Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Eclipse 4diac Wiki/Development/4DIAC-IDE Code Clean-up

< Eclipse 4diac Wiki
Revision as of 14:48, 1 November 2016 by Alois.zoitl.gmx.at (Talk | contribs) (Import IEC 61499 System Files)


This is an idea pool of topics and items for the 4DIAC-IDE code clean-up. All items here will either be moved to a bugzilla issue or deleted.

Remove UI Model

  • Use FBNetworkEditPart for CompositeFBs to add adapters to the FBNetwork

Redesign Mapping According to the following rules/steps

TODO: Translate this bullet list into Bugzilla issues

  • Remove ResourceFBNetwork
  • A mapping list located in the system keeps track between FBs in the application and their mapped FBs in the resources
    • Each FB gets a backward reference (eOpposite in EMF) to its entry in the mapping list
      • Helperfunktion: isMapped
    • Application FBs where this backward reference is null are not mapped
    • FBs located in a resource with a null backward reference are resource FBs
    • A mapping list entry needs the following helper functions simplifying navigation in the model for the mapping related commands
      • getFromFBNetwork: the FBNetwork of the application or subapplication the FB has been mapped from
      • getDevice: the device the FB has been mapped to
    • TODO: consider if connections should be part of this list as well
  • On mapping a FB all incoming and outgoing connections are checked if the other end’s FB is also in the same resource. If this is the case the connection is also created in the resource
  • Deleting a mapped FB in a resource is equivalent to unmapp a FB
  • On unmapping a FB all connections in the resource are deleted
  • Deleting a connection in the application editor: If both ends of a connection are mapped than the according connection in the resource has to be deleted as well.
  • Deleting a connection in the resource editor where both ends are mapped (i.e., the connection exists in the application also): Show a pop-up dialog which informs that this connection will be also deleted in the (sub-)application. Provide OK and Cancel button.
  • If parameters of a mapped FB are edited/created the parameter needs to be synced in the resource

Clean-up 1499 model

  • Check if EMF validtors would be better suited to check name changes instead of the setNameMethod to remove the generated NOT there
  • Remove seldom used values that can be computed to reduce memory footprint of model
    • Connection: remove resourceConnection replace with helper function
      • isResourceConnection() { return getSourcFB().isMapped() && getDesitinationFB().isMapped(); }
  • IInterfaceElements
    • Check that getInputConnections and getOutputConnections is correctly used. This is the basis for the new subapplication model.
      • FB InterfaceElement:
        • Input: all connections are in input connections output connections should be empty
        • Output: all connections are in output connections input connections should be empty
      • Internal representation of Resource, Composite FB, SubApp (typed or untyped) interface element:
        • Input: all connections are in output connections input connections should be empty
        • Output: all connections are in input connections output connections should be empty
  • Rework Adapter Model
    • Remove Inheritance of AdapterDeclaration from VarDeclaration
      • Would reduce at several places to check if it is a vardeclaration or adapter declaration in the correct order
      • Would simplfy some AdapterDeclaration model
    • Introduce AdapterConnection
      • This should be done independent from the inheritence clean-up
      • Requires own AdapterCreationCommand and maybe own InterfaceElementEditPart
  • FBNetwork
    • Investigate if a subclass for application and subapplication which return an application make sense.

Import IEC 61499 System Files

Goal: USe IEC 61499-2 XML as persistence format for 4DIAC TODOS:

  • Extract FBNetwork parsing into an own Class that can be utilized for Application, subapplication, resource, and CFB parsing


Points that need to be considered:

  • Develop an attribute framework that allows to store additional information like color of devices and segments
  • Typed elements would not need a type path model entry but could use only the paletteEntry and store the type path into the persistence model
  • Use existing commends as much as possible for reusing code and ensuring correct models

Prepare Code for Eclipse Migration

  • Check for unused elements
  • Reconsider all points when the system is saved and if it is realy always necessary
  • Check if ISystemEditor can be replaced with DiagramWithflyoutpaltetteEditor (i.e, getSystem)
  • Correct copyright information
  • Fix paste in CFB editor
  • General Ideas:
    • Save as of application
      • reuse new application wizard page -> alows to save an application also into another system
      • copy fb network remove all mapping information
      • save system

Implement new Subapplication Model

  • Harmonize Subapplication model elements with CFB to increase code reuse
  • Introduce explicit subapplication interface elements also for untyped subapplications

Back to the top