Commit 11f59ca7 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

php5 generator fix: Hide misleading warning when using single inheritance and...

php5 generator fix: Hide misleading warning when using single inheritance and multiple implementations which is supported by php5.

CCBUG:336889
parent b10cdc25
......@@ -3049,7 +3049,7 @@ void Php5Writer::writeClass(UMLClassifier *c)
php << " */" << m_endl ;
}
UMLClassifierList superclasses = c->getSuperClasses();
UMLClassifierList superclasses = c->getSuperClasses(false);
UMLAssociationList aggregations = c->getAggregations();
UMLAssociationList compositions = c->getCompositions();
UMLAssociationList realizations = c->getRealizations();
......
......@@ -354,9 +354,10 @@ UMLAssociationList UMLCanvasObject::getAssociations()
* TODO: This overlaps with UMLClassifier::findSuperClassConcepts(),
* see if we can merge the two.
*
* @param withRealizations include realizations in the returned list (default=yes)
* @return The list of superclasses for the concept.
*/
UMLClassifierList UMLCanvasObject::getSuperClasses()
UMLClassifierList UMLCanvasObject::getSuperClasses(bool withRealizations)
{
UMLClassifierList list;
UMLAssociationList assocs = getAssociations();
......@@ -364,6 +365,7 @@ UMLClassifierList UMLCanvasObject::getSuperClasses()
uIgnoreZeroPointer(a);
if ((a->getAssocType() != Uml::AssociationType::Generalization &&
a->getAssocType() != Uml::AssociationType::Realization) ||
(!withRealizations && a->getAssocType() == Uml::AssociationType::Realization) ||
a->getObjectId(Uml::RoleType::A) != id())
continue;
UMLClassifier *c = dynamic_cast<UMLClassifier*>(a->getObject(Uml::RoleType::B));
......
......@@ -59,7 +59,7 @@ public:
UMLAssociationList getSpecificAssocs(Uml::AssociationType::Enum assocType);
UMLClassifierList getSuperClasses();
UMLClassifierList getSuperClasses(bool withRealizations = true);
UMLClassifierList getSubClasses();
virtual UMLAssociationList getRealizations();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment