archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
946 stars 269 forks source link

Label expression $composition:source{name} is not resolved, when referencing concept is shown without the reference to the source concept #713

Closed olwol closed 11 months ago

olwol commented 3 years ago

Version of Archi

com.archimatetool.editor (4.8.1.202101181039) "Archi" [Active]

Archi Plug-ins

*** Plug-in Registry: com.archimatetool.canvas (4.8.1.202101181039) "Canvas Model Toolkit" [Active] com.archimatetool.commandline (4.8.1.202101181039) "Archi Command Line" [Starting] com.archimatetool.csv (4.8.1.202101181039) "CSV Export" [Active] com.archimatetool.csv.commandline (4.8.1.202101181039) "CSV Command Line" [Starting] com.archimatetool.editor (4.8.1.202101181039) "Archi" [Active] com.archimatetool.editor.browser (4.8.1.202101181039) "Browser Component" [Starting] com.archimatetool.editor.launch.win32 (4.8.1.202101181039) "Archi Windows Launcher" [Resolved] com.archimatetool.editor.themes (4.8.1.202101181039) "Themes for Archi" [Resolved] com.archimatetool.excel (0.1.0.201807240916) "Archi Excel Plugin" [Active] com.archimatetool.export.svg (4.8.1.202101181039) "SVG Image Export" [Starting] com.archimatetool.hammer (4.8.1.202101181039) "Archi Validator" [Active] com.archimatetool.help (4.8.1.202101181039) "Archi Help" [Active] com.archimatetool.jasperreports (4.8.1.202101181039) "Jasper Reports" [Active] com.archimatetool.jasperreports.commandline (4.8.1.202101181039) "Jasper Reports Command Line" [Starting] com.archimatetool.jdom (4.8.1.202101181039) "JDOM and Jaxen Utils" [Resolved] com.archimatetool.model (4.8.1.202101181039) "Archi Model" [Active] com.archimatetool.modelimporter (4.8.1.202101181039) "Archi Model Importer" [Active] com.archimatetool.modelimporter.commandline (4.8.1.202101181039) "Archi Model Importer Command Line" [Starting] com.archimatetool.reports (4.8.1.202101181039) "Archi Reports" [Active] com.archimatetool.reports.commandline (4.8.1.202101181039) "Archi HTML Reports Command Line" [Starting] com.archimatetool.script (1.1.0.202101121529) "Archi Scripting (jArchi)" [Active] com.archimatetool.script.commandline (1.1.0.202101121529) "Archi Scripting (jArchi) Command Line" [Starting] com.archimatetool.script.premium (1.1.0.202101121529) "Archi Scripting (jArchi) Examples" [Starting] com.archimatetool.templates (4.8.1.202101181039) "Archi Templates" [Active] com.archimatetool.vista (1.0.1.201911121256) "Lightbox for Archi" [Active] com.archimatetool.widgets (4.8.1.202101181039) "Archi Widgets" [Starting] com.archimatetool.zest (4.8.1.202101181039) "Archi Zest Visualiser" [Starting] com.ibm.icu (67.1.0.v20200706-1749) "ICU4J" [Active] com.sun.el (2.2.0.v201303151357) "Javax Expression Language Reference Implementation Bundle" [Resolved] com.sun.jna (4.5.1.v20190425-1842) "Java Native Access" [Starting] com.sun.jna.platform (4.5.1.v20190425-1842) "Java Native Access Platform" [Resolved] javax.annotation (1.3.5.v20200909-1856) "Jakarta Annotations API" [Resolved] javax.el (2.2.0.v201303151357) "Javax Expression Language Bundle" [Resolved] javax.inject (1.0.0.v20091030) "Atinject Dependency Injection Annotations" [Resolved] javax.servlet (3.1.0.v201410161800) "Servlet API Bundle" [Resolved] javax.servlet.jsp (2.2.0.v201112011158) "JSP API Bundle" [Resolved] org.apache.batik.constants (1.13.0.v20200622-2037) "Batik constants library" [Resolved] org.apache.batik.css (1.13.0.v20200622-2037) "Batik CSS engine" [Resolved] org.apache.batik.i18n (1.13.0.v20200622-2037) "Batik i18n library" [Resolved] org.apache.batik.util (1.13.0.v20200622-2037) "Batik utility library" [Resolved] org.apache.commons.codec (1.14.0.v20200818-1422) "Apache Commons Codec" [Resolved] org.apache.commons.io (2.6.0.v20190123-2029) "Apache Commons IO" [Resolved] org.apache.commons.jxpath (1.3.0.v200911051830) "Apache Commons JXPath" [Resolved] org.apache.commons.logging (1.2.0.v20180409-1502) "Apache Commons Logging" [Resolved] org.apache.felix.gogo.command (1.1.0.v20201023-1558) "Apache Felix Gogo Command" [Active] org.apache.felix.gogo.runtime (1.1.2.v20201023-1558) "Apache Felix Gogo Runtime" [Active] org.apache.felix.gogo.shell (1.1.2.v20201023-1558) "Apache Felix Gogo Shell" [Active] org.apache.felix.scr (2.1.24.v20200924-1939) "Apache Felix Declarative Services" [Active] org.apache.httpcomponents.httpclient (4.5.10.v20200830-2311) "Apache HttpClient" [Resolved] org.apache.httpcomponents.httpclient.win (4.5.10.v20200830-2311) "Apache HttpClient Windows features" [Resolved] org.apache.httpcomponents.httpcore (4.4.12.v20200108-1212) "Apache HttpCore" [Resolved] org.apache.jasper.glassfish (2.2.2.v201501141630) "JSP 2.2 implementation from Glassfish" [Resolved] org.apache.lucene.analyzers-common (8.4.1.v20200122-1459) "Lucene Common Analyzers" [Resolved] org.apache.lucene.analyzers-smartcn (8.4.1.v20200122-1459) "Lucene Smart Chinese Analyzer" [Resolved] org.apache.lucene.core (8.4.1.v20200122-1459) "Lucene Core" [Resolved] org.apache.xmlgraphics (2.4.0.v20200622-2037) "Apache XML Graphics Commons" [Resolved] org.archicontribs.modelrepository (0.6.2.202004031233) "Archi Model Repository" [Active] org.archicontribs.modelrepository.commandline (0.6.2.202004031233) "Archi Model Repository Command Line" [Starting] org.eclipse.core.commands (3.9.800.v20201021-1339) "Commands" [Resolved] org.eclipse.core.contenttype (3.7.800.v20200724-0804) "Eclipse Content Mechanism" [Active] org.eclipse.core.databinding (1.10.100.v20200926-1123) "JFace Data Binding" [Starting] org.eclipse.core.databinding.beans (1.7.100.v20201021-1339) "JFace Data Binding for JavaBeans" [Resolved] org.eclipse.core.databinding.observable (1.10.0.v20200730-0848) "JFace Data Binding Observables" [Resolved] org.eclipse.core.databinding.property (1.8.100.v20200619-0651) "JFace Data Binding Properties" [Starting] org.eclipse.core.expressions (3.7.0.v20200720-1126) "Expression Language" [Active] org.eclipse.core.jobs (3.10.1000.v20200909-1312) "Eclipse Jobs Mechanism" [Active] org.eclipse.core.net (1.3.1000.v20200715-0827) "Internet Connection Management" [Starting] org.eclipse.core.runtime (3.20.0.v20201027-1526) "Core Runtime" [Active] org.eclipse.draw2d (3.10.100.201606061308) "Draw2d" [Active] org.eclipse.e4.core.commands (0.13.0.v20201119-1132) "Eclipse e4 core commands" [Resolved] org.eclipse.e4.core.contexts (1.8.400.v20191217-1710) "Eclipse Contexts" [Active] org.eclipse.e4.core.di (1.7.600.v20200428-0912) "Eclipse Dependency Injection" [Active] org.eclipse.e4.core.di.annotations (1.6.600.v20191216-2352) "Eclipse Dependency Injection Annotations" [Resolved] org.eclipse.e4.core.di.extensions (0.16.0.v20200507-0938) "Eclipse Dependency Injection Extensions" [Active] org.eclipse.e4.core.di.extensions.supplier (0.15.700.v20200622-1247) "Eclipse Dependency Injection Extensions Supplier" [Active] org.eclipse.e4.core.services (2.2.500.v20200928-2213) "Eclipse Application Services" [Active] org.eclipse.e4.emf.xpath (0.2.800.v20200609-0849) "Eclipse Model Xpath" [Resolved] org.eclipse.e4.ui.bindings (0.13.0.v20201119-1132) "Eclipse Bindings Support" [Active] org.eclipse.e4.ui.css.core (0.13.0.v20201015-0653) "Eclipse CSS Core Support" [Resolved] org.eclipse.e4.ui.css.swt (0.14.0.v20201103-0952) "Eclipse CSS SWT Support" [Active] org.eclipse.e4.ui.css.swt.theme (0.13.0.v20201026-1147) "Eclipse CSS SWT Theme Support" [Active] org.eclipse.e4.ui.di (1.2.900.v20201021-1339) "Eclipse UI Dependency Injection" [Active] org.eclipse.e4.ui.dialogs (1.2.100.v20201109-2317) "Eclipse e4 dialogs" [Resolved] org.eclipse.e4.ui.model.workbench (2.1.900.v20201014-0742) "Eclipse Workbench Model" [Active] org.eclipse.e4.ui.services (1.4.0.v20201014-0944) "Eclipse UI Application Services" [Active] org.eclipse.e4.ui.swt.win32 (1.1.0.v20201119-1132) "Eclipse UI WIN32 Enhancements" [Resolved] org.eclipse.e4.ui.widgets (1.2.800.v20201021-1339) "Eclipse UI Custom widgets" [Resolved] org.eclipse.e4.ui.workbench (1.12.0.v20201119-1132) "Eclipse e4 Workbench" [Active] org.eclipse.e4.ui.workbench.addons.swt (1.4.0.v20201119-1132) "Eclipse e4 Workbench Add-ons" [Active] org.eclipse.e4.ui.workbench.renderers.swt (0.15.0.v20201125-0918) "Eclipse e4 Workbench SWT Renderer" [Active] org.eclipse.e4.ui.workbench.swt (0.15.0.v20201103-0952) "Eclipse e4 Workbench SWT" [Active] org.eclipse.e4.ui.workbench3 (0.15.500.v20201021-1339) "Bundle for Workbench APIs available in e4" [Resolved] org.eclipse.ecf (3.9.101.v20201027-0547) "ECF Core API" [Starting] org.eclipse.ecf.filetransfer (5.1.101.v20201025-2315) "ECF Filetransfer API" [Starting] org.eclipse.ecf.identity (3.9.401.v20201027-0550) "ECF Identity Core API" [Starting] org.eclipse.ecf.provider.filetransfer (3.2.601.v20201025-0700) "ECF Filetransfer Provider" [Starting] org.eclipse.ecf.provider.filetransfer.httpclient45 (1.0.301.v20201025-0700) "ECF HttpComponents 4.5 Filetransfer Provider" [Active] org.eclipse.ecf.provider.filetransfer.httpclient45.win32 (1.0.300.v20200816-1842) "ECF HttpComponents 4.5 Filetransfer Windows Components" [Active] org.eclipse.ecf.provider.filetransfer.ssl (1.0.200.v20200611-1836) "ECF Filetransfer Provider" [Resolved] org.eclipse.ecf.ssl (1.2.400.v20200611-2220) "ECF Core API" [Resolved] org.eclipse.emf.common (2.21.0.v20200917-1439) "EMF Common" [Active] org.eclipse.emf.ecore (2.23.0.v20200630-0516) "EMF Ecore" [Active] org.eclipse.emf.ecore.change (2.14.0.v20190528-0725) "EMF Change Model" [Starting] org.eclipse.emf.ecore.xmi (2.16.0.v20190528-0725) "EMF XML/XMI Persistence" [Active] org.eclipse.equinox.app (1.5.0.v20200717-0620) "Equinox Application Container" [Active] org.eclipse.equinox.bidi (1.3.0.v20200612-1624) "Bidirectional Text Support" [Starting] org.eclipse.equinox.common (3.14.0.v20201102-2053) "Common Eclipse Runtime" [Active] org.eclipse.equinox.concurrent (1.1.500.v20200106-1437) "Equinox Concurrent API" [Starting] org.eclipse.equinox.console (1.4.200.v20200828-1034) "Console plug-in" [Active] org.eclipse.equinox.ds (1.6.200.v20200422-1833) "Declarative Services" [Active] org.eclipse.equinox.event (1.5.500.v20200616-0800) "Event Admin" [Active] org.eclipse.equinox.frameworkadmin (2.1.400.v20191002-0702) "Equinox Framework Admin" [Active] org.eclipse.equinox.frameworkadmin.equinox (1.1.400.v20200319-1546) "Equinox Framework Admin for Equinox" [Active] org.eclipse.equinox.http.jetty (3.7.500.v20200915-1207) "Jetty Http Service" [Starting] org.eclipse.equinox.http.registry (1.2.0.v20200614-1851) "Http Service Registry Extensions" [Resolved] org.eclipse.equinox.http.servlet (1.6.700.v20201109-1600) "Http Services Servlet" [Starting] org.eclipse.equinox.jsp.jasper (1.1.500.v20200422-1833) "Jasper Jsp Support Bundle" [Starting] org.eclipse.equinox.jsp.jasper.registry (1.1.400.v20200422-1833) "Jasper Jsp Registry Support Plug-in" [Starting] org.eclipse.equinox.launcher (1.6.0.v20200915-1508) "Equinox Launcher" [Resolved] org.eclipse.equinox.launcher.win32.win32.x86_64 (1.2.0.v20200915-1442) "Equinox Launcher Win32 X86_64 Fragment" [Resolved] org.eclipse.equinox.p2.artifact.repository (1.3.500.v20200406-2025) "Equinox Provisioning Artifact Repository Support" [Active] org.eclipse.equinox.p2.console (1.1.400.v20201106-0859) "Equinox Provisioning Console" [Starting] org.eclipse.equinox.p2.core (2.6.300.v20200211-1504) "Equinox Provisioning Core" [Active] org.eclipse.equinox.p2.director (2.4.700.v20200511-1530) "Equinox Provisioning Director" [Active] org.eclipse.equinox.p2.director.app (1.1.600.v20200511-1530) "Equinox Provisioning Director Application" [Starting] org.eclipse.equinox.p2.directorywatcher (1.2.500.v20191211-1631) "Equinox Provisioning Directory Watcher" [Active] org.eclipse.equinox.p2.engine (2.6.700.v20200511-1530) "Equinox Provisioning Engine" [Active] org.eclipse.equinox.p2.extensionlocation (1.3.400.v20191213-1911) "Equinox Provisioning Extension Location Repository Support" [Active] org.eclipse.equinox.p2.garbagecollector (1.1.400.v20200221-1022) "Equinox Provisioning Garbage Collector" [Active] org.eclipse.equinox.p2.jarprocessor (1.1.700.v20200904-1601) "Equinox Provisioning JAR Processor" [Resolved] org.eclipse.equinox.p2.metadata (2.5.100.v20200908-1020) "Equinox Provisioning Metadata" [Active] org.eclipse.equinox.p2.metadata.repository (1.3.400.v20191211-1528) "Equinox Provisioning Metadata Repository" [Active] org.eclipse.equinox.p2.operations (2.5.1000.v20201106-1246) "Equinox Provisioning Operations API" [Starting] org.eclipse.equinox.p2.publisher (1.5.400.v20200511-1530) "Equinox Provisioning Publisher Infrastructure" [Active] org.eclipse.equinox.p2.publisher.eclipse (1.3.700.v20200828-0839) "Equinox Provisioning Publisher for Eclipse" [Active] org.eclipse.equinox.p2.reconciler.dropins (1.3.400.v20200511-1530) "Equinox Provisioning Drop-in" [Active] org.eclipse.equinox.p2.repository (2.5.0.v20201013-0853) "Equinox Provisioning Repository" [Active] org.eclipse.equinox.p2.repository.tools (2.2.500.v20200110-2121) "Equinox Provisioning Repository Tools" [Starting] org.eclipse.equinox.p2.touchpoint.eclipse (2.2.700.v20200813-0739) "Equinox Provisioning Eclipse Touchpoint" [Active] org.eclipse.equinox.p2.touchpoint.natives (1.3.600.v20200511-1530) "Equinox Provisioning Native Touchpoint" [Active] org.eclipse.equinox.p2.transport.ecf (1.3.0.v20201012-1345) "Equinox Provisioning ECF based Transport" [Starting] org.eclipse.equinox.preferences (3.8.100.v20201102-2042) "Eclipse Preferences Mechanism" [Active] org.eclipse.equinox.registry (3.10.0.v20201107-1818) "Extension Registry Support" [Active] org.eclipse.equinox.security (1.3.500.v20200114-1637) "Equinox Java Authentication and Authorization Service (JAAS)" [Active] org.eclipse.equinox.security.win32.x86_64 (1.1.200.v20190812-0919) "Windows Data Protection services integration (64 bit)" [Resolved] org.eclipse.equinox.simpleconfigurator (1.3.600.v20200721-1308) "Simple Configurator" [Active] org.eclipse.equinox.simpleconfigurator.manipulator (2.1.500.v20200211-1505) "Simple Configurator Manipulator" [Active] org.eclipse.gef (3.11.0.201606061308) "GEF (MVC)" [Active] org.eclipse.help (3.8.800.v20200525-0755) "Help System Core" [Active] org.eclipse.help.base (4.3.100.v20201202-1800) "Help System Base" [Starting] org.eclipse.help.ui (4.2.100.v20200923-2139) "Help System UI" [Starting] org.eclipse.help.webapp (3.10.100.v20201130-2122) "Help System Webapp" [Starting] org.eclipse.jetty.continuation (9.4.35.v20201120) "Jetty :: Continuation" [Resolved] org.eclipse.jetty.http (9.4.35.v20201120) "Jetty :: Http Utility" [Resolved] org.eclipse.jetty.io (9.4.35.v20201120) "Jetty :: IO Utility" [Resolved] org.eclipse.jetty.security (9.4.35.v20201120) "Jetty :: Security" [Resolved] org.eclipse.jetty.server (9.4.35.v20201120) "Jetty :: Server Core" [Resolved] org.eclipse.jetty.servlet (9.4.35.v20201120) "Jetty :: Servlet Handling" [Resolved] org.eclipse.jetty.util (9.4.35.v20201120) "Jetty :: Utilities" [Resolved] org.eclipse.jetty.util.ajax (9.4.35.v20201120) "Jetty :: Utilities :: Ajax(JSON)" [Resolved] org.eclipse.jface (3.22.0.v20201106-0834) "JFace" [Resolved] org.eclipse.jface.databinding (1.12.100.v20201014-0742) "JFace Data Binding for SWT and JFace" [Resolved] org.eclipse.jface.notifications (0.2.100.v20201130-1828) "Notification API" [Resolved] org.eclipse.jface.text (3.16.500.v20201112-1545) "JFace Text" [Resolved] org.eclipse.osgi (3.16.100.v20201030-1916) "OSGi System Bundle" [Active] org.eclipse.osgi.compatibility.state (1.2.200.v20200915-2015) "Equinox State and Resolver Compatibility Fragment" [Resolved] org.eclipse.osgi.services (3.9.0.v20200511-1725) "OSGi Release 4.2.0 Services" [Resolved] org.eclipse.osgi.util (3.5.300.v20190708-1141) "OSGi Release 4.2.0 Utility Classes" [Resolved] org.eclipse.rcp (4.18.0.v20201202-1800) "Eclipse RCP" [Starting] org.eclipse.swt (3.115.100.v20201202-1103) "Standard Widget Toolkit" [Resolved] org.eclipse.swt.browser.chromium.win32.win32.x86_64 (3.115.100.v20201202-1103) "Chromium SWT Widget for Windows" [Resolved] org.eclipse.swt.win32.win32.x86_64 (3.115.100.v20201202-1103) "Standard Widget Toolkit for Windows" [Resolved] org.eclipse.text (3.10.400.v20200925-0557) "Text" [Resolved] org.eclipse.ui (3.118.100.v20201123-0719) "Eclipse UI" [Active] org.eclipse.ui.cheatsheets (3.7.100.v20200915-1059) "Cheat Sheets" [Starting] org.eclipse.ui.forms (3.11.0.v20201025-0656) "Eclipse Forms" [Resolved] org.eclipse.ui.intro (3.6.0.v20201120-1551) "Welcome Framework" [Starting] org.eclipse.ui.views (3.10.500.v20201021-1339) "Views" [Resolved] org.eclipse.ui.views.properties.tabbed (3.9.0.v20201026-0739) "Tabbed Properties View" [Resolved] org.eclipse.ui.workbench (3.122.0.v20201122-1345) "Eclipse Workbench" [Active] org.eclipse.update.configurator (3.4.700.v20200907-1237) "Install/Update Configurator" [Active] org.eclipse.urischeme (1.1.200.v20201104-0938) "Eclipse URI Scheme Handling" [Resolved] org.eclipse.zest.core (1.5.300.201606061308) "Zest Core" [Resolved] org.eclipse.zest.layouts (1.1.300.201606061308) "Zest Layouts" [Resolved] org.opengroup.archimate.xmlexchange (4.8.1.202101181039) "ArchiMate Open Exchange XML Plugin for Archi" [Active] org.opengroup.archimate.xmlexchange.commandline (4.8.1.202101181039) "XML Exchange Command Line" [Starting] org.sat4j.core (2.3.5.v201308161310) "SAT4J Core" [Resolved] org.sat4j.pb (2.3.5.v201404071733) "SAT4J Pseudo" [Resolved] org.tukaani.xz (1.8.0.v20180207-1613) "XZ for Java" [Resolved] org.w3c.css.sac (1.3.1.v200903091627) "W3C CSS SAC" [Resolved] org.w3c.dom.events (3.0.0.draft20060413_v201105210656) "W3C DOM Level 3 Events" [Resolved] org.w3c.dom.smil (1.0.1.v200903091627) "W3C SMIL DOM" [Resolved] org.w3c.dom.svg (1.1.0.v201011041433) "W3C SVG DOM" [Resolved]

