Commit 1e48acba authored by Ralf Habacker's avatar Ralf Habacker

Fix 'Java enum association fails'.

To fix this issue an associaton rule to allow associations between
enums for java language has been added.

BUG:131591
FIXED-IN: 2.21.80 (KDE Applications 17.03.80)
parent 2d0b04c9
......@@ -415,6 +415,7 @@ AssocRules::Assoc_Rule AssocRules::m_AssocRules[] = {
{ All, Uml::AssociationType::Association, WidgetBase::wt_Interface, WidgetBase::wt_Artifact, true, false, false, false },
{ All, Uml::AssociationType::Association, WidgetBase::wt_Node, WidgetBase::wt_Node, true, false, false, false },
{ All, Uml::AssociationType::Association, WidgetBase::wt_Node, WidgetBase::wt_Node, true, false, false, false },
{Java, Uml::AssociationType::Association, WidgetBase::wt_Enum, WidgetBase::wt_Enum, true, false, false, false },
{ All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Class, WidgetBase::wt_Class, true, true, true, true },
{ All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Object, WidgetBase::wt_Object, true, true, true, true },
{ All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Interface, WidgetBase::wt_Interface, true, true, true, true },
......@@ -533,6 +534,8 @@ bool AssocRules::Assoc_Rule::isValid() const
{
if (language == All)
return true;
else if (language == Java && UMLApp::app()->activeLanguage() == Uml::ProgrammingLanguage::Java)
return true;
else
return false;
}
......@@ -41,7 +41,7 @@ public:
static Uml::AssociationType::Enum isGeneralisationOrRealisation(UMLWidget* widgetA, UMLWidget* widgetB);
typedef enum {All} Language;
typedef enum {All, Java} Language;
private:
class Assoc_Rule { ///< Structure to help determine association rules.
......
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