From b9f9926791df0b34eca39c905092df2e54298288 Mon Sep 17 00:00:00 2001 From: ipa-nhg Date: Fri, 29 Sep 2023 18:38:56 +0200 Subject: [PATCH] Remove out-of-date projects --- .../.classpath | 7 - .../.project | 28 - .../.settings/org.eclipse.jdt.core.prefs | 10 - .../META-INF/MANIFEST.MF | 30 - .../build.properties | 6 - .../icons/ros_compare_model.jpg | Bin 7569 -> 0 bytes .../icons/ros_compare_model.png | Bin 1694 -> 0 bytes .../plugin.xml | 52 -- .../pom.xml | 32 -- .../spec/check/CheckModelSpecHandler.java | 25 - .../model/spec/check/CompareModelWizard.java | 282 ---------- .../.classpath | 8 - .../.gitignore | 1 - .../.project | 34 -- .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 10 - .../META-INF/MANIFEST.MF | 18 - .../build.properties | 19 - .../plugin.xml | 51 -- .../pom.xml | 31 - .../ipa/ros/observer/Activator.java | 7 - .../ipa/ros/observer/GenerationHandler.java | 229 -------- .../ObserverExecutableExtensionFactory.java | 19 - .../generator/ObserverPyCodeGenerator.xtend | 89 --- .../de.fraunhofer.ipa.ros.sirius/.classpath | 7 - plugins/de.fraunhofer.ipa.ros.sirius/.project | 28 - .../.settings/org.eclipse.jdt.core.prefs | 9 - .../META-INF/MANIFEST.MF | 23 - .../build.properties | 8 - .../description/ros.odesign | 462 --------------- .../icons/action_icon.png | Bin 141 -> 0 bytes .../icons/component.gif | Bin 90 -> 0 bytes .../icons/component.svg | 85 --- .../icons/parameters.png | Bin 750 -> 0 bytes .../icons/parameters_scale.png | Bin 810 -> 0 bytes .../icons/ros_logo.png | Bin 605 -> 0 bytes .../icons/service_icon.png | Bin 1863 -> 0 bytes .../icons/tools.png | Bin 517 -> 0 bytes .../icons/topic_icon.png | Bin 1783 -> 0 bytes .../plugin.properties | 3 - .../de.fraunhofer.ipa.ros.sirius/plugin.xml | 54 -- plugins/de.fraunhofer.ipa.ros.sirius/pom.xml | 12 - .../fraunhofer/ipa/ros/sirius/Activator.java | 66 --- .../ipa/ros/sirius/AutoConnect.java | 138 ----- .../ipa/ros/sirius/ConnectionsCheckUtils.java | 123 ---- .../ExternalJavaActionNewComponents.java | 54 -- .../ExternalJavaActionNewParameter.java | 86 --- .../ipa/ros/sirius/RemoveAllConnections.java | 64 --- .../RemoveComponentsWithConnections.java | 118 ---- .../fraunhofer/ipa/ros/sirius/Services.java | 17 - .../sirius/SimulateRuntimeConnections.java | 141 ----- .../.classpath | 8 - .../.project | 34 -- .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 18 - .../build.properties | 17 - .../plugin.xml | 94 ---- .../pom.xml | 31 - .../ipa/roscode/generator/Activator.java | 7 - .../roscode/generator/Generation2Handler.java | 82 --- .../roscode/generator/GenerationHandler.java | 82 --- .../generator/ParameterGeneratorHelpers.xtend | 95 ---- .../roscode/generator/Ros2CodeGenerator.xtend | 291 ---------- .../roscode/generator/RosCodeGenerator.xtend | 211 ------- ...deGeneratorExecutableExtensionFactory.java | 19 - .../.classpath | 7 - .../.project | 28 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 32 -- .../build.properties | 6 - .../icons/merge-documents.png | Bin 9655 -> 0 bytes .../icons/merge-documents_icon.png | Bin 4309 -> 0 bytes .../plugin.xml | 52 -- .../pom.xml | 32 -- .../combination/CombineModelHandler.java | 25 - .../combination/CombineModelsWizard.java | 530 ------------------ 77 files changed, 4205 deletions(-) delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/.classpath delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/.project delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/META-INF/MANIFEST.MF delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/build.properties delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/icons/ros_compare_model.jpg delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/icons/ros_compare_model.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/plugin.xml delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/pom.xml delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CheckModelSpecHandler.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CompareModelWizard.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/.classpath delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/.gitignore delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/.project delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.core.resources.prefs delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/META-INF/MANIFEST.MF delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/build.properties delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/plugin.xml delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/pom.xml delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/Activator.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/GenerationHandler.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/ObserverExecutableExtensionFactory.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/generator/ObserverPyCodeGenerator.xtend delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/.classpath delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/.project delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/META-INF/MANIFEST.MF delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/build.properties delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/description/ros.odesign delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/action_icon.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/component.gif delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/component.svg delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/parameters.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/parameters_scale.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/ros_logo.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/service_icon.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/tools.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/icons/topic_icon.png delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/plugin.properties delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/plugin.xml delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/pom.xml delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Activator.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/AutoConnect.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ConnectionsCheckUtils.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewComponents.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewParameter.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveAllConnections.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveComponentsWithConnections.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Services.java delete mode 100644 plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/SimulateRuntimeConnections.java delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/.classpath delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/.project delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.core.resources.prefs delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/META-INF/MANIFEST.MF delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/build.properties delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/plugin.xml delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/pom.xml delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Activator.java delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Generation2Handler.java delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/GenerationHandler.java delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/ParameterGeneratorHelpers.xtend delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Ros2CodeGenerator.xtend delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGenerator.xtend delete mode 100644 plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGeneratorExecutableExtensionFactory.java delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/.classpath delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/.project delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/META-INF/MANIFEST.MF delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/build.properties delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/icons/merge-documents.png delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/icons/merge-documents_icon.png delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/plugin.xml delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/pom.xml delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelHandler.java delete mode 100644 plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelsWizard.java diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/.classpath b/plugins/de.fraunhofer.ipa.ros.model.spec.check/.classpath deleted file mode 100644 index 62b961327..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/.project b/plugins/de.fraunhofer.ipa.ros.model.spec.check/.project deleted file mode 100644 index 9d0a0b1dc..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - de.fraunhofer.ipa.ros.model.spec.check - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/.settings/org.eclipse.jdt.core.prefs b/plugins/de.fraunhofer.ipa.ros.model.spec.check/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 907fef17b..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,10 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=19 -org.eclipse.jdt.core.compiler.compliance=19 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=19 diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/META-INF/MANIFEST.MF b/plugins/de.fraunhofer.ipa.ros.model.spec.check/META-INF/MANIFEST.MF deleted file mode 100644 index d7c4f35d7..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/META-INF/MANIFEST.MF +++ /dev/null @@ -1,30 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Check -Bundle-SymbolicName: de.fraunhofer.ipa.ros.model.spec.check;singleton:=true -Bundle-Version: 2.0.0.qualifier -Automatic-Module-Name: de.fraunhofer.ipa.ros.model.spec.check -Bundle-RequiredExecutionEnvironment: JavaSE-19 -Import-Package: org.eclipse.core.commands, - org.eclipse.core.resources, - org.eclipse.core.runtime;version="3.5.0", - org.eclipse.emf.common.ui.dialogs, - org.eclipse.emf.common.util, - org.eclipse.emf.ecore, - org.eclipse.emf.ecore.resource, - org.eclipse.emf.ecore.resource.impl, - org.eclipse.emf.edit.ui.provider, - org.eclipse.jface.dialogs, - org.eclipse.jface.operation, - org.eclipse.jface.viewers, - org.eclipse.jface.window, - org.eclipse.jface.wizard, - org.eclipse.swt, - org.eclipse.swt.events, - org.eclipse.swt.layout, - org.eclipse.swt.widgets, - org.eclipse.ui, - org.eclipse.ui.actions, - org.eclipse.ui.dialogs, - org.eclipse.ui.handlers, - ros diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/build.properties b/plugins/de.fraunhofer.ipa.ros.model.spec.check/build.properties deleted file mode 100644 index 056f99229..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - icons/,\ - .,\ - plugin.xml diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/icons/ros_compare_model.jpg b/plugins/de.fraunhofer.ipa.ros.model.spec.check/icons/ros_compare_model.jpg deleted file mode 100644 index bda913471f6cdd8cef4be412b0f8dd5c150b584c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7569 zcmbt&cTiK?yLJ$eF4CJ25s*$SAX0M_=>`OpUZhC}5fFqxjv&1qK|n!>G()6G36UB) z2RWc56bVuiL<9s91>8c)&F}v1+&lBld^6vCckNk!?7i1|XFY4Z>v^B|Wqx9=f=*kR zS(<^^*gzmQ)&pWLf=pO%|GV}tBmX-Ktl7+dkPtWM4(KjB+d0q)AvSg)Hs&x0%vvYs zzios5tFfJ6=iofa#m&RZ#~Oe+4LZTb&VGV}os*M;gEcyl^&i9`#3?L)@!CldJ8!OY zk)oF#Kdt0exZW}#WAbRvs+zXW72T_P`X)C_&CD$q(uD}wEsl*{{}4i{|niF1N$FbL=Zna8|(1cg+NdcgQ1>JRnDjJt#0n@ zz}?os{6H{yS0pkdtSQ9xVTsO2mw_3FkDC2Mo(8~-PKG-FL}%yPfPV`fZd$Xl-1SQ1pW@>A2R2)O3jg!; zuUGyV+g{4%uQm-gtO%V<5K6|5uq_dR2z7doYyUNrS&OCQ=fV{dplLl0Rl(Drf=Y`E zFKyZ{OvJt@-htc|GHUp9F|pXv{)S7~E(%))chJ}Uhw7*f0H&-+d>HUO|Ehvv9!jofe-qymyT$~K*@BWLk=%w+R22DMU1`7* znn2a(tr8Vk&ckN7#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J=O56Yp_mO>uRHTCYSthv3?LC$JhPsK&1)7)_Kl;p8vboS7pVGgU_cQ zi8_rBM!o)BsVo%>YaWpsCh`7tzg}`m;PskfO_?hyBzU%|JH+<~lp*T{jUXb(r{$28 ztW7ZOT{T12`@VkC4ES_9{XNl~3DQzO7|bGUU(Nr045jh>MwA>p^ghr~rn9s3cE19{ z{0obHl3hGbAu)o(P?}PEKEvIfRqJTjWrDta>yu~Y=bAN$A7q?cVD+{b6SVQ238E;k zGb|7egG|szBM6NR{IrcFRn+~v(%eFj#8@)tNYA(FNseXF=`UH%pS-J|$~enEeLSQp zsc?3_HO`j7vq$Q^3?pbmB;n3fY__3ZjmxLa!}wE0sBg<$ZDCNGWOcU?8T9^*vRm)k zj}0#lX+T4B{c|p1m(Sx&>J(4GlrtJ;%Uv*wFZQua(7C=f*V{pM52Axc%L>*DlkLKk z6Rvc*e}RjvLb+&qA46#uSCN97eP=#?_jTU+uDuwYd_mL~o@(~nFT7bXXX+noVN0EP SJ5#?vQ9D!6|E(jK3;zLW`!MzZ diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/icons/ros_compare_model.png b/plugins/de.fraunhofer.ipa.ros.model.spec.check/icons/ros_compare_model.png deleted file mode 100644 index 04adc1ae1799a642b625a077fa8a107f9559deae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1694 zcmV;P24VS$P)XH{L{bVVr33(plpv+a!ytqJAt0$KNW6LmJUn~+S^A^> zY|Guo;pYzHusa^ep{0}oJY6>#4Gbd`Eooqim}&3vQ6DzDjfG3A5UK_ULg8`h->auT z+E0nAgjcq_@|i{fG>J@cGCmeUGv=UL93T>&Dai#007W1G)gtg+e1q#jFQse0iWCY* z8;^3@cN$&j9DM2^*=gA`MopVOFeNBL1w~63PR>h_ur87zP~5p>&dw+7{h0QP2GQ(X z4mBS_BB@(aM@3=9j79;p1er`cGU0tB8Y2`6qbULjn5IMmcHM%*rV~NomUn<6d6)jy zll=5t2LUrcp`(y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er.ipa.ros.model.spec.check/plugin.xml b/plugins/de.fraunhofer.ipa.ros.model.spec.check/plugin.xml deleted file mode 100644 index e21f484c1..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/plugin.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/pom.xml b/plugins/de.fraunhofer.ipa.ros.model.spec.check/pom.xml deleted file mode 100644 index 8f6f11f70..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - 4.0.0 - - de.fraunhofer.ipa.ros - de.fraunhofer.ipa.ros.parent - 2.0.0-SNAPSHOT - ../de.fraunhofer.ipa.ros.parent/pom.xml - - de.fraunhofer.ipa.ros.model.spec.check - eclipse-plugin - - - - - org.eclipse.tycho - target-platform-configuration - - - - - eclipse-plugin - org.eclipse.ui.ide - 0.0.0 - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CheckModelSpecHandler.java b/plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CheckModelSpecHandler.java deleted file mode 100644 index d655b94d3..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CheckModelSpecHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -package model.spec.check; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.handlers.HandlerUtil; - -public class CheckModelSpecHandler extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent event) { - Shell activeShell = HandlerUtil.getActiveShell(event); - CompareModelWizard wizard = new CompareModelWizard(); - wizard.init(PlatformUI.getWorkbench(), new StructuredSelection()); - WizardDialog dialog = new WizardDialog(activeShell,wizard); - dialog.create(); - dialog.getShell().setText("Compare ROS model specifications"); - int result = dialog.open(); - return null; - } - -} diff --git a/plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CompareModelWizard.java b/plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CompareModelWizard.java deleted file mode 100644 index 58312e229..000000000 --- a/plugins/de.fraunhofer.ipa.ros.model.spec.check/src/model/spec/check/CompareModelWizard.java +++ /dev/null @@ -1,282 +0,0 @@ -package model.spec.check; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.jface.wizard.WizardSelectionPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.actions.WorkspaceModifyOperation; - -import ros.ActionClient; -import ros.ActionServer; -import ros.Artifact; -import ros.Node; -import ros.Package; -import ros.PackageSet; -import ros.Publisher; -import ros.ServiceClient; -import ros.ServiceServer; -import ros.Subscriber; - -/** - * This is a simple wizard for creating a new model file. - * - * - * @generated - */ -public class CompareModelWizard extends Wizard implements INewWizard { - - protected SelectinputFile getInputFileCreationPage; - - public void init(IWorkbench workbench, IStructuredSelection selection) { - setWindowTitle("Compare"); - } - - @Override - public boolean performFinish() { - try { - IFile InputFile = getInputFileCreationPage.getInputFile(); - String RelativePath = InputFile.getProject().getName()+"/"+InputFile.getProjectRelativePath(); - ResourceSet rs_input = new ResourceSetImpl(); - Resource resource_input = rs_input.getResource(URI.createPlatformResourceURI(RelativePath,true),true); - PackageSet packageSet_model_input = (PackageSet) resource_input.getContents().get(0); - EList package_model_input = (EList) packageSet_model_input.getPackage(); - EList artifact_input = (EList) package_model_input.get(0).getArtifact(); - Node rosnode_input = (Node) artifact_input.get(0).getNode(); - EList pubs_input = (EList) rosnode_input.getPublisher(); - EList subs_input = (EList) rosnode_input.getSubscriber(); - EList scls_input = (EList) rosnode_input.getServiceclient(); - EList ssrs_input = (EList) rosnode_input.getServiceserver(); - EList acls_input = (EList) rosnode_input.getActionclient(); - EList asrs_input = (EList) rosnode_input.getActionserver(); - - final IFile SpecFile = getInputFileCreationPage.getSpecFile(); - String SpecRelativePath = SpecFile.getProject().getName()+"/"+SpecFile.getProjectRelativePath(); - ResourceSet rs_spec = new ResourceSetImpl(); - Resource resource_spec = rs_spec.getResource(URI.createPlatformResourceURI(SpecRelativePath,true),true); - PackageSet packageSet_model_spec = (PackageSet) resource_spec.getContents().get(0); - EList package_model_spec = (EList) packageSet_model_spec.getPackage(); - EList artifact_spec = (EList) package_model_spec.get(0).getArtifact(); - Node rosnode_spec = (Node) artifact_spec.get(0).getNode(); - EList pubs_spec = (EList) rosnode_spec.getPublisher(); - EList subs_spec = (EList) rosnode_spec.getSubscriber(); - EList scls_spec = (EList) rosnode_spec.getServiceclient(); - EList ssrs_spec = (EList) rosnode_spec.getServiceserver(); - EList acls_spec = (EList) rosnode_spec.getActionclient(); - EList asrs_spec = (EList) rosnode_spec.getActionserver(); - - ArrayList Errors = new ArrayList<>(); - ArrayList OKs = new ArrayList<>(); - - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - @Override - protected void execute(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { - try { - for(Publisher pub:pubs_spec) { - boolean pub_ok = false; - for (Publisher pub_i:pubs_input) { - if (pub.getMessage().getFullname().equals(pub_i.getMessage().getFullname())){ - pub_ok = true; - OKs.add("- OK: Publisher for message type " + pub.getMessage().getFullname() +" found: \n" +pub.getName() + " -> " + pub_i.getName()); - } - } - if (!pub_ok) { - Errors.add("- ERROR: missed a publisher for message type:\n" +pub.getMessage().getFullname()); - } - } - for(Subscriber sub:subs_spec) { - boolean sub_ok = false; - for (Subscriber sub_i:subs_input) { - if (sub.getMessage().getFullname().equals(sub_i.getMessage().getFullname())){ - sub_ok = true; - OKs.add("- OK: Subscriber for message type " + sub.getMessage().getFullname() +" found: \n" +sub.getName() + " -> " + sub_i.getName()); - } - } - if (!sub_ok) { - Errors.add("- ERROR: missed a subscriber for message type:\n" +sub.getMessage().getFullname()); - } - } - for(ServiceClient scl:scls_spec) { - boolean scl_ok = false; - for (ServiceClient scl_i:scls_input) { - if (scl.getService().getFullname().equals(scl_i.getService().getFullname())){ - scl_ok = true; - OKs.add("- OK: Service Client for service type " + scl.getService().getFullname() +" found: \n" +scl.getName() + " -> " + scl_i.getName()); - } - } - if (!scl_ok) { - Errors.add("- ERROR: missed a ServiceClient for service type:\n" +scl.getService().getFullname()); - } - } - for(ServiceServer ssr:ssrs_spec) { - boolean ssr_ok = false; - for (ServiceServer ssr_i:ssrs_input) { - if (ssr.getService().getFullname().equals(ssr_i.getService().getFullname())){ - ssr_ok = true; - OKs.add("- OK: Service Server for service type " + ssr.getService().getFullname() +" found: \n" +ssr.getName() + " -> " + ssr_i.getName()); - } - } - if (!ssr_ok) { - Errors.add("- ERROR: missed a ServiceServer for service type:\n" +ssr.getService().getFullname()); - } - } - for(ActionClient acl:acls_spec) { - boolean acl_ok = false; - for (ActionClient acl_i:acls_input) { - if (acl.getAction().getFullname().equals(acl_i.getAction().getFullname())){ - acl_ok = true; - OKs.add("- OK: Action Client for action type " + acl.getAction().getFullname() +" found: \n" +acl.getName() + " -> " + acl_i.getName()); - } - } - if (!acl_ok) { - Errors.add("- ERROR: missed a ActionClient for action type:\n" +acl.getAction().getFullname()); - } - } - for(ActionServer asr:asrs_spec) { - boolean asr_ok = false; - for (ActionServer asr_i:asrs_input) { - if (asr.getAction().getFullname().equals(asr_i.getAction().getFullname())){ - asr_ok = true; - OKs.add("- OK: Action Server for action type " + asr.getAction().getFullname() +" found: \n" +asr.getName() + " -> " + asr_i.getName()); - } - } - if (!asr_ok) { - Errors.add("- ERROR: missed a ActionServer for action type:\n" +asr.getAction().getFullname()); - } - } - }finally { - // create a dialog with ok and cancel buttons and a question icon - MessageBox dialog; - String message ="Validate the file:\n "+ InputFile.getName() + "\nfor the specifications model:\n"+ SpecFile.getName()+"\n"; - if (!Errors.isEmpty()) { - dialog = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK); - message+="\nERRORS:\n"; - for (String s:Errors) { - message+=s+"\n"; - } - } else { - dialog = new MessageBox(getShell(), SWT.ICON_WORKING | SWT.OK); - } - if (!OKs.isEmpty()) { - message+="\nOK:\n"; - for (String s:OKs) { - message+=s+"\n"; - } - } - dialog.setText("Specification checker"); - dialog.setMessage(message); - // open dialog and await user selection - dialog.open(); - } - }}; - - getContainer().run(false, false, operation); - return true; - }catch (Exception exception) { - return false; - } - } - - public class SelectinputFile extends WizardSelectionPage{ - private Composite container; - private Text locationPathField; - private Text locationPathField2; - private Button browseButton1; - private Button browseButton2; - protected IFile SpecFile; - protected IFile InputFile; - private String spec_path; - private String input_path; - - protected SelectinputFile(String pageId) { - super(pageId); - } - @Override - public void createControl(Composite parent) { - container = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(2, false); - container.setLayout(layout); - layout.numColumns = 1; - Label label1 = new Label(container, SWT.NONE); - label1.setText("Input model"); - locationPathField = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData (GridData.FILL_HORIZONTAL); - gd.grabExcessHorizontalSpace = true; - gd.horizontalAlignment = GridData.FILL; - locationPathField.setLayoutData(gd); - browseButton1 = new Button(container, SWT.PUSH); - browseButton1.setText("Browse..."); - browseButton1.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - public void widgetSelected(SelectionEvent e) { - IFile[] files_input = WorkspaceResourceDialog.openFileSelection(getShell(), "Select the ROS Input model", "open", false, null, null); - InputFile= files_input[0]; - input_path = InputFile.getLocation().toString(); - if (input_path == null) return; - locationPathField.setText(InputFile.getName()); - } - }); - Label label2 = new Label(container, SWT.NONE); - label2.setText("Specification model"); - locationPathField2 = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd2 = new GridData (GridData.FILL_HORIZONTAL); - gd2.grabExcessHorizontalSpace = true; - gd2.horizontalAlignment = GridData.FILL; - locationPathField2.setLayoutData(gd2); - browseButton2 = new Button(container, SWT.PUSH); - browseButton2.setText("Browse..."); - browseButton2.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - public void widgetSelected(SelectionEvent e) { - IFile[] files = WorkspaceResourceDialog.openFileSelection(getShell(), "Select the ROS Specification model", "open", false, null, null); - SpecFile= files[0]; - spec_path= SpecFile.getLocation().toString(); - if (spec_path == null) return; - locationPathField2.setText(SpecFile.getName()); - } - }); - setControl(container); - setPageComplete(true); - } - - public IFile getSpecFile() { - return SpecFile; - } - public IFile getInputFile() { - return InputFile; - } - } - - @Override - public void addPages() { - getInputFileCreationPage = new SelectinputFile("Whatever"); - getInputFileCreationPage.setTitle("Select ROS model input"); - getInputFileCreationPage.setDescription("Select ROS model input"); - addPage(getInputFileCreationPage); - } - -} diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/.classpath b/plugins/de.fraunhofer.ipa.ros.observer.generator/.classpath deleted file mode 100644 index 1725f5d08..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/.gitignore b/plugins/de.fraunhofer.ipa.ros.observer.generator/.gitignore deleted file mode 100644 index ae3c17260..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/.project b/plugins/de.fraunhofer.ipa.ros.observer.generator/.project deleted file mode 100644 index 894391735..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - de.fraunhofer.ipa.ros.observer.generator - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.xtext.ui.shared.xtextNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.core.resources.prefs b/plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c020..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.jdt.core.prefs b/plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 907fef17b..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,10 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=19 -org.eclipse.jdt.core.compiler.compliance=19 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=19 diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/META-INF/MANIFEST.MF b/plugins/de.fraunhofer.ipa.ros.observer.generator/META-INF/MANIFEST.MF deleted file mode 100644 index 5ed911957..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: de.fraunhofer.ipa.ros.observer.generator -Bundle-SymbolicName: de.fraunhofer.ipa.ros.observer.generator;singleton:=true -Bundle-Version: 2.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-19 -Import-Package: javax.inject;version="1.0.0", - org.eclipse.ui.handlers, - org.eclipse.xtext.ui.resource -Bundle-ActivationPolicy: lazy -Bundle-Activator: de.fraunhofer.ipa.ros.observer.Activator -Require-Bundle: org.eclipse.xtext.builder, - org.eclipse.xtext.ui, - de.fraunhofer.ipa.ros.xtext.ui, - de.fraunhofer.ipa.ros, - de.fraunhofer.ipa.rossystem, - de.fraunhofer.ipa.rossystem.xtext.ui -Export-Package: de.fraunhofer.ipa.ros.observer diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/build.properties b/plugins/de.fraunhofer.ipa.ros.observer.generator/build.properties deleted file mode 100644 index f1db2cffa..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -source.. = src/,\ - xtend-gen/ -bin.includes = .,\ - META-INF/,\ - plugin.xml -bin.excludes = **/*.mwe2,\ - **/*.xtend -additional.bundles = org.eclipse.xtext.xbase,\ - org.eclipse.xtext.common.types,\ - org.eclipse.xtext.xtext.generator,\ - org.eclipse.emf.codegen.ecore,\ - org.eclipse.emf.mwe.utils,\ - org.eclipse.emf.mwe2.launch,\ - org.eclipse.emf.mwe2.lib,\ - org.objectweb.asm,\ - org.apache.commons.logging,\ - org.apache.log4j,\ - com.ibm.icu,\ - org.eclipse.xtext.generator diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/plugin.xml b/plugins/de.fraunhofer.ipa.ros.observer.generator/plugin.xml deleted file mode 100644 index 39d4236a0..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/plugin.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/pom.xml b/plugins/de.fraunhofer.ipa.ros.observer.generator/pom.xml deleted file mode 100644 index d72b7bb44..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - - de.fraunhofer.ipa.ros - de.fraunhofer.ipa.ros.parent - 2.0.0-SNAPSHOT - ../de.fraunhofer.ipa.ros.parent/pom.xml - - de.fraunhofer.ipa.ros.observer.generator - eclipse-plugin - - - - - org.eclipse.xtend - xtend-maven-plugin - - - org.apache.maven.plugins - maven-clean-plugin - - - xtend-gen-clean - clean - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/Activator.java b/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/Activator.java deleted file mode 100644 index ff087a9c2..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/Activator.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.fraunhofer.ipa.ros.observer; - -import de.fraunhofer.ipa.rossystem.xtext.ui.internal.XtextActivator; - -public class Activator extends XtextActivator { - -} diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/GenerationHandler.java b/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/GenerationHandler.java deleted file mode 100644 index 59e68efea..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/GenerationHandler.java +++ /dev/null @@ -1,229 +0,0 @@ -package de.fraunhofer.ipa.ros.observer; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.dialogs.ElementListSelectionDialog; -import org.eclipse.ui.handlers.HandlerUtil; -import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2; -import org.eclipse.xtext.generator.GeneratorContext; -import org.eclipse.xtext.generator.IOutputConfigurationProvider; -import org.eclipse.xtext.generator.OutputConfiguration; -import org.eclipse.xtext.resource.IResourceDescriptions; -import org.eclipse.xtext.ui.resource.IResourceSetProvider; - -import com.google.inject.Inject; -import com.google.inject.Provider; - -import componentInterface.ComponentInterface; -import componentInterface.RosPublisher; -import de.fraunhofer.ipa.ros.observer.generator.CustomOutputProvider; -import de.fraunhofer.ipa.ros.observer.generator.ObserverPyCodeGenerator; -import ros.Subscriber; -import ros.impl.SubscriberImpl; -import rossystem.RosSystem; - -public class GenerationHandler extends AbstractHandler implements IHandler { - - @Inject - private Provider fileAccessProvider; - - @Inject - IResourceDescriptions resourceDescriptions; - - @Inject - IResourceSetProvider resourceSetProvider; - - static Map getOutputConfigurationsAsMap(IOutputConfigurationProvider provider) { - Map outputs = new HashMap(); - for(OutputConfiguration c: provider.getOutputConfigurations()) { - outputs.put(c.getName(), c); - } - return outputs; - } - - @SuppressWarnings("null") - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - ISelection selection = HandlerUtil.getCurrentSelection(event); - if (selection instanceof IStructuredSelection) { - IStructuredSelection structuredSelection = (IStructuredSelection) selection; - Object firstElement = structuredSelection.getFirstElement(); - if (firstElement instanceof IFile) { - IFile file = (IFile) firstElement; - IProject project = file.getProject(); - - URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); - ResourceSet rs = resourceSetProvider.get(project); - Resource r = rs.getResource(uri, true); - - Display display = Display.getDefault(); - Shell shell = display.getActiveShell(); - - RosSystem rossystem = (RosSystem)r.getContents().get(0); - EList roscomponents = rossystem.getRosComponent(); - List RosInterfaces = new ArrayList(); - for (int i=0; i NewRosInterfaces = getInterfaces(roscomponents.get(i)); - for (int j= 0;j Build Automatilly is enable !!!"); - dialogSelect.setMultipleSelection(true); - dialogSelect.open(); - - Object[] results = dialogSelect.getResult(); - - String observer_name = "my_observer"; - String RelativePathTogenerationFolder = "src-gen/observers/"; - String RelativePathToObserverModel = RelativePathTogenerationFolder+observer_name+".ros"; - IFile ObserverModelFile = project.getFile(RelativePathToObserverModel); - - String ros_model = - "PackageSet { \n" + - " CatkinPackage rosgraph_monitor {" + - " Artifact "+observer_name+" {\n" + - " Node { name /"+observer_name+"\n"; - ros_model+=" Publishers { \n"+ - " Publisher { name '/diagnostics' message 'diagnostic_msgs.DiagnosticArray'}}\n"; - List rossubscribers = new ArrayList(); - - for (Object result_: results) { - for (EObject ResultInterface: RosInterfaces) { - if((getViewMenuInterfaceName(ResultInterface)).equals(result_.toString())) { - EObject SelectedInterface = ResultInterface; - - if (SelectedInterface.getClass().toString().contains("componentInterface.impl.RosPublisherImpl")) { - Subscriber sub = new SubscriberImpl(); - sub.setName(((RosPublisher) SelectedInterface).getName()); - sub.setMessage(((RosPublisher)SelectedInterface).getPublisher().getMessage()); - rossubscribers.add(sub); - } - }}} - if (!rossubscribers.isEmpty()) { - ros_model+=" Subscribers {\n"; - for(int i=0;i getInterfaces(ComponentInterface componentInterface_model) { - List ROSInterfaces = new ArrayList(); - for (RosPublisher RosPub: componentInterface_model.getRospublisher()) { - ROSInterfaces.add(RosPub); - } - /**for (RosSubscriber RosSub: componentInterface_model.getRossubscriber()) { - ROSInterfaces.add(RosSub); - } - for (RosServiceClient RosSrvc: componentInterface_model.getRosserviceclient()) { - ROSInterfaces.add(RosSrvc); - } - for (RosServiceServer RosSrvs: componentInterface_model.getRosserviceserver()) { - ROSInterfaces.add(RosSrvs); - } - for (RosActionClient RosActc: componentInterface_model.getRosactionclient()) { - ROSInterfaces.add(RosActc); - } - for (RosActionServer RosActs: componentInterface_model.getRosactionserver()) { - ROSInterfaces.add(RosActs); - }*/ - return ROSInterfaces; - } - - private String getInterfaceName(EObject RosInterface) { - String name = RosInterface.toString().substring(RosInterface.toString().indexOf("name:")+6,RosInterface.toString().indexOf(",")); - return name; - } - private String getViewMenuInterfaceName(EObject RosInterface) { - String name = "["+RosInterface.toString().substring(RosInterface.toString().indexOf("impl.Ros")+8,RosInterface.toString().indexOf("Impl@"))+"] "+ - getInterfaceName(RosInterface); - return name; - } - - @Override - public boolean isEnabled() { - return true; - } - } diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/ObserverExecutableExtensionFactory.java b/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/ObserverExecutableExtensionFactory.java deleted file mode 100644 index f0899bc99..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/ObserverExecutableExtensionFactory.java +++ /dev/null @@ -1,19 +0,0 @@ -package de.fraunhofer.ipa.ros.observer; - -import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory; -import org.osgi.framework.Bundle; - -import com.google.inject.Injector; - -public class ObserverExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory { - - @Override - protected Bundle getBundle() { - return Activator.getInstance().getBundle(); - } - - @Override - protected Injector getInjector() { - return Activator.getInstance().getInjector(Activator.DE_FRAUNHOFER_IPA_ROSSYSTEM_ROSSYSTEM); - } - } diff --git a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/generator/ObserverPyCodeGenerator.xtend b/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/generator/ObserverPyCodeGenerator.xtend deleted file mode 100644 index 043a6a19b..000000000 --- a/plugins/de.fraunhofer.ipa.ros.observer.generator/src/de/fraunhofer/ipa/ros/observer/generator/ObserverPyCodeGenerator.xtend +++ /dev/null @@ -1,89 +0,0 @@ -package de.fraunhofer.ipa.ros.observer.generator - -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.xtext.generator.AbstractGenerator -import org.eclipse.xtext.generator.IFileSystemAccess2 -import org.eclipse.xtext.generator.IGeneratorContext -import org.eclipse.xtext.generator.IOutputConfigurationProvider -import org.eclipse.xtext.generator.OutputConfiguration -import java.util.Set -import ros.Node - -class CustomOutputProvider implements IOutputConfigurationProvider { - public final static String OBSERVER_OUTPUT = "OBSERVER_OUTPUT" - - override Set getOutputConfigurations() { - var OutputConfiguration observer_config = new OutputConfiguration(OBSERVER_OUTPUT) - observer_config.setDescription("OBSERVER_OUTPUT"); - observer_config.setOutputDirectory("./src-gen/observers/"); - observer_config.setOverrideExistingResources(true); - observer_config.setCreateOutputDirectory(true); - observer_config.setCleanUpDerivedResources(true); - observer_config.setSetDerivedProperty(true); - return newHashSet(observer_config) - } -} - - -class ObserverPyCodeGenerator extends AbstractGenerator { - - int count_sub - - def void createXtextGenerationFolder (IFileSystemAccess2 fsa, IGeneratorContext context) { - fsa.generateFile("lock",CustomOutputProvider::OBSERVER_OUTPUT,''''''); - fsa.deleteFile("lock",CustomOutputProvider::OBSERVER_OUTPUT); - } - - override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { - for (node : resource.allContents.toIterable.filter(Node)){ - fsa.generateFile(node.getName()+".py",CustomOutputProvider::OBSERVER_OUTPUT,node.compile) - } - } - -def compile(Node node) { - count_sub = node.subscriber.size -''' -from rosgraph_monitor.observer import TopicObserver -«FOR sub:node.subscriber» -from «sub.message.package.name».msg import «sub.message.name» -«ENDFOR» -from diagnostic_msgs.msg import DiagnosticStatus, KeyValue - - -class «node.name.replace("_","").replace("/","").toFirstUpper»(TopicObserver): - def __init__(self, name): - - topics = [ -«FOR sub:node.subscriber»«val count_sub=count_sub--» - ("«sub.name»", «sub.message.name»)«IF count_sub > 1 »,«ENDIF»«ENDFOR» - ] - - super(«node.name.replace("_","").replace("/","").toFirstUpper», self).__init__( - name, 10, topics) - - def calculate_attr(self, msgs): - status_msg = DiagnosticStatus() - - #Write here your code (or uncomment the following lines) - #if len(msgs) < 2: - # print("Incorrect number of messages") - # return status_msg - - #... - - #attr = msgs[0].data + msgs[1].data - #print("{0} + {1}".format(msgs[0].data, msgs[1].data)) - - status_msg = DiagnosticStatus() - status_msg.level = DiagnosticStatus.OK - status_msg.name = self._id - # Set here your name attribute - status_msg.values.append( - KeyValue("KeyName", attr)) - status_msg.message = "QA status" - - return status_msg -''' -} - -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/.classpath b/plugins/de.fraunhofer.ipa.ros.sirius/.classpath deleted file mode 100644 index e804adf57..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/.project b/plugins/de.fraunhofer.ipa.ros.sirius/.project deleted file mode 100644 index 39407163a..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - de.fraunhofer.ipa.ros.sirius - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/.settings/org.eclipse.jdt.core.prefs b/plugins/de.fraunhofer.ipa.ros.sirius/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d41383c70..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=19 -org.eclipse.jdt.core.compiler.compliance=19 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=19 diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/META-INF/MANIFEST.MF b/plugins/de.fraunhofer.ipa.ros.sirius/META-INF/MANIFEST.MF deleted file mode 100644 index 049c0fee9..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: de.fraunhofer.ipa.ros.sirius;singleton:=true -Bundle-Version: 2.0.0.qualifier -Bundle-Activator: de.fraunhofer.ipa.ros.sirius.Activator -Bundle-Localization: plugin -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.sirius, - org.eclipse.sirius.common.acceleo.aql, - de.fraunhofer.ipa.ros, - org.eclipse.ui.workbench, - org.eclipse.ui.ide, - org.eclipse.sirius.common, - org.eclipse.sirius.diagram.ui, - de.fraunhofer.ipa.rossystem -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-19 -Bundle-Vendor: %providerName -Automatic-Module-Name: de.fraunhofer.ipa.ros.sirius -Export-Package: de.fraunhofer.ipa.ros.sirius diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/build.properties b/plugins/de.fraunhofer.ipa.ros.sirius/build.properties deleted file mode 100644 index ec79d6f85..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - description/,\ - icons/,\ - plugin.properties,\ - plugin.xml diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/description/ros.odesign b/plugins/de.fraunhofer.ipa.ros.sirius/description/ros.odesign deleted file mode 100644 index 972afd43e..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/description/ros.odesign +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/action_icon.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/action_icon.png deleted file mode 100644 index 9c55be3719d20f3b6ba3d9a09515bbc01327f7cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^;y^6M!2~3ih)e(pFc&*{hH!9j+33vY2hJ9^H|M*2j7#OSpwJ#!0 diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/component.svg b/plugins/de.fraunhofer.ipa.ros.sirius/icons/component.svg deleted file mode 100644 index a0833a9f8..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/icons/component.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/parameters.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/parameters.png deleted file mode 100644 index d416b063918634d3abc327f5c93320ebb4bbd1dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 750 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAv7|ftIx;Y9?C1WI$O_~uBzpw; zGB8xBF)%c=FfjZA3N^f7U???UV0e|lz+g3lfkC`r&aOZkpv3$DpAc6d&8<3tOSPX% zt)E9_5|>IJmr6gEN-s!6wVy$|0V2hvI)OoYh7ML)4D(HBG`@^66|L?v@>M*>q?BxBo z-rLP|1$lW=g=VMTo)#7?$-LItLiy;cs>d6j7cFq(Yg;4ilWv#YVBm6~(SCN)A*n>U z=F&!1Yxa)k9TC$Ly!R3`N$>&1mzlT!Zhld?|7%0l zD@mKH|9h^_=lRILaaEoCql}}e0@t4No^;iRdP`(kYX@0 zFtpG$Fw-?M2r)FYGBUI>FxNIPvNA9ba{ecTq9HdwB{QuOw}xanw{<`bk{}y`^V3So o6N^$A%FE03GV`*FlM@S4_413-XTP(N0xDwgboFyt=akR{09hvY6aWAK diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/parameters_scale.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/parameters_scale.png deleted file mode 100644 index dc7f646e42c7861052c8ea7914c1d807de1c6843..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 810 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!SkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP$ECTC&U#N%K}A%7dcjgEz1%=HSUrz& zFHn$2WfGSfSPHBFXwxMou38|aToU9L%)pqs`I*%I!)ABB)VDeR`@7gfg8BY?bMHSE z%NJg9{2=Oi?bDJ{HW{FD#w2fd7lsa2Sq~tGv%n*=7#JkiL734=V|E2lkiEpy*OmPd zn+Ug*^357YPM{utPZ!6Kh{JcM-xO*x;Bn=4Wi3A%E4cOl|9-a^2j97O(rOg>x9lu_ z&NF4(Oo?Duk=rU83sdentt;ELt}9R7r&msDW#9y<-Qh>nT((a6dTEP$v#Da1Q)HHp zmvfTSmD|5f+#_;16<&Wg)_idKwUi=bO%=Ou;RophmF@3z+x9ceDK}YmGsSB5`Si=2 zzQ>jA8$Lhdo~09BemKkXq|$fBi1)MF&VKvZb(?o-wtU0acQ1CX7q9exd5%3{FME~P z)`)J?cm3cyz;yMNnhLvJ#I$}zIcq)bbRUOwVD6dPvUr7J~1fw zATYF5OI#yLQW8s2t&)pUffR$0fuV)2ftjw6L5QKDm64g1v8lF!k(GhL%l^*`Q8eV{ zr(~v8;?^+ZlD8~SgCxj?;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1STJYD@< J);T3K0RS^_Ad&z8 diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/ros_logo.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/ros_logo.png deleted file mode 100644 index 3362fc8c849dadd2ada1f8a66afc51d9e1b2b8ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcmV-j0;2tiP)!3?T)FhNz%H2mghrAi|o8 zGn%9bTS5qbL0i=I!*D1NPE1M?9sB`@ci!jydbPH-MbGK^2RwlPJv)1OxKf5PfFz_c z%#sj`5u!+j3IPT{0E!8?2gFqd!~(+X_{h$g{^8h&Dl-VeZk%p9c@KsXfSUjav#WsS z0c#cT1cqJ!0{|A>A&cy>0fPWeryAQP4c1}6Gc)u6U{rRFh2Zn<91G4lcRrte`Ebpp z15VD&j*oP?`-HpK3Aj&Zc4mB}o#c|JUQy@V!`-dzoeO1gA`;n8>Xwo->e-HaN%Tg_4&i>WC00000NkvXXu0mjf7QPL% diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/service_icon.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/service_icon.png deleted file mode 100644 index f125792372610eb22d85e3b75fd5d72fa3a3f1a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1863 zcmeAS@N?(olHy`uVBq!ia0vp^qChOd!3HFgyvvM%6kC$Fy9>jA5L~c#`DCC7XMsm# zF#`j)FbFd;%$g$s6l5>)^mS!_#KpyDCUs`(+Lu5f$r9Iy66gHf+|;}h2Ir#G#FEq$ zh4Rdj3pfi@Lo5Utm#{_uWOPhw{QvCL2cTZ!z<)*t2FCx`)q;d) zH>EMKFfuR#9Zv!PDkh|!i3H<_R!SQ~|NSTA8KNBsSIEQ&40vh-+IXMZt^}FKL<8S5 z0KHFrV~0?f(j=lr4W)Vr&?HH*fa({b(?7UC17#L`CEI@n7FHG(oYe!iZ~+;IoCjfi bgf)x|p1Klq47Scc0MhU2>gTe~DWM4f{|`cj diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/tools.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/tools.png deleted file mode 100644 index eedac5f3e74d8c0aee35ccfb6517b476607e17b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 517 zcmV+g0{Z=lP)7W?ZU0F;h|ehah@(kAj_3G}yMsV80jXmN2SVG2tyq7Gp;i#?B}l>T zhJLHj>Ciu0jigQjEaOV*b|JK1&H3OgUcw%%CeZslY`kjd*D;E7_=XoS8DbZY@iPw_ z`|+V=>vdd$hxm<76piCYBrM_#UiSfXFgtuG!PV?_?imu;7eLtz~O$* z?&#g2X2G@4##*}E=CvAfLC>+x#G9$xQEaB1rq@j1PfC~>a0nYIcM-?n4W=<4!u|ie zL#MEwV9)4XxH+ug5voC;fSpM8Sca2vGM9G(NiXRvKH=hD2FDEo4(Ey=00000NkvXX Hu0mjf6+Yx# diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/icons/topic_icon.png b/plugins/de.fraunhofer.ipa.ros.sirius/icons/topic_icon.png deleted file mode 100644 index f46018756f80f6061f0393f0a48d45426ce1941b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1783 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWS|IVfk$L9 z0|U1(2s1Lwnj--eWH0gbb!C6V#l@#5vQkW9J5Wfn#5JPCIX^cyHLrxhxhOTUBsE2$ zJhLQ2!QIn0AiR-J9B6vHr;B5Vg&<=H+v=Z;Ku!OFm}-EDY9>Jq8a0se5FHJ}(J&+< j1V)n$8G(kTWdw%dxp$1}N*N3GfkML5)z4*}Q$iB}bxA34 diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/plugin.properties b/plugins/de.fraunhofer.ipa.ros.sirius/plugin.properties deleted file mode 100644 index 3d2dd03b6..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/plugin.properties +++ /dev/null @@ -1,3 +0,0 @@ -pluginName = de.fraunhofer.ipa.ros.sirius -providerName = Fraunhofer IPA -viewpointName = MyViewpoint diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/plugin.xml b/plugins/de.fraunhofer.ipa.ros.sirius/plugin.xml deleted file mode 100644 index 69b2ed720..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/plugin.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/pom.xml b/plugins/de.fraunhofer.ipa.ros.sirius/pom.xml deleted file mode 100644 index a32cf1464..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - de.fraunhofer.ipa.ros - de.fraunhofer.ipa.ros.parent - 2.0.0-SNAPSHOT - ../de.fraunhofer.ipa.ros.parent/pom.xml - - de.fraunhofer.ipa.ros.sirius - eclipse-plugin - diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Activator.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Activator.java deleted file mode 100644 index 9899deae4..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Activator.java +++ /dev/null @@ -1,66 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.HashSet; -import java.util.Set; - -import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; -import org.eclipse.sirius.viewpoint.description.Viewpoint; -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 = "de.fraunhofer.ipa.ros.sirius"; - - // The shared instance - private static Activator plugin; - - private static Set viewpoints; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - viewpoints = new HashSet(); - viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/ros.odesign")); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - if (viewpoints != null) { - for (final Viewpoint viewpoint: viewpoints) { - ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); - } - viewpoints.clear(); - viewpoints = null; - } - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/AutoConnect.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/AutoConnect.java deleted file mode 100644 index 7dec742db..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/AutoConnect.java +++ /dev/null @@ -1,138 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; -import org.eclipse.sirius.viewpoint.DView; -import org.eclipse.ui.IWorkbench; -import componentInterface.ComponentInterface; -import componentInterface.RosActionClient; -import componentInterface.RosActionServer; -import componentInterface.RosPublisher; -import componentInterface.RosServiceClient; -import componentInterface.RosServiceServer; -import componentInterface.RosSubscriber; -import rossystem.ActionConnection; -import rossystem.RosSystem; -import rossystem.ServiceConnection; -import rossystem.TopicConnection; -import rossystem.impl.ActionConnectionImpl; -import rossystem.impl.RosSystemImpl; -import rossystem.impl.ServiceConnectionImpl; -import rossystem.impl.TopicConnectionImpl; - -public class AutoConnect implements IExternalJavaAction { - public IFile modelFile; - protected IWorkbench workbench; - protected IStructuredSelection selection; - // public static final List FILE_EXTENSIONS = - // Collections.unmodifiableList(Arrays.asList(ComponentInterfaceEditorPlugin.INSTANCE.getString("_UI_ComponentInterfaceEditorFilenameExtensions").split("\\s*,\\s*"))); - protected ExecutionEvent event; - - public AutoConnect() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean canExecute(Collection arg0) { - // TODO Auto-generated method stub - return true; - } - - @Override - public void execute(Collection arg0, Map arg1) { - boolean duplicated = false; - for (EObject diagram : arg0) { - List owned_views = ConnectionsCheckUtils.getDiagramViews(diagram); - for (DView view : owned_views) { - for (EObject rossystemEObj : view.getModels()) { - RosSystemImpl rossystem = ((RosSystemImpl)rossystemEObj); - for (ComponentInterface component : rossystem.getRosComponent()) { - for (RosPublisher rospub : component.getRospublisher()) { - for (ComponentInterface component2 : rossystem.getRosComponent()) { - for (RosSubscriber rossub : component2.getRossubscriber()) { - if (ConnectionsCheckUtils.containEqualCommunicationObjects( - rospub.getPublisher().getMessage(), rossub.getSubscriber().getMessage())) { - if (rospub.eContainer() != rossub.eContainer()) { - duplicated = false; - System.out.println("Possible Topic Connection found [" + rospub.eContainer() - + "]" + rospub.getName() + "->[" + rossub.eContainer() + "]" - + rossub.getName()); - // Check if connection already exists - duplicated = ConnectionsCheckUtils - .isDuplicatedTopicConnection(rossystem, rospub, rossub); - if (!duplicated) { - TopicConnection topic_connection = new TopicConnectionImpl(); - topic_connection.setTopicName(rospub.getName()); - topic_connection.getFrom().add(rospub); - topic_connection.getTo().add(rossub); - rossystem.getTopicConnections().add(topic_connection); - } - } - } - } - } - } - for (RosServiceClient rosscl : component.getRosserviceclient()) { - for (ComponentInterface component2 : ((RosSystem) rossystem).getRosComponent()) { - for (RosServiceServer rosss : component2.getRosserviceserver()) { - if (ConnectionsCheckUtils.containEqualCommunicationObjects( - rosscl.getSrvclient().getService(), rosss.getSrvserver().getService())) { - if (rosscl.eContainer() != rosss.eContainer()) { - duplicated = false; - System.out.println("Possible Service Connection found [" - + rosscl.eContainer() + "]" + rosscl.getName() + "->[" - + rosss.eContainer() + "]" + rosss.getName()); - // Check if connection already exists - duplicated = ConnectionsCheckUtils.isDuplicatedServiceConnection( - rossystem, rosss, rosscl); - if (!duplicated) { - ServiceConnection srv_connection = new ServiceConnectionImpl(); - srv_connection.setServiceName(rosscl.getName()); - srv_connection.setTo(rosscl); - srv_connection.getFrom().add(rosss); - rossystem.getServiceConnections().add(srv_connection); - } - } - } - } - } - } - for (RosActionClient rosac : component.getRosactionclient()) { - for (ComponentInterface component2 : rossystem.getRosComponent()) { - for (RosActionServer rosas : component2.getRosactionserver()) { - if (ConnectionsCheckUtils.containEqualCommunicationObjects( - rosac.getActclient().getAction(), rosas.getActserver().getAction())) { - if (rosac.eContainer() != rosas.eContainer()) { - - System.out.println("Possible Action Connection found [" + rosac.eContainer() - + "]" + rosac.getName() + "->[" + rosas.eContainer() + "]" - + rosas.getName()); - // Check if connection already exists - duplicated = ConnectionsCheckUtils - .isDuplicatedActionConnection(rossystem, rosac, rosas); - if (!duplicated) { - ActionConnection action_connection = new ActionConnectionImpl(); - action_connection.setActionName(rosac.getName()); - action_connection.setFrom(rosas); - action_connection.setTo(rosac); - rossystem.getActionConnections().add(action_connection); - } - } - } - } - } - } - } - } - } - } - } - -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ConnectionsCheckUtils.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ConnectionsCheckUtils.java deleted file mode 100644 index 95e575fa9..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ConnectionsCheckUtils.java +++ /dev/null @@ -1,123 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - - -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.common.util.EList; -import org.eclipse.sirius.business.api.session.Session; -import org.eclipse.sirius.business.api.session.SessionManager; -import org.eclipse.sirius.diagram.impl.DSemanticDiagramImpl; -import org.eclipse.sirius.viewpoint.DAnalysis; -import org.eclipse.sirius.viewpoint.DView; - -import componentInterface.RosActionClient; -import componentInterface.RosActionServer; -import componentInterface.RosPublisher; -import componentInterface.RosServiceClient; -import componentInterface.RosServiceServer; -import componentInterface.RosSubscriber; -import ros.SpecBase; -import rossystem.ActionConnection; -import rossystem.RosSystem; -import rossystem.ServiceConnection; -import rossystem.TopicConnection; - -/* - * Class with utility functions used by AutoConnect and SimulateRuntimeConnections - */ - -public final class ConnectionsCheckUtils { - - private ConnectionsCheckUtils() { - - } - - static List getDiagramViews(EObject diagram) { - - EObject target = ((DSemanticDiagramImpl) diagram).getTarget(); - Session session = SessionManager.INSTANCE.getSession(target); - DAnalysis slaveAnalysis = (DAnalysis) session.getSessionResource().getContents().get(0); - String name = ((DSemanticDiagramImpl) diagram).getName(); - EList owned_views = slaveAnalysis.getOwnedViews(); - - List current_views = owned_views.stream() - .filter(view -> view.getOwnedRepresentationDescriptors().toString().contains(name)) - .collect(Collectors.toList()); - - return current_views; - } - - static boolean containEqualCommunicationObjects(SpecBase message1, SpecBase message2) { - if (message1==null | message2==null) { - return false; - } - boolean haveEqualName = false; - if (message1.isSetFullname() && message2.isSetFullname()) { - if (message1.getFullname().equals(message2.getFullname())) { - haveEqualName = true; - } - } else { - if (message1.getName().equals(message2.getName())) { - haveEqualName = true; - } - } - - boolean haveEqualContent = true; - if (message1.eContents().size() != message2.eContents().size()) { - haveEqualContent = false; - } else { - for (EObject communicationObject1 : message1.eContents()) { - Optional optional = message2.eContents().stream() - .filter(obj -> EcoreUtil.equals(obj, communicationObject1)).findFirst(); - if (!optional.isPresent()) { - haveEqualContent = false; - } - } - } - return haveEqualName && haveEqualContent; - } - - static boolean isDuplicatedTopicConnection(RosSystem rossystem, RosPublisher rospub, RosSubscriber rossub) { - for (TopicConnection topic_con : rossystem.getTopicConnections()) { - for (RosPublisher pub_con : topic_con.getFrom()) { - for (RosSubscriber sub_con : topic_con.getTo()) { - if (pub_con == rospub && sub_con == rossub) { - System.out.println("Connection already exits"); - return true; - } - } - } - } - - return false; - } - - static boolean isDuplicatedServiceConnection(RosSystem rossystem, RosServiceServer rosss, RosServiceClient rosscl) { - for (ServiceConnection srv_con : ((RosSystem) rossystem).getServiceConnections()) { - for (RosServiceServer srvs_con : srv_con.getFrom()) { - if (srvs_con == rosss && EcoreUtil.equals(srv_con.getTo(), rosscl)) { - System.out.println("Connection already exits"); - return true; - } - } - } - - return false; - } - - static boolean isDuplicatedActionConnection(RosSystem rossystem, RosActionClient rosac, RosActionServer rosas) { - for (ActionConnection act_con : rossystem.getActionConnections()) { - if (EcoreUtil.equals(act_con.getTo(), rosac) && EcoreUtil.equals(act_con.getFrom(), rosas)) { - System.out.println("Connection already exits"); - return true; - } - } - - return false; - } - -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewComponents.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewComponents.java deleted file mode 100644 index a5ebbff51..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewComponents.java +++ /dev/null @@ -1,54 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; - -import componentInterface.presentation.ComponentInterfaceEditorPlugin; -import componentInterface.presentation.ComponentInterfaceModelWizardOnlyRosInputModel; - - -public class ExternalJavaActionNewComponents implements IExternalJavaAction { - - public IFile modelFile; - protected IWorkbench workbench; - protected IStructuredSelection selection; - public static final List FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(ComponentInterfaceEditorPlugin.INSTANCE.getString("_UI_ComponentInterfaceEditorFilenameExtensions").split("\\s*,\\s*"))); - protected ExecutionEvent event; - - public ExternalJavaActionNewComponents() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean canExecute(Collection arg0) { - // TODO Auto-generated method stub - return true; - } - - @Override - public void execute(Collection arg0, Map arg1) { - Display display = Display.getDefault(); - Shell activeShell = display.getActiveShell(); - ComponentInterfaceModelWizardOnlyRosInputModel wizard = new ComponentInterfaceModelWizardOnlyRosInputModel(); - wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(), arg0, arg1); - WizardDialog dialog = new WizardDialog(activeShell,wizard); - dialog.create(); - dialog.getShell().setText(wizard.getWindowTitle()); - dialog.open(); - } -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewParameter.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewParameter.java deleted file mode 100644 index 76016cf01..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/ExternalJavaActionNewParameter.java +++ /dev/null @@ -1,86 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.Collection; -import java.util.Map; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.dialogs.ElementListSelectionDialog; -import ros.Parameter; -import ros.ParameterBoolean; -import ros.ParameterStringType; -import ros.ParameterType; -import ros.impl.ParameterBooleanImpl; -import ros.impl.ParameterBooleanTypeImpl; -import ros.impl.ParameterDateTypeImpl; -import ros.impl.ParameterDoubleTypeImpl; -import ros.impl.ParameterImpl; -import ros.impl.ParameterIntegerTypeImpl; -import ros.impl.ParameterStringImpl; -import ros.impl.ParameterStringTypeImpl; -import ros.impl.ParameterTypeImpl; - - -public class ExternalJavaActionNewParameter implements IExternalJavaAction { - public IFile modelFile; - protected IWorkbench workbench; - protected IStructuredSelection selection; - //public static final List FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(ComponentInterfaceEditorPlugin.INSTANCE.getString("_UI_ComponentInterfaceEditorFilenameExtensions").split("\\s*,\\s*"))); - protected ExecutionEvent event; - - public ExternalJavaActionNewParameter() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean canExecute(Collection arg0) { - // TODO Auto-generated method stub - return true; - } - - @Override - public void execute(Collection arg0, Map arg1) { - Display display = Display.getDefault(); - Shell activeShell = display.getActiveShell(); - ElementListSelectionDialog dlg = new ElementListSelectionDialog(activeShell, new LabelProvider()); - dlg.setTitle("ParameterType"); - dlg.setMessage("Select a type for your parameter (* = any string, ? = any char):"); - Collection param_collection = (Collection) arg0; - Parameter param = param_collection.iterator().next(); - ParameterType type = null; - - dlg.setElements( new Object[] {"Boolean","String","Integer","Date","Double"}); - dlg.open(); - - Object selected_type = dlg.getFirstResult(); - if (selected_type.toString() == "Boolean") { - type = new ParameterBooleanTypeImpl(); - } - if (selected_type.toString() == "String") { - type = new ParameterStringTypeImpl(); - } - if (selected_type.toString() == "Integer") { - type = new ParameterIntegerTypeImpl(); - } - if (selected_type.toString() == "Date") { - type = new ParameterDateTypeImpl(); - } - if (selected_type.toString() == "Double") { - type = new ParameterDoubleTypeImpl(); - } - param.setType(type); - - -} -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveAllConnections.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveAllConnections.java deleted file mode 100644 index 9ecc1c4f9..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveAllConnections.java +++ /dev/null @@ -1,64 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; -import org.eclipse.sirius.viewpoint.DView; -import org.eclipse.ui.IWorkbench; - -import rossystem.ActionConnection; -import rossystem.ServiceConnection; -import rossystem.TopicConnection; -import rossystem.impl.RosSystemImpl; - -public class RemoveAllConnections implements IExternalJavaAction { - public IFile modelFile; - protected IWorkbench workbench; - protected IStructuredSelection selection; - // public static final List FILE_EXTENSIONS = - // Collections.unmodifiableList(Arrays.asList(ComponentInterfaceEditorPlugin.INSTANCE.getString("_UI_ComponentInterfaceEditorFilenameExtensions").split("\\s*,\\s*"))); - protected ExecutionEvent event; - - public RemoveAllConnections() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean canExecute(Collection arg0) { - // TODO Auto-generated method stub - return true; - } - - @Override - public void execute(Collection arg0, Map arg1) { - for (EObject diagram : arg0) { - List owned_views = ConnectionsCheckUtils.getDiagramViews(diagram); - for (DView view : owned_views) { - for (EObject rossystem : view.getModels()) { - Iterator it = ((RosSystemImpl) rossystem).getTopicConnections().iterator(); - while (it.hasNext()) { - it.next(); - it.remove(); - } - Iterator is = ((RosSystemImpl) rossystem).getServiceConnections().iterator(); - while (is.hasNext()) { - is.next(); - is.remove(); - } - Iterator ia = ((RosSystemImpl) rossystem).getActionConnections().iterator(); - while (ia.hasNext()) { - ia.next(); - ia.remove(); - } - } - } - } - } -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveComponentsWithConnections.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveComponentsWithConnections.java deleted file mode 100644 index 74fbe586f..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/RemoveComponentsWithConnections.java +++ /dev/null @@ -1,118 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; -import org.eclipse.ui.IWorkbench; - -import componentInterface.RosActionClient; -import componentInterface.RosActionServer; -import componentInterface.RosPublisher; -import componentInterface.RosServiceClient; -import componentInterface.RosServiceServer; -import componentInterface.RosSubscriber; -import componentInterface.impl.ComponentInterfaceImpl; -import rossystem.ActionConnection; -import rossystem.ServiceConnection; -import rossystem.TopicConnection; -import rossystem.impl.RosSystemImpl; - -public class RemoveComponentsWithConnections implements IExternalJavaAction { - public IFile modelFile; - protected IWorkbench workbench; - protected IStructuredSelection selection; - // public static final List FILE_EXTENSIONS = - // Collections.unmodifiableList(Arrays.asList(ComponentInterfaceEditorPlugin.INSTANCE.getString("_UI_ComponentInterfaceEditorFilenameExtensions").split("\\s*,\\s*"))); - protected ExecutionEvent event; - - public RemoveComponentsWithConnections() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean canExecute(Collection arg0) { - // TODO Auto-generated method stub - return true; - } - - @Override - public void execute(Collection arg0, Map arg1) { - - for (EObject component:arg0) { - ComponentInterfaceImpl selected_component = (ComponentInterfaceImpl) component; - RosSystemImpl system = (RosSystemImpl) component.eContainer(); - System.out.println(system.eContents()); - System.out.println(selected_component); - System.out.println(system.getTopicConnections()); - ArrayList TopicConnectionsToRemove = new ArrayList(); - ArrayList ServiceConnectionsToRemove = new ArrayList(); - ArrayList ActionConnectionsToRemove = new ArrayList(); - - for (TopicConnection topic_connection: system.getTopicConnections()) { - for (RosPublisher rospub:selected_component.getRospublisher()) { - for (RosPublisher from: topic_connection.getFrom()) { - if (rospub.equals(from)){ - if (topic_connection.getFrom().size()>1){ - topic_connection.getFrom().remove(rospub); - }else { - TopicConnectionsToRemove.add(topic_connection); - } - } - } - for (RosSubscriber rossub:selected_component.getRossubscriber()) { - for (RosSubscriber to: topic_connection.getTo()) { - if (rossub.equals(to)){ - if (topic_connection.getTo().size()>1){ - topic_connection.getTo().remove(rossub); - }else { - TopicConnectionsToRemove.add(topic_connection); - } - } - } - } - } - for (ServiceConnection service_connection: system.getServiceConnections()) { - for (RosServiceServer rossrv:selected_component.getRosserviceserver()) { - for (RosServiceServer from: service_connection.getFrom()) { - if (rossrv.equals(from)){ - if (service_connection.getFrom().size()>1){ - service_connection.getFrom().remove(rossrv); - }else { - ServiceConnectionsToRemove.add(service_connection); - } - } - } - for (RosServiceClient rossrvcli:selected_component.getRosserviceclient()) { - if (rossrvcli.equals(service_connection.getTo())){ - ServiceConnectionsToRemove.add(service_connection); - } - } - } - } - for (ActionConnection action_connection: system.getActionConnections()) { - for (RosActionServer rosact:selected_component.getRosactionserver()) { - if (rosact.equals(action_connection.getFrom())){ - ActionConnectionsToRemove.add(action_connection); - } - } - for (RosActionClient rosactcli:selected_component.getRosactionclient()) { - if (rosactcli.equals(action_connection.getTo())){ - ActionConnectionsToRemove.add(action_connection); - } - } - } - } - for( TopicConnection connection:TopicConnectionsToRemove) { system.getTopicConnections().remove(connection);} - for( ServiceConnection connection:ServiceConnectionsToRemove) { system.getServiceConnections().remove(connection);} - for( ActionConnection connection:ActionConnectionsToRemove) { system.getActionConnections().remove(connection);} - - system.getRosComponent().remove(selected_component); - } - } -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Services.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Services.java deleted file mode 100644 index 6aa613129..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/Services.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import org.eclipse.emf.ecore.EObject; - -/** - * The services class used by VSM. - */ -public class Services { - - /** - * See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.html&cp=24 for documentation on how to write service methods. - */ - public EObject myService(EObject self, String arg) { - // TODO Auto-generated code - return self; - } -} diff --git a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/SimulateRuntimeConnections.java b/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/SimulateRuntimeConnections.java deleted file mode 100644 index f5a385fa4..000000000 --- a/plugins/de.fraunhofer.ipa.ros.sirius/src/de/fraunhofer/ipa/ros/sirius/SimulateRuntimeConnections.java +++ /dev/null @@ -1,141 +0,0 @@ -package de.fraunhofer.ipa.ros.sirius; - -import java.util.Collection; -import java.util.List; -import java.util.Map; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.sirius.tools.api.ui.IExternalJavaAction; -import org.eclipse.sirius.viewpoint.DView; -import org.eclipse.ui.IWorkbench; -import componentInterface.ComponentInterface; -import componentInterface.RosActionClient; -import componentInterface.RosActionServer; -import componentInterface.RosPublisher; -import componentInterface.RosServiceClient; -import componentInterface.RosServiceServer; -import componentInterface.RosSubscriber; -import rossystem.ActionConnection; -import rossystem.ServiceConnection; -import rossystem.TopicConnection; -import rossystem.impl.ActionConnectionImpl; -import rossystem.impl.ServiceConnectionImpl; -import rossystem.impl.TopicConnectionImpl; -import rossystem.impl.RosSystemImpl; - -public class SimulateRuntimeConnections implements IExternalJavaAction { - public IFile modelFile; - protected IWorkbench workbench; - protected IStructuredSelection selection; - // public static final List FILE_EXTENSIONS = - // Collections.unmodifiableList(Arrays.asList(ComponentInterfaceEditorPlugin.INSTANCE.getString("_UI_ComponentInterfaceEditorFilenameExtensions").split("\\s*,\\s*"))); - protected ExecutionEvent event; - - public SimulateRuntimeConnections() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean canExecute(Collection arg0) { - // TODO Auto-generated method stub - return true; - } - - @Override - public void execute(Collection arg0, Map arg1) { - boolean duplicated = false; - for (EObject diagram : arg0) { - List owned_views = ConnectionsCheckUtils.getDiagramViews(diagram); - for (DView view : owned_views) { - for (EObject rossystemEObj : view.getModels()) { - RosSystemImpl rossystem = ((RosSystemImpl)rossystemEObj); - for (ComponentInterface component : rossystem.getRosComponent()) { - for (RosPublisher rospub : component.getRospublisher()) { - for (ComponentInterface component2 : rossystem.getRosComponent()) { - for (RosSubscriber rossub : component2.getRossubscriber()) { - if (ConnectionsCheckUtils.containEqualCommunicationObjects( - rospub.getPublisher().getMessage(), rossub.getSubscriber().getMessage()) - && rospub.getName().equals(rossub.getName())) { - if (rospub.eContainer() != rossub.eContainer()) { - duplicated = false; - System.out.println("Topic Connection found [" + rospub.eContainer() + "]" - + rospub.getName() + "->[" + rossub.eContainer() + "]" - + rossub.getName()); - // Check if connection already exists - duplicated = ConnectionsCheckUtils - .isDuplicatedTopicConnection(rossystem, rospub, rossub); - if (!duplicated) { - TopicConnection topic_connection = new TopicConnectionImpl(); - topic_connection.setTopicName(rospub.getName()); - topic_connection.getFrom().add(rospub); - topic_connection.getTo().add(rossub); - rossystem.getTopicConnections().add(topic_connection); - } - } - } - } - } - } - for (RosServiceClient rosscl : component.getRosserviceclient()) { - for (ComponentInterface component2 : rossystem.getRosComponent()) { - for (RosServiceServer rosss : component2.getRosserviceserver()) { - if (ConnectionsCheckUtils.containEqualCommunicationObjects( - rosscl.getSrvclient().getService(), rosscl.getSrvclient().getService()) - && rosscl.getName().equals(rosss.getName())) { - if (rosscl.getSrvclient().eContainer() != rosss.getSrvserver().eContainer()) { - duplicated = false; - System.out.println("Service Connection found [" + rosscl.eContainer() + "]" - + rosscl.getName() + "->[" + rosss.eContainer() + "]" - + rosss.getName()); - // Check if connection already exists - duplicated = ConnectionsCheckUtils.isDuplicatedServiceConnection( - rossystem, rosss, rosscl); - - if (!duplicated) { - ServiceConnection srv_connection = new ServiceConnectionImpl(); - srv_connection.setServiceName(rosscl.getName()); - srv_connection.setTo(rosscl); - srv_connection.getFrom().add(rosss); - rossystem.getServiceConnections().add(srv_connection); - - } - } - } - - } - } - } - for (RosActionClient rosac : component.getRosactionclient()) { - for (ComponentInterface component2 : rossystem.getRosComponent()) { - for (RosActionServer rosas : component2.getRosactionserver()) { - if (ConnectionsCheckUtils.containEqualCommunicationObjects( - rosac.getActclient().getAction(), rosas.getActserver().getAction()) - && rosac.getName().equals(rosas.getName())) { - if (rosac.eContainer() != rosas.eContainer()) { - System.out.println("Action Connection found [" + rosac.eContainer() + "]" - + rosac.getName() + "->[" + rosas.eContainer() + "]" - + rosas.getName()); - // Check if connection already exists - duplicated = ConnectionsCheckUtils - .isDuplicatedActionConnection(rossystem, rosac, rosas); - if (!duplicated) { - ActionConnection action_connection = new ActionConnectionImpl(); - action_connection.setActionName(rosac.getName()); - action_connection.setFrom(rosas); - action_connection.setTo(rosac); - rossystem.getActionConnections().add(action_connection); - } - } - } - } - } - } - } - } - } - } - - } -} diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/.classpath b/plugins/de.fraunhofer.ipa.roscode.generator/.classpath deleted file mode 100644 index 1725f5d08..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/.project b/plugins/de.fraunhofer.ipa.roscode.generator/.project deleted file mode 100644 index 7dfd83529..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - de.fraunhofer.ipa.roscode.generator - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.xtext.ui.shared.xtextNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.core.resources.prefs b/plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c020..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.jdt.core.prefs b/plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 49cf78d8c..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=19 -org.eclipse.jdt.core.compiler.compliance=19 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=19 diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/META-INF/MANIFEST.MF b/plugins/de.fraunhofer.ipa.roscode.generator/META-INF/MANIFEST.MF deleted file mode 100644 index 40a6f7daa..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: de.seronet_projekt.componentGateway.generator -Bundle-SymbolicName: de.fraunhofer.ipa.roscode.generator;singleton:=true -Bundle-Version: 3.0.0.qualifier -Bundle-Vendor: SeRoNet (www.seronet-projekt.de) -Export-Package: de.fraunhofer.ipa.roscode.generator -Bundle-RequiredExecutionEnvironment: JavaSE-19 -Import-Package: javax.inject;version="1.0.0", - org.eclipse.ui.handlers, - org.eclipse.xtext.ui.resource -Bundle-ActivationPolicy: lazy -Bundle-Activator: de.fraunhofer.ipa.roscode.generator.Activator -Require-Bundle: org.eclipse.xtext.builder, - org.eclipse.xtext.ui, - de.fraunhofer.ipa.ros, - de.fraunhofer.ipa.ros.xtext.ide, - de.fraunhofer.ipa.ros.xtext.ui diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/build.properties b/plugins/de.fraunhofer.ipa.roscode.generator/build.properties deleted file mode 100644 index ff7637b2b..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -source.. = src/,\ - xtend-gen/ -bin.includes = .,\ - META-INF/,\ - plugin.xml -bin.excludes = **/*.mwe2,\ - **/*.xtend -additional.bundles = org.eclipse.xtext.xbase,\ - org.eclipse.xtext.common.types,\ - org.eclipse.xtext.xtext.generator,\ - org.eclipse.emf.codegen.ecore,\ - org.eclipse.emf.mwe.utils,\ - org.eclipse.emf.mwe2.lib,\ - org.objectweb.asm,\ - org.apache.commons.logging,\ - org.apache.log4j,\ - com.ibm.icu diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/plugin.xml b/plugins/de.fraunhofer.ipa.roscode.generator/plugin.xml deleted file mode 100644 index ce8d51ee4..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/plugin.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/pom.xml b/plugins/de.fraunhofer.ipa.roscode.generator/pom.xml deleted file mode 100644 index a43de03ca..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - - de.fraunhofer.ipa.ros - de.fraunhofer.ipa.ros.parent - 2.0.0-SNAPSHOT - ../de.fraunhofer.ipa.ros.parent/pom.xml - - de.fraunhofer.ipa.roscode.generator - eclipse-plugin - - - - - org.eclipse.xtend - xtend-maven-plugin - - - org.apache.maven.plugins - maven-clean-plugin - - - xtend-gen-clean - clean - - - - - - diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Activator.java b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Activator.java deleted file mode 100644 index 9f3c9d5aa..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Activator.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator; - -import de.fraunhofer.ipa.ros.xtext.ui.internal.XtextActivator; - -public class Activator extends XtextActivator { - -} diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Generation2Handler.java b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Generation2Handler.java deleted file mode 100644 index 3f720b95b..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Generation2Handler.java +++ /dev/null @@ -1,82 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.handlers.HandlerUtil; -import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2; -import org.eclipse.xtext.generator.GeneratorContext; -import org.eclipse.xtext.generator.IOutputConfigurationProvider; -import org.eclipse.xtext.generator.OutputConfiguration; -import org.eclipse.xtext.resource.IResourceDescriptions; -import org.eclipse.xtext.ui.resource.IResourceSetProvider; - -import com.google.inject.Inject; -import com.google.inject.Provider; - -import de.fraunhofer.ipa.roscode.generator.RosCodeGenerator;; - -public class Generation2Handler extends AbstractHandler implements IHandler { - - @Inject - private Provider fileAccessProvider; - - @Inject - IResourceDescriptions resourceDescriptions; - - @Inject - IResourceSetProvider resourceSetProvider; - - static Map getOutputConfigurationsAsMap(IOutputConfigurationProvider provider) { - Map outputs = new HashMap(); - for(OutputConfiguration c: provider.getOutputConfigurations()) { - outputs.put(c.getName(), c); - } - return outputs; - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - - ISelection selection = HandlerUtil.getCurrentSelection(event); - if (selection instanceof IStructuredSelection) { - IStructuredSelection structuredSelection = (IStructuredSelection) selection; - Object firstElement = structuredSelection.getFirstElement(); - if (firstElement instanceof IFile) { - IFile file = (IFile) firstElement; - IProject project = file.getProject(); - - final EclipseResourceFileSystemAccess2 fsa = fileAccessProvider.get(); - fsa.setProject(project); - fsa.setOutputConfigurations(getOutputConfigurationsAsMap(new CustomOutputProvider())); - fsa.setMonitor(new NullProgressMonitor()); - - URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); - ResourceSet rs = resourceSetProvider.get(project); - Resource r = rs.getResource(uri, true); - - Ros2CodeGenerator generator = new Ros2CodeGenerator(); - generator.doGenerate(r, fsa, new GeneratorContext()); - - } - } - return null; - } - - @Override - public boolean isEnabled() { - return true; - } - } diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/GenerationHandler.java b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/GenerationHandler.java deleted file mode 100644 index e17bab1af..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/GenerationHandler.java +++ /dev/null @@ -1,82 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.handlers.HandlerUtil; -import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2; -import org.eclipse.xtext.generator.GeneratorContext; -import org.eclipse.xtext.generator.IOutputConfigurationProvider; -import org.eclipse.xtext.generator.OutputConfiguration; -import org.eclipse.xtext.resource.IResourceDescriptions; -import org.eclipse.xtext.ui.resource.IResourceSetProvider; - -import com.google.inject.Inject; -import com.google.inject.Provider; - -import de.fraunhofer.ipa.roscode.generator.RosCodeGenerator;; - -public class GenerationHandler extends AbstractHandler implements IHandler { - - @Inject - private Provider fileAccessProvider; - - @Inject - IResourceDescriptions resourceDescriptions; - - @Inject - IResourceSetProvider resourceSetProvider; - - static Map getOutputConfigurationsAsMap(IOutputConfigurationProvider provider) { - Map outputs = new HashMap(); - for(OutputConfiguration c: provider.getOutputConfigurations()) { - outputs.put(c.getName(), c); - } - return outputs; - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - - ISelection selection = HandlerUtil.getCurrentSelection(event); - if (selection instanceof IStructuredSelection) { - IStructuredSelection structuredSelection = (IStructuredSelection) selection; - Object firstElement = structuredSelection.getFirstElement(); - if (firstElement instanceof IFile) { - IFile file = (IFile) firstElement; - IProject project = file.getProject(); - - final EclipseResourceFileSystemAccess2 fsa = fileAccessProvider.get(); - fsa.setProject(project); - fsa.setOutputConfigurations(getOutputConfigurationsAsMap(new CustomOutputProvider())); - fsa.setMonitor(new NullProgressMonitor()); - - URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); - ResourceSet rs = resourceSetProvider.get(project); - Resource r = rs.getResource(uri, true); - - RosCodeGenerator generator = new RosCodeGenerator(); - generator.doGenerate(r, fsa, new GeneratorContext()); - - } - } - return null; - } - - @Override - public boolean isEnabled() { - return true; - } - } diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/ParameterGeneratorHelpers.xtend b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/ParameterGeneratorHelpers.xtend deleted file mode 100644 index bb7c9a7ca..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/ParameterGeneratorHelpers.xtend +++ /dev/null @@ -1,95 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator - -import ros.impl.ParameterStringTypeImpl -import ros.impl.ParameterStringImpl -import ros.impl.ParameterIntegerTypeImpl -import ros.impl.ParameterIntegerImpl -import ros.impl.ParameterDoubleTypeImpl -import ros.impl.ParameterDoubleImpl -import ros.impl.ParameterBooleanTypeImpl -import ros.impl.ParameterBooleanImpl -import ros.impl.ParameterBase64TypeImpl -import ros.impl.ParameterBase64Impl -import ros.impl.ParameterListTypeImpl -import org.eclipse.emf.common.util.EList -import ros.ParameterType -import ros.impl.ParameterStructTypeImpl -import ros.impl.ParameterArrayTypeImpl - -abstract class ParameterGeneratorHelpers { - - def String get_param_declaration_str(String param_type, String param_name, String delim, Boolean has_value) - - def Boolean is_array(EList list) { - var t = list.get(0).class - for (type : list) { - if (!(type.class == t)) { - return false; - } - } - return true; - } - - def Pair compile_struct(ParameterStructTypeImpl struct, String name) { - var struct_str = ""; - var struct_type_str = ""; - for (elem : struct.getParameterstructypetmember()) { - if (elem.getType() instanceof ParameterStructTypeImpl) { - var elem_pair = compile_struct(elem.getType() as ParameterStructTypeImpl, name + "." + elem.getName()); - struct_str += elem_pair.getKey(); - struct_type_str += elem_pair.getValue(); - } else { - var param_pair = get_param_type(elem.getType()); - var elem_name = name + "." + elem.getName(); - struct_str += get_param_declaration_str(param_pair.getKey(), elem_name, ".", (param_pair.getValue != "")); - - struct_type_str += param_pair.getKey() + " " + elem_name.replace(".", "_") + "_;\n"; - } - } - return new Pair(struct_str, struct_type_str); - } - - def Pair get_param_type(ParameterType type) { - var has_value = type.eContents.length > 0; - var param_val = "" - if (type instanceof ParameterStringTypeImpl) { - if (has_value) { - param_val = ", \"" + (type.eContents.get(0) as ParameterStringImpl).getValue() + "\""; - } - return new Pair("std::string", param_val); - } else if (type instanceof ParameterIntegerTypeImpl) { - if (has_value) { - param_val = ", " + (type.eContents.get(0) as ParameterIntegerImpl).getValue(); - } - return new Pair("int", param_val); - } else if (type instanceof ParameterDoubleTypeImpl) { - if (has_value) { - param_val = ", " + (type.eContents.get(0) as ParameterDoubleImpl).getValue(); - } - return new Pair("double", param_val); - } else if (type instanceof ParameterBooleanTypeImpl) { - if (has_value) { - param_val = ", " + (type.eContents.get(0) as ParameterBooleanImpl).isValue(); - } - return new Pair("bool", param_val); - /*} else if (type instanceof ParameterBase64TypeImpl) { - if (has_value) { - param_val = ", " + (type.eContents.get(0) as ParameterBase64Impl).getValue(); - } - return new Pair("uint64_t", param_val); // not sure about this*/ - } else if (type instanceof ParameterListTypeImpl) { - var list = (type as ParameterListTypeImpl).getSequence(); - if (!list.is_array()) { - return new Pair("", ""); - } - var list_type = get_param_type(list.get(0)); - return new Pair("std::vector<" + list_type.getKey() + ">", ""); - } else if (type instanceof ParameterArrayTypeImpl) { - var array = type as ParameterArrayTypeImpl; - return new Pair("std::vector<" + get_param_type(array.getType()).getKey() + ">", ""); - } - - return new Pair("", ""); - } - -} diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Ros2CodeGenerator.xtend b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Ros2CodeGenerator.xtend deleted file mode 100644 index 3f37eea26..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/Ros2CodeGenerator.xtend +++ /dev/null @@ -1,291 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator - -import java.util.ArrayList -import java.util.HashSet -import java.util.List -import java.util.Set -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.xtext.generator.AbstractGenerator -import org.eclipse.xtext.generator.IFileSystemAccess2 -import org.eclipse.xtext.generator.IGeneratorContext -import ros.Node -import ros.Package -import ros.impl.ParameterStructTypeImpl - -/** - * Generates code from your model files on save. - * - * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation - */ -class Ros2CodeGenerator extends AbstractGenerator { - - String resourcepath - String import_msgs - int char_i - Node node - List PkgsList - Set set - ParameterGeneratorHelpers parameter_helper = new ParameterGeneratorHelpers() { - - override get_param_declaration_str(String param_type, String param_name, String delim, Boolean has_value) { - var struct_str = ""; - struct_str += "this->declare_parameter"; - if (has_value) { - struct_str += "<" + param_type + ">"; - } - struct_str += "(\"" + param_name + "\");\n"; - struct_str += "this->get_parameter(\"" + param_name + "\", " + param_name.replace(delim, "_") + "_);\n\n"; - - return struct_str; - } - - }; - - override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { - resourcepath = resource.URI.toString(); - if (! resourcepath.contains("/ros-input")) { - for (pkg : resource.allContents.toIterable.filter(Package)){ - fsa.generateFile(pkg.getName().toLowerCase+"/package.xml",pkg.compile_package_xml) - fsa.generateFile(pkg.getName().toLowerCase+"/CMakeLists.txt",pkg.compile_CMakeLists) - for (art : pkg.artifact){ - node = art.node - fsa.generateFile(pkg.getName().toLowerCase+"/src/"+node.name+".cpp",node.compile_node) - - } - } - } - } - - -def compile_package_xml(Package pkg)''' - - - - «pkg.name» - 0.0.0 - This package contains the implementation of the node «pkg.artifact.get(0).node.name» - Jane Doe - Jane Doe - Apache 2.0 - - ament_cmake - - boost - rclcpp - «FOR depend_pkg:pkg.getPkgDependencies» - «depend_pkg» - «ENDFOR» - - ament_lint_auto - ament_lint_common - - - ament_cmake - - -''' - -def compile_CMakeLists(Package pkg)''' -cmake_minimum_required(VERSION 3.5) -project(«pkg.name») - -# Default to C++14 -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() - -find_package(ament_cmake REQUIRED) -find_package(Boost REQUIRED) -find_package(rclcpp REQUIRED) - «FOR depend_pkg:pkg.getPkgDependencies» -find_package(«depend_pkg» REQUIRED) - «ENDFOR» - -«FOR art:pkg.artifact» -add_executable(«art.name» src/«art.node.name».cpp) -ament_target_dependencies(«art.name» rclcpp «FOR depend_pkg:pkg.getPkgDependencies»«depend_pkg» «ENDFOR») - -install(TARGETS - «art.name» - DESTINATION lib/${PROJECT_NAME}) -«ENDFOR» - -ament_package() -''' - -def compile_node(Node node) ''' -#include -#include -#include -#include -#include - -#include "rclcpp/rclcpp.hpp" -#include "rcutils/cmdline_parser.h" - «FOR pub : node.publisher» -#include <«pub.message.package.name»/msg/«check_message_include(pub.message.name)».hpp> - «ENDFOR» - «FOR sub : node.subscriber» -#include <«sub.message.package.name»/msg/«check_message_include(sub.message.name)».hpp> - «ENDFOR» - «FOR srvserver : node.serviceserver» -#include <«srvserver.service.package.name»/srv/«check_message_include(srvserver.service.name)».hpp> - «ENDFOR» - «FOR srvclient : node.serviceclient» -#include <«srvclient.service.package.name»/srv/«check_message_include(srvclient.service.name)».hpp> - «ENDFOR» - -using namespace std::chrono_literals; -using std::placeholders::_1; -using std::placeholders::_2; -using std::placeholders::_3; - -void print_usage() -{ - printf("Usage for «node.name» app:\n"); - printf("..... \n"); - printf("..... \n"); - printf("..... \n"); -} - -class «node.name» : public rclcpp::Node { - public: - «node.name»() : Node("«node.name»") { - «FOR param : node.parameter» - «IF (param.type instanceof ParameterStructTypeImpl)» - «parameter_helper.compile_struct(param.type as ParameterStructTypeImpl, param.name).getKey()» - «ELSE» -«var param_pair = parameter_helper.get_param_type(param.type)» - «IF !(param_pair.getKey().empty)» - this->declare_parameter«IF !param_pair.getValue().empty»<«param_pair.getKey()»>«ENDIF»("«param.name»"«param_pair.getValue()»); - this->get_parameter("«param.name»", «param.name»_); - «ENDIF» - «ENDIF» - «ENDFOR» - «FOR pub : node.publisher» - «check_name(pub.name)»_ = this->create_publisher<«pub.message.package.name»::msg::«pub.message.name»>("«pub.name»",10); - «ENDFOR» - «FOR sub : node.subscriber» - «check_name(sub.name)»_ = this->create_subscription<«sub.message.package.name»::msg::«sub.message.name»>("«sub.name»", 10, std::bind(&«node.name»::«check_name(sub.name)»_callback, this, _1)); - «ENDFOR» - «FOR client : node.serviceclient» - «check_name(client.name)»_ = this->create_client<«client.service.package.name»::srv::«client.service.name»>("«client.name»"); - «ENDFOR» - «FOR service : node.serviceserver» - «check_name(service.name)»_ = this->create_service<«service.service.package.name»::srv::«service.service.name»>("«service.name»", std::bind(&«node.name»::«check_name(service.name)»_handle, this, _1, _2, _3)); - «ENDFOR» - - «IF node.publisher.length > 0» - timer_ = this->create_wall_timer(500ms, std::bind(&«node.name»::timer_callback, this)); - «ENDIF» - - «FOR client : node.serviceclient» - // Service client - while (!«check_name(client.name)»_->wait_for_service(std::chrono::seconds(10))){ - RCLCPP_ERROR(this->get_logger(), "Client interrupted while waiting for service '%s' to appear.", "«client.name»"); - } - auto request = std::make_shared<«client.service.package.name»::srv::«client.service.name»::Request>(); - // request-> ... = ....; - auto result_future = «check_name(client.name)»_->async_send_request(request); - auto result = result_future.get(); - RCLCPP_INFO(this->get_logger(), "Service called, service: '%s'", "«client.name»"); - «ENDFOR» - } - - private: - «FOR param : node.parameter» - «IF (param.type instanceof ParameterStructTypeImpl)» - «parameter_helper.compile_struct(param.type as ParameterStructTypeImpl, param.name).getValue()» - «ELSE» - «var param_pair = parameter_helper.get_param_type(param.type)» - «IF !(param_pair.getKey().empty)» - «param_pair.getKey()» «param.name»_; - «ENDIF» - «ENDIF» - «ENDFOR» - - «FOR sub : node.subscriber» - // Subscriber callback - void «check_name(sub.name)»_callback(const «sub.message.package.name»::msg::«sub.message.name»::SharedPtr msg) const { - RCLCPP_INFO(this->get_logger(), "«sub.name» topic got a message", msg); - } - - rclcpp::Subscription<«sub.message.package.name»::msg::«sub.message.name»>::SharedPtr «check_name(sub.name)»_ ; - «ENDFOR» - «FOR pub : node.publisher» - rclcpp::Publisher<«pub.message.package.name»::msg::«pub.message.name»>::SharedPtr «check_name(pub.name)»_; - «ENDFOR» - «IF node.publisher.length > 0» - // Timer Callback - void timer_callback(){ - «FOR pub : node.publisher» - auto «check_name(pub.name)»_msg = «pub.message.package.name»::msg::«pub.message.name»(); - //«check_name(pub.name)»_msg = ... - «check_name(pub.name)»_->publish(«check_name(pub.name)»_msg); - RCLCPP_INFO(this->get_logger(), "«pub.name» publisher active"); - «ENDFOR» - } - rclcpp::TimerBase::SharedPtr timer_; - «ENDIF» - - «FOR client : node.serviceclient»rclcpp::Client<«client.service.package.name»::srv::«client.service.name»>::SharedPtr «check_name(client.name)»_; - «ENDFOR» - - «FOR service : node.serviceserver» - // Service Handler - void «check_name(service.name)»_handle( const std::shared_ptr request_header, - const std::shared_ptr<«service.service.package.name»::srv::«service.service.name»::Request> request_, - const std::shared_ptr<«service.service.package.name»::srv::«service.service.name»::Response> response_){ - (void)request_header; - (void)request_; - (void)response_; - RCLCPP_INFO( this->get_logger(), "trigger service '%s'","«service.name»"); - } - rclcpp::Service<«service.service.package.name»::srv::«service.service.name»>::SharedPtr «check_name(service.name)»_; - «ENDFOR» -}; - -int main(int argc, char * argv[]) -{ - rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared<«node.name»>()); - rclcpp::shutdown(); - return 0; -} - ''' - - def List getPkgDependencies(Package pkg){ - set=new HashSet() - PkgsList = new ArrayList() - for (art:pkg.artifact){ - node=art.node - for (pub:node.publisher){set.add(pub.message.package.name)} - for (sub:node.subscriber){set.add(sub.message.package.name)} - for (srvserver:node.serviceserver){set.add(srvserver.service.package.name)} - for (srvclient:node.serviceclient){set.add(srvclient.service.package.name)} - } - PkgsList.addAll(set) - return PkgsList - } - - def String check_message_include(String message_name){ - import_msgs = message_name.toFirstLower; - for (char_i =0; char_i < import_msgs.length; char_i++ ){ - if (Character.isUpperCase(import_msgs.charAt(char_i))){ - import_msgs = import_msgs.substring(0,char_i)+"_"+Character.toLowerCase(import_msgs.charAt(char_i))+import_msgs.substring(char_i+1); - } - } - return import_msgs; - } - - def String check_name(String interface_name){ - return interface_name.replace("/",""); - } - -} diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGenerator.xtend b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGenerator.xtend deleted file mode 100644 index bf39a39ac..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGenerator.xtend +++ /dev/null @@ -1,211 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator - -import java.util.ArrayList -import java.util.HashSet -import java.util.List -import java.util.Set -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.xtext.generator.AbstractGenerator -import org.eclipse.xtext.generator.IFileSystemAccess2 -import org.eclipse.xtext.generator.IGeneratorContext -import org.eclipse.xtext.generator.IOutputConfigurationProvider -import org.eclipse.xtext.generator.OutputConfiguration -import ros.Node -import ros.Package -import ros.Publisher -import ros.ServiceClient -import ros.ServiceServer -import ros.Subscriber -import ros.impl.ParameterStructTypeImpl - -class CustomOutputProvider implements IOutputConfigurationProvider { - public final static String DEFAULT_OUTPUT = "DEFAULT_OUTPUT" - - - override Set getOutputConfigurations() { - var OutputConfiguration default_config = new OutputConfiguration(DEFAULT_OUTPUT) - default_config.setDescription("DEFAULT_OUTPUT"); - default_config.setOutputDirectory("./src-gen/"); - default_config.setOverrideExistingResources(true); - default_config.setCreateOutputDirectory(true); - default_config.setCleanUpDerivedResources(true); - default_config.setSetDerivedProperty(true); - return newHashSet(default_config) - } -} - -/** - * Generates code from your model files on save. - * - * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation - */ -class RosCodeGenerator extends AbstractGenerator { - - - String resourcepath - Node node - List PkgsList - Set set - ParameterGeneratorHelpers parameter_helper = new ParameterGeneratorHelpers() { - - override get_param_declaration_str(String param_type, String param_name, String delim, Boolean has_value) { - var struct_str = ""; - struct_str += param_type + " " + param_name.replace(delim, "_") + "_;\n"; - struct_str += "n.param(\"" + param_name.replace(delim, "/") + "\", " + param_name.replace(delim, "_") + "_);\n\n"; - - return struct_str; - } - - }; - - override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { - resourcepath = resource.URI.toString(); - if (! resourcepath.contains("/ros-input")) { - for (pkg : resource.allContents.toIterable.filter(Package)){ - fsa.generateFile(pkg.getName().toLowerCase+"/package.xml",pkg.compile_package_xml) - fsa.generateFile(pkg.getName().toLowerCase+"/CMakeLists.txt",pkg.compile_CMakeLists) - for (art : pkg.artifact){ - node = art.node - fsa.generateFile(pkg.getName().toLowerCase+"/src/"+node.name+".cpp",node.compile_node) - - } - } - } - } - -def compile_package_xml(Package pkg)''' - - - - «pkg.name» - 0.0.0 - This package contains the implementation of the node «pkg.artifact.get(0).node.name» - Jane Doe - Jane Doe - Apache 2.0 - - catkin - - boost - roscpp - «FOR depend_pkg:pkg.getPkgDependencies» - «depend_pkg» - «ENDFOR» - - -''' - -def compile_CMakeLists(Package pkg)''' -cmake_minimum_required(VERSION 3.0.2) -project(«pkg.name») - -find_package(catkin REQUIRED COMPONENTS roscpp «FOR depend_pkg:pkg.getPkgDependencies»«depend_pkg» «ENDFOR») - -catkin_package( - CATKIN_DEPENDS roscpp «FOR depend_pkg:pkg.getPkgDependencies»«depend_pkg» «ENDFOR» -) - -### Build ### - -include_directories(${catkin_INCLUDE_DIRS}) - -«FOR art:pkg.artifact» -add_executable(«art.name» src/«art.node.name».cpp) -add_dependencies(«art.name» ${catkin_EXPORTED_TARGETS}) -target_link_libraries(«art.name» ${catkin_LIBRARIES}) - -«ENDFOR» -### Install ### -install(TARGETS «FOR art:pkg.artifact»«art.name»«ENDFOR» - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) -''' - -def compile_node(Node node) ''' -#include - «FOR pub : node.publisher» -#include <«pub.message.package.name»/«pub.message.name».h> - «ENDFOR» - «FOR sub : node.subscriber» -#include <«sub.message.package.name»/«sub.message.name».h> - «ENDFOR» - «FOR srvserver : node.serviceserver» -#include <«srvserver.service.package.name»/«srvserver.service.name».h> - «ENDFOR» - «FOR srvclient : node.serviceclient» -#include <«srvclient.service.package.name»/«srvclient.service.name».h> - «ENDFOR» - - «FOR srvserver : node.serviceserver» -bool «srvserver.name»_cb («srvserver.service.package.name»::«srvserver.service.name»::Request &req, «srvserver.service.package.name»::«srvserver.service.name»::Response &res){ - return true; -} - «ENDFOR» - «FOR sub : node.subscriber» -void «sub.name»_cb (const «sub.message.package.name»::«sub.message.name» msg){} - «ENDFOR» - - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "«node.name»"); - ros::NodeHandle n; - «FOR param : node.parameter» - «IF (param.type instanceof ParameterStructTypeImpl)» - «parameter_helper.compile_struct(param.type as ParameterStructTypeImpl, param.name).getKey()» - «ELSE» - «var param_pair = parameter_helper.get_param_type(param.type)» - «IF !(param_pair.getKey().empty)» - «param_pair.getKey()» «param.name»_; - n.param«IF!(param_pair.getValue().empty)»<«param_pair.getKey()»>«ENDIF»("«param.name»", «param.name»_«param_pair.getValue()»); - «ENDIF» - «ENDIF» -«ENDFOR» -«FOR pub : node.publisher» -«pub.compile» -«ENDFOR» -«FOR sub : node.subscriber» -«sub.compile» -«ENDFOR» -«FOR srvserver : node.serviceserver» -«srvserver.compile» -«ENDFOR» -«FOR srvclient : node.serviceclient» -«srvclient.compile» -«ENDFOR» - - ros::spin(); - - return 0; -} - ''' - -def compile(Publisher pub) -''' ros::Publisher «pub.name»_pub = n.advertise<«pub.message.package.name»::«pub.message.name»>("«pub.name»", 10);''' -def compile(Subscriber sub) -''' ros::Subscriber «sub.name» = n.subscribe("«sub.name»", 10, «sub.name»_cb);''' -def compile(ServiceServer srvserver) -''' ros::ServiceServer «srvserver.name» = n.advertiseService("«srvserver.name»", «srvserver.name»_cb);''' -def compile(ServiceClient srvclient) -''' ros::ServiceClient «srvclient.name» = n.serviceClient<«srvclient.service.package.name»::«srvclient.service.name»>("«srvclient.name»");''' - - - def List getPkgDependencies(Package pkg){ - set=new HashSet() - PkgsList = new ArrayList() - for (art:pkg.artifact){ - node=art.node - for (pub:node.publisher){set.add(pub.message.package.name)} - for (sub:node.subscriber){set.add(sub.message.package.name)} - for (srvserver:node.serviceserver){set.add(srvserver.service.package.name)} - for (srvclient:node.serviceclient){set.add(srvclient.service.package.name)} - } - PkgsList.addAll(set) - return PkgsList - } - -} diff --git a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGeneratorExecutableExtensionFactory.java b/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGeneratorExecutableExtensionFactory.java deleted file mode 100644 index 0854780c2..000000000 --- a/plugins/de.fraunhofer.ipa.roscode.generator/src/de/fraunhofer/ipa/roscode/generator/RosCodeGeneratorExecutableExtensionFactory.java +++ /dev/null @@ -1,19 +0,0 @@ -package de.fraunhofer.ipa.roscode.generator; - -import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory; -import org.osgi.framework.Bundle; - -import com.google.inject.Injector; - -public class RosCodeGeneratorExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory { - - @Override - protected Bundle getBundle() { - return Activator.getInstance().getBundle(); - } - - @Override - protected Injector getInjector() { - return Activator.getInstance().getInjector(Activator.DE_FRAUNHOFER_IPA_ROS_ROS); - } - } diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/.classpath b/plugins/de.fraunhofer.ipa.rossystem.model.combination/.classpath deleted file mode 100644 index 62b961327..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/.project b/plugins/de.fraunhofer.ipa.rossystem.model.combination/.project deleted file mode 100644 index 98a5c135f..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - de.fraunhofer.ipa.rossystem.model.combination - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/.settings/org.eclipse.jdt.core.prefs b/plugins/de.fraunhofer.ipa.rossystem.model.combination/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 49cf78d8c..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=19 -org.eclipse.jdt.core.compiler.compliance=19 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=19 diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/META-INF/MANIFEST.MF b/plugins/de.fraunhofer.ipa.rossystem.model.combination/META-INF/MANIFEST.MF deleted file mode 100644 index 092c89dce..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/META-INF/MANIFEST.MF +++ /dev/null @@ -1,32 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Check -Bundle-SymbolicName: de.fraunhofer.ipa.rossystem.model.combination;singleton:=true -Bundle-Version: 2.0.0.qualifier -Automatic-Module-Name: de.fraunhofer.ipa.rossystem.model.combination -Bundle-RequiredExecutionEnvironment: JavaSE-19 -Import-Package: org.eclipse.core.commands, - org.eclipse.core.resources, - org.eclipse.core.runtime;version="3.5.0", - org.eclipse.emf.common.ui.dialogs, - org.eclipse.emf.common.util, - org.eclipse.emf.ecore, - org.eclipse.emf.ecore.resource, - org.eclipse.emf.ecore.resource.impl, - org.eclipse.emf.edit.ui.provider, - org.eclipse.jface.dialogs, - org.eclipse.jface.operation, - org.eclipse.jface.viewers, - org.eclipse.jface.window, - org.eclipse.jface.wizard, - org.eclipse.swt, - org.eclipse.swt.events, - org.eclipse.swt.layout, - org.eclipse.swt.widgets, - org.eclipse.ui, - org.eclipse.ui.actions, - org.eclipse.ui.dialogs, - org.eclipse.ui.handlers, - ros -Require-Bundle: de.fraunhofer.ipa.rossystem, - de.fraunhofer.ipa.rossystem.editor diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/build.properties b/plugins/de.fraunhofer.ipa.rossystem.model.combination/build.properties deleted file mode 100644 index 056f99229..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - icons/,\ - .,\ - plugin.xml diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/icons/merge-documents.png b/plugins/de.fraunhofer.ipa.rossystem.model.combination/icons/merge-documents.png deleted file mode 100644 index d4e9e4d1c2b35acff4dffcaaef024a9f51fbc1cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9655 zcmb7IRahKftY4PJi!D~%-K|hui@QUiNO5;}DehKSw76SwDAGa;MT$FH92QvIDR=)5 z_wByinJ;tZB$Ju%OmdQ65~r!IfQ?Cp2><}Fl@#T)5o7UxgpP{1CQR9KBKWoex`tlb z7QQrY9lFN>@}QEYR_(c5$ULqccg&m~Is z@Az9`>rF4hmWoc|*e}qu`VP&S8=HE0svq&cpt32ApTxiEa7@AX zc{e_s-{x%py~O&fxhMYZ-`p*Uy<2Zc57a7I;2Rb0^K;VGt<<3>bU!WF=B4-B2ZqsI zZ?UXfDIYWHJn!d_>PzwIfTBB&-DkF<@qoVj&A;PFjLJQHTEuVP?%q9dH4^PCI*P#~ z4YE?`SskJEAA@n<5?s04GprZOCWu>>Ez8F<~W2{V6((w;31pO*Qe5 znWV^``dVgd7Px0p&3~y5VT&6C=RE!8e_GB7-6uUYr79(Sw5>DD@iS|Er7#)lNgP)8 zI8rZx^v|#VZ_4H_ZZ&4aHHN2cB>m(fUTcMGR~9vde_wCo17l{y=`A2Cwu?PMi4

