Bug 580187 - [Designer, releng] Create a minimal feature/RCP for code generation - Remove UI dependency (org.eclipse.ui) in many MANIFEST.MF => Activator extends class Plugin instead of AbstractUIPlugin - Cleanup of non-required dependencies in many MANIFEST.MF files - Remove upper restriction on css plugin (compatibility with 2023-12) - Split oepr.ros2.preferences plugin in UI and non-UI part => add additional plugin to feature and to pom => TODO: StartupCheck is triggered via UI plugin. This needs some re-considerations - Don't defined MARTE URI, since already defined in SW Designer Change-Id: I281d3d55d0190b3299c5f430d41a42a7a6b27c02 Signed-off-by: aradermache <ansgar.radermacher@cea.fr>
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.bpc.profile/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.robotics.bpc.profile/META-INF/MANIFEST.MF index bfaeaad..0c33da8 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.bpc.profile/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.robotics.bpc.profile/META-INF/MANIFEST.MF
@@ -1,6 +1,5 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,6.0.0)", - org.eclipse.core.runtime, +Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.emf.ecore.xmi;visibility:=reexport, org.eclipse.uml2.types;visibility:=reexport,
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.core/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.robotics.core/META-INF/MANIFEST.MF index 39ca3f3..219d213 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.core/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.robotics.core/META-INF/MANIFEST.MF
@@ -30,7 +30,8 @@ org.eclipse.papyrus.infra.services.edit;bundle-version="[3.2.0,5.0.0)", org.eclipse.emf.edit.ui;bundle-version="2.0.0", org.eclipse.papyrus.designer.languages.common.base;bundle-version="2.1.0", - org.eclipse.papyrus.designer.uml.tools.utils;bundle-version="3.0.0" + org.eclipse.papyrus.designer.uml.tools.utils;bundle-version="3.0.0", + org.eclipse.papyrus.designer.transformation.base;bundle-version="3.0.0" Export-Package: org.eclipse.papyrus.robotics.core, org.eclipse.papyrus.robotics.core.commands, org.eclipse.papyrus.robotics.core.menu,
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/ChoiceTypeEditHelperAdvice.java b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/ChoiceTypeEditHelperAdvice.java index b7b48bd..cb67dc1 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/ChoiceTypeEditHelperAdvice.java +++ b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/ChoiceTypeEditHelperAdvice.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.MARTE.MARTE_Annexes.VSL.DataTypes.ChoiceType; +import org.eclipse.papyrus.designer.transformation.base.utils.StdModelLibs; import org.eclipse.papyrus.robotics.core.types.advice.AbstractApplyStereotypeEditHelperAdvice; import org.eclipse.papyrus.robotics.core.utils.MarteUtils; @@ -28,7 +29,7 @@ @Override protected URI getProfileURI() { - return MarteUtils.MARTE_PROFILE_URI; + return StdModelLibs.MARTE_PROFILE_URI; } @Override
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/CollectionTypeEditHelperAdvice.java b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/CollectionTypeEditHelperAdvice.java index 64e33df..4bc2759 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/CollectionTypeEditHelperAdvice.java +++ b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/CollectionTypeEditHelperAdvice.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.MARTE.MARTE_Annexes.VSL.DataTypes.CollectionType; +import org.eclipse.papyrus.designer.transformation.base.utils.StdModelLibs; import org.eclipse.papyrus.robotics.core.types.advice.AbstractApplyStereotypeEditHelperAdvice; import org.eclipse.papyrus.robotics.core.utils.MarteUtils; @@ -28,7 +29,7 @@ @Override protected URI getProfileURI() { - return MarteUtils.MARTE_PROFILE_URI; + return StdModelLibs.MARTE_PROFILE_URI; } @Override
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/NfpTypeEditHelperAdvice.java b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/NfpTypeEditHelperAdvice.java index 694c345..f3b3e93 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/NfpTypeEditHelperAdvice.java +++ b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/NfpTypeEditHelperAdvice.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.MARTE.MARTE_Foundations.NFPs.NfpType; +import org.eclipse.papyrus.designer.transformation.base.utils.StdModelLibs; import org.eclipse.papyrus.robotics.core.types.advice.AbstractApplyStereotypeEditHelperAdvice; import org.eclipse.papyrus.robotics.core.utils.MarteUtils; @@ -28,7 +29,7 @@ @Override protected URI getProfileURI() { - return MarteUtils.MARTE_PROFILE_URI; + return StdModelLibs.MARTE_PROFILE_URI; } @Override
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/TupleTypeEditHelperAdvice.java b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/TupleTypeEditHelperAdvice.java index 2aa6263..f95cb40 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/TupleTypeEditHelperAdvice.java +++ b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/types/advice/marte/TupleTypeEditHelperAdvice.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.MARTE.MARTE_Annexes.VSL.DataTypes.TupleType; +import org.eclipse.papyrus.designer.transformation.base.utils.StdModelLibs; import org.eclipse.papyrus.robotics.core.types.advice.AbstractApplyStereotypeEditHelperAdvice; import org.eclipse.papyrus.robotics.core.utils.MarteUtils; @@ -28,7 +29,7 @@ @Override protected URI getProfileURI() { - return MarteUtils.MARTE_PROFILE_URI; + return StdModelLibs.MARTE_PROFILE_URI; } @Override
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/utils/MarteUtils.java b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/utils/MarteUtils.java index 84d0ca8..a688db9 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/utils/MarteUtils.java +++ b/plugins/customization/org.eclipse.papyrus.robotics.core/src/org/eclipse/papyrus/robotics/core/utils/MarteUtils.java
@@ -15,11 +15,7 @@ package org.eclipse.papyrus.robotics.core.utils; -import org.eclipse.emf.common.util.URI; - public class MarteUtils { - public static final URI MARTE_PROFILE_URI = URI.createURI("pathmap://Papyrus_LIBRARIES/MARTE.profile.uml"); //$NON-NLS-1$ - public static final String MARTE_DATA_TYPES_SUBPROFILE = "MARTE::MARTE_Annexes::VSL::DataTypes"; //$NON-NLS-1$ public static final String MARTE_NFPS_SUBPROFILE = "MARTE::MARTE_Foundations::NFPs"; //$NON-NLS-1$ }
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.css/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.robotics.css/META-INF/MANIFEST.MF index d6a5e59..96dbcb3 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.css/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.robotics.css/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.4.0,4.0.0)", org.eclipse.papyrus.robotics.profile;bundle-version="0.7.0", org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,6.0.0)", - org.eclipse.e4.ui.css.core;bundle-version="[0.12.0,0.14.0)", + org.eclipse.e4.ui.css.core;bundle-version="[0.12.0,1.0.0)", org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,3.0.0)", org.eclipse.papyrus.robotics.core;bundle-version="0.7.0", org.eclipse.papyrus.infra.tools;bundle-version="[3.2.0,5.0.0)",
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.profile/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.robotics.profile/META-INF/MANIFEST.MF index a452d24..91ea265 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.profile/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.robotics.profile/META-INF/MANIFEST.MF
@@ -1,12 +1,10 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,6.0.0)", - org.eclipse.core.runtime;bundle-version="3.0.0", +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.0.0", org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)";visibility:=reexport, org.eclipse.papyrus.robotics.bpc.profile;bundle-version="0.8.0";visibility:=reexport, org.eclipse.emf.ecore.xmi;bundle-version="2.0.0";visibility:=reexport, org.eclipse.uml2.types;bundle-version="2.5.0";visibility:=reexport, - org.eclipse.uml2.uml;bundle-version="5.5.0";visibility:=reexport, - org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.4.0,5.0.0)" + org.eclipse.uml2.uml;bundle-version="5.5.0";visibility:=reexport Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: .
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.safety/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.robotics.safety/META-INF/MANIFEST.MF index 5800749..2101bf6 100644 --- a/plugins/customization/org.eclipse.papyrus.robotics.safety/META-INF/MANIFEST.MF +++ b/plugins/customization/org.eclipse.papyrus.robotics.safety/META-INF/MANIFEST.MF
@@ -6,15 +6,8 @@ Bundle-Activator: org.eclipse.papyrus.robotics.safety.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, - org.eclipse.papyrus.infra.gmfdiag.css.theme;bundle-version="1.2.0", org.eclipse.emf.ecore;bundle-version="[2.20.0,3.0.0)", - org.eclipse.gmf.runtime.notation;bundle-version="1.8.0", - org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.4.0,4.0.0)", org.eclipse.papyrus.robotics.profile;bundle-version="0.7.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,6.0.0)", - org.eclipse.e4.ui.css.core;bundle-version="[0.12.0,0.14.0)", - org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,3.0.0)", - org.eclipse.papyrus.uml.diagram.composite;bundle-version="[3.2.0,6.0.0)", org.polarsys.esf.core.profile.esfarchitectureconcepts;bundle-version="0.7.0", org.eclipse.papyrus.robotics.core;bundle-version="0.7.0" Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/META-INF/MANIFEST.MF index f13289a..a0e29be 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/META-INF/MANIFEST.MF
@@ -5,8 +5,7 @@ org.eclipse.papyrus.robotics.ros2.codegen.common.launch, org.eclipse.papyrus.robotics.ros2.codegen.common.message, org.eclipse.papyrus.robotics.ros2.codegen.common.utils -Require-Bundle: org.eclipse.ui, - org.eclipse.papyrus.designer.transformation.core;bundle-version="0.7.0", +Require-Bundle: org.eclipse.papyrus.designer.transformation.core;bundle-version="0.7.0", org.eclipse.uml2.uml;bundle-version="4.0.0", org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.4.0,5.0.0)", org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)", @@ -17,29 +16,19 @@ org.eclipse.xtext.xbase.lib, org.eclipse.xtend.lib, org.eclipse.xtend.lib.macro, - org.eclipse.uml2.uml.profile.standard;bundle-version="1.0.0", org.eclipse.papyrus.marte.static.profile;bundle-version="1.2.0", - org.eclipse.papyrus.designer.transformation.profile;bundle-version="0.7.0", org.eclipse.papyrus.designer.transformation.base;bundle-version="0.8.1", org.eclipse.papyrus.designer.deployment.tools;bundle-version="0.7.0", - org.eclipse.papyrus.designer.languages.cpp.codegen;bundle-version="1.1.0", org.eclipse.papyrus.designer.transformation.extensions;bundle-version="0.7.0", org.eclipse.papyrus.designer.deployment.profile;bundle-version="0.7.0", org.eclipse.papyrus.designer.languages.common.extensionpoints;bundle-version="1.1.0", org.eclipse.papyrus.designer.infra.base;bundle-version="1.1.0", - org.eclipse.papyrus.designer.languages.common.profile, - org.eclipse.papyrus.designer.infra.ui;bundle-version="1.1.0", org.eclipse.papyrus.robotics.profile;bundle-version="0.7.0", - org.eclipse.papyrus.designer.transformation.library;bundle-version="0.7.0", org.eclipse.papyrus.robotics.core;bundle-version="0.7.0", org.eclipse.papyrus.robotics.ros2.base;bundle-version="0.7.0", - org.eclipse.cdt.managedbuilder.core;bundle-version="8.0.0", - org.eclipse.cdt.core;bundle-version="5.4.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,6.0.0)", org.eclipse.papyrus.robotics.ros2.preferences;bundle-version="0.7.0", org.eclipse.papyrus.robotics.codegen.common;bundle-version="0.8.0", org.eclipse.core.runtime;bundle-version="3.0.0", - org.eclipse.papyrus.infra.tools;bundle-version="[3.2.0,5.0.0)", org.eclipse.emf.transaction;bundle-version="1.9.0", org.eclipse.papyrus.robotics.library;bundle-version="0.8.0", org.eclipse.papyrus.designer.languages.common.base;bundle-version="2.1.0",
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.notation b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.notation index 9952ead..511d71c 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.notation +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.notation
@@ -53,7 +53,7 @@ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-Xwr9fVkEemTJIu6MXTrdg"/> </children> <element xmi:type="uml:Class" href="ros2Library.uml#_G73NQ_VgEemTJIu6MXTrdg"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-Xu2wfVkEemTJIu6MXTrdg" x="64" y="51" width="357"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-Xu2wfVkEemTJIu6MXTrdg" x="64" y="51" width="317" height="170"/> </children> <children xmi:type="notation:Shape" xmi:id="__Ij2wPVkEemTJIu6MXTrdg" type="Class_Shape"> <children xmi:type="notation:DecorationNode" xmi:id="__Ij2wvVkEemTJIu6MXTrdg" type="Class_NameLabel"/> @@ -107,17 +107,17 @@ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__Ikd3_VkEemTJIu6MXTrdg"/> </children> <element xmi:type="uml:Class" href="ros2Library.uml#_G73NUPVgEemTJIu6MXTrdg"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="__Ij2wfVkEemTJIu6MXTrdg" x="60" y="300" width="361" height="161"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="__Ij2wfVkEemTJIu6MXTrdg" x="60" y="300" width="321" height="161"/> </children> <children xmi:type="notation:Shape" xmi:id="_Y390MPVlEemTJIu6MXTrdg" type="Comment_Shape"> <children xmi:type="notation:DecorationNode" xmi:id="_Y390MvVlEemTJIu6MXTrdg" type="Comment_BodyLabel"/> <element xmi:type="uml:Comment" href="ros2Library.uml#_G73NQfVgEemTJIu6MXTrdg"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y390MfVlEemTJIu6MXTrdg" x="520" y="81"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y390MfVlEemTJIu6MXTrdg" x="460" y="81"/> </children> <children xmi:type="notation:Shape" xmi:id="_Z2vJkPVlEemTJIu6MXTrdg" type="Comment_Shape"> <children xmi:type="notation:DecorationNode" xmi:id="_Z2vwoPVlEemTJIu6MXTrdg" type="Comment_BodyLabel"/> <element xmi:type="uml:Comment" href="ros2Library.uml#_G73NQvVgEemTJIu6MXTrdg"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z2vJkfVlEemTJIu6MXTrdg" x="520" y="311" width="264"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z2vJkfVlEemTJIu6MXTrdg" x="460" y="311" width="264"/> </children> <children xmi:type="notation:Shape" xmi:id="_Ay4SABNKEeqSqNoV_scP8g" type="StereotypeComment"> <styles xmi:type="notation:TitleStyle" xmi:id="_Ay4SARNKEeqSqNoV_scP8g"/> @@ -231,6 +231,22 @@ <element xsi:nil="true"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hg2t8q4zEeq7FZkihd40fQ" x="260" y="300"/> </children> + <children xmi:type="notation:Shape" xmi:id="_OSwIcJULEe6yobVqGRMybg" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_OSwIcZULEe6yobVqGRMybg"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_OSwIc5ULEe6yobVqGRMybg" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ros2Library.uml#_G73NQ_VgEemTJIu6MXTrdg"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OSwIcpULEe6yobVqGRMybg" x="264" y="51"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_OS9j05ULEe6yobVqGRMybg" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_OS9j1JULEe6yobVqGRMybg"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_OS9j1pULEe6yobVqGRMybg" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ros2Library.uml#_G73NUPVgEemTJIu6MXTrdg"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OS9j1ZULEe6yobVqGRMybg" x="260" y="300"/> + </children> <styles xmi:type="notation:StringValueStyle" xmi:id="_9eT7cfVkEemTJIu6MXTrdg" name="diagram_compatibility_version" stringValue="1.4.0"/> <styles xmi:type="notation:DiagramStyle" xmi:id="_9eT7cvVkEemTJIu6MXTrdg"/> <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_9eT7c_VkEemTJIu6MXTrdg" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> @@ -272,7 +288,7 @@ <element xsi:nil="true"/> <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_e4ucwvVlEemTJIu6MXTrdg" points="[552, 100, -643984, -643984]$[421, 100, -643984, -643984]"/> <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e8BBUPVlEemTJIu6MXTrdg" id="(0.0,0.31666666666666665)"/> - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e8BBUfVlEemTJIu6MXTrdg" id="(1.0,0.23444976076555024)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e8BBUfVlEemTJIu6MXTrdg" id="(1.0,0.28823529411764703)"/> </edges> <edges xmi:type="notation:Connector" xmi:id="_Ay4SBBNKEeqSqNoV_scP8g" type="StereotypeCommentLink" source="_-Xu2wPVkEemTJIu6MXTrdg" target="_Ay4SABNKEeqSqNoV_scP8g"> <styles xmi:type="notation:FontStyle" xmi:id="_Ay4SBRNKEeqSqNoV_scP8g"/> @@ -414,6 +430,26 @@ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hg2t964zEeq7FZkihd40fQ"/> <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hg2t-K4zEeq7FZkihd40fQ"/> </edges> + <edges xmi:type="notation:Connector" xmi:id="_OSwIdJULEe6yobVqGRMybg" type="StereotypeCommentLink" source="_-Xu2wPVkEemTJIu6MXTrdg" target="_OSwIcJULEe6yobVqGRMybg"> + <styles xmi:type="notation:FontStyle" xmi:id="_OSwIdZULEe6yobVqGRMybg"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_OSwIeZULEe6yobVqGRMybg" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ros2Library.uml#_G73NQ_VgEemTJIu6MXTrdg"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OSwIdpULEe6yobVqGRMybg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OSwId5ULEe6yobVqGRMybg"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OSwIeJULEe6yobVqGRMybg"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_OS9j15ULEe6yobVqGRMybg" type="StereotypeCommentLink" source="__Ij2wPVkEemTJIu6MXTrdg" target="_OS9j05ULEe6yobVqGRMybg"> + <styles xmi:type="notation:FontStyle" xmi:id="_OS9j2JULEe6yobVqGRMybg"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_OS9j3JULEe6yobVqGRMybg" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ros2Library.uml#_G73NUPVgEemTJIu6MXTrdg"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OS9j2ZULEe6yobVqGRMybg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OS9j2pULEe6yobVqGRMybg"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OS9j25ULEe6yobVqGRMybg"/> + </edges> </notation:Diagram> <notation:Diagram xmi:id="_ukx7QHNvEeqPZecp7_XFqQ" type="PapyrusUMLStateMachineDiagram" name="ROS states" measurementUnit="Pixel"> <children xmi:type="notation:Shape" xmi:id="_ukx7QXNvEeqPZecp7_XFqQ" type="StateMachine_Shape">
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.uml b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.uml index 32e3493..b6aea6b 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.uml +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/models/library/ros2Library.uml
@@ -9,10 +9,10 @@ </packageImport> <packagedElement xmi:type="uml:Package" xmi:id="_G73NQPVgEemTJIu6MXTrdg" name="m2mtransformations"> <ownedComment xmi:type="uml:Comment" xmi:id="_G73NQfVgEemTJIu6MXTrdg" annotatedElement="_G73NQ_VgEemTJIu6MXTrdg"> - <body>Standard transformation chain for ROS.</body> + <body>Standard transformation chain for ROS 2.</body> </ownedComment> <ownedComment xmi:type="uml:Comment" xmi:id="_G73NQvVgEemTJIu6MXTrdg" annotatedElement="_G73NUPVgEemTJIu6MXTrdg"> - <body>Transformation chain from ROS, if an explicit deployment plan is used</body> + <body>Transformation chain for ROS 2, if an explicit deployment plan is used</body> </ownedComment> <packagedElement xmi:type="uml:Class" xmi:id="_G73NQ_VgEemTJIu6MXTrdg" name="ROSChain"> <ownedAttribute xmi:type="uml:Property" xmi:id="_G73NRPVgEemTJIu6MXTrdg" name="manualTransformations">
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/Activator.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/Activator.java index aa91e34..692968e 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/Activator.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/Activator.java
@@ -14,14 +14,14 @@ package org.eclipse.papyrus.robotics.ros2.codegen.common; +import org.eclipse.core.runtime.Plugin; import org.eclipse.papyrus.infra.core.log.LogHelper; -import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ -public class Activator extends AbstractUIPlugin { +public class Activator extends Plugin { // The plug-in ID public static final String PLUGIN_ID = "org.eclipse.papyrus.robotics.ros2.codegen.common"; //$NON-NLS-1$
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/launch/LaunchScript.xtend b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/launch/LaunchScript.xtend index e156e9d..584498c 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/launch/LaunchScript.xtend +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.common/src/org/eclipse/papyrus/robotics/ros2/codegen/common/launch/LaunchScript.xtend
@@ -242,7 +242,7 @@ ''' /** - * an XML based aunch script (XML) + * an XML based launch script (XML) */ static def createLaunchScriptXML(Class system) ''' <launch>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.cpp/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.cpp/META-INF/MANIFEST.MF index 8b273e8..3a552fa 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.cpp/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.cpp/META-INF/MANIFEST.MF
@@ -18,7 +18,6 @@ org.eclipse.papyrus.designer.transformation.base;bundle-version="0.8.1", org.eclipse.papyrus.designer.deployment.tools;bundle-version="0.7.0", org.eclipse.papyrus.designer.languages.cpp.codegen;bundle-version="1.1.0", - org.eclipse.papyrus.designer.transformation.extensions;bundle-version="0.7.0", org.eclipse.papyrus.designer.languages.common.extensionpoints;bundle-version="1.1.0", org.eclipse.papyrus.designer.infra.base;bundle-version="1.1.0", org.eclipse.papyrus.designer.languages.common.profile, @@ -28,7 +27,6 @@ org.eclipse.papyrus.robotics.ros2.base;bundle-version="0.7.0", org.eclipse.cdt.managedbuilder.core;bundle-version="8.0.0", org.eclipse.cdt.core;bundle-version="5.4.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.4.0,6.0.0)", org.eclipse.papyrus.robotics.ros2.preferences;bundle-version="0.7.0", org.eclipse.papyrus.robotics.codegen.common;bundle-version="0.8.0", org.eclipse.core.runtime;bundle-version="3.0.0",
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.base/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.base/META-INF/MANIFEST.MF index 953394e..692b902 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.base/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.base/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui +Require-Bundle: org.eclipse.uml2.uml;bundle-version="5.5.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 0.9.0.qualifier
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.extra/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.extra/META-INF/MANIFEST.MF index b6f53c6..381deb4 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.extra/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.extra/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui +Require-Bundle: org.eclipse.uml2.uml;bundle-version="5.5.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 0.9.0.qualifier
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.hrim/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.hrim/META-INF/MANIFEST.MF index 2ae4918..44235e4 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.hrim/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.hrim/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui +Require-Bundle: org.eclipse.uml2.uml;bundle-version="5.5.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 0.9.0.qualifier
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.nav2/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.nav2/META-INF/MANIFEST.MF index dc4b051..f5d895e 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.nav2/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.library.nav2/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui +Require-Bundle: org.eclipse.uml2.uml;bundle-version="5.5.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 0.9.0.qualifier
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/.classpath b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/.classpath new file mode 100644 index 0000000..1db08c6 --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/.classpath
@@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="target/classes"/> +</classpath>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/.project b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/.project new file mode 100644 index 0000000..6242d2f --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/.project
@@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.robotics.ros2.preferences.ui</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + </natures> +</projectDescription>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000..27ca28c --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui;bundle-version="[3.100.0,4.0.0)", + org.eclipse.core.runtime;bundle-version="3.0.0", + org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)", + org.eclipse.jface.text;bundle-version="3.0.0", + org.eclipse.papyrus.robotics.ros2.base;bundle-version="0.8.0", + org.eclipse.papyrus.robotics.ros2.preferences;bundle-version="0.9.0" +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 0.9.0.qualifier +Bundle-Localization: plugin +Bundle-Name: %pluginName +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.robotics.ros2.preferences.ui;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Automatic-Module-Name: org.eclipse.papyrus.robotics.transformation.ros.library +Export-Package: org.eclipse.papyrus.robotics.ros2.preferences.ui +Bundle-Activator: org.eclipse.papyrus.robotics.ros2.preferences.ui.Activator
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/about.html b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/about.html new file mode 100644 index 0000000..778e1ba --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/about.html
@@ -0,0 +1,27 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/build.properties b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/build.properties new file mode 100644 index 0000000..caf99d0 --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/build.properties
@@ -0,0 +1,11 @@ +# +#Thu Jun 28 15:46:18 CEST 2012 +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + .classpath,\ + .project,\ + about.html,\ + plugin.properties +src.includes = about.html +source.. = src/
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/plugin.properties b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/plugin.properties new file mode 100644 index 0000000..ef2981c --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/plugin.properties
@@ -0,0 +1,11 @@ +# Copyright (c) CEA LIST. +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +pluginName=Papyrus for Robotics: handle ROS 2 preferences (Incubation) +providerName=Eclipse Modeling Project
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/plugin.xml b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/plugin.xml new file mode 100644 index 0000000..8664477 --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/plugin.xml
@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<plugin> + + <extension point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory" + class="org.eclipse.papyrus.robotics.ros2.preferences.ui.Ros2CodeGenPreferencePage" + id="org.eclipse.papyrus.robotics.ros2.preferences.ui.Ros2CodeGenPreferencePage" + name="ROS 2 code generation preferences"> + </page> + </extension> + + <extension point="org.eclipse.ui.startup"> + <startup class="org.eclipse.papyrus.robotics.ros2.preferences.ui.StartupCheck"/> + </extension> +</plugin>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/pom.xml b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/pom.xml new file mode 100644 index 0000000..819925d --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/pom.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.papyrus.robotics</groupId> + <artifactId>org.eclipse.papyrus.robotics.ros2</artifactId> + <version>0.9.0-SNAPSHOT</version> + </parent> + <artifactId>org.eclipse.papyrus.robotics.ros2.preferences.ui</artifactId> + <packaging>eclipse-plugin</packaging> + <description>Papyrus for Robotics: handle ROS 2 preferences</description> +</project>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/Activator.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/Activator.java new file mode 100644 index 0000000..84d10dc --- /dev/null +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/Activator.java
@@ -0,0 +1,73 @@ +/***************************************************************************** + * Copyright (c) 2020 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * Contributors: + * Ansgar Radermacher ansgar.radermacher@cea.fr + * + *****************************************************************************/ +package org.eclipse.papyrus.robotics.ros2.preferences.ui; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.robotics.ros2.preferences.ui"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + + // register the login helper + log = new LogHelper(plugin); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +}
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2CodeGenPreferencePage.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/Ros2CodeGenPreferencePage.java similarity index 95% rename from plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2CodeGenPreferencePage.java rename to plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/Ros2CodeGenPreferencePage.java index 78d0420..adf7c6f 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2CodeGenPreferencePage.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/Ros2CodeGenPreferencePage.java
@@ -12,7 +12,7 @@ * Ansgar Radermacher - Initial API and implementation *******************************************************************************/ -package org.eclipse.papyrus.robotics.ros2.preferences; +package org.eclipse.papyrus.robotics.ros2.preferences.ui; import org.eclipse.jface.preference.ComboFieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; @@ -20,6 +20,8 @@ import org.eclipse.jface.preference.StringFieldEditor; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.papyrus.robotics.ros2.preferences.Ros2Distributions; +import org.eclipse.papyrus.robotics.ros2.preferences.Ros2PreferenceConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; @@ -31,7 +33,7 @@ /** * This class represents a preference page that is contributed to the - * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage /samp>, + * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, * we can use the field support built into JFace that allows us to create a page * that is small and knows how to save, restore and apply itself. * <p>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/StartupCheck.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/StartupCheck.java similarity index 67% rename from plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/StartupCheck.java rename to plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/StartupCheck.java index 17c99ec..9b787cd 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/StartupCheck.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences.ui/src/org/eclipse/papyrus/robotics/ros2/preferences/ui/StartupCheck.java
@@ -14,11 +14,18 @@ * *****************************************************************************/ -package org.eclipse.papyrus.robotics.ros2.preferences; +package org.eclipse.papyrus.robotics.ros2.preferences.ui; import org.eclipse.papyrus.robotics.ros2.base.EnvironmentUtils; +import org.eclipse.papyrus.robotics.ros2.preferences.Ros2PreferenceUtils; import org.eclipse.ui.IStartup; +/** + * Initialize the startup here. We cannot do this in the activator of other P4R plugins, as + * the build via colcon does not trigger any P4R plugin loading (unless we add additional + * build commands). + * TODO: needs re-consideration in the context of web-based RCP + */ public class StartupCheck implements IStartup { @Override
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/META-INF/MANIFEST.MF b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/META-INF/MANIFEST.MF index 9341fa7..caf8840 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/META-INF/MANIFEST.MF +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/META-INF/MANIFEST.MF
@@ -1,6 +1,5 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui;bundle-version="[3.100.0,4.0.0)", - org.eclipse.core.runtime;bundle-version="3.0.0", +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.0.0", org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,3.0.0)", org.eclipse.jface.text;bundle-version="3.0.0", org.eclipse.papyrus.robotics.ros2.base;bundle-version="0.8.0"
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/plugin.xml b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/plugin.xml index 7c89497..b0a6607 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/plugin.xml +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/plugin.xml
@@ -6,17 +6,4 @@ class="org.eclipse.papyrus.robotics.ros2.preferences.Ros2PreferenceInitializer"> </initializer> </extension> - - <extension point="org.eclipse.ui.preferencePages"> - <page - category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory" - class="org.eclipse.papyrus.robotics.ros2.preferences.Ros2CodeGenPreferencePage" - id="org.eclipse.papyrus.robotics.ros2.preferences.Ros2CodeGenPreferencePage" - name="ROS 2 code generation preferences"> - </page> - </extension> - - <extension point="org.eclipse.ui.startup"> - <startup class="org.eclipse.papyrus.robotics.ros2.preferences.StartupCheck"/> - </extension> </plugin>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Activator.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Activator.java index 7131abb..dc109a9 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Activator.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Activator.java
@@ -13,14 +13,14 @@ *****************************************************************************/ package org.eclipse.papyrus.robotics.ros2.preferences; +import org.eclipse.core.runtime.Plugin; import org.eclipse.papyrus.infra.core.log.LogHelper; -import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ -public class Activator extends AbstractUIPlugin { +public class Activator extends Plugin { // The plug-in ID public static final String PLUGIN_ID = "org.eclipse.papyrus.robotics.ros2.preferences"; //$NON-NLS-1$
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceConstants.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceConstants.java index 792bfcb..71814cc 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceConstants.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceConstants.java
@@ -13,37 +13,50 @@ package org.eclipse.papyrus.robotics.ros2.preferences; +/** + * ROS2 preference constants (key + default value) + */ public class Ros2PreferenceConstants { /** * used ROS 2 distribution */ public static final String P_ROS_DISTRO = "rosDistro"; //$NON-NLS-1$ + public static final String P_DEFAULT_ROS_DISTRO = Ros2Distributions.HUMBLE; /** * list of paths in which to charge setup.bash files */ public static final String P_SETUP_PATH = "rosSetupPath"; //$NON-NLS-1$ + public static final String P_DEFAULT_SETUP_PATH = "/opt/ros/" + P_DEFAULT_ROS_DISTRO; //$NON-NLS-1$ /** * colcon build options, e.g. --symlink-install */ public static final String P_COLCON_OPTIONS = "colcon-options"; //$NON-NLS-1$ + public static final String P_DEFAULT_COLCON_OPTIONS = "--symlink-install"; //$NON-NLS-1$ /** * colcon option to build a particular package */ public static final String P_COLCON_PACKAGES = "colcon-packages"; //$NON-NLS-1$ + public static final String P_DEFAULT_COLCON_PACKAGES = "--packages-up-to"; //$NON-NLS-1$ /** * maintainer name and e-mail */ public static final String P_MAINTAINER_NAME = "maintainer-name"; //$NON-NLS-1$ + public static final String P_DEFAULT_MAINTAINER_NAME = "maintainer"; //$NON-NLS-1$ + public static final String P_MAINTAINER_MAIL = "maintainer-mail"; //$NON-NLS-1$ + public static final String P_DEFAULT_MAINTAINER_MAIL = "maintainer@somewhere.net"; //$NON-NLS-1$ /** * author name and e-mail */ public static final String P_AUTHOR_NAME = "author-name"; //$NON-NLS-1$ + public static final String P_DEFAULT_AUTHOR_NAME = "author"; //$NON-NLS-1$ + public static final String P_AUTHOR_MAIL = "author-mail"; //$NON-NLS-1$ + public static final String P_DEFAULT_AUTHOR_MAIL = "author@somewhere.net"; //$NON-NLS-1$ }
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceInitializer.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceInitializer.java index 063c019..e2b7deb 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceInitializer.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceInitializer.java
@@ -14,9 +14,10 @@ package org.eclipse.papyrus.robotics.ros2.preferences; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.core.runtime.preferences.DefaultScope; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; import org.eclipse.papyrus.robotics.ros2.base.EnvironmentUtils; @@ -27,30 +28,32 @@ * * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ - @SuppressWarnings("nls") @Override public void initializeDefaultPreferences() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - store.setDefault(Ros2PreferenceConstants.P_ROS_DISTRO, Ros2Distributions.HUMBLE); - store.setDefault(Ros2PreferenceConstants.P_SETUP_PATH, "/opt/ros/" + Ros2Distributions.HUMBLE); - store.setDefault(Ros2PreferenceConstants.P_COLCON_OPTIONS, "--symlink-install"); - store.setDefault(Ros2PreferenceConstants.P_COLCON_PACKAGES, "--packages-up-to"); - store.setDefault(Ros2PreferenceConstants.P_MAINTAINER_NAME, "maintainer"); - store.setDefault(Ros2PreferenceConstants.P_MAINTAINER_MAIL, "maintainer@somewhere.net"); - store.setDefault(Ros2PreferenceConstants.P_AUTHOR_NAME, "author"); - store.setDefault(Ros2PreferenceConstants.P_AUTHOR_MAIL, "author@somewhere.net"); - - IPropertyChangeListener changeListener = new IPropertyChangeListener() { - + IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(Activator.PLUGIN_ID); + prefs.put(Ros2PreferenceConstants.P_ROS_DISTRO, Ros2PreferenceConstants.P_DEFAULT_ROS_DISTRO); + prefs.put(Ros2PreferenceConstants.P_SETUP_PATH, Ros2PreferenceConstants.P_DEFAULT_SETUP_PATH); + prefs.put(Ros2PreferenceConstants.P_COLCON_OPTIONS, Ros2PreferenceConstants.P_DEFAULT_COLCON_OPTIONS); + prefs.put(Ros2PreferenceConstants.P_COLCON_PACKAGES, Ros2PreferenceConstants.P_DEFAULT_COLCON_PACKAGES); + prefs.put(Ros2PreferenceConstants.P_MAINTAINER_NAME, Ros2PreferenceConstants.P_DEFAULT_MAINTAINER_NAME); + prefs.put(Ros2PreferenceConstants.P_MAINTAINER_MAIL, Ros2PreferenceConstants.P_DEFAULT_MAINTAINER_MAIL); + prefs.put(Ros2PreferenceConstants.P_AUTHOR_NAME, Ros2PreferenceConstants.P_DEFAULT_AUTHOR_NAME); + prefs.put(Ros2PreferenceConstants.P_AUTHOR_MAIL, Ros2PreferenceConstants.P_DEFAULT_AUTHOR_MAIL); + + /** + * if the user changes the ROS2 setup path, re-run setup jobs. + */ + IPreferenceChangeListener changeListener = new IPreferenceChangeListener() { + @Override - public void propertyChange(PropertyChangeEvent event) { + public void preferenceChange(PreferenceChangeEvent changeEvent) { // update ROS 2 environment variables - if (event.getProperty() == Ros2PreferenceConstants.P_SETUP_PATH) { + if (changeEvent.getKey() == Ros2PreferenceConstants.P_SETUP_PATH) { EnvironmentUtils.waitForSetupJob(); EnvironmentUtils.runCheckAndApplySetupJob(Ros2PreferenceUtils.getSetupPath()); - } + } } }; - store.addPropertyChangeListener(changeListener); + prefs.addPreferenceChangeListener(changeListener); } }
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceUtils.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceUtils.java index f6e0b9a..6ae905d 100644 --- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceUtils.java +++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.preferences/src/org/eclipse/papyrus/robotics/ros2/preferences/Ros2PreferenceUtils.java
@@ -13,7 +13,8 @@ package org.eclipse.papyrus.robotics.ros2.preferences; -import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; /** * Utility class that returns the preference values (eventually taking @@ -21,51 +22,51 @@ */ public class Ros2PreferenceUtils { - protected static IPreferenceStore preferenceStore = null; + protected static IEclipsePreferences prefs = null; public static String getRosDistroStr() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_ROS_DISTRO); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_ROS_DISTRO, Ros2PreferenceConstants.P_DEFAULT_ROS_DISTRO); } public static String getSetupPath() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_SETUP_PATH); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_SETUP_PATH, Ros2PreferenceConstants.P_DEFAULT_SETUP_PATH); } public static String getColconOptions() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_COLCON_OPTIONS); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_COLCON_OPTIONS, Ros2PreferenceConstants.P_DEFAULT_COLCON_OPTIONS); } public static String getColconPackageOptions() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_COLCON_PACKAGES); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_COLCON_PACKAGES, Ros2PreferenceConstants.P_DEFAULT_COLCON_PACKAGES); } public static String getMaintainerName() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_MAINTAINER_NAME); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_MAINTAINER_NAME, Ros2PreferenceConstants.P_DEFAULT_MAINTAINER_NAME); } public static String getMaintainerMail() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_MAINTAINER_MAIL); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_MAINTAINER_MAIL, Ros2PreferenceConstants.P_DEFAULT_MAINTAINER_MAIL); } public static String getAuthorName() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_AUTHOR_NAME); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_AUTHOR_NAME, Ros2PreferenceConstants.P_DEFAULT_AUTHOR_NAME); } public static String getAuthorMail() { - initPreferenceStore(); - return preferenceStore.getString(Ros2PreferenceConstants.P_AUTHOR_MAIL); + initprefs(); + return prefs.get(Ros2PreferenceConstants.P_AUTHOR_MAIL, Ros2PreferenceConstants.P_DEFAULT_AUTHOR_MAIL); } - public static void initPreferenceStore() { - if (preferenceStore == null) { - preferenceStore = Activator.getDefault().getPreferenceStore(); + public static void initprefs() { + if (prefs == null) { + prefs = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID); } } }
diff --git a/plugins/ros2/pom.xml b/plugins/ros2/pom.xml index a35e5de..4e3866d 100644 --- a/plugins/ros2/pom.xml +++ b/plugins/ros2/pom.xml
@@ -24,6 +24,7 @@ <module>org.eclipse.papyrus.robotics.ros2.launch</module> <module>org.eclipse.papyrus.robotics.ros2.codegen.tests</module> <module>org.eclipse.papyrus.robotics.ros2.preferences</module> + <module>org.eclipse.papyrus.robotics.ros2.preferences.ui</module> <module>org.eclipse.papyrus.robotics.ros2.library.base</module> <module>org.eclipse.papyrus.robotics.ros2.library.extra</module> <module>org.eclipse.papyrus.robotics.ros2.library.nav2</module>
diff --git a/releng/org.eclipse.papyrus.robotics.ros2.feature/feature.xml b/releng/org.eclipse.papyrus.robotics.ros2.feature/feature.xml index 555ed86..d2ff5d0 100644 --- a/releng/org.eclipse.papyrus.robotics.ros2.feature/feature.xml +++ b/releng/org.eclipse.papyrus.robotics.ros2.feature/feature.xml
@@ -131,4 +131,11 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.eclipse.papyrus.robotics.ros2.preferences.ui" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + </feature>