diff --git a/plugins/ms.design/META-INF/MANIFEST.MF b/plugins/ms.design/META-INF/MANIFEST.MF index a5844c2..7e9bb80 100644 --- a/plugins/ms.design/META-INF/MANIFEST.MF +++ b/plugins/ms.design/META-INF/MANIFEST.MF @@ -30,7 +30,10 @@ Require-Bundle: org.eclipse.ui, org.polarsys.capella.vp.ms.expression, org.polarsys.capella.vp.ms.ui.css, org.eclipse.e4.ui.css.core;bundle-version="0.12.700", - org.w3c.css.sac;bundle-version="1.3.1" + org.w3c.css.sac;bundle-version="1.3.1", + org.eclipse.gmf.runtime.diagram.ui, + org.polarsys.capella.core.sirius.analysis, + org.eclipse.sirius.diagram.ui;bundle-version="6.3.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: ms.configuration.services.cs, diff --git a/plugins/ms.design/description/Contextual Component Detailed Interfaces/ms.css b/plugins/ms.design/description/Contextual Component Detailed Interfaces/ms.css new file mode 100644 index 0000000..a7f4a9f --- /dev/null +++ b/plugins/ms.design/description/Contextual Component Detailed Interfaces/ms.css @@ -0,0 +1,39 @@ +/** + * Custom images for Contextual Component Detailed Interfaces diagrams + */ +ComponentPort[kind=STANDARD][providedInterfaces].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/StandardPort_provided.png'; +} + +ComponentPort[kind=STANDARD][requiredInterfaces].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/StandardPort_required.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces][requiredInterfaces].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/StandardPort_providedrequired.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces].vpms-excluded { + image: '/ms.design/images/vpms-rotating/StandardPort_provided-red.png'; +} + +ComponentPort[kind=STANDARD][requiredInterfaces].vpms-excluded { + image: '/ms.design/images/vpms-rotating/StandardPort_required-red.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces][requiredInterfaces].vpms-excluded { + image: '/ms.design/images/vpms-rotating/StandardPort_providedrequired-red.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/StandardPort_provided-purple.png'; +} + +ComponentPort[kind=STANDARD][requiredInterfaces].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/StandardPort_required-purple.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces][requiredInterfaces].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/StandardPort_providedrequired-purple.png'; +} + diff --git a/plugins/ms.design/description/Contextual Component External Interfaces/ms.css b/plugins/ms.design/description/Contextual Component External Interfaces/ms.css new file mode 100644 index 0000000..462d7f7 --- /dev/null +++ b/plugins/ms.design/description/Contextual Component External Interfaces/ms.css @@ -0,0 +1,40 @@ +/* + * Custom images for Contextual Component External Interfaces Diagrams + */ + +ComponentPort[kind=STANDARD][providedInterfaces].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/StandardPort_provided.png'; +} + +ComponentPort[kind=STANDARD][requiredInterfaces].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/StandardPort_required.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces][requiredInterfaces].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/StandardPort_providedrequired.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces].vpms-excluded { + image: '/ms.design/images/vpms-rotating/StandardPort_provided-red.png'; +} + +ComponentPort[kind=STANDARD][requiredInterfaces].vpms-excluded { + image: '/ms.design/images/vpms-rotating/StandardPort_required-red.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces][requiredInterfaces].vpms-excluded { + image: '/ms.design/images/vpms-rotating/StandardPort_providedrequired-red.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/StandardPort_provided-purple.png'; +} + +ComponentPort[kind=STANDARD][requiredInterfaces].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/StandardPort_required-purple.png'; +} + +ComponentPort[kind=STANDARD][providedInterfaces][requiredInterfaces].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/StandardPort_providedrequired-purple.png'; +} + diff --git a/plugins/ms.design/description/ms.css b/plugins/ms.design/description/ms.css index 3a50aee..102f9e1 100644 --- a/plugins/ms.design/description/ms.css +++ b/plugins/ms.design/description/ms.css @@ -43,53 +43,74 @@ For each element, only configurations that have the element in its scope are con edge-color: DarkViolet; } - FunctionInputPort.vpms-all-undefined { - image: 'ms.design/images/FlowPort.gif'; + image: '/ms.design/images/vpms-rotating/FunctionInputPort.png'; +} + +FunctionInputPort.vpms-excluded { + image: '/ms.design/images/vpms-rotating/FunctionInputPort-red.png'; +} + +FunctionInputPort.vpms-included.vpms-excluded { + image: '/ms.design/images/vpms-rotating/FunctionInputPort-purple.png'; } FunctionOutputPort.vpms-all-undefined { - image: 'ms.design/images/FlowPort.gif'; + image: '/ms.design/images/vpms-rotating/FunctionOutputPort.png'; } -ComponentPort.vpms-all-undefined { - image: 'ms.design/images/FlowPort.gif'; +FunctionOutputPort.vpms-excluded { + image: '/ms.design/images/vpms-rotating/FunctionOutputPort-red.png'; } -PhysicalPort.vpms-all-undefined { - image: 'ms.design/images/FlowPort.gif'; +FunctionOutputPort.vpms-included.vpms-excluded { + image: '/ms.design/images/vpms-rotating/FunctionOutputPort-purple.png'; } -FunctionInputPort.vpms-excluded { - image: 'ms.design/images/FlowPort-red.gif'; +ComponentPort[orientation='IN'].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/InFlowPort.png'; } -FunctionOutputPort.vpms-excluded { - image: 'ms.design/images/FlowPort-red.gif'; +ComponentPort[orientation='IN'].vpms-excluded { + image: '/ms.design/images/vpms-rotating/InFlowPort-red.png'; } -ComponentPort.vpms-excluded { - image: 'ms.design/images/FlowPort-red.gif'; +ComponentPort[orientation='IN'].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/InFlowPort-purple.png'; } -PhysicalPort.vpms-excluded { - image: 'ms.design/images/FlowPort-red.gif'; +ComponentPort[orientation='OUT'].vpms-all-undefined { + image: '/ms.design/images/vpms-rotating/OutFlowPort.png'; } -FunctionInputPort.vpms-included.vpms-excluded { - image: 'ms.design/images/FlowPort-conflict.gif'; +ComponentPort[orientation='OUT'].vpms-excluded { + image: '/ms.design/images/vpms-rotating/OutFlowPort-red.png'; } -FunctionOutputPort.vpms-included.vpms-excluded { - image: 'ms.design/images/FlowPort-conflict.gif'; +ComponentPort[orientation='OUT'].vpms-excluded.vpms-included { + image: '/ms.design/images/vpms-rotating/OutFlowPort-purple.png'; +} + +ComponentPort.vpms-all-undefined { + image: '/ms.design/images/FlowPort.png'; +} + +ComponentPort.vpms-excluded { + image: '/ms.design/images/FlowPort-red.png'; } ComponentPort.vpms-included.vpms-excluded { - image: 'ms.design/images/FlowPort-conflict.gif'; + image: '/ms.design/images/FlowPort-purple.png'; } -PhysicalPort.vpms-included.vpms-excluded { - image: 'ms.design/images/FlowPort-conflict.gif'; +PhysicalPort.vpms-all-undefined { + image: '/ms.design/images/FlowPort.png'; } +PhysicalPort.vpms-excluded { + image: '/ms.design/images/FlowPort-red.png'; +} +PhysicalPort.vpms-included.vpms-excluded { + image: '/ms.design/images/FlowPort-purple.png'; +} diff --git a/plugins/ms.design/images/FlowPort-conflict.gif b/plugins/ms.design/images/FlowPort-conflict.gif deleted file mode 100644 index 52ed66b..0000000 Binary files a/plugins/ms.design/images/FlowPort-conflict.gif and /dev/null differ diff --git a/plugins/ms.design/images/FlowPort-purple.png b/plugins/ms.design/images/FlowPort-purple.png new file mode 100644 index 0000000..1331f28 Binary files /dev/null and b/plugins/ms.design/images/FlowPort-purple.png differ diff --git a/plugins/ms.design/images/FlowPort-red.gif b/plugins/ms.design/images/FlowPort-red.gif deleted file mode 100644 index 75192e0..0000000 Binary files a/plugins/ms.design/images/FlowPort-red.gif and /dev/null differ diff --git a/plugins/ms.design/images/FlowPort-red.png b/plugins/ms.design/images/FlowPort-red.png new file mode 100644 index 0000000..5403d14 Binary files /dev/null and b/plugins/ms.design/images/FlowPort-red.png differ diff --git a/plugins/ms.design/images/FlowPort.gif b/plugins/ms.design/images/FlowPort.gif deleted file mode 100644 index 3fe1bfa..0000000 Binary files a/plugins/ms.design/images/FlowPort.gif and /dev/null differ diff --git a/plugins/ms.design/images/FlowPort.png b/plugins/ms.design/images/FlowPort.png new file mode 100644 index 0000000..2231d82 Binary files /dev/null and b/plugins/ms.design/images/FlowPort.png differ diff --git a/plugins/ms.design/images/StandardPort_provided_east.png b/plugins/ms.design/images/StandardPort_provided_east.png deleted file mode 100644 index e32b8df..0000000 Binary files a/plugins/ms.design/images/StandardPort_provided_east.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_provided_north.png b/plugins/ms.design/images/StandardPort_provided_north.png deleted file mode 100644 index f2e7b94..0000000 Binary files a/plugins/ms.design/images/StandardPort_provided_north.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_provided_south.png b/plugins/ms.design/images/StandardPort_provided_south.png deleted file mode 100644 index f90e5e8..0000000 Binary files a/plugins/ms.design/images/StandardPort_provided_south.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_provided_west.png b/plugins/ms.design/images/StandardPort_provided_west.png deleted file mode 100644 index d34f14f..0000000 Binary files a/plugins/ms.design/images/StandardPort_provided_west.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_providedrequired_east.png b/plugins/ms.design/images/StandardPort_providedrequired_east.png deleted file mode 100644 index 6e60ea2..0000000 Binary files a/plugins/ms.design/images/StandardPort_providedrequired_east.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_providedrequired_north.png b/plugins/ms.design/images/StandardPort_providedrequired_north.png deleted file mode 100644 index d7ff45a..0000000 Binary files a/plugins/ms.design/images/StandardPort_providedrequired_north.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_providedrequired_south.png b/plugins/ms.design/images/StandardPort_providedrequired_south.png deleted file mode 100644 index 9d43410..0000000 Binary files a/plugins/ms.design/images/StandardPort_providedrequired_south.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_providedrequired_west.png b/plugins/ms.design/images/StandardPort_providedrequired_west.png deleted file mode 100644 index 65cdb78..0000000 Binary files a/plugins/ms.design/images/StandardPort_providedrequired_west.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_required_east.png b/plugins/ms.design/images/StandardPort_required_east.png deleted file mode 100644 index 5e7be8c..0000000 Binary files a/plugins/ms.design/images/StandardPort_required_east.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_required_north.png b/plugins/ms.design/images/StandardPort_required_north.png deleted file mode 100644 index c8c3559..0000000 Binary files a/plugins/ms.design/images/StandardPort_required_north.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_required_south.png b/plugins/ms.design/images/StandardPort_required_south.png deleted file mode 100644 index b4349b0..0000000 Binary files a/plugins/ms.design/images/StandardPort_required_south.png and /dev/null differ diff --git a/plugins/ms.design/images/StandardPort_required_west.png b/plugins/ms.design/images/StandardPort_required_west.png deleted file mode 100644 index de703d8..0000000 Binary files a/plugins/ms.design/images/StandardPort_required_west.png and /dev/null differ diff --git a/plugins/ms.design/images/license.txt b/plugins/ms.design/images/license.txt index 82fbbc1..a1766c2 100644 --- a/plugins/ms.design/images/license.txt +++ b/plugins/ms.design/images/license.txt @@ -2,28 +2,30 @@ These followings icons are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 - - - - -/images/Configuration.gif - org.polarsys.capella.vp.ms.edit - org.polarsys.capella.vp.ms.edit/icons/full/obj16/CSConfiguration.gif -/images/FlowPort.gif - ms.design - ms.design/images/FlowPort.gif -/images/FunctionInputPort.png - ms.design - ms.design/images/FunctionInputPort.png -/images/FunctionOutputPort.png - ms.design - ms.design/images/FunctionOutputPortPort.png -/images/InFlowPort.png - ms.design - ms.design/images/InFlowPort.png -/images/StandardPortSmall.png - ms.design - ms.design/images/StandardPortSmall.png -/images/TransparentPort.png - ms.design - ms.design/images/TransparentPort.png -/images/StandardPort_provided_east.png - ms.design - ms.design/images/StandardPort_provided_east.png -/images/StandardPort_provided_north.png - ms.design - ms.design/images/StandardPort_provided_north.png -/images/StandardPort_provided_south.png - ms.design - ms.design/images/StandardPort_provided_south.png -/images/StandardPort_provided_west.png - ms.design - ms.design/images/StandardPort_provided_west.png -/images/StandardPort_provided.png - ms.design - ms.design/images/StandardPort_provided.png -/images/StandardPort_providedrequired_east.png - ms.design - ms.design/images/StandardPort_providedrequired_east.png -/images/StandardPort_providedrequired_north.png - ms.design - ms.design/images/StandardPort_providedrequired_north.png -/images/StandardPort_providedrequired_south.png - ms.design - ms.design/images/StandardPort_providedrequired_south.png -/images/StandardPort_providedrequired_west.png - ms.design - ms.design/images/StandardPort_providedrequired_west.png -/images/StandardPort_providedrequired.png - ms.design - ms.design/images/StandardPort_providedrequired.png -/images/StandardPort_required_east.png - ms.design - ms.design/images/StandardPort_required_east.png -/images/StandardPort_required_north.png - ms.design - ms.design/images/StandardPort_required_north.png -/images/StandardPort_required_south.png - ms.design - ms.design/images/StandardPort_required_south.png -/images/StandardPort_required_west.png - ms.design - ms.design/images/StandardPort_required_west.png -/images/StandardPort_required.png - ms.design - ms.design/images/StandardPort_required.png -/images/FlowPort-red.gif - ms.design - ms.design/images/FlowPort-red.gif \ No newline at end of file +images/Configuration.gif +images/FlowPort-purple.png +images/FlowPort-red.png +images/FlowPort.png +images/StandardPortSmall.png +images/TransparentPort.png +images/vpms-rotating/FunctionInputPort-purple.png +images/vpms-rotating/FunctionInputPort-red.png +images/vpms-rotating/FunctionInputPort.png +images/vpms-rotating/FunctionOutputPort-purple.png +images/vpms-rotating/FunctionOutputPort-red.png +images/vpms-rotating/FunctionOutputPort.png +images/vpms-rotating/InFlowPort-purple.png +images/vpms-rotating/InFlowPort-red.png +images/vpms-rotating/InFlowPort.png +images/vpms-rotating/OutFlowPort-purple.png +images/vpms-rotating/OutFlowPort-red.png +images/vpms-rotating/OutFlowPort.png +images/vpms-rotating/StandardPort_provided-purple.png +images/vpms-rotating/StandardPort_provided-red.png +images/vpms-rotating/StandardPort_provided.png +images/vpms-rotating/StandardPort_providedrequired-purple.png +images/vpms-rotating/StandardPort_providedrequired-red.png +images/vpms-rotating/StandardPort_providedrequired.png +images/vpms-rotating/StandardPort_required-purple.png +images/vpms-rotating/StandardPort_required-red.png +images/vpms-rotating/StandardPort_required.png diff --git a/plugins/ms.design/images/vpms-rotating/FunctionInputPort-purple.png b/plugins/ms.design/images/vpms-rotating/FunctionInputPort-purple.png new file mode 100644 index 0000000..b44d6a4 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/FunctionInputPort-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/FunctionInputPort-red.png b/plugins/ms.design/images/vpms-rotating/FunctionInputPort-red.png new file mode 100644 index 0000000..6c608a4 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/FunctionInputPort-red.png differ diff --git a/plugins/ms.design/images/FunctionInputPort.png b/plugins/ms.design/images/vpms-rotating/FunctionInputPort.png similarity index 100% rename from plugins/ms.design/images/FunctionInputPort.png rename to plugins/ms.design/images/vpms-rotating/FunctionInputPort.png diff --git a/plugins/ms.design/images/vpms-rotating/FunctionOutputPort-purple.png b/plugins/ms.design/images/vpms-rotating/FunctionOutputPort-purple.png new file mode 100644 index 0000000..35b30a9 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/FunctionOutputPort-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/FunctionOutputPort-red.png b/plugins/ms.design/images/vpms-rotating/FunctionOutputPort-red.png new file mode 100644 index 0000000..fa1e746 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/FunctionOutputPort-red.png differ diff --git a/plugins/ms.design/images/FunctionOutputPort.png b/plugins/ms.design/images/vpms-rotating/FunctionOutputPort.png similarity index 100% rename from plugins/ms.design/images/FunctionOutputPort.png rename to plugins/ms.design/images/vpms-rotating/FunctionOutputPort.png diff --git a/plugins/ms.design/images/vpms-rotating/InFlowPort-purple.png b/plugins/ms.design/images/vpms-rotating/InFlowPort-purple.png new file mode 100644 index 0000000..ba36d9c Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/InFlowPort-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/InFlowPort-red.png b/plugins/ms.design/images/vpms-rotating/InFlowPort-red.png new file mode 100644 index 0000000..9b9ad25 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/InFlowPort-red.png differ diff --git a/plugins/ms.design/images/InFlowPort.png b/plugins/ms.design/images/vpms-rotating/InFlowPort.png similarity index 100% rename from plugins/ms.design/images/InFlowPort.png rename to plugins/ms.design/images/vpms-rotating/InFlowPort.png diff --git a/plugins/ms.design/images/vpms-rotating/OutFlowPort-purple.png b/plugins/ms.design/images/vpms-rotating/OutFlowPort-purple.png new file mode 100644 index 0000000..3fa427d Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/OutFlowPort-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/OutFlowPort-red.png b/plugins/ms.design/images/vpms-rotating/OutFlowPort-red.png new file mode 100644 index 0000000..08729fb Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/OutFlowPort-red.png differ diff --git a/plugins/ms.design/images/OutFlowPort.png b/plugins/ms.design/images/vpms-rotating/OutFlowPort.png similarity index 100% rename from plugins/ms.design/images/OutFlowPort.png rename to plugins/ms.design/images/vpms-rotating/OutFlowPort.png diff --git a/plugins/ms.design/images/vpms-rotating/StandardPort_provided-purple.png b/plugins/ms.design/images/vpms-rotating/StandardPort_provided-purple.png new file mode 100644 index 0000000..c0309ed Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/StandardPort_provided-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/StandardPort_provided-red.png b/plugins/ms.design/images/vpms-rotating/StandardPort_provided-red.png new file mode 100644 index 0000000..5e999c4 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/StandardPort_provided-red.png differ diff --git a/plugins/ms.design/images/StandardPort_provided.png b/plugins/ms.design/images/vpms-rotating/StandardPort_provided.png similarity index 100% rename from plugins/ms.design/images/StandardPort_provided.png rename to plugins/ms.design/images/vpms-rotating/StandardPort_provided.png diff --git a/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired-purple.png b/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired-purple.png new file mode 100644 index 0000000..fa21222 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired-red.png b/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired-red.png new file mode 100644 index 0000000..4625531 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired-red.png differ diff --git a/plugins/ms.design/images/StandardPort_providedrequired.png b/plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired.png similarity index 100% rename from plugins/ms.design/images/StandardPort_providedrequired.png rename to plugins/ms.design/images/vpms-rotating/StandardPort_providedrequired.png diff --git a/plugins/ms.design/images/vpms-rotating/StandardPort_required-purple.png b/plugins/ms.design/images/vpms-rotating/StandardPort_required-purple.png new file mode 100644 index 0000000..81388f0 Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/StandardPort_required-purple.png differ diff --git a/plugins/ms.design/images/vpms-rotating/StandardPort_required-red.png b/plugins/ms.design/images/vpms-rotating/StandardPort_required-red.png new file mode 100644 index 0000000..a98d03b Binary files /dev/null and b/plugins/ms.design/images/vpms-rotating/StandardPort_required-red.png differ diff --git a/plugins/ms.design/images/StandardPort_required.png b/plugins/ms.design/images/vpms-rotating/StandardPort_required.png similarity index 100% rename from plugins/ms.design/images/StandardPort_required.png rename to plugins/ms.design/images/vpms-rotating/StandardPort_required.png diff --git a/plugins/ms.design/plugin.xml b/plugins/ms.design/plugin.xml index 9341e21..25463ad 100644 --- a/plugins/ms.design/plugin.xml +++ b/plugins/ms.design/plugin.xml @@ -29,4 +29,13 @@ providerClass="ms.design.MsRefreshExtensionProvider"> + + + + + + diff --git a/plugins/ms.design/src/ms/design/RotativeImageEditPartProvider.java b/plugins/ms.design/src/ms/design/RotativeImageEditPartProvider.java new file mode 100644 index 0000000..78a5852 --- /dev/null +++ b/plugins/ms.design/src/ms/design/RotativeImageEditPartProvider.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2006, 2019 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package ms.design; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.sirius.diagram.DNode; +import org.eclipse.sirius.diagram.WorkspaceImage; +import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNode4EditPart; +import org.eclipse.sirius.diagram.ui.internal.edit.parts.WorkspaceImageEditPart; +import org.polarsys.capella.core.sirius.analysis.editpart.RotativeDNode4EditPart; +import org.polarsys.capella.core.sirius.analysis.editpart.RotativeImageEditPart; + +/** + * Specific Edit Part Provider for rotative image + */ +public class RotativeImageEditPartProvider extends AbstractEditPartProvider { + + @Override + protected Class getNodeEditPartClass(final View view) { + String type = view.getType(); + + if (type != null) { + EObject resolvedSemanticElement = ViewUtil.resolveSemanticElement(view); + if (resolvedSemanticElement != null) { + + if (String.valueOf(WorkspaceImageEditPart.VISUAL_ID).equals(type)) { + if (resolvedSemanticElement instanceof WorkspaceImage) { + final WorkspaceImage customStyle = (WorkspaceImage) resolvedSemanticElement; + if (isRotative(customStyle)) { + return RotativeImageEditPart.class; + } + } + } else if (String.valueOf(DNode4EditPart.VISUAL_ID).equals(type)) { + if (resolvedSemanticElement instanceof DNode) { + + DNode spec = (DNode) resolvedSemanticElement; + if (spec.getOwnedStyle() != null && spec.getOwnedStyle() instanceof WorkspaceImage) { + if (isRotative((WorkspaceImage) spec.getOwnedStyle())) { + return RotativeDNode4EditPart.class; + } + } + } + } + } + } + + return super.getNodeEditPartClass(view); + } + + private boolean isRotative(WorkspaceImage ownedStyle_p) { + IPath path = new Path(ownedStyle_p.getWorkspacePath()); + if (path.segmentCount() >= 2) { + String folder = path.segment(path.segmentCount() - 2); + return "vpms-rotating".equals(folder); + } + return false; + } + +} diff --git a/plugins/org.polarsys.capella.vp.ms.ui.css/META-INF/MANIFEST.MF b/plugins/org.polarsys.capella.vp.ms.ui.css/META-INF/MANIFEST.MF index 456021e..c8ce583 100644 --- a/plugins/org.polarsys.capella.vp.ms.ui.css/META-INF/MANIFEST.MF +++ b/plugins/org.polarsys.capella.vp.ms.ui.css/META-INF/MANIFEST.MF @@ -10,7 +10,9 @@ Require-Bundle: org.eclipse.e4.ui.css.core;bundle-version="0.12.700", org.w3c.css.sac;bundle-version="1.3.1", org.eclipse.e4.ui.css.swt;bundle-version="0.13.500", org.eclipse.swt, - org.eclipse.core.resources;bundle-version="3.13.400" + org.eclipse.core.resources;bundle-version="3.13.400", + org.polarsys.capella.common.helpers, + org.polarsys.capella.core.data.gen Import-Package: org.eclipse.core.runtime Export-Package: org.polarsys.capella.vp.ms.ui.css, org.polarsys.capella.vp.ms.ui.css.dom, diff --git a/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/CSSRefreshExtension.java b/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/CSSRefreshExtension.java index b73bedd..2caf5b7 100644 --- a/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/CSSRefreshExtension.java +++ b/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/CSSRefreshExtension.java @@ -83,7 +83,12 @@ public void error(Exception e) { for (Layer layer : dDiagram.getActivatedLayers()) { URI resource = layer.eResource().getURI(); if (seen.add(resource)) { - URI cssURI = resource.trimFileExtension().appendFileExtension("css"); + + URI baseCssURI = resource.trimFileExtension(); + String filename = baseCssURI.lastSegment() + ".css"; + URI cssURI = baseCssURI.appendFileExtension("css"); + + URI diagramCssURI = baseCssURI.trimSegments(1).appendSegment(dDiagram.getDescription().getName()).appendSegment(filename); try { URL cssURL = FileLocator.find(new URL(cssURI.toString())); @@ -92,7 +97,13 @@ public void error(Exception e) { StyleSheet ss = engine.parseStyleSheet(is); } } - + URL diagramCssURL = FileLocator.find(new URL(diagramCssURI.toString())); + if (diagramCssURL != null) { + try (InputStream is = diagramCssURL.openStream()){ + StyleSheet ss = engine.parseStyleSheet(is); + } + } + if (workspaceBaseURI != null) { URI customCSSURI = workspaceBaseURI.appendSegment(cssURI.segment(cssURI.segmentCount() - 1)); String customCSSPlatformString = customCSSURI.toPlatformString(true); diff --git a/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/DSemanticDecoratorElement.java b/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/DSemanticDecoratorElement.java index 85edf8f..0c162e9 100644 --- a/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/DSemanticDecoratorElement.java +++ b/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/DSemanticDecoratorElement.java @@ -16,6 +16,8 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.sirius.viewpoint.DSemanticDecorator; +import org.polarsys.capella.core.data.capellacore.TypedElement; +import org.polarsys.capella.core.data.cs.Part; import org.w3c.dom.Element; public class DSemanticDecoratorElement extends EObjectElement { @@ -27,7 +29,11 @@ public DSemanticDecoratorElement(DSemanticDecorator nativeWidget, CSSEngine engi } protected EObject getTarget() { - return ((DSemanticDecorator)getNativeWidget()).getTarget(); + EObject target = ((DSemanticDecorator)getNativeWidget()).getTarget(); + if (target instanceof Part) { + target = ((TypedElement) target).getType(); + } + return target; } @Override diff --git a/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/EObjectElement.java b/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/EObjectElement.java index fb1560b..c28e61f 100644 --- a/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/EObjectElement.java +++ b/plugins/org.polarsys.capella.vp.ms.ui.css/src/org/polarsys/capella/vp/ms/ui/css/dom/EObjectElement.java @@ -12,11 +12,16 @@ *******************************************************************************/ package org.polarsys.capella.vp.ms.ui.css.dom; +import java.util.Collection; +import java.util.stream.Collectors; + import org.eclipse.e4.ui.css.core.dom.ElementAdapter; import org.eclipse.e4.ui.css.core.engine.CSSEngine; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.polarsys.capella.common.helpers.EObjectLabelProviderHelper; import org.polarsys.capella.vp.ms.ui.css.CSSAdapter; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -71,17 +76,32 @@ public String getAttribute(String attr) { return getCSSClass(); } - // must be careful here: - // in dom, if the attribute is the default, we must return null, not the default - // e.g. to match Component[actor] EObject widget = (EObject) getNativeWidget(); for (EAttribute ea : widget.eClass().getEAllAttributes()) { if (attr.equals(ea.getName())){ - if (widget.eIsSet(ea)) { - return EcoreUtil.convertToString(ea.getEAttributeType(), widget.eGet(ea)); + return EcoreUtil.convertToString(ea.getEAttributeType(), widget.eGet(ea)); + } + } + + // treat references as absent if they're not set to anything, this way you can test + // e.g. + // ComponentPort[providedInterfaces] { + // something: something; + // } + // and apply only if the port provides at least one interface + for (EReference ref : widget.eClass().getEAllReferences()) { + if (ref.getName().equals(attr)) { + if (widget.eIsSet(ref)){ + if (ref.isMany()) { + Collection c = (Collection) widget.eGet(ref); + return c.stream().map(EObjectLabelProviderHelper::getText).collect(Collectors.joining(",")); + } else { + return EObjectLabelProviderHelper.getText(widget.eGet(ref)); + } } } } + return null; }