Sjk@Pw?h1Ltp6_XOq$?^|%Ek_P21|Ql-vI~R+npYRrJ5JoSg?WCk zRu=kPU0K<__c+-zap^lbI$1oulRHT|(wO=dZXEE130FI$Fr;+kPw@kgnhm5d75)TF>QsHGp=w8&ph9^v63xL1M2o5;_bxB|_1eZSXk z&G^)D&|kW&r6=Y;a<8(Fw?)(aZDvb!wcZ;a3Fk6h{rzFYOyn$RS zrLtMiEPn5CH6N`I8$Y;!>+#=EcYZ&(6MIDLjE zM0ZWlVBq}9{a=L`x$Q0dw5X67-XW|})8+WA?lUZB4qSg|X7C)d4yIy~Erq32D%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NqHhbHIg74{EoeyFMXEXm<&pvkn1cbckK2sBknt{p!xPu`D+eEWeJz}OUgYXmSY z<2vxkwwY;Kh6}6&mWzBDutN6K0vjaH$ANAC?04%s9e?{7Xn?jx00000NkvXXu0mjf D9#26Q diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/plugin.xml b/plugins/de.fraunhofer.ipa.rossystem.model.combination/plugin.xml deleted file mode 100644 index bf2a86ea5..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/plugin.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/pom.xml b/plugins/de.fraunhofer.ipa.rossystem.model.combination/pom.xml deleted file mode 100644 index 209a4a036..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - 4.0.0 - - de.fraunhofer.ipa.ros - de.fraunhofer.ipa.ros.parent - 2.0.0-SNAPSHOT - ../de.fraunhofer.ipa.ros.parent/pom.xml - - de.fraunhofer.ipa.rossystem.model.combination - eclipse-plugin - - - - - org.eclipse.tycho - target-platform-configuration - - - - - eclipse-plugin - org.eclipse.ui.ide - 0.0.0 - - - - - - - - diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelHandler.java b/plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelHandler.java deleted file mode 100644 index 1a9c1d5f4..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -package rossystem.model.combination; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.handlers.HandlerUtil; - -public class CombineModelHandler extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent event) { - Shell activeShell = HandlerUtil.getActiveShell(event); - CombineModelsWizard wizard = new CombineModelsWizard(); - wizard.init(PlatformUI.getWorkbench(), new StructuredSelection()); - WizardDialog dialog = new WizardDialog(activeShell,wizard); - dialog.create(); - dialog.getShell().setText("Combine ROS System Models"); - int result = dialog.open(); - return null; - } - -} diff --git a/plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelsWizard.java b/plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelsWizard.java deleted file mode 100644 index 6103991e9..000000000 --- a/plugins/de.fraunhofer.ipa.rossystem.model.combination/src/rossystem/model/combination/CombineModelsWizard.java +++ /dev/null @@ -1,530 +0,0 @@ -package rossystem.model.combination; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.jface.wizard.WizardSelectionPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.actions.WorkspaceModifyOperation; - -import componentInterface.ComponentInterface; -import componentInterface.RosActionClient; -import componentInterface.RosActionServer; -import componentInterface.RosPublisher; -import componentInterface.RosServiceClient; -import componentInterface.RosServiceServer; -import componentInterface.RosSubscriber; -import componentInterface.impl.ComponentInterfaceImpl; -import componentInterface.impl.RosPublisherImpl; -import rossystem.RosSystem; - -/** - * This is a simple wizard for creating a new model file. - * - * - * @generated - */ -public class CombineModelsWizard extends Wizard implements INewWizard { - - protected SelectinputFile getInputFileCreationPage; - //protected RossystemPackage rossystemPackage = RossystemPackage.eINSTANCE; - //protected RossystemFactory rossystemFactory = rossystemPackage.getRossystemFactory(); - - public void init(IWorkbench workbench, IStructuredSelection selection) { - setWindowTitle("Combine System Models"); - } - - public void addComponentAndSave(RosSystem RosSystemResult, ComponentInterface component, Resource resource_result2) { - RosSystemResult.getRosComponent().add(component); - resource_result2.getContents().add(RosSystemResult); - try { - resource_result2.save(null); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - - - public RosPublisher NewPub(RosPublisher pub) { - RosPublisher ros_pub = new RosPublisherImpl(); - ros_pub.setName(pub.getName()); - ros_pub.setNs(pub.getNs()); - ros_pub.setPublisher(pub.getPublisher()); - return ros_pub; - } - - @Override - public boolean performFinish() { - try { - ArrayList Report = new ArrayList<>(); - - IFile InputFile = getInputFileCreationPage.getInputFile(); - String RelativePath = InputFile.getProject().getName()+"/"+InputFile.getProjectRelativePath(); - ResourceSet rs_input = new ResourceSetImpl(); - Resource resource_input = rs_input.getResource(URI.createPlatformResourceURI(RelativePath,true),true); - RosSystem RosSystemInput = (RosSystem) resource_input.getContents().get(0); - EList components_input = (EList) RosSystemInput.getRosComponent(); - - final IFile InputFile2 = getInputFileCreationPage.getSpecFile(); - String InputFile2RelativePath = InputFile2.getProject().getName()+"/"+InputFile2.getProjectRelativePath(); - ResourceSet rs_spec = new ResourceSetImpl(); - Resource resource_input2 = rs_spec.getResource(URI.createPlatformResourceURI(InputFile2RelativePath,true),true); - RosSystem RosSystemInput2 = (RosSystem) resource_input2.getContents().get(0); - EList components_input2 = (EList) RosSystemInput2.getRosComponent(); - Report.add("Combine the system model "+RosSystemInput.getName()+" from file:\n "+ InputFile.getName() + - "\nwith the system model "+RosSystemInput2.getName()+" from :\n"+ InputFile2.getName()+"\n"); - - Report.add(RosSystemInput.getName()+": "+components_input.size()+" components"); - Report.add(RosSystemInput2.getName()+": "+components_input2.size()+" components"); - - final IFile modelFile = getInputFileCreationPage.getResultFile(); - - final boolean minimal_model_combination = getInputFileCreationPage.get_minimal_model(); - - - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - @Override - protected void execute(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { - try { - - ResourceSet resourceSet = new ResourceSetImpl(); - URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); - Resource resource_result = resourceSet.createResource(fileURI); - StringBuilder model_output = new StringBuilder(); - resource_result.getContents().clear(); - model_output.append("RosSystem { Name 'result' }"); - byte[] bytes = model_output.toString().getBytes(); - InputStream source = new ByteArrayInputStream(bytes); - try { - modelFile.create(source, IResource.FILE, null); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - String ResultFileRelativePath = modelFile.getProject().getName()+"/"+modelFile.getProjectRelativePath(); - ResourceSet rs_result = new ResourceSetImpl(); - Resource resource_result2= rs_result.getResource(URI.createPlatformResourceURI(ResultFileRelativePath,true),true); - RosSystem RosSystemResult = (RosSystem) resource_result2.getContents().get(0); - - List components1_ = new ArrayList<>(); - components1_.addAll(components_input); - - List components2_ = new ArrayList<>(); - components2_.addAll(components_input2); - - boolean component_found; - - if (!minimal_model_combination) { - for(int i = 0; i < components2_.size(); i++) { - ComponentInterface comp2 = components2_.get(i); - component_found=false; - for (int j = 0; j < components1_.size(); j++) { - ComponentInterface comp = components1_.get(j); - if (comp2.getName().equals(comp.getName())) {component_found=true;}} - if (!component_found) { - addComponentAndSave(RosSystemResult,comp2,resource_result2); - } - } - } - int count=0; - - for (int i = 0; i < components1_.size(); i++) { - ComponentInterface comp = components1_.get(i); - component_found=false; - for (int j = 0; j < components2_.size(); j++) { - ComponentInterface comp2 = components2_.get(j); - if (comp2.getName().equals(comp.getName())) { - count++; - System.out.println(count); - component_found = true; - addComponentAndSave(RosSystemResult,computeInterfaces(comp, comp2),resource_result2); - }} - if (!component_found) { - addComponentAndSave(RosSystemResult,comp,resource_result2); - } - - } - Report.add("Result model: "+RosSystemResult.getRosComponent().size()+" components"); - } - - finally { - // create a dialog with ok and cancel buttons and a question icon - String message = null; - - MessageBox dialog; - if (!Report.isEmpty()) { - dialog = new MessageBox(getShell(), SWT.ICON_WORKING | SWT.OK); - for (String s:Report) { - message+=s+"\n"; - } - } else { - dialog = new MessageBox(getShell(), SWT.ICON_WORKING | SWT.OK); - } - - dialog.setText("Report"); - dialog.setMessage(message); - // open dialog and await user selection - dialog.open(); - }}}; - getContainer().run(false, false, operation); - return true; - }catch (Exception exception) { - return false; - } } - - - public ComponentInterface computeInterfaces (ComponentInterface comp, ComponentInterface comp2) { - ComponentInterface component_ = new ComponentInterfaceImpl(); - component_.setName(comp.getName()); - component_.setNameSpace(comp.getNameSpace()); - System.out.println(component_); - EList pubs_input = (EList) comp.getRospublisher(); - EList subs_input = (EList) comp.getRossubscriber(); - EList scls_input = (EList) comp.getRosserviceclient(); - EList ssrs_input = (EList) comp.getRosserviceserver(); - EList acls_input = (EList) comp.getRosactionclient(); - EList asrs_input = (EList) comp.getRosactionserver(); - - EList pubs_input2 = (EList) comp2.getRospublisher(); - EList subs_input2 = (EList) comp2.getRossubscriber(); - EList scls_input2 = (EList) comp2.getRosserviceclient(); - EList ssrs_input2 = (EList) comp2.getRosserviceserver(); - EList acls_input2 = (EList) comp2.getRosactionclient(); - EList asrs_input2 = (EList) comp2.getRosactionserver(); - - //PUBLISHERS - List pubs_input_ = new ArrayList<>(); - pubs_input_.addAll(pubs_input); - - List pubs_input2_ = new ArrayList<>(); - pubs_input2_.addAll(pubs_input2); - for(RosPublisher pub:pubs_input2_) { - boolean pub_found = false; - for (RosPublisher pub_i:pubs_input_) { - if (pub_i.getName().equals(pub.getName())){ - pub_found=true; - component_.getRospublisher().add(pub_i); - }} - if (!pub_found) { - component_.getRospublisher().add(pub); - } - } - for(RosPublisher pub:pubs_input_) { - boolean pub_found = false; - for (RosPublisher pub_i:pubs_input2_) { - if (pub_i.getName().equals(pub.getName())){ - pub_found=true; - }} - if (!pub_found) { - component_.getRospublisher().add(pub); - } - } - //SUBSCRIBERS - List subs_input_ = new ArrayList<>(); - subs_input_.addAll(subs_input); - - List subs_input2_ = new ArrayList<>(); - subs_input2_.addAll(subs_input2); - for(RosSubscriber sub:subs_input2_) { - boolean sub_found = false; - for (RosSubscriber sub_i:subs_input_) { - if (sub_i.getName().equals(sub.getName())){ - sub_found=true; - component_.getRossubscriber().add(sub_i); - }} - if (!sub_found) { - component_.getRossubscriber().add(sub); - } - } - for(RosSubscriber sub:subs_input_) { - boolean sub_found = false; - for (RosSubscriber sub_i:subs_input2_) { - if (sub_i.getName().equals(sub.getName())){ - sub_found=true; - }} - if (!sub_found) { - component_.getRossubscriber().add(sub); - } - } - - //SERVICE SERVER - List ssrs_input_ = new ArrayList<>(); - ssrs_input_.addAll(ssrs_input); - - List ssrs_input2_ = new ArrayList<>(); - ssrs_input2_.addAll(ssrs_input2); - for(RosServiceServer srv:ssrs_input2_) { - boolean srv_found = false; - for (RosServiceServer srv_i:ssrs_input_) { - if (srv_i.getName().equals(srv.getName())){ - srv_found=true; - component_.getRosserviceserver().add(srv_i); - }} - if (!srv_found) { - component_.getRosserviceserver().add(srv); - } - } - for(RosServiceServer srv:ssrs_input_) { - boolean srv_found = false; - for (RosServiceServer srv_i:ssrs_input2_) { - if (srv_i.getName().equals(srv.getName())){ - srv_found=true; - }} - if (!srv_found) { - component_.getRosserviceserver().add(srv); - } - } - - //SERVICE CLIENT - List scls_input_ = new ArrayList<>(); - scls_input_.addAll(scls_input); - - List scls_input2_ = new ArrayList<>(); - scls_input2_.addAll(scls_input2); - for(RosServiceClient cli:scls_input2_) { - boolean cli_found = false; - for (RosServiceClient cli_i:scls_input_) { - if (cli_i.getName().equals(cli.getName())){ - cli_found=true; - component_.getRosserviceclient().add(cli_i); - }} - if (!cli_found) { - component_.getRosserviceclient().add(cli); - } - } - for(RosServiceClient cli:scls_input_) { - boolean cli_found = false; - for (RosServiceClient cli_i:scls_input2_) { - if (cli_i.getName().equals(cli.getName())){ - cli_found=true; - }} - if (!cli_found) { - component_.getRosserviceclient().add(cli); - } - } - - //SERVICE SERVER - List asrs_input_ = new ArrayList<>(); - asrs_input_.addAll(asrs_input); - - List asrs_input2_ = new ArrayList<>(); - asrs_input2_.addAll(asrs_input2); - for(RosActionServer srv:asrs_input2_) { - boolean srv_found = false; - for (RosActionServer srv_i:asrs_input_) { - if (srv_i.getName().equals(srv.getName())){ - srv_found=true; - component_.getRosactionserver().add(srv_i); - }} - if (!srv_found) { - component_.getRosactionserver().add(srv); - } - } - for(RosActionServer srv:asrs_input_) { - boolean srv_found = false; - for (RosActionServer srv_i:asrs_input2_) { - if (srv_i.getName().equals(srv.getName())){ - srv_found=true; - }} - if (!srv_found) { - component_.getRosactionserver().add(srv); - } - } - - //ACTION CLIENT - List acls_input_ = new ArrayList<>(); - acls_input_.addAll(acls_input); - - List acls_input2_ = new ArrayList<>(); - acls_input2_.addAll(acls_input2); - for(RosActionClient cli:acls_input2_) { - boolean cli_found = false; - for (RosActionClient cli_i:acls_input_) { - if (cli_i.getName().equals(cli.getName())){ - cli_found=true; - component_.getRosactionclient().add(cli_i); - }} - if (!cli_found) { - component_.getRosactionclient().add(cli); - } - } - for(RosActionClient cli:acls_input_) { - boolean cli_found = false; - for (RosActionClient cli_i:acls_input2_) { - if (cli_i.getName().equals(cli.getName())){ - cli_found=true; - }} - if (!cli_found) { - component_.getRosactionclient().add(cli); - } - } - - return component_; - } - - public class SelectinputFile extends WizardSelectionPage{ - private Composite container; - private Text locationPathField; - private Text locationPathField2; - private Text locationPathField3; - - private Button browseButton1; - private Button browseButton2; - private Button browseButton3; - private Button browseButton4; - - private boolean minimal_model; - - - protected IFile SpecFile; - protected IFile InputFile; - protected IContainer ResultFolder; - private String spec_path; - private String input_path; - private String folder_path; - - protected SelectinputFile(String pageId) { - super(pageId); - } - @Override - public void createControl(Composite parent) { - container = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(2, false); - container.setLayout(layout); - layout.numColumns = 1; - Label label1 = new Label(container, SWT.NONE); - label1.setText("Select a RosSystems model (result from a static analysis)"); - locationPathField = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData (GridData.FILL_HORIZONTAL); - gd.grabExcessHorizontalSpace = true; - gd.horizontalAlignment = GridData.FILL; - locationPathField.setLayoutData(gd); - browseButton1 = new Button(container, SWT.PUSH); - browseButton1.setText("Browse..."); - browseButton1.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - public void widgetSelected(SelectionEvent e) { - IFile[] files_input = WorkspaceResourceDialog.openFileSelection(getShell(), "Select a RosSystems model (result from a static analysis)", "open", false, null, null); - InputFile= files_input[0]; - input_path = InputFile.getLocation().toString(); - if (input_path == null) return; - locationPathField.setText(InputFile.getName()); - } - }); - Label label2 = new Label(container, SWT.NONE); - label2.setText("RosSystems model (result from a runtime analysis)"); - locationPathField2 = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd2 = new GridData (GridData.FILL_HORIZONTAL); - gd2.grabExcessHorizontalSpace = true; - gd2.horizontalAlignment = GridData.FILL; - locationPathField2.setLayoutData(gd2); - browseButton2 = new Button(container, SWT.PUSH); - browseButton2.setText("Browse..."); - browseButton2.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - public void widgetSelected(SelectionEvent e) { - IFile[] files = WorkspaceResourceDialog.openFileSelection(getShell(), "Select a RosSystems model (result from a runtime analysis)", "open", false, null, null); - SpecFile= files[0]; - spec_path= SpecFile.getLocation().toString(); - if (spec_path == null) return; - locationPathField2.setText(SpecFile.getName()); - } - }); - Label label3 = new Label(container, SWT.NONE); - label3.setText("Path for result model"); - locationPathField3 = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd3 = new GridData (GridData.FILL_HORIZONTAL); - gd3.grabExcessHorizontalSpace = true; - gd3.horizontalAlignment = GridData.FILL; - locationPathField3.setLayoutData(gd3); - browseButton3 = new Button(container, SWT.PUSH); - browseButton3.setText("Browse..."); - browseButton3.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - public void widgetSelected(SelectionEvent e) { - IContainer[] path = WorkspaceResourceDialog.openFolderSelection(getShell(), "Select a RosSystems model (result from a runtime analysis)", "open", false, null, null); - ResultFolder = path[0]; - folder_path= ResultFolder.getLocation().toString(); - if (folder_path == null) return; - locationPathField3.setText(ResultFolder.getName()); - } - }); - - Label label4 = new Label(container, SWT.NONE); - //label4.setText("Mininal model"); - GridData gd4 = new GridData (GridData.FILL_HORIZONTAL); - gd4.grabExcessHorizontalSpace = true; - gd4.horizontalAlignment = GridData.FILL; - browseButton4 = new Button(container, SWT.CHECK); - browseButton4.setText("Combine to the minimal model (restrictive strategy)"); - browseButton4.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - public void widgetSelected(SelectionEvent e) { - minimal_model = browseButton4.getSelection(); - - } - }); - - setControl(container); - setPageComplete(true); - } - - public IFile getSpecFile() { - return SpecFile; - } - public IFile getInputFile() { - return InputFile; - } - public IFile getResultFile() { - return ResourcesPlugin.getWorkspace().getRoot().getFile(ResultFolder.getFullPath().append("result.rossystem")); - } - - public boolean get_minimal_model() { - return minimal_model; - } - } - - @Override - public void addPages() { - getInputFileCreationPage = new SelectinputFile("Whatever"); - getInputFileCreationPage.setTitle("Select ROS model input"); - getInputFileCreationPage.setDescription("Select ROS model input"); - addPage(getInputFileCreationPage); - } - -}