Operating System

Microsoft Windows 10 Pro Version 10.0.19042 Build 19042

Expected Behaviour

I created a "is composed of" relation between Interfaces. The label of the referening concept is set to "$composition:source{name}". When I copy the referencing concept and past it as reference into the view, the label should still resolve and show the information from the source concept.

Actual Behaviour

The reference in the label expression is resolved and shown only, when the source and the referencing concept are visible with the reference between them.

Steps to Reproduce the Behaviour

  1. Create 2 interfaces.
  2. Create comopsition between them.
  3. Add label "$composition:source{name}" to the referencing concept
  4. Copy the referencing concept
  5. Past it as reference => the label does not show the source name even though the reference between the concepts exists in the model.

Label expression is not resolved when referencing concept is shown without the reference to the source concept

See the related model: `<?xml version="1.0" encoding="UTF-8"?>

Fixed in version 4.8.
Phillipus commented 3 years ago

The reference in the label expression is resolved and shown only, when the source and the referencing concept are visible with the reference between them.

This is by design. Label expressions are applied to a View's components and so source and target are calculated based on the connections that are present not the underlying model relations.

It might be possible to implement the behaviour you are missing by adding an additional prefix like <relationship>:msource or <relationship>:mtarget that would return any underlying model relationship rather than only if a connection exists on the View.

olwol commented 3 years ago

Hello, thank you for your quick response.

So mparent and vparent, msource and vsource, mtarget and vtarget would fit into this schema, isn't it? Prefix m would mean: show it; while v would mean: show it only, if also shown in the current view.

It would be helpful allowing to use the name of a relationship. So far, you support the use of relationship types (e.g., triggering). For example, I name the composition relationship "plugged into" and I can use something like $composition|plugged into|:msource{property:key}

Additonally, it would be great to have that value compositon feature available for the values of the properties of a concept. Not only for the label of a concept. May be with a switch per property to turn it on/off for performance.

With kind regards, Olav

michael-tapp-vodafone-com commented 2 years ago

I've come across this constraint myself a few times.

Label expressions are a great idea, but if you can only pull data from other elements that actually visible on the diagram, it reduces their utility quite a bit.

I can see the constraint around trying to ensure you have something unique though. One sort-of hack, I wonder whether could be supported is where it'd be able to support any arbitrary JArchi expression that returns a single text value? With the element the label is for being the $(element) that is the starting point. That would be super useful.

Phillipus commented 11 months ago

I've opened #972 so I'll close this one.