diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e5b08aea..159e82f54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,247 +1,251 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) project(umbrello) # KDE Application Version, managed by release script set (KDE_APPLICATIONS_VERSION_MAJOR "19") set (KDE_APPLICATIONS_VERSION_MINOR "11") set (KDE_APPLICATIONS_VERSION_MICRO "70") set(UMBRELLO_VERSION_MAJOR "2") -MATH(EXPR UMBRELLO_VERSION_MINOR "37-${KDE_APPLICATIONS_VERSION_MINOR}") +set(UMBRELLO_VERSION_MINOR "29") +if (KDE_APPLICATIONS_VERSION_MICRO GREATER_EQUAL 70) + math(EXPR UMBRELLO_VERSION_MINOR "${UMBRELLO_VERSION_MINOR}-1") +endif() + set(UMBRELLO_VERSION_PATCH ${KDE_APPLICATIONS_VERSION_MICRO}) option(BUILD_ICONS "Create icons from svg source" OFF) option(BUILD_CURSOR_ICONS "Create cursor icons from svg source" OFF) option(BUILD_ICONS_INTO_SIZE_RELATED_DIRS "place icons into separate directories (for debugging purpose)" OFF) option(BUILD_KF5 "Build for KDE Frameworks 5" ON) option(BUILD_PHP_IMPORT "Build with php import support" ON) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) include(Macros) set(CMAKE_AUTORCC ON) if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks") # TODO: after removing kdelibs4support this could also be removed set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() if(NOT BUILD_KF5) set(APP_SUFFIX) set(LIB_PREFIX Qt4::Qt) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) include(ECMKDE4Macros) set(QT_MIN_VERSION "4.8.0") set(KDEV_MIN_VERSION 1.7.3) set(KDEV_SOURCE_DIR lib/kdev4-php) set(KDEV_COMPONENTS) else() set(APP_SUFFIX 5) set(LIB_PREFIX Qt5::) # we need some parts of the ECM CMake helpers find_package(ECM 1.1.0 REQUIRED NO_MODULE) list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(FeatureSummary) include(ECMInstallIcons) include(ECMSetupVersion) include(ECMOptionalAddSubdirectory) include(ECMAddAppIcon) include(ECMAddTests) set(QT_MIN_VERSION "5.2.0") set(KDEV_MIN_VERSION 5.1.2) set(KDEV_SOURCE_DIR lib/kdev5-php) set(KDEV_COMPONENTS KDev::Interfaces KDev::Language KDev::Tests) endif() # search packages used by Qt find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Gui PrintSupport Svg Test Widgets Xml WebKitWidgets ) # search packages used by KDE find_package(KF5 REQUIRED COMPONENTS Archive Completion Config CoreAddons Crash DocTools I18n IconThemes KDELibs4Support KIO TextEditor WidgetsAddons WindowSystem XmlGui ) if(BUILD_PHP_IMPORT) find_package(KDevelop-PG-Qt) find_package(KDevPlatform ${KDEV_MIN_VERSION} COMPONENTS ${KDEV_COMPONENTS}) endif() if(BUILD_KF5 AND NOT TARGET KDev::Tests) message(STATUS "Could not find required KDevPlatform component KDev::Tests - disabling php import support") set(KDEVPLATFORM_FOUND 0) set(BUILD_PHP_IMPORT 0) endif() if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND) message(STATUS "requirements available - enable building php code import") include_directories( ${KDEVPGQT_INCLUDE_DIR} ${KDEVPLATFORM_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/${KDEV_SOURCE_DIR}/parser ${CMAKE_BINARY_DIR}/${KDEV_SOURCE_DIR}/parser ) set(NO_INSTALL 1) set(BUILD_PARSER_ONLY 1) set(BUILD_PHP_IMPORT 1) add_definitions( -DKDEVPHPPARSER_EXPORT= -DENABLE_PHP_IMPORT ) add_subdirectory(${KDEV_SOURCE_DIR}) else() set(BUILD_PHP_IMPORT 0) endif() set(UMBRELLO_DATA_INSTALL_DIR ${DATA_INSTALL_DIR}/umbrello${APP_SUFFIX}) if(NOT BUILD_KF5) macro_display_feature_log() KDE4_NO_ENABLE_FINAL(umbrello) else() set(BUILD_UNITTESTS 1) ki18n_install(po) kdoctools_install(po) endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 OLD) endif() # use some compile flags add_definitions( -DQT_NO_SIGNAL_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING ) # set default umbrello version # umbrello version could be overridden by cmake command line using -DUMBRELLO_VERSION_STRING=major.minor.patch if(NOT UMBRELLO_VERSION_STRING) set(UMBRELLO_VERSION_STRING "${UMBRELLO_VERSION_MAJOR}.${UMBRELLO_VERSION_MINOR}.${UMBRELLO_VERSION_PATCH}") if(EXISTS ${CMAKE_SOURCE_DIR}/.git) execute_process( COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE _hash ) if(_hash) string(REPLACE "\n" "" hash ${_hash}) set(UMBRELLO_VERSION_STRING "${UMBRELLO_VERSION_STRING}-${hash}") endif() endif() endif() message(STATUS "Using umbrello version ${UMBRELLO_VERSION_STRING}") add_definitions(-DUMBRELLO_VERSION_STRING="${UMBRELLO_VERSION_STRING}") message(STATUS "Using automoc4 version ${AUTOMOC4_VERSION}") message(STATUS "Using cmake version ${CMAKE_VERSION}") message(STATUS "Using Qt version ${QTVERSION}") find_package(LibXslt) set_package_properties(LibXslt PROPERTIES DESCRIPTION "A library to transform XMLfiles into other XML files." URL "http://xmlsoft.org/XSLT" TYPE REQUIRED) find_package(LibXml2) set_package_properties(LibXml2 PROPERTIES DESCRIPTION "Libraries used to develop XML applications." URL "http://xmlsoft.org" TYPE REQUIRED) include_directories( ${CMAKE_BINARY_DIR} ) # # Unstable features should not be enabled in stable branches # This macro limits unstable feature to development branches # by only adding -DENABLE_ to the compile command when # the patch level is >= 70 which includes releases from master # beta and rc releases. On cmake configure time a related status # note is displayed. # # syntax: add_unstable_feature() # # In code wrap feature related code with # # #ifdef ENABLE_ # # #endif # macro(add_unstable_feature name) if(UMBRELLO_VERSION_PATCH GREATER 69) add_definitions(-DENABLE_${name}) set(ENABLE_${name} 1) message(STATUS "Enable unstable feature ${name} - use '#ifdef ENABLE_${name}' in related code") else() set(ENABLE_${name} 0) message(STATUS "Disable unstable feature ${name}") endif() endmacro(add_unstable_feature) add_unstable_feature(WIDGET_SHOW_DOC) # show documentation in classes ticket xxx add_unstable_feature(NEW_CODE_GENERATORS) # new c++ code generator add_unstable_feature(UML_OBJECTS_WINDOW) # objects dock window add_unstable_feature(XMIRESOLUTION) # see https://bugs.kde.org/show_bug.cgi?id=90103 # Current object diagram implementation does not follow UML 1.4 standard # because of using umbrello specific XMI tag (UML:InstanceAttribute). add_unstable_feature(OBJECT_DIAGRAM) # see https://bugs.kde.org/show_bug.cgi?id=123633 configure_file(Doxyfile ${CMAKE_BINARY_DIR}/Doxyfile) find_program(DOXYGEN_EXECUTABLE doxygen) if(DOXYGEN_EXECUTABLE) add_custom_target(apidoc COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile ) endif() if(LIBXSLT_FOUND AND LIBXML2_FOUND) add_subdirectory(umbrello) add_subdirectory(doc) add_subdirectory(tools) endif(LIBXSLT_FOUND AND LIBXML2_FOUND) add_subdirectory(maintainer) # for automatic unit tests if(BUILD_UNITTESTS) ecm_optional_add_subdirectory(unittests) endif() feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/umbrello/assocrules.cpp b/umbrello/assocrules.cpp index f583fa880..ff62e8e05 100644 --- a/umbrello/assocrules.cpp +++ b/umbrello/assocrules.cpp @@ -1,543 +1,543 @@ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * copyright (C) 2002-2014 * * Umbrello UML Modeller Authors * ***************************************************************************/ // own header #include "assocrules.h" // local includes #include "debug_utils.h" #include "uml.h" #include "umlview.h" #include "umlwidget.h" #include "umlobject.h" #include "associationwidgetlist.h" #include "associationwidget.h" #include "statewidget.h" #include "activitywidget.h" #include "signalwidget.h" #include "forkjoinwidget.h" #include "umlscene.h" #include "umllistview.h" // kde includes #include #include /** * Constructor. */ AssocRules::AssocRules() { } /** * Destructor. */ AssocRules::~AssocRules() { } /** * Returns whether an association is going to be allowed for the given * values. This method is used to test if you can start an association. */ bool AssocRules::allowAssociation(Uml::AssociationType::Enum assocType, UMLWidget * widget) { WidgetBase::WidgetType widgetType = widget->baseType(); bool bValid = false; for (int i = 0; i < m_nNumRules; ++i) { const Assoc_Rule& rule = m_AssocRules[i]; if (!rule.isValid()) continue; if (assocType != rule.assoc_type) continue; if (widgetType == rule.widgetA_type || (widgetType == rule.widgetB_type && rule.bidirectional)) { bValid = true; break; } } if(!bValid) { // Special case: Subsystem realizes interface in component diagram UMLView *view = UMLApp::app()->currentView(); if (view && view->umlScene()->type() == Uml::DiagramType::Component && widgetType == WidgetBase::wt_Package && (assocType == Uml::AssociationType::Generalization || assocType == Uml::AssociationType::Realization)) ; else return false; } AssociationWidgetList list = widget->associationWidgetList(); switch(assocType) { case Uml::AssociationType::Association: case Uml::AssociationType::UniAssociation: case Uml::AssociationType::Dependency: case Uml::AssociationType::Coll_Message_Synchronous: case Uml::AssociationType::Coll_Message_Asynchronous: case Uml::AssociationType::Generalization://can have many sub/super types case Uml::AssociationType::Aggregation: case Uml::AssociationType::Relationship: case Uml::AssociationType::Composition: case Uml::AssociationType::Containment: return true;//doesn't matter whats already connected to widget break; case Uml::AssociationType::Association_Self: return true;// we should really check that connection is to same object break; case Uml::AssociationType::Realization: // one connected to widget only (a or b) foreach (AssociationWidget* assoc, list) { if(assoc->associationType() == Uml::AssociationType::Realization) return false; } return true; break; case Uml::AssociationType::State: { StateWidget *pState = widget->asStateWidget(); return (pState == 0 || pState->stateType() != StateWidget::End); } break; case Uml::AssociationType::Activity: case Uml::AssociationType::Exception: { ActivityWidget *pActivity = widget->asActivityWidget(); return (pActivity == 0 || pActivity->activityType() != ActivityWidget::End); } break; case Uml::AssociationType::Anchor: return true; break; case Uml::AssociationType::Category2Parent: if (widgetType == WidgetBase::wt_Category) return true; break; case Uml::AssociationType::Child2Category: if (widgetType == WidgetBase::wt_Entity) return true; break; default: uWarning() << "allowAssociation() on unknown type"; break; } return false; } /** * Returns whether an association is valid with the given variables. * This method is used to finish an association. * When we know what we are going to connect both ends of the association to, we can * use this method. */ bool AssocRules::allowAssociation(Uml::AssociationType::Enum assocType, UMLWidget * widgetA, UMLWidget * widgetB) { WidgetBase::WidgetType widgetTypeA = widgetA->baseType(); WidgetBase::WidgetType widgetTypeB = widgetB->baseType(); bool bValid = false; if (widgetA->umlObject() && widgetA->umlObject() == widgetB->umlObject()) { return allowSelf(assocType, widgetTypeA); } for (int i = 0; i < m_nNumRules; ++i) { const Assoc_Rule& rule = m_AssocRules[i]; if (!rule.isValid()) continue; if (assocType != rule.assoc_type) continue; if ((widgetTypeA == rule.widgetA_type && widgetTypeB == rule.widgetB_type) || (rule.bidirectional && widgetTypeB == rule.widgetA_type && widgetTypeA == rule.widgetB_type)) { bValid = true; break; } } if (!bValid) { return false; } //Prevent against a package containing its own parent! #packageception. if (assocType == Uml::AssociationType::Containment) { UMLListViewItem* listItemA = UMLApp::app()->listView()->findUMLObject(widgetA->umlObject()); UMLListViewItem* listItemB = UMLApp::app()->listView()->findUMLObject(widgetB->umlObject()); if (listItemA && listItemB) { // Great, we have our listviewitems, now check to make sure that they don't become recursive. if (listItemA->parent() == static_cast(listItemB)) { // The user is trying to make the parent the child and the child the parent. Stop them! return false; } } // This was just a little assertion for safety, don't return yet! } AssociationWidgetList list = widgetB->associationWidgetList(); switch(assocType) { case Uml::AssociationType::Association_Self: if (widgetA->umlObject() == widgetB->umlObject()) return true; break; case Uml::AssociationType::Association: case Uml::AssociationType::UniAssociation: case Uml::AssociationType::Dependency: case Uml::AssociationType::Coll_Message_Synchronous: case Uml::AssociationType::Coll_Message_Asynchronous: case Uml::AssociationType::Aggregation: case Uml::AssociationType::Relationship: return true; // doesn't matter what's already connected to widget break; case Uml::AssociationType::Composition: case Uml::AssociationType::Containment: return true; break; case Uml::AssociationType::Generalization://can have many sub/super types but can't sup/sub each foreach (AssociationWidget * assoc, list) { if((widgetA == assoc->widgetForRole(Uml::RoleType::A) || widgetA == assoc->widgetForRole(Uml::RoleType::B)) && assoc->associationType() == assocType) return false; } return true; break; case Uml::AssociationType::Realization: // can only connect to abstract (interface) classes foreach(AssociationWidget * assoc, list) { if((widgetA == assoc->widgetForRole(Uml::RoleType::A) || widgetA == assoc->widgetForRole(Uml::RoleType::B)) && assoc->associationType() == Uml::AssociationType::Realization) { return false; } } if (widgetB->isClassWidget()) { return widgetB->umlObject()->isAbstract(); } else if (widgetB->isInterfaceWidget() || widgetB->isPackageWidget()) { return true; } break; case Uml::AssociationType::State: { StateWidget *stateA = widgetA->asStateWidget(); StateWidget *stateB = widgetB->asStateWidget(); if (stateA && stateB) { if (stateB->stateType() == StateWidget::Initial) return false; if (stateB->stateType() == StateWidget::End && stateA->stateType() != StateWidget::Normal) return false; } } return true; break; case Uml::AssociationType::Activity: case Uml::AssociationType::Exception: { ActivityWidget *actA = widgetA->asActivityWidget(); ActivityWidget *actB = widgetB->asActivityWidget(); bool isSignal = false; bool isObjectNode = false; if (widgetTypeA == WidgetBase::wt_Signal) isSignal = true; else if (widgetTypeA == WidgetBase::wt_ObjectNode) isObjectNode = true; // no transitions to initial activity allowed if (actB && actB->activityType() == ActivityWidget::Initial) { return false; } // actType -1 here means "not applicable". int actTypeA = -1; if (actA) actTypeA = actA->activityType(); int actTypeB = -1; if (actB) actTypeB = actB->activityType(); // only from a signalwidget a objectnode widget, a normal activity, branch or fork activity, to the end if ((actTypeB == ActivityWidget::End || actTypeB == ActivityWidget::Final) && actTypeA != ActivityWidget::Normal && actTypeA != ActivityWidget::Branch && widgetA->asForkJoinWidget() == 0 && !isSignal &&!isObjectNode) { return false; } // only Forks and Branches can have more than one "outgoing" transition if (actA != 0 && actTypeA != ActivityWidget::Branch) { AssociationWidgetList list = widgetA->associationWidgetList(); foreach (AssociationWidget* assoc, list) { if (assoc->widgetForRole(Uml::RoleType::A) == widgetA) { return false; } } } } return true; break; case Uml::AssociationType::Anchor: return true; break; case Uml::AssociationType::Category2Parent: if (widgetTypeA == WidgetBase::wt_Category && widgetTypeB == WidgetBase::wt_Entity) { return true; } break; case Uml::AssociationType::Child2Category: if (widgetTypeA == WidgetBase::wt_Entity && widgetTypeB == WidgetBase::wt_Category) { return true; } break; default: uWarning() << "allowAssociation() on unknown type"; break; } return false; } /** * Returns whether to allow a role text for the given association type. */ bool AssocRules::allowRole(Uml::AssociationType::Enum assocType) { for(int i = 0; i < m_nNumRules; ++i) { const Assoc_Rule& rule = m_AssocRules[i]; if (!rule.isValid()) continue; if(assocType == rule.assoc_type) return rule.role; } return false; } /** * Returns whether to allow a multiplicity text for the given * association and widget type. */ bool AssocRules::allowMultiplicity(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType) { for(int i = 0; i < m_nNumRules; ++i) { const Assoc_Rule& rule = m_AssocRules[i]; if (!rule.isValid()) continue; if(assocType == rule.assoc_type) if(widgetType == rule.widgetA_type || widgetType == rule.widgetB_type) return rule.multiplicity; } return false; } /** * Returns whether to allow an association to self for given variables. */ bool AssocRules::allowSelf(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType) { for(int i = 0; i < m_nNumRules; ++i) { const Assoc_Rule& rule = m_AssocRules[i]; if (!rule.isValid()) continue; if(assocType == rule.assoc_type) if(widgetType == rule.widgetA_type || widgetType == rule.widgetB_type) return rule.self; } return false; } /** * Returns whether an implements association should be a Realisation or * a Generalisation. * as defined in m_AssocRules. */ Uml::AssociationType::Enum AssocRules::isGeneralisationOrRealisation(UMLWidget* widgetA, UMLWidget* widgetB) { WidgetBase::WidgetType widgetTypeA = widgetA->baseType(); WidgetBase::WidgetType widgetTypeB = widgetB->baseType(); for (int i = 0; i < m_nNumRules; ++i) { const Assoc_Rule &rule = m_AssocRules[i]; if (!rule.isValid()) continue; if (rule.assoc_type == Uml::AssociationType::Realization && widgetTypeA == rule.widgetA_type && widgetTypeB == rule.widgetB_type) { return Uml::AssociationType::Realization; } } return Uml::AssociationType::Generalization; } AssocRules::Assoc_Rule AssocRules::m_AssocRules[] = { // Language Association widgetA widgetB role multi bidir. self //----+---------------------------------------+--------------------------+---------------------------+-------+-------+-------+-------- { All, Uml::AssociationType::Association_Self, WidgetBase::wt_Class, WidgetBase::wt_Class, true, true, true, true }, { All, Uml::AssociationType::Association_Self, WidgetBase::wt_Object, WidgetBase::wt_Object, true, true, true, true }, { All, Uml::AssociationType::Association_Self, WidgetBase::wt_Interface, WidgetBase::wt_Interface, true, true, true, true }, { All, Uml::AssociationType::Association, WidgetBase::wt_Class, WidgetBase::wt_Class, true, true, true, true }, { All, Uml::AssociationType::Association, WidgetBase::wt_Object, WidgetBase::wt_Object, true, true, true, true }, { All, Uml::AssociationType::Association, WidgetBase::wt_Instance, WidgetBase::wt_Instance, true, true, true, true }, { All, Uml::AssociationType::Association, WidgetBase::wt_Interface, WidgetBase::wt_Interface, true, true, true, true }, { All, Uml::AssociationType::Association, WidgetBase::wt_Class, WidgetBase::wt_Interface, true, true, true, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Class, WidgetBase::wt_Datatype, true, true, true, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Class, WidgetBase::wt_Enum, true, true, true, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Actor, WidgetBase::wt_UseCase, true, false, false, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_UseCase, WidgetBase::wt_UseCase, true, false, false, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Actor, WidgetBase::wt_Actor, true, false, false, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Actor, WidgetBase::wt_UseCase, true, false, false, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Component, WidgetBase::wt_Interface, true, false, false, false }, { All, Uml::AssociationType::Association, WidgetBase::wt_Port, WidgetBase::wt_Interface, true, false, false, false }, { 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 }, + {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 }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Class, WidgetBase::wt_Interface, true, true, true, true }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Class, WidgetBase::wt_Datatype, true, true, true, true }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Class, WidgetBase::wt_Enum, true, true, true, true }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Actor, WidgetBase::wt_Actor, true, false, false, false }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_UseCase, WidgetBase::wt_UseCase, true, false, false, false }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_UseCase, WidgetBase::wt_Actor, true, false, false, false }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Component, WidgetBase::wt_Interface, true, false, false, false }, - { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Component, WidgetBase::wt_Artifact, true, false, true, false }, + { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Component, WidgetBase::wt_Artifact, true, false, true, false }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Port, WidgetBase::wt_Interface, true, false, false, false }, { All, Uml::AssociationType::UniAssociation, WidgetBase::wt_Node, WidgetBase::wt_Node, true, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_Class, WidgetBase::wt_Datatype, false, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_Class, WidgetBase::wt_Class, false, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_Interface, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_Interface, WidgetBase::wt_Class, false, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_UseCase, WidgetBase::wt_UseCase, false, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_Actor, WidgetBase::wt_Actor, false, false, false, false }, { All, Uml::AssociationType::Generalization, WidgetBase::wt_Component, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Aggregation, WidgetBase::wt_Class, WidgetBase::wt_Class, true, true, false, true }, { All, Uml::AssociationType::Aggregation, WidgetBase::wt_Class, WidgetBase::wt_Interface, true, true, false, false }, { All, Uml::AssociationType::Aggregation, WidgetBase::wt_Class, WidgetBase::wt_Enum, true, true, false, false }, { All, Uml::AssociationType::Aggregation, WidgetBase::wt_Class, WidgetBase::wt_Datatype, true, true, false, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Class, true, false, false, true }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_UseCase, WidgetBase::wt_UseCase, true, false, false, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Actor, WidgetBase::wt_Actor, true, false, false, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Actor, WidgetBase::wt_UseCase, true, false, false, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Package, WidgetBase::wt_Package, true, true, true, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Package, true, true, true, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Interface, WidgetBase::wt_Package, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Package, WidgetBase::wt_Package, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Package, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Interface, WidgetBase::wt_Package, true, true, true, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Interface, WidgetBase::wt_Interface, true, true, true, true }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Interface, true, true, true, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Datatype, true, true, true, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Enum, true, true, true, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Interface, WidgetBase::wt_Enum, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Interface, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Datatype, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Class, WidgetBase::wt_Enum, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Interface, WidgetBase::wt_Enum, true, true, true, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Component, WidgetBase::wt_Component, true, true, true, true }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Component, WidgetBase::wt_Interface, true, true, true, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Component, WidgetBase::wt_Artifact, true, false, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Component, WidgetBase::wt_Interface, true, true, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Component, WidgetBase::wt_Artifact, true, false, true, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Component, WidgetBase::wt_Package, true, false, false, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Port, WidgetBase::wt_Interface, true, false, false, false }, - { All, Uml::AssociationType::Dependency, WidgetBase::wt_Package, WidgetBase::wt_Artifact, true, false, true, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Port, WidgetBase::wt_Interface, true, false, false, false }, + { All, Uml::AssociationType::Dependency, WidgetBase::wt_Package, WidgetBase::wt_Artifact, true, false, true, false }, { All, Uml::AssociationType::Dependency, WidgetBase::wt_Node, WidgetBase::wt_Node, true, false, false, false }, { All, Uml::AssociationType::Realization, WidgetBase::wt_Class, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Realization, WidgetBase::wt_Interface, WidgetBase::wt_Package, false, false, false, false }, { All, Uml::AssociationType::Realization, WidgetBase::wt_Interface, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Realization, WidgetBase::wt_Component, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Realization, WidgetBase::wt_Package, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Composition, WidgetBase::wt_Class, WidgetBase::wt_Class, true, true, false, true }, { All, Uml::AssociationType::Composition, WidgetBase::wt_Interface, WidgetBase::wt_Interface, true, true, false, false }, { All, Uml::AssociationType::Composition, WidgetBase::wt_Class, WidgetBase::wt_Interface, true, true, false, false }, { All, Uml::AssociationType::Composition, WidgetBase::wt_Class, WidgetBase::wt_Enum, true, true, false, false }, { All, Uml::AssociationType::Composition, WidgetBase::wt_Class, WidgetBase::wt_Datatype, false, false, false, false }, { All, Uml::AssociationType::Composition, WidgetBase::wt_Class, WidgetBase::wt_Class, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Package, WidgetBase::wt_Class, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Package, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Package, WidgetBase::wt_Enum, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Package, WidgetBase::wt_Datatype, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Package, WidgetBase::wt_Package, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Package, WidgetBase::wt_Component, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Class, WidgetBase::wt_Class, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Class, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Class, WidgetBase::wt_Enum, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Class, WidgetBase::wt_Datatype, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Interface, WidgetBase::wt_Class, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Interface, WidgetBase::wt_Interface, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Interface, WidgetBase::wt_Enum, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Interface, WidgetBase::wt_Datatype, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Component, WidgetBase::wt_Component, false, false, false, false }, { All, Uml::AssociationType::Containment, WidgetBase::wt_Component, WidgetBase::wt_Artifact, false, false, false, false }, { All, Uml::AssociationType::Coll_Message_Synchronous, WidgetBase::wt_Object, WidgetBase::wt_Object, true, false, true, true }, { All, Uml::AssociationType::Coll_Message_Asynchronous, WidgetBase::wt_Object, WidgetBase::wt_Object, true, false, true, true }, { All, Uml::AssociationType::State, WidgetBase::wt_State, WidgetBase::wt_State, true, false, true, true }, { All, Uml::AssociationType::State, WidgetBase::wt_ForkJoin, WidgetBase::wt_State, true, false, true, true }, { All, Uml::AssociationType::State, WidgetBase::wt_State, WidgetBase::wt_ForkJoin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Signal, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Activity, WidgetBase::wt_Signal, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_ObjectNode, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Activity, WidgetBase::wt_ObjectNode, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Activity, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_ForkJoin, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Activity, WidgetBase::wt_ForkJoin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Signal, WidgetBase::wt_ForkJoin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_ForkJoin, WidgetBase::wt_Signal, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_ForkJoin, WidgetBase::wt_ObjectNode, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_ObjectNode, WidgetBase::wt_ForkJoin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Pin, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Pin, WidgetBase::wt_Pin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Activity, WidgetBase::wt_Pin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_Pin, WidgetBase::wt_ForkJoin, true, false, true, true }, { All, Uml::AssociationType::Activity, WidgetBase::wt_ForkJoin, WidgetBase::wt_Pin, true, false, true, true }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Activity, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Actor, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Artifact, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Class, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Component, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Datatype, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Entity, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Enum, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Interface, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Message, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Object, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_Package, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_State, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Anchor, WidgetBase::wt_UseCase, WidgetBase::wt_Note, false, false, true, false }, { All, Uml::AssociationType::Relationship, WidgetBase::wt_Entity, WidgetBase::wt_Entity, true, true, true, true }, { All, Uml::AssociationType::Exception, WidgetBase::wt_Activity, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Exception, WidgetBase::wt_Activity, WidgetBase::wt_Signal, true, false, true, true }, { All, Uml::AssociationType::Exception, WidgetBase::wt_Signal, WidgetBase::wt_Activity, true, false, true, true }, { All, Uml::AssociationType::Exception, WidgetBase::wt_Signal, WidgetBase::wt_Signal, true, false, true, true }, { All, Uml::AssociationType::Category2Parent, WidgetBase::wt_Category, WidgetBase::wt_Entity, false, false, true, false }, { All, Uml::AssociationType::Child2Category, WidgetBase::wt_Entity, WidgetBase::wt_Category, false, false, true, false } }; int AssocRules::m_nNumRules = sizeof(m_AssocRules) / sizeof(AssocRules::Assoc_Rule); 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; }