1. 16 Jun, 2014 1 commit
  2. 15 Jun, 2014 1 commit
    • Oliver Kellogg's avatar
      Preparation of PortWidget for factoring of abstract base class shared with · cd1979ae
      Oliver Kellogg authored
      PinWidget (see "BTW" at https://bugs.kde.org/show_bug.cgi?id=335399#c1)
      
      umbrello/widgets/portwidget.{h,cpp}
      - New function ownerWidget() encapsulates extraction of owning
        ComponentWidget.
        Motivation: Implementation will be different for PinWidget.
      - Rename function attachToOwningComponent() to attachToOwner().
        Motivation: Prepare for applicability to PinWidget (owner of PinWidget is
        not a ComponentWidget).
      - Rename function slotCompMoved() to slotOwnerMoved().
        Motivation: Prepare for applicability to PinWidget.
      - In C++ body, replace mentions of m_umlObject->name() by name().
        Motivation: Prepare for common base class (m_umlObject of PinWidget is
        always NULL).
      
      umbrello/umlscene.cpp
      - Adapt function setupNewWidget() to renamed PortWidget function
        attachToOwner().
      cd1979ae
  3. 14 Jun, 2014 7 commits
    • Oliver Kellogg's avatar
      Permit creation of ports using toolbar for component diagram: · f8d4dbf7
      Oliver Kellogg authored
      umbrello/widgets/toolbarstateonewidget.cpp
      - In function mouseReleaseWidget() admit
          currentWidget()->baseType() == WidgetBase::wt_Component
        to the call of setWidget(currentWidget())
      - In function setWidget() handling of widgetType() == WidgetBase::wt_Pin,
        add handling of m_firstObject->baseType() == WidgetBase::wt_Component:
        - Open a dialog querying the user for a new port name
        - If user confirmed port creation then
          - Let Object_Factory create a UML Port object of given name.
            The object is owned by the UML Component underlying m_firstObject.
          - Let Widget_Factory create a PortWidget representing the UML Port and
            assign this widget to `umlwidget'.
      
      umbrello/worktoolbar.cpp
      - In function slotCheckToolBar(Uml::DiagramType::Enum) switch (m_Type) case
        Uml::DiagramType::Component, insertHotBtn(tbb_Pin).
        tbb_Pin is reused for ports.
      
      umbrello/widgets/portwidget.cpp
      - In function attachToOwningComponent() prevent the port from being dropped
        underneath its owning component (thus becoming inaccessible).
        This is achieved as follows:
        If scenePos.x() is in the range
          [ owner->x() : owner->x() + owner->width() ]
        and scenePos.y() is in the range
          [ owner->y() : owner->y() + owner->height() ]
        then
          if scenePos.y() is in the top half of owner then
            setY(owner->y() - height())
          else
            setY(owner->y() + owner->height())
      
      CCBUG:115269
      f8d4dbf7
    • Oliver Kellogg's avatar
      ed9a487b
    • Oliver Kellogg's avatar
      Followup to commit b61d3ab7 (moving management of widget owned floating text · 0f47f8fc
      Oliver Kellogg authored
      from UMLScene to the owning widget)
      
      umbrello/widgets/umlwidget.{h,cpp}
      - New virtual function widgetWithID() returns 'this' if given id matches
        either of m_nLocalID, m_umlObject->id(), or m_nId; else returns NULL.
        The intention is that child classes of UMLWidget may reimplement this
        function in order to test the id against their child widgets.
      
      umbrello/widgets/portwidget.{h,cpp}
      - Reimplement UMLWidget function widgetWithID() to additionally check
        m_pName.
      - In function slotMenuSelection() case ListPopupMenu::mt_NameAsTooltip,
        - If m_pName is non NULL then do not call m_scene->removeWidget(m_pName).
          Reason: m_pName is now entirely managed by PortWidget.
        - If m_pName is NULL then after assigning a new FloatingTextWidget to
          m_pName call m_pName->setParentItem(this).
          This completes the switchover of m_pName management from UMLScene.
          Further, this means that m_pName position is no longer relative to
          UMLScene but instead is now relative to its owning PortWidget.
          Adjust m_pName X/Y computations accordingly.
      - In function setFloatingTextWidget(), m_pName->setParentItem(this) if
        m_pName is non NULL.
      - In function loadFromXMI(),
        - Remove loading of attribute "textid";
        - If m_pName->loadFromXMI() returns with success then call
          m_pName->setParentItem(this).
      - In function saveToXMI(), remove saving of attribute "textid".
      
      umbrello/umlscene.{h,cpp}
      - In function widgetOnDiagram(),
        - in foreach loop over m_WidgetList, call obj->widgetWithID(id) instead
          of direct comparison (id == obj->id())
        - in foreach loop over m_MessageList, add TODO note about checking whether
          MessageWidget should reimplement widgetWithID()
      - In function findWidget(),
        - in foreach loop over m_WidgetList, replace special casing of wt_Object
          and direct comparison (id == obj->id()) by call to obj->widgetWithID(id)
        - in foreach loop over m_MessageList, add TODO note about checking whether
          MessageWidget should reimplement widgetWithID()
      - Remove function findWidgetByLocalId(); due to above change it is redundant
        to findWidget().
      
      umbrello/cmds/widget/cmd_baseWidgetCommand.cpp
      umbrello/cmds/widget/cmd_createWidget.cpp
      umbrello/cmds/widget/cmd_removeWidget.cpp
      - In function redo() call umlScene->findWidget() in lieu of
        umlScene->findWidgetByLocalId() which was removed.
      
      umbrello/widgets/floatingtextwidget.{h,cpp}
      - Reimplement UMLWidget function onWidget() to additionally check PortWidget
        parentage.
      - In function setText(), avoid calling m_linkWidget->seqNumAndOp() when
        m_linkWidget is NULL.
      - In function loadFromXMI(), call setText() instead of directly assigning
        m_Text in order to achieve geometry update. (To be checked.)
      - Fix spelling at bool usefulWidget.
      - In function saveToXMI(), return immediately if isEmpty() returns true.
      
      umbrello/widgets/pinwidget.cpp
      - In function loadFromXMI(), add TODO note about removing the code for
        loading "textid".
      
      umbrello/version.h
      - Increment XMI_FILE_VERSION due to changes in function saveToXMI() of
        FloatingTextWidget and PortWidget.
      0f47f8fc
    • Oliver Kellogg's avatar
      umbrello/widgets/messagewidget.cpp · 7e997587
      Oliver Kellogg authored
      - In function setY() do not emit sigMessageMoved() if
        UMLApp::app()->document()->loading()
      
      umbrello/widgets/objectwidget.cpp
      - In function setY() do not moveEvent(0) if
        UMLApp::app()->document()->loading()
      
      BUG:336201
      7e997587
    • Oliver Kellogg's avatar
      umbrello/widgets/umlwidget.{h,cpp} · b61d3ab7
      Oliver Kellogg authored
      - Change return type of virtual function onWidget() from bool to UMLWidget*.
        This is one of the steps for moving management of widget-owned floating
        texts from UMLScene to the owning widget.
      
      umbrello/widgets/messagewidget.{h,cpp}
      - Adapt reimplemented function onWidget() to changed return type.
      
      umbrello/widgets/pinwidget.{h,cpp}
      umbrello/widgets/portwidget.{h,cpp}
      - Reimplement UMLWidget::onWidget() in order to additionally check m_pName.
      
      umbrello/umlscene.cpp
      - Adapt function widgetAt() to changed return type of UMLWidget::onWidget().
      b61d3ab7
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      umbrello/object_factory.cpp · e3a161a5
      Oliver Kellogg authored
      - Revert commit 13cce915. I overlooked the UMLObject constructor
        explicit UMLObject(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
        which means that calling UMLObject() is _not_ calling a default constructor.
      e3a161a5
  4. 13 Jun, 2014 1 commit
    • Oliver Kellogg's avatar
      umbrello/object_factory.cpp · 13cce915
      Oliver Kellogg authored
      - In function makeObjectFromXMI(), call setBaseType() on newly constructed
        pObject. Reason: default constructors do not set UMLObject::m_BaseType.
      13cce915
  5. 12 Jun, 2014 1 commit
  6. 11 Jun, 2014 1 commit
  7. 09 Jun, 2014 5 commits
    • Ralf Habacker's avatar
      Rename uml_p.h to umlappprivate.h to reflect class name. · 4db7138d
      Ralf Habacker authored
      The empty cpp file is required for autogenerating signal/slot related methods from class UMLAppPrivate.
      4db7138d
    • Andi Fischer's avatar
      Replacing KUrl with QUrl. · cd89f6b0
      Andi Fischer authored
      Preparation work to port to Frameworks 5.
      cd89f6b0
    • Andi Fischer's avatar
      Umbrello did not compile for me. · c7d19cf1
      Andi Fischer authored
      This patch solved the problem.
      c7d19cf1
    • Oliver Kellogg's avatar
      (In reply to comment #2) · 60fc2177
      Oliver Kellogg authored
      > (In reply to comment #1)
      > > A workaround I found is adding the line indicated with '+'.
      > > ms_seenFiles.append(includeFile);
      >
      > The problem is that the current file is added to the list of seen files
      > after importing, which failed when an included file includes the current
      > file.
      
      I tested this on current clucene/src/core/CLucene git master and I confirm
      your finding.
      I therefore commit both comment #2 and a clean version of comment #3:
      
      umbrello/codeimport/classimport.h
      - New virtual function initPerFile() lets concrete importers provide
        initializations which are executed before each single file parsed.
        This is different from initialize() in that initialize() is executed only
        once for all files parsed.
      
      umbrello/codeimport/classimport.cpp
      - Provide empty default implementation for new function initPerFile()
      - In function importFiles(), call importFile() instead of parseFile()
      - In function importFile(), call initPerFile() instead of initialize()
      
      umbrello/codeimport/cppimport.{h,cpp}
      - Reimplement function initPerFile() from ClassImport.
      - In function feedTheModel(), append includeFile to ms_seenFiles prior to
        calling feedTheModel(includeFile) if includeFile is not found in
        ms_seenFiles.
      
      umbrello/codeimport/import_utils.cpp
      - In function createUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set parentPkg to logicalView.
      
      umbrello/model_utils.cpp
      - In function findUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set currentObj to NULL.
      
      BUG:335914
      60fc2177
    • Oliver Kellogg's avatar
  8. 08 Jun, 2014 2 commits
  9. 07 Jun, 2014 3 commits
  10. 06 Jun, 2014 6 commits
  11. 02 Jun, 2014 2 commits
  12. 31 May, 2014 3 commits
    • Oliver Kellogg's avatar
      Integration of PinWidget's floating-text name display in PortWidget · ca646e95
      Oliver Kellogg authored
      (see "BTW" at https://bugs.kde.org/show_bug.cgi?id=335399#c1)
      
      umbrello/listpopupmenu.h
      - At enum MenuType add new value, mt_NameAsTooltip.
      
      umbrello/widgets/portwidget.h
      - Add protected member m_pName of type pointer-to-FloatingTextWidget with
        corresponding public getter and setter method.
        The intention is that the FloatingTextWidget may be used as an
        alternative to the tooltip for displaying the port name on a diagram.
      - Override UMLWidget::slotMenuSelection() for adding handling of
        ListPopupMenu::mt_NameAsTooltip.
      
      umbrello/listpopupmenu.cpp
      - In function insertSingleSelectionMenu() case wt_Port, insert
        mt_NameAsTooltip as checkable. If the PortWidget's floatingTextWidget()
        is NULL then setChecked(true) on m_actions[mt_NameAsTooltip].
        This is the default case as the PortWidget does not automatically
        construct its FloatingTextWidget.
      
      umbrello/widgets/portwidget.cpp
      - In function updateWidget(), if m_pName is non NULL then update the text
        in the FloatingTextWidget; else update the text in the ToolTip.
      - In function slotMenuSelection(), handle ListPopupMenu::mt_NameAsTooltip
        as follows: If m_pName is non NULL then toggle the name display from
        FloatingText to ToolTip; else toggle the name display from ToolTip to
        FloatingText.
      - In functions loadFromXMI() and saveToXMI(), implement loading/saving of
        the optional FloatingTextWidget *m_pName.
      ca646e95
    • Oliver Kellogg's avatar
      umbrello/umlscene.cpp · 9ef8ecfa
      Oliver Kellogg authored
      - Cosmetic change in function removeWidgetCmd() : If an "if" statement
        uses braces then for symmetry its "else" part should use them also.
      9ef8ecfa
    • Oliver Kellogg's avatar
      umbrello/widgets/pinwidget.cpp : Do not assume that m_pName is always non... · f1c41922
      Oliver Kellogg authored
      umbrello/widgets/pinwidget.cpp : Do not assume that m_pName is always non NULL. (It may have been deleted.)
      f1c41922
  13. 30 May, 2014 1 commit
    • Oliver Kellogg's avatar
      Followup to commit d0bafb53, · aea59832
      Oliver Kellogg authored
      > > On moving a ComponentWidget, its attached PortWidgets should move along.
      > [...]
      Additionally, associations attached at ports should also move along when a
      ComponentWidget is moved:
      
      umbrello/widgets/componentwidget.{h,cpp}
      - Reimplement UMLWidget virtual method adjustAssocs(qreal dx, qreal dy)
        to additionally propagate the adjustAssocs call to attached PortWidgets.
      aea59832
  14. 29 May, 2014 5 commits
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      Add UniAssociation support in Component and Deployment View: · 56f346d4
      Oliver Kellogg authored
      umbrello/worktoolbar.cpp
      - In function insertBasicAssociations(), insert button for UniAssociation
        also on Uml::DiagramType Component or Deployment.
      
      umbrello/assocrules.cpp
      - In m_AssocRules[], add following entries:
        Association    from Node      to Node
        UniAssociation from Component to Artifact, bidir.
        UniAssociation from Node      to Node
        Dependency     from Component to Package
        Dependency     from Package   to Artifact, bidir.
        Dependency     from Node      to Node
      56f346d4
    • Oliver Kellogg's avatar
      On importing various Java projects for reproducing the crash reported in · 03a618cd
      Oliver Kellogg authored
        https://bugs.kde.org/show_bug.cgi?id=335478
      I notice that Java.lang final classes such as Boolean, Byte, Integer, etc.
      create new classes; they should be prefined Data Types instead. Fix:
      
      umbrello/codegenerators/java/java{writer,codegenerator}.cpp
      - In function defaultDatatypes() add Java.lang predefined final classes:
        Integer, Character, Boolean, Float, Double, Byte, Short, Long,
        StringBuffer, StringBuilder.
      03a618cd
    • Oliver Kellogg's avatar
      Apply modified version of https://bugs.kde.org/attachment.cgi?id=86235 · b68bd35c
      Oliver Kellogg authored
      umbrello/codeimport/pythonimport.h
      - Add member m_isStatic of type bool defaulting to false.
      
      umbrello/codeimport/pythonimport.cpp function parseStmt()
      - Decode "@staticmethod" to set m_isStatic true.
      - In handling of keyword "def",
        - If first parameter is not named "self" then set m_isStatic true and add
          the parameter via Import_Utils::addMethodParameter(); else do not add
          the parameter.
        - At call to Import_Utils::insertMethod(), provide m_isStatic as argument
          `isStatic'.
        - Reset m_isStatic false after call to Import_Utils::insertMethod().
      
      BUG:322467
      b68bd35c
    • Oliver Kellogg's avatar
      (In reply to comment #1) · c9c85d7e
      Oliver Kellogg authored
      > it seems, the import does not crash using a single java file using the
      > default, i.e. no, package - my original files I wanted to import reside
      > inside real packages
      
      It might be that the problem is fixed coincidentally by following change
      but without a reproducer there is no way of knowing.
      
      umbrello/codeimport/nativeimportbase.{h,cpp}
      - Change member m_parsedFiles to `static'.
        Reason: The files parsed shall be accumulated across all instances of
        NativeImportBase. See e.g. umbrello/codeimport/javaimport.cpp function
        spawnImport() : A new JavaImport importer is created for each file.
        However, m_parsedFiles shall span across all these instances.
      
      umbrello/codeimport/nativeimportbase.cpp
      - Additional fix in function preprocess() :
        A Java input line such as
          //***** this is a single line comment *****
        was erroneously treated as a multi line comment opener.
        (Notice the embedded /* which was misinterpreted.)
      
      CCBUG:335478
      c9c85d7e
  15. 28 May, 2014 1 commit