Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2014-08-14 05:34:33 -0400
committerHenrik Rentz-Reichert2014-08-14 05:34:33 -0400
commit89224851b84d4af599839e38cc792288e19ddd75 (patch)
treee0882c5ea144e92076b50489f521e38089066cf7
parent1dbf2c78c259a48e67954e347e09cee1b524be38 (diff)
downloadorg.eclipse.etrice-89224851b84d4af599839e38cc792288e19ddd75.tar.gz
org.eclipse.etrice-89224851b84d4af599839e38cc792288e19ddd75.tar.xz
org.eclipse.etrice-89224851b84d4af599839e38cc792288e19ddd75.zip
[ui.common, ui.common.base] factored out ROOM independent parts into the new ui.common.base
-rw-r--r--features/org.eclipse.etrice.feature/feature.xml28
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/about.html28
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/src/org/eclipse/etrice/core/fsm/ui/FSMUiModule.java7
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/about.html28
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/RoomUiModule.java2
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/RoomProposalProvider.java1
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/SaveOnFocusLostListener.java5
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/preferences/RoomPreferenceConstants.java (renamed from plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/PreferenceConstants.java)4
-rw-r--r--plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore69
-rw-r--r--plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.genmodel1
-rw-r--r--plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/ActorClass.java9
-rw-r--r--plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/ActorClassImpl.java13
-rw-r--r--plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/RoomPackageImpl.java2
-rw-r--r--plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.xtend5
-rw-r--r--plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java123
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/DiagramAccess.java33
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/ProviderDispatcher.java6
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/AbstractMemberAwarePropertyDialog.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/ChoicePointPropertyDialog.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/QuickFixDialog.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/TrPointPropertyDialog.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/editor/BehaviorExporter.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/quickfix/BehaviorQuickfixProvider.java6
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/ChoicePointSupport.java10
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/InitialPointSupport.java6
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/QuickFixFeature.java4
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateGraphSupport.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java8
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/SupportUtil.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TrPointSupport.java10
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TransitionSupport.java18
-rw-r--r--plugins/org.eclipse.etrice.ui.commands/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.ui.commands/src/org/eclipse/etrice/ui/commands/handlers/ExportDiagramsHandler.java12
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/.classpath7
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/.gitignore1
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/.project28
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF36
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/about.html28
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/build.properties5
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/plugin.xml37
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/UIBaseActivator.java50
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/commands/UpdateCommand.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/UpdateCommand.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/ConcurrentModificationObserver.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/ConcurrentModificationObserver.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/EditingDomainAdapter.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/EditingDomainAdapter.java)6
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/SimpleDirtyResource.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/SimpleDirtyResource.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/dialogs/AbstractPropertyDialog.java)6
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/dialogs/MultiValidator2.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomDiagramBehavior.java)3
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomResourceSetProvider.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomResourceSetProvider.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomUpdateBehavior.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomUpdateBehavior.java)8
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java306
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramExporter.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/DiagramExporter.java)26
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/IInputUriHolder.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/IInputUriHolder.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/ModificationTrackingEnabler.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/ModificationTrackingEnabler.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/SaveOnFocusLostListener.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/SaveOnFocusLostListener.java)10
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/SuperClassListener.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/SuperClassListener.java)28
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceConstants.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceConstants.java)4
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceInitializer.java45
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/AbstractQuickfixProvider.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/AbstractQuickfixProvider.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IDiagramModification.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IDiagramModification.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IssueResolution.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IssueResolution.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IssueResolutionAcceptor.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IssueResolutionAcceptor.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramRenameParticipant.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/refactoring/DiagramRenameParticipant.java)4
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/AutoUpdateFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/AutoUpdateFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CantDeleteFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CantDeleteFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CantRemoveFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CantRemoveFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCreateConnectionFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCreateConnectionFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCreateFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCreateFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCustomFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCustomFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CommonSupportUtil.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CommonSupportUtil.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/DeleteWithoutConfirmFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/DeleteWithoutConfirmFeature.java)10
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/DiagramAccessBase.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/DiagramAccessBase.java)70
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/NoResizeFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/NoResizeFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/RemoveBendpointsFeature.java (renamed from plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java)2
-rw-r--r--plugins/org.eclipse.etrice.ui.common/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.etrice.ui.common/plugin.xml26
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java12
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java272
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/ETricePreferencePage.java42
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceInitializer.java18
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java3
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java33
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/ProviderDispatcher.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/ActorContainerRefPropertyDialog.java4
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SPPPropertyDialog.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureExporter.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java12
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java6
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/InterfaceItemSupport.java8
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/LayerConnectionSupport.java4
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java6
-rw-r--r--tests/org.eclipse.etrice.core.fsm.tests/about.html28
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF1
-rw-r--r--tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF1
103 files changed, 1082 insertions, 639 deletions
diff --git a/features/org.eclipse.etrice.feature/feature.xml b/features/org.eclipse.etrice.feature/feature.xml
index a482a1fa3..57fabd4c4 100644
--- a/features/org.eclipse.etrice.feature/feature.xml
+++ b/features/org.eclipse.etrice.feature/feature.xml
@@ -340,4 +340,32 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.etrice.core.fsm"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.etrice.core.fsm.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.etrice.core.genmodel.fsm"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.etrice.ui.common.base"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.fsm.ui/META-INF/MANIFEST.MF
index 441afec16..40f1c9b42 100644
--- a/plugins/org.eclipse.etrice.core.fsm.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.core.fsm.ui/META-INF/MANIFEST.MF
@@ -20,8 +20,9 @@ Require-Bundle: org.eclipse.etrice.core.common.ui;bundle-version="0.5.0",
Import-Package: org.apache.log4j,
org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.etrice.core.fsm.ui.quickfix,
+Export-Package: org.eclipse.etrice.core.fsm.ui,
org.eclipse.etrice.core.fsm.ui.contentassist,
org.eclipse.etrice.core.fsm.ui.contentassist.antlr,
- org.eclipse.etrice.core.fsm.ui.internal
+ org.eclipse.etrice.core.fsm.ui.internal,
+ org.eclipse.etrice.core.fsm.ui.quickfix
Bundle-Activator: org.eclipse.etrice.core.fsm.ui.internal.FSMActivator
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/about.html b/plugins/org.eclipse.etrice.core.fsm.ui/about.html
new file mode 100644
index 000000000..c258ef55d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.fsm.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/src/org/eclipse/etrice/core/fsm/ui/FSMUiModule.java b/plugins/org.eclipse.etrice.core.fsm.ui/src/org/eclipse/etrice/core/fsm/ui/FSMUiModule.java
index 6f9fecb7a..a2c621096 100644
--- a/plugins/org.eclipse.etrice.core.fsm.ui/src/org/eclipse/etrice/core/fsm/ui/FSMUiModule.java
+++ b/plugins/org.eclipse.etrice.core.fsm.ui/src/org/eclipse/etrice/core/fsm/ui/FSMUiModule.java
@@ -3,8 +3,11 @@
*/
package org.eclipse.etrice.core.fsm.ui;
+import org.eclipse.etrice.core.fsm.ui.internal.FSMActivator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import com.google.inject.Injector;
+
/**
* Use this class to register components to be used within the IDE.
*/
@@ -12,4 +15,8 @@ public class FSMUiModule extends org.eclipse.etrice.core.fsm.ui.AbstractFSMUiMod
public FSMUiModule(AbstractUIPlugin plugin) {
super(plugin);
}
+
+ public static Injector getInjector() {
+ return FSMActivator.getInstance().getInjector(FSMActivator.ORG_ECLIPSE_ETRICE_CORE_FSM_FSM);
+ }
}
diff --git a/plugins/org.eclipse.etrice.core.fsm/about.html b/plugins/org.eclipse.etrice.core.fsm/about.html
new file mode 100644
index 000000000..c258ef55d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.fsm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF
index 1b2038181..2cd4c2c5d 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF
@@ -27,5 +27,6 @@ Export-Package: org.eclipse.etrice.core.ui,
org.eclipse.etrice.core.ui.editor,
org.eclipse.etrice.core.ui.internal,
org.eclipse.etrice.core.ui.linking,
+ org.eclipse.etrice.core.ui.preferences,
org.eclipse.etrice.core.ui.quickfix
Bundle-Activator: org.eclipse.etrice.core.ui.RoomUiActivator
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/RoomUiModule.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/RoomUiModule.java
index cb205c503..33da3c985 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/RoomUiModule.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/RoomUiModule.java
@@ -40,7 +40,7 @@ public class RoomUiModule extends org.eclipse.etrice.core.ui.AbstractRoomUiModul
}
public static Injector getInjector() {
- return RoomActivator.getInstance().getInjector("org.eclipse.etrice.core.Room");
+ return RoomActivator.getInstance().getInjector(RoomActivator.ORG_ECLIPSE_ETRICE_CORE_ROOM);
}
// HOWTO: use URI imports - need special editor opener
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/RoomProposalProvider.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/RoomProposalProvider.java
index 7f9d9a122..8bb8b2e9e 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/RoomProposalProvider.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/RoomProposalProvider.java
@@ -28,7 +28,6 @@ import org.eclipse.etrice.core.room.RefPath;
import org.eclipse.etrice.core.room.RoomAnnotationTargetEnum;
import org.eclipse.etrice.core.room.RoomPackage;
import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.core.validation.ValidationUtil;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.swt.graphics.Image;
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/SaveOnFocusLostListener.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/SaveOnFocusLostListener.java
index 905ac1cc7..eb744ca66 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/SaveOnFocusLostListener.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/SaveOnFocusLostListener.java
@@ -14,6 +14,7 @@ package org.eclipse.etrice.core.ui.editor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.etrice.core.ui.preferences.RoomPreferenceConstants;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.xtext.ui.editor.XtextEditor;
@@ -60,8 +61,8 @@ public class SaveOnFocusLostListener implements IPartListener {
return;
boolean save = Platform.getPreferencesService().getBoolean(
- "org.eclipse.etrice.ui.common",
- PreferenceConstants.SAVE_TEXT_ON_FOCUS_LOST, false, null);
+ "org.eclipse.etrice.ui.common.base",
+ RoomPreferenceConstants.SAVE_TEXT_ON_FOCUS_LOST, false, null);
if (save && editor.isDirty())
if (((IValidatingEditor)editor).isValid())
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/PreferenceConstants.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/preferences/RoomPreferenceConstants.java
index 303a48b5b..5b5119339 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/PreferenceConstants.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/preferences/RoomPreferenceConstants.java
@@ -10,12 +10,12 @@
*
*******************************************************************************/
-package org.eclipse.etrice.core.ui.editor;
+package org.eclipse.etrice.core.ui.preferences;
/**
* Constant definitions for plug-in preferences
*/
-public class PreferenceConstants {
+public interface RoomPreferenceConstants {
public static final String SAVE_TEXT_ON_FOCUS_LOST = "SaveTextOnFocusLost";
}
diff --git a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore
index a2fcacff4..ed3a26a05 100644
--- a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore
+++ b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore
@@ -10,14 +10,14 @@
<details key="documentation" value="&lt;br>The model name is a dot separated fully qualified name and is&#xD;&#xA;used to provide a name space. The generators may use that also&#xD;&#xA;to place the generated code into separate directories.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
- eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Import"
+ eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Import"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a list of all imported models.&#xD;&#xA;"/>
@@ -68,7 +68,7 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="annotationTypes" upperBound="-1"
- eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//AnnotationType"
+ eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//AnnotationType"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RoomClass">
@@ -80,7 +80,7 @@
<details key="documentation" value="&lt;br>By this name the actor class is referred to in the model.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
@@ -92,7 +92,7 @@
<details key="documentation" value="&lt;br>This class is the super class of the structural classes&#xD;&#xA;&lt;ul>&#xD;&#xA; &lt;li>{@link ActorContainerClass}&lt;/li>&#xD;&#xA; &lt;li>{@link LogicalSystem}&lt;/li>&#xD;&#xA;&lt;/ul>&#xD;&#xA;"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1"
- eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
+ eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a list of structure class annotations.&#xD;&#xA;"/>
@@ -121,19 +121,19 @@
<details key="documentation" value="&lt;br>This is a list of all interface SPPs.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode1" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode1" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode2" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode2" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode3" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode3" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
@@ -191,7 +191,7 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>A primitive type describes a type like int, char, float&#xD;&#xA;and can represent the type with a certain precision&#xD;&#xA;in the target language&#xD;&#xA;"/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//LiteralType">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//LiteralType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is one of the basic variable types.&#xD;&#xA;"/>
</eAnnotations>
@@ -243,7 +243,7 @@
<details key="documentation" value="&lt;br>The name of the literal.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="literal" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//IntLiteral"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="literal" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//IntLiteral"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The value of the literal. It is associated with a target type which defaults to&#xD;&#xA;{@code int} and can be set explicitly using the {@link EnumerationType#getPrimitiveType()}&#xD;&#xA;"/>
@@ -275,25 +275,25 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1"
- eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
+ eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a list of data class annotations.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode1" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode1" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode2" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode2" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode3" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode3" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
@@ -337,7 +337,7 @@
<details key="documentation" value="&lt;br>This is an optional default value literal.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
@@ -365,13 +365,13 @@
<details key="documentation" value="&lt;br>This is an optional return type of the operation.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="detailCode" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="detailCode" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is the operation body written in code generator target language.&#xD;&#xA;"/>
@@ -408,7 +408,7 @@
<details key="documentation" value="&lt;br>The super class of&#xD;&#xA;&lt;ul>&#xD;&#xA; &lt;li>{@link ProtocolClass}&lt;/li>&#xD;&#xA; &lt;li>{@link CompoundProtocolClass}&lt;/li>&#xD;&#xA;&lt;/ul>&#xD;&#xA;"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1"
- eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
+ eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a list of protocol class annotations.&#xD;&#xA;"/>
@@ -429,19 +429,19 @@
<details key="documentation" value="&lt;br>The base class from which all messages are inherited.&#xD;&#xA;The port classes and the semantics are not inherited.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode1" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode1" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode2" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode2" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode3" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode3" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
@@ -504,7 +504,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Message" eSuperTypes="../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractMessage">
+ <eClassifiers xsi:type="ecore:EClass" name="Message" eSuperTypes="platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractMessage">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a concrete sub class of an {@link AbstractMessage}.&#xD;&#xA;A message in ROOM is part of a {@link ProtocolClass}. Messages are exchanged via {@link Port}s.&#xD;&#xA;For event driven protocols the message is an object that is deliverd using a message&#xD;&#xA;service of the runtime. For data driven systems only messages holding data are valid. In this&#xD;&#xA;case the conjugate port is the one holding (and writing) the data and the regular port is&#xD;&#xA;reading the data.&#xD;&#xA;"/>
</eAnnotations>
@@ -519,7 +519,7 @@
<details key="documentation" value="&lt;br>This is a reference to optional message data.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
@@ -530,7 +530,7 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>A port class can be specified to customize the behavior of a {@link ProtocolClass}.&#xD;&#xA;There can be one for regular ports and another one for conjugate ports independently.&#xD;&#xA;&#xD;&#xA;&lt;p>&#xD;&#xA;Port classes can be used to define attributes and operations and message handlers&#xD;&#xA;(or interceptors).&#xD;&#xA;&lt;/p>&#xD;&#xA;"/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="userCode" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="userCode" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>The user code is treated in a generator dependent way.&#xD;&#xA;"/>
@@ -564,7 +564,7 @@
<details key="documentation" value="&lt;br>This is the message that is handled.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="detailCode" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="detailCode" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is the handler code written in code generator target language.&#xD;&#xA;"/>
@@ -618,7 +618,7 @@
<details key="documentation" value="&lt;br>A {@link SemanticsRule} for outgoing messages.&#xD;&#xA;The rule points to an outgoing messages and allows follow-up rules.&#xD;&#xA;"/>
</eAnnotations>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ActorClass" eSuperTypes="#//ActorContainerClass ../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ModelComponent">
+ <eClassifiers xsi:type="ecore:EClass" name="ActorClass" eSuperTypes="#//ActorContainerClass platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ModelComponent">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>Together with {@link ProtocolClass} and {@link DataClass} one of&#xD;&#xA;the main class types of the ROOM language.&#xD;&#xA;&#xD;&#xA;&lt;p>&#xD;&#xA;The actor class in ROOM has three compartments which aren't represented as separate model objects.&#xD;&#xA;To understand to which compartment an attribute or reference belongs to here is a list&#xD;&#xA;&lt;ul>&#xD;&#xA; &lt;li>Interface: everything which is visible from the outside from a model point of view&#xD;&#xA; &lt;ul>&#xD;&#xA; &lt;li>{@link #getInterfacePorts}: a list of all interface {@link Port}s&lt;/li>&#xD;&#xA; &lt;li>{@link ActorContainerClass#getServiceProvisionPoints()}: a list of all interface {@link SPP}s&lt;/li>&#xD;&#xA; &lt;/ul>&#xD;&#xA; &lt;li>Structure: all internal structural aspects of an actor class&lt;/li>&#xD;&#xA; &lt;ul>&#xD;&#xA; &lt;li>{@link #getUserCode1}-3: user defined code with generator dependent meaning&lt;/li>&#xD;&#xA; &lt;li>{@link #getInternalPorts}: a list of all internal end {@link Port}s&lt;/li>&#xD;&#xA; &lt;li>{@link #getExternalPorts}: a list of all {@link ExternalPort}s (the interface ports that&#xD;&#xA; are end ports, not relay ports&lt;/li>&#xD;&#xA; &lt;li>{@link #getServiceImplementations}: a list of all {@link ServiceImplementation}s&lt;/li>&#xD;&#xA; &lt;li>{@link #getServiceAccessPoints}: a list of all {@link SAP}s used by this actor class&lt;/li>&#xD;&#xA; &lt;li>{@link #getAttributes}: a list of all actor class {@link Attribute}s&lt;/li>&#xD;&#xA; &lt;li>{@link #getActorRefs}: a list of all referenced actor classes (an {@link ActorRef}&#xD;&#xA; has the meaning of a composition)&lt;/li>&#xD;&#xA; &lt;li>{@link #getBindings}: a list of all port {@link Binding}s of this actor class&lt;/li>&#xD;&#xA; &lt;li>{@link #getConnections}: a list of all {@link LayerConnection}s&lt;/li>&#xD;&#xA; &lt;/ul>&#xD;&#xA; &lt;li>Behavior: the behavioral aspects of an actor class&lt;/li>&#xD;&#xA; &lt;ul>&#xD;&#xA; &lt;li>{@link #getOperations}: a list of {@link Operation}s&lt;/li>&#xD;&#xA; &lt;li>{@link #getStateMachine}: the {@link StateGraph state machine} definition&lt;/li>&#xD;&#xA; &lt;/ul>&#xD;&#xA;&lt;/ul>&#xD;&#xA;&lt;/p>&#xD;&#xA;"/>
</eAnnotations>
@@ -642,13 +642,18 @@
<details key="body" value="return (ActorClass)getBase();&#xD;&#xA;"/>
</eAnnotations>
</eOperations>
+ <eOperations name="getComponentName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return getName();&#xD;&#xA;"/>
+ </eAnnotations>
+ </eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="interfacePorts" upperBound="-1"
eType="#//Port" containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a list containing all ports of the actor interface.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="structureDocu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="structureDocu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation of the actor structure.&#xD;&#xA;"/>
@@ -684,14 +689,14 @@
<details key="documentation" value="&lt;br>This is a list of all actor class private attributes.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="behaviorDocu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="behaviorDocu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation of the actor behavior.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="behaviorAnnotations" upperBound="-1"
- eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
+ eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Annotation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a list of annotations to the actor behavior.&#xD;&#xA;"/>
@@ -704,7 +709,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="InterfaceItem" eSuperTypes="../../../../../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem">
+ <eClassifiers xsi:type="ecore:EClass" name="InterfaceItem" eSuperTypes="platform:/resource/org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is a concrete sub class of an {@link AbstractInterfaceItem}.&#xD;&#xA;&#xD;&#xA;It is the super class of&#xD;&#xA;&lt;ul>&#xD;&#xA; &lt;li>{@link Port}&lt;/li>&#xD;&#xA; &lt;li>{@link SAP}&lt;/li>&#xD;&#xA; &lt;li>{@link SPP}&lt;/li>&#xD;&#xA;&lt;/ul>&#xD;&#xA;"/>
</eAnnotations>
@@ -739,7 +744,7 @@
<details key="documentation" value="&lt;br>This is the port's protocol class.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
@@ -811,7 +816,7 @@
<details key="documentation" value="&lt;br>By this name the actor container reference is referred to in the model.&#xD;&#xA;"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass ../../../../../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="docu" eType="ecore:EClass platform:/resource/org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.ecore#//Documentation"
containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;br>This is an optional documentation.&#xD;&#xA;"/>
diff --git a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.genmodel b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.genmodel
index 4f2c075b0..93f7b6580 100644
--- a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.genmodel
+++ b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.genmodel
@@ -177,6 +177,7 @@
<genOperations ecoreOperation="Room.ecore#//ActorClass/getRelayPorts"/>
<genOperations ecoreOperation="Room.ecore#//ActorClass/getImplementedSPPs"/>
<genOperations ecoreOperation="Room.ecore#//ActorClass/getActorBase"/>
+ <genOperations ecoreOperation="Room.ecore#//ActorClass/getComponentName"/>
</genClasses>
<genClasses ecoreClass="Room.ecore#//InterfaceItem">
<genOperations ecoreOperation="Room.ecore#//InterfaceItem/getGeneralProtocol"/>
diff --git a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/ActorClass.java b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/ActorClass.java
index 2a71044fe..2656cbc89 100644
--- a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/ActorClass.java
+++ b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/ActorClass.java
@@ -289,4 +289,13 @@ public interface ActorClass extends ActorContainerClass, ModelComponent
*/
ActorClass getActorBase();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return getName();\r\n'"
+ * @generated
+ */
+ String getComponentName();
+
} // ActorClass
diff --git a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/ActorClassImpl.java b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/ActorClassImpl.java
index 7525a8d60..6c26b0011 100644
--- a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/ActorClassImpl.java
+++ b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/ActorClassImpl.java
@@ -316,7 +316,7 @@ public class ActorClassImpl extends ActorContainerClassImpl implements ActorClas
* <!-- end-user-doc -->
* @generated
*/
- public String getComponentName()
+ public String getComponentName_()
{
return componentName;
}
@@ -694,6 +694,17 @@ public class ActorClassImpl extends ActorContainerClassImpl implements ActorClas
* <!-- end-user-doc -->
* @generated
*/
+ public String getComponentName()
+ {
+ return getName();
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
diff --git a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/RoomPackageImpl.java b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/RoomPackageImpl.java
index 0aad7502e..43ca6d02f 100644
--- a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/RoomPackageImpl.java
+++ b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/RoomPackageImpl.java
@@ -2866,6 +2866,8 @@ public class RoomPackageImpl extends EPackageImpl implements RoomPackage
addEOperation(actorClassEClass, this.getActorClass(), "getActorBase", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEOperation(actorClassEClass, ecorePackage.getEString(), "getComponentName", 0, 1, IS_UNIQUE, IS_ORDERED);
+
initEClass(interfaceItemEClass, InterfaceItem.class, "InterfaceItem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
addEOperation(interfaceItemEClass, this.getGeneralProtocolClass(), "getGeneralProtocol", 0, 1, IS_UNIQUE, IS_ORDERED);
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.xtend b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.xtend
index a0fbefd87..d021a8ce5 100644
--- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.xtend
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.xtend
@@ -76,6 +76,11 @@ class ImplPostprocessor {
return (ActorClass)getBase();
'''
)
+ actorClass.addOperation("getComponentName", EcorePackage::eINSTANCE.getEClassifier("EString"), 1,
+ '''
+ return getName();
+ '''
+ )
val actorContainerRef = roomPackage.getClass("ActorContainerRef")
actorContainerRef.addOperation("getStructureClass",
diff --git a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java b/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java
index 6ea366789..348255219 100644
--- a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java
+++ b/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java
@@ -104,88 +104,93 @@ public class ImplPostprocessor {
_builder_5.append("return (ActorClass)getBase();");
_builder_5.newLine();
PostprocessingHelpers.addOperation(actorClass, "getActorBase", _eClassifier_5, Integer.valueOf(1), _builder_5.toString());
- final EClass actorContainerRef = PostprocessingHelpers.getClass(roomPackage, "ActorContainerRef");
- EClassifier _eClassifier_6 = roomPackage.getEClassifier("StructureClass");
+ EClassifier _eClassifier_6 = EcorePackage.eINSTANCE.getEClassifier("EString");
StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("if (this instanceof <%org.eclipse.etrice.core.room.ActorRef%>)");
- _builder_6.newLine();
- _builder_6.append("\t");
- _builder_6.append("return ((ActorRef)this).getType();");
- _builder_6.newLine();
- _builder_6.append("else if (this instanceof <%org.eclipse.etrice.core.room.SubSystemRef%>)");
- _builder_6.newLine();
- _builder_6.append("\t");
- _builder_6.append("return ((SubSystemRef)this).getType();");
+ _builder_6.append("return getName();");
_builder_6.newLine();
- _builder_6.append("else");
- _builder_6.newLine();
- _builder_6.append("\t");
- _builder_6.append("return null;");
- _builder_6.newLine();
- PostprocessingHelpers.addOperation(actorContainerRef, "getStructureClass", _eClassifier_6,
- Integer.valueOf(1), _builder_6.toString());
- final EClass refPath = PostprocessingHelpers.getClass(roomPackage, "RefPath");
- EClassifier _eClassifier_7 = EcorePackage.eINSTANCE.getEClassifier("EString");
+ PostprocessingHelpers.addOperation(actorClass, "getComponentName", _eClassifier_6, Integer.valueOf(1), _builder_6.toString());
+ final EClass actorContainerRef = PostprocessingHelpers.getClass(roomPackage, "ActorContainerRef");
+ EClassifier _eClassifier_7 = roomPackage.getEClassifier("StructureClass");
StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("StringBuilder sb = new StringBuilder();");
+ _builder_7.append("if (this instanceof <%org.eclipse.etrice.core.room.ActorRef%>)");
+ _builder_7.newLine();
+ _builder_7.append("\t");
+ _builder_7.append("return ((ActorRef)this).getType();");
_builder_7.newLine();
- _builder_7.append("for (RefSegment ref : getRefs()) {");
+ _builder_7.append("else if (this instanceof <%org.eclipse.etrice.core.room.SubSystemRef%>)");
_builder_7.newLine();
_builder_7.append("\t");
- _builder_7.append("sb.append(\"/\"+ref.toString());");
+ _builder_7.append("return ((SubSystemRef)this).getType();");
_builder_7.newLine();
- _builder_7.append("}");
+ _builder_7.append("else");
_builder_7.newLine();
- _builder_7.append("return sb.toString();");
+ _builder_7.append("\t");
+ _builder_7.append("return null;");
_builder_7.newLine();
- PostprocessingHelpers.addOperation(refPath,
- "toString", _eClassifier_7,
+ PostprocessingHelpers.addOperation(actorContainerRef, "getStructureClass", _eClassifier_7,
Integer.valueOf(1), _builder_7.toString());
- final EClass refSeg = PostprocessingHelpers.getClass(roomPackage, "RefSegment");
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(refSeg, "idx");
- _attribute_2.setDefaultValueLiteral("-1");
+ final EClass refPath = PostprocessingHelpers.getClass(roomPackage, "RefPath");
EClassifier _eClassifier_8 = EcorePackage.eINSTANCE.getEClassifier("EString");
StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("return getRef() + ((getIdx()>=0)? \":\"+getIdx() : \"\");");
+ _builder_8.append("StringBuilder sb = new StringBuilder();");
_builder_8.newLine();
- PostprocessingHelpers.addOperation(refSeg,
+ _builder_8.append("for (RefSegment ref : getRefs()) {");
+ _builder_8.newLine();
+ _builder_8.append("\t");
+ _builder_8.append("sb.append(\"/\"+ref.toString());");
+ _builder_8.newLine();
+ _builder_8.append("}");
+ _builder_8.newLine();
+ _builder_8.append("return sb.toString();");
+ _builder_8.newLine();
+ PostprocessingHelpers.addOperation(refPath,
"toString", _eClassifier_8,
Integer.valueOf(1), _builder_8.toString());
- final EClass enumLiteral = PostprocessingHelpers.getClass(roomPackage, "EnumLiteral");
- EClassifier _eClassifier_9 = EcorePackage.eINSTANCE.getEClassifier("ELong");
+ final EClass refSeg = PostprocessingHelpers.getClass(roomPackage, "RefSegment");
+ EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(refSeg, "idx");
+ _attribute_2.setDefaultValueLiteral("-1");
+ EClassifier _eClassifier_9 = EcorePackage.eINSTANCE.getEClassifier("EString");
StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("if (this.getLiteral() != null)");
- _builder_9.newLine();
- _builder_9.append("\t");
- _builder_9.append("return this.getLiteral().getValue();");
- _builder_9.newLine();
- _builder_9.newLine();
- _builder_9.append("// recursively from predecessor");
- _builder_9.newLine();
- _builder_9.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());");
- _builder_9.newLine();
- _builder_9.append("int idx = et.getLiterals().indexOf(this);");
+ _builder_9.append("return getRef() + ((getIdx()>=0)? \":\"+getIdx() : \"\");");
_builder_9.newLine();
- _builder_9.append("if (idx > 0)");
- _builder_9.newLine();
- _builder_9.append("\t");
- _builder_9.append("return et.getLiterals().get(idx - 1).getLiteralValue() + 1;");
- _builder_9.newLine();
- _builder_9.newLine();
- _builder_9.append("return 0;");
- _builder_9.newLine();
- PostprocessingHelpers.addOperation(enumLiteral,
- "getLiteralValue", _eClassifier_9,
+ PostprocessingHelpers.addOperation(refSeg,
+ "toString", _eClassifier_9,
Integer.valueOf(1), _builder_9.toString());
- EClassifier _eClassifier_10 = EcorePackage.eINSTANCE.getEClassifier("EString");
+ final EClass enumLiteral = PostprocessingHelpers.getClass(roomPackage, "EnumLiteral");
+ EClassifier _eClassifier_10 = EcorePackage.eINSTANCE.getEClassifier("ELong");
StringConcatenation _builder_10 = new StringConcatenation();
+ _builder_10.append("if (this.getLiteral() != null)");
+ _builder_10.newLine();
+ _builder_10.append("\t");
+ _builder_10.append("return this.getLiteral().getValue();");
+ _builder_10.newLine();
+ _builder_10.newLine();
+ _builder_10.append("// recursively from predecessor");
+ _builder_10.newLine();
_builder_10.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());");
_builder_10.newLine();
- _builder_10.append("return et.getName() + \".\" + this.getName();");
+ _builder_10.append("int idx = et.getLiterals().indexOf(this);");
_builder_10.newLine();
- _xblockexpression = PostprocessingHelpers.addOperation(enumLiteral,
- "getFullName", _eClassifier_10,
+ _builder_10.append("if (idx > 0)");
+ _builder_10.newLine();
+ _builder_10.append("\t");
+ _builder_10.append("return et.getLiterals().get(idx - 1).getLiteralValue() + 1;");
+ _builder_10.newLine();
+ _builder_10.newLine();
+ _builder_10.append("return 0;");
+ _builder_10.newLine();
+ PostprocessingHelpers.addOperation(enumLiteral,
+ "getLiteralValue", _eClassifier_10,
Integer.valueOf(1), _builder_10.toString());
+ EClassifier _eClassifier_11 = EcorePackage.eINSTANCE.getEClassifier("EString");
+ StringConcatenation _builder_11 = new StringConcatenation();
+ _builder_11.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());");
+ _builder_11.newLine();
+ _builder_11.append("return et.getName() + \".\" + this.getName();");
+ _builder_11.newLine();
+ _xblockexpression = PostprocessingHelpers.addOperation(enumLiteral,
+ "getFullName", _eClassifier_11,
+ Integer.valueOf(1), _builder_11.toString());
}
return _xblockexpression;
}
diff --git a/plugins/org.eclipse.etrice.ui.behavior/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.behavior/META-INF/MANIFEST.MF
index 2eadca9d1..b91a7141e 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.behavior/META-INF/MANIFEST.MF
@@ -6,6 +6,7 @@ Bundle-Version: 0.5.0.qualifier
Bundle-Activator: org.eclipse.etrice.ui.behavior.Activator
Require-Bundle: org.eclipse.etrice.core.room.ui;bundle-version="0.5.0",
org.eclipse.etrice.core.common.ui;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.0.5",
org.eclipse.etrice.ui.common;bundle-version="0.5.0",
org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.graphiti;bundle-version="0.8.0",
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/DiagramAccess.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/DiagramAccess.java
index e0103a14e..28bf94d3e 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/DiagramAccess.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/DiagramAccess.java
@@ -13,15 +13,15 @@
package org.eclipse.etrice.ui.behavior;
import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.StructureClass;
+import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.ui.behavior.commands.PopulateDiagramCommand;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.support.DiagramUpdateFeature;
-import org.eclipse.etrice.ui.common.DiagramAccessBase;
-import org.eclipse.etrice.ui.common.commands.UpdateCommand;
-import org.eclipse.etrice.ui.behavior.DiagramTypeProvider;
+import org.eclipse.etrice.ui.common.base.commands.UpdateCommand;
+import org.eclipse.etrice.ui.common.base.support.DiagramAccessBase;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.mm.pictograms.Diagram;
@@ -33,8 +33,12 @@ public class DiagramAccess extends DiagramAccessBase {
* @see org.eclipse.etrice.ui.common.DiagramAccessBase#getDiagramName(org.eclipse.etrice.core.room.StructureClass)
*/
@Override
- public String getDiagramName(StructureClass sc) {
- return "Behavior of "+sc.getName();
+ public String getDiagramName(EObject rootObject) {
+ if (rootObject instanceof ActorClass) {
+ ActorClass ac = (ActorClass) rootObject;
+ return "Behavior of "+ac.getName();
+ }
+ return "unknown";
}
/* (non-Javadoc)
@@ -57,17 +61,24 @@ public class DiagramAccess extends DiagramAccessBase {
* @see org.eclipse.etrice.ui.common.DiagramAccessBase#getFileExtension()
*/
@Override
- protected String getFileExtension() {
- return ".behavior";
+ protected String getDigramFileName(EObject rootObject) {
+ if (rootObject instanceof ActorClass) {
+ ActorClass ac = (ActorClass) rootObject;
+ String modelName = ((RoomModel) ac.eContainer()).getName();
+ return modelName+"."+ac.getName()+".behavior";
+ }
+ return "unknown";
}
/* (non-Javadoc)
* @see org.eclipse.etrice.ui.common.DiagramAccessBase#getInitialCommand(org.eclipse.etrice.core.room.StructureClass, org.eclipse.graphiti.mm.pictograms.Diagram, org.eclipse.emf.transaction.TransactionalEditingDomain)
*/
@Override
- protected Command getInitialCommand(StructureClass ac, Diagram diagram,
- TransactionalEditingDomain editingDomain) {
- return new PopulateDiagramCommand(diagram, (ActorClass) ac, editingDomain);
+ protected Command getInitialCommand(EObject rootObject, Diagram diagram, TransactionalEditingDomain editingDomain) {
+ if (rootObject instanceof ActorClass) {
+ return new PopulateDiagramCommand(diagram, (ActorClass) rootObject, editingDomain);
+ }
+ return null;
}
/* (non-Javadoc)
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/ProviderDispatcher.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/ProviderDispatcher.java
index 08f6f79b2..f3d405992 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/ProviderDispatcher.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/ProviderDispatcher.java
@@ -31,9 +31,9 @@ import org.eclipse.etrice.ui.behavior.support.StateGraphSupport;
import org.eclipse.etrice.ui.behavior.support.StateSupport;
import org.eclipse.etrice.ui.behavior.support.TrPointSupport;
import org.eclipse.etrice.ui.behavior.support.TransitionSupport;
-import org.eclipse.etrice.ui.common.support.CantDeleteFeature;
-import org.eclipse.etrice.ui.common.support.CantRemoveFeature;
-import org.eclipse.etrice.ui.common.support.RemoveBendpointsFeature;
+import org.eclipse.etrice.ui.common.base.support.CantDeleteFeature;
+import org.eclipse.etrice.ui.common.base.support.CantRemoveFeature;
+import org.eclipse.etrice.ui.common.base.support.RemoveBendpointsFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/AbstractMemberAwarePropertyDialog.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/AbstractMemberAwarePropertyDialog.java
index c537d3167..dde29018b 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/AbstractMemberAwarePropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/AbstractMemberAwarePropertyDialog.java
@@ -21,7 +21,7 @@ import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.ui.behavior.dialogs.PortMessageSelectionDialog.MsgItemPair;
import org.eclipse.etrice.ui.behavior.dialogs.PortMessageSelectionDialog.OperationItemPair;
import org.eclipse.etrice.ui.behavior.support.SupportUtil;
-import org.eclipse.etrice.ui.common.dialogs.AbstractPropertyDialog;
+import org.eclipse.etrice.ui.common.base.dialogs.AbstractPropertyDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/ChoicePointPropertyDialog.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/ChoicePointPropertyDialog.java
index 9fc7a0f00..7b833399a 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/ChoicePointPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/ChoicePointPropertyDialog.java
@@ -10,7 +10,7 @@ import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
import org.eclipse.etrice.core.fsm.validation.FSMValidationUtil.Result;
import org.eclipse.etrice.ui.behavior.Activator;
import org.eclipse.etrice.ui.behavior.support.SupportUtil;
-import org.eclipse.etrice.ui.common.dialogs.AbstractPropertyDialog;
+import org.eclipse.etrice.ui.common.base.dialogs.AbstractPropertyDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/QuickFixDialog.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/QuickFixDialog.java
index 9a6e2dda4..73222e371 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/QuickFixDialog.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/QuickFixDialog.java
@@ -18,7 +18,7 @@ import java.util.List;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.etrice.ui.behavior.Activator;
-import org.eclipse.etrice.ui.common.quickfix.IssueResolution;
+import org.eclipse.etrice.ui.common.base.quickfix.IssueResolution;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/TrPointPropertyDialog.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/TrPointPropertyDialog.java
index e0f44f423..ec3e2f706 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/TrPointPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/TrPointPropertyDialog.java
@@ -11,7 +11,7 @@ import org.eclipse.etrice.core.fsm.fSM.TransitionPoint;
import org.eclipse.etrice.core.fsm.validation.FSMValidationUtil.Result;
import org.eclipse.etrice.ui.behavior.Activator;
import org.eclipse.etrice.ui.behavior.support.SupportUtil;
-import org.eclipse.etrice.ui.common.dialogs.AbstractPropertyDialog;
+import org.eclipse.etrice.ui.common.base.dialogs.AbstractPropertyDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/editor/BehaviorExporter.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/editor/BehaviorExporter.java
index f8e7ac1b3..d78dcd056 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/editor/BehaviorExporter.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/editor/BehaviorExporter.java
@@ -19,7 +19,7 @@ import org.eclipse.etrice.core.fsm.fSM.State;
import org.eclipse.etrice.core.fsm.fSM.StateGraph;
import org.eclipse.etrice.ui.behavior.DiagramAccess;
import org.eclipse.etrice.ui.behavior.support.SupportUtil;
-import org.eclipse.etrice.ui.common.editor.DiagramExporter;
+import org.eclipse.etrice.ui.common.base.editor.DiagramExporter;
import org.eclipse.ui.PlatformUI;
public class BehaviorExporter {
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/quickfix/BehaviorQuickfixProvider.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/quickfix/BehaviorQuickfixProvider.java
index d364285c2..946741daf 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/quickfix/BehaviorQuickfixProvider.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/quickfix/BehaviorQuickfixProvider.java
@@ -34,9 +34,9 @@ import org.eclipse.etrice.ui.behavior.dialogs.StatePropertyDialog;
import org.eclipse.etrice.ui.behavior.dialogs.StatePropertyDialog.Where;
import org.eclipse.etrice.ui.behavior.dialogs.TransitionPropertyDialog;
import org.eclipse.etrice.ui.behavior.support.SupportUtil;
-import org.eclipse.etrice.ui.common.quickfix.AbstractQuickfixProvider;
-import org.eclipse.etrice.ui.common.quickfix.IDiagramModification;
-import org.eclipse.etrice.ui.common.quickfix.IssueResolutionAcceptor;
+import org.eclipse.etrice.ui.common.base.quickfix.AbstractQuickfixProvider;
+import org.eclipse.etrice.ui.common.base.quickfix.IDiagramModification;
+import org.eclipse.etrice.ui.common.base.quickfix.IssueResolutionAcceptor;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IRemoveFeature;
import org.eclipse.graphiti.features.context.IRemoveContext;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/ChoicePointSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/ChoicePointSupport.java
index cc716a4cd..daeefc45e 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/ChoicePointSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/ChoicePointSupport.java
@@ -25,11 +25,11 @@ import org.eclipse.etrice.ui.behavior.ImageProvider;
import org.eclipse.etrice.ui.behavior.dialogs.ChoicePointPropertyDialog;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.markers.DecoratorUtil;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.CommonSupportUtil;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
-import org.eclipse.etrice.ui.common.support.NoResizeFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.CommonSupportUtil;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.NoResizeFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/InitialPointSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/InitialPointSupport.java
index a0448dd24..0fc70dad4 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/InitialPointSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/InitialPointSupport.java
@@ -18,9 +18,9 @@ import org.eclipse.etrice.core.fsm.fSM.InitialTransition;
import org.eclipse.etrice.core.fsm.fSM.StateGraph;
import org.eclipse.etrice.core.fsm.fSM.Transition;
import org.eclipse.etrice.ui.behavior.ImageProvider;
-import org.eclipse.etrice.ui.common.support.CommonSupportUtil;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
-import org.eclipse.etrice.ui.common.support.NoResizeFeature;
+import org.eclipse.etrice.ui.common.base.support.CommonSupportUtil;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.NoResizeFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/QuickFixFeature.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/QuickFixFeature.java
index e395011ea..2bd97fd97 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/QuickFixFeature.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/QuickFixFeature.java
@@ -21,8 +21,8 @@ import org.eclipse.etrice.ui.behavior.ImageProvider;
import org.eclipse.etrice.ui.behavior.dialogs.QuickFixDialog;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.quickfix.BehaviorQuickfixProvider;
-import org.eclipse.etrice.ui.common.quickfix.IssueResolution;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.quickfix.IssueResolution;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.jface.window.Window;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateGraphSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateGraphSupport.java
index cf36333ca..10092511f 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateGraphSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateGraphSupport.java
@@ -26,7 +26,7 @@ import org.eclipse.etrice.core.fsm.fSM.Transition;
import org.eclipse.etrice.ui.behavior.commands.StateGraphContext;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.markers.DecoratorUtil;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java
index 97dc0780e..4d6131e74 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java
@@ -28,10 +28,10 @@ import org.eclipse.etrice.ui.behavior.ImageProvider;
import org.eclipse.etrice.ui.behavior.dialogs.StatePropertyDialog;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.markers.DecoratorUtil;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.CommonSupportUtil;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.CommonSupportUtil;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/SupportUtil.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/SupportUtil.java
index 1f783d3b0..e7a30caaa 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/SupportUtil.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/SupportUtil.java
@@ -47,7 +47,7 @@ import org.eclipse.etrice.core.validation.ValidationUtil;
import org.eclipse.etrice.ui.behavior.commands.StateGraphContext;
import org.eclipse.etrice.ui.behavior.support.IPositionProvider.Pos;
import org.eclipse.etrice.ui.behavior.support.IPositionProvider.PosAndSize;
-import org.eclipse.etrice.ui.common.support.CommonSupportUtil;
+import org.eclipse.etrice.ui.common.base.support.CommonSupportUtil;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TrPointSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TrPointSupport.java
index 75d544257..720634275 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TrPointSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TrPointSupport.java
@@ -30,11 +30,11 @@ import org.eclipse.etrice.ui.behavior.ImageProvider;
import org.eclipse.etrice.ui.behavior.dialogs.TrPointPropertyDialog;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.markers.DecoratorUtil;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.CommonSupportUtil;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
-import org.eclipse.etrice.ui.common.support.NoResizeFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.CommonSupportUtil;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.NoResizeFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TransitionSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TransitionSupport.java
index 018bf3a14..2b81e521c 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TransitionSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TransitionSupport.java
@@ -38,12 +38,12 @@ import org.eclipse.etrice.ui.behavior.ImageProvider;
import org.eclipse.etrice.ui.behavior.dialogs.TransitionPropertyDialog;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
import org.eclipse.etrice.ui.behavior.markers.DecoratorUtil;
-import org.eclipse.etrice.ui.common.Activator;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
-import org.eclipse.etrice.ui.common.support.CantRemoveFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateConnectionFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
+import org.eclipse.etrice.ui.common.base.support.CantRemoveFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateConnectionFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
@@ -832,9 +832,9 @@ public class TransitionSupport {
}
protected static String getLabel(Transition trans) {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- int MAX_LINE_LENGTH = store.getInt(PreferenceConstants.MAX_LABEL_LINE_LENGTH);
- int MAX_LINES = store.getInt(PreferenceConstants.MAX_LABEL_LINES);
+ IPreferenceStore store = UIBaseActivator.getDefault().getPreferenceStore();
+ int MAX_LINE_LENGTH = store.getInt(UIBasePreferenceConstants.MAX_LABEL_LINE_LENGTH);
+ int MAX_LINES = store.getInt(UIBasePreferenceConstants.MAX_LABEL_LINES);
String label = SupportUtil.getInstance().getRoomNameProvider().getTransitionLabelName(trans);
StringBuilder result = new StringBuilder();
int i = 0;
diff --git a/plugins/org.eclipse.etrice.ui.commands/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.commands/META-INF/MANIFEST.MF
index fa1992b5e..8b74f1fed 100644
--- a/plugins/org.eclipse.etrice.ui.commands/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.commands/META-INF/MANIFEST.MF
@@ -8,6 +8,7 @@ Bundle-Vendor: Eclipse eTrice (Incubation)
Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.etrice.core.room.ui;bundle-version="0.5.0",
org.eclipse.etrice.ui.common;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.5.0",
org.eclipse.etrice.ui.structure;bundle-version="0.5.0",
org.eclipse.etrice.ui.behavior;bundle-version="0.5.0",
org.eclipse.graphiti;bundle-version="0.8.0",
diff --git a/plugins/org.eclipse.etrice.ui.commands/src/org/eclipse/etrice/ui/commands/handlers/ExportDiagramsHandler.java b/plugins/org.eclipse.etrice.ui.commands/src/org/eclipse/etrice/ui/commands/handlers/ExportDiagramsHandler.java
index bce9478dc..8ca831837 100644
--- a/plugins/org.eclipse.etrice.ui.commands/src/org/eclipse/etrice/ui/commands/handlers/ExportDiagramsHandler.java
+++ b/plugins/org.eclipse.etrice.ui.commands/src/org/eclipse/etrice/ui/commands/handlers/ExportDiagramsHandler.java
@@ -35,8 +35,8 @@ import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.core.room.SubSystemClass;
import org.eclipse.etrice.core.ui.RoomUiModule;
import org.eclipse.etrice.ui.behavior.editor.BehaviorExporter;
-import org.eclipse.etrice.ui.common.Activator;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
import org.eclipse.etrice.ui.structure.editor.StructureExporter;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -79,7 +79,7 @@ public class ExportDiagramsHandler extends AbstractHandler {
Injector injector = RoomUiModule.getInjector();
injector.injectMembers(this);
- this.store = Activator.getDefault().getPreferenceStore();
+ this.store = UIBaseActivator.getDefault().getPreferenceStore();
}
// TODO: code copied from org.eclipse.etrice.ui.commands.handlers.AbstractEditHandler - refactor
@@ -120,9 +120,9 @@ public class ExportDiagramsHandler extends AbstractHandler {
protected void exportDiagrams(RoomModel model, IPath modelPath, Shell shell) {
IContainer container = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(modelPath.removeLastSegments(1));
- String relPath = store.getString(PreferenceConstants.EXPORT_DIAGRAM_PATH);
- boolean projectRelative = PreferenceConstants.PATH_REL_TO_PROJECT.equals(
- store.getString(PreferenceConstants.EXPORT_DIAGRAM_PATH_RELATIVE_TO));
+ String relPath = store.getString(UIBasePreferenceConstants.EXPORT_DIAGRAM_PATH);
+ boolean projectRelative = UIBasePreferenceConstants.PATH_REL_TO_PROJECT.equals(
+ store.getString(UIBasePreferenceConstants.EXPORT_DIAGRAM_PATH_RELATIVE_TO));
IFolder folder;
if (projectRelative) {
diff --git a/plugins/org.eclipse.etrice.ui.common.base/.classpath b/plugins/org.eclipse.etrice.ui.common.base/.classpath
new file mode 100644
index 000000000..ad32c83a7
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.etrice.ui.common.base/.gitignore b/plugins/org.eclipse.etrice.ui.common.base/.gitignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/plugins/org.eclipse.etrice.ui.common.base/.project b/plugins/org.eclipse.etrice.ui.common.base/.project
new file mode 100644
index 000000000..5fc4c5fa1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.ui.common.base</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.etrice.ui.common.base/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.ui.common.base/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..c537b6306
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..43e5f6938
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Common Base for UI
+Bundle-SymbolicName: org.eclipse.etrice.ui.common.base;singleton:=true
+Bundle-Version: 0.5.0.qualifier
+Bundle-Activator: org.eclipse.etrice.ui.common.base.UIBaseActivator
+Bundle-Vendor: eTrice (Incubation)
+Require-Bundle: org.eclipse.etrice.core.common.ui;bundle-version="0.5.0",
+ org.eclipse.etrice.core.fsm.ui;bundle-version="0.5.0",
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ org.eclipse.graphiti;bundle-version="0.8.0",
+ org.eclipse.xtext.ui;bundle-version="2.1.1",
+ org.eclipse.xtext.ui.shared;bundle-version="2.1.1",
+ org.eclipse.emf.databinding,
+ org.eclipse.jface.databinding,
+ org.eclipse.core.databinding.property;bundle-version="1.4.200",
+ org.eclipse.jdt.core;bundle-version="3.9.0",
+ org.eclipse.graphiti.ui;bundle-version="0.7.0",
+ org.eclipse.gef;bundle-version="3.6.1",
+ org.eclipse.ui.forms;bundle-version="3.6.1",
+ org.eclipse.emf.workspace;bundle-version="1.5.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.100",
+ org.eclipse.ui.ide;bundle-version="3.9.2"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Import-Package: org.apache.log4j
+Export-Package: org.eclipse.etrice.ui.common.base,
+ org.eclipse.etrice.ui.common.base.commands,
+ org.eclipse.etrice.ui.common.base.concurrency,
+ org.eclipse.etrice.ui.common.base.dialogs,
+ org.eclipse.etrice.ui.common.base.editor,
+ org.eclipse.etrice.ui.common.base.preferences,
+ org.eclipse.etrice.ui.common.base.quickfix,
+ org.eclipse.etrice.ui.common.base.support
diff --git a/plugins/org.eclipse.etrice.ui.common.base/about.html b/plugins/org.eclipse.etrice.ui.common.base/about.html
new file mode 100644
index 000000000..c258ef55d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.ui.common.base/build.properties b/plugins/org.eclipse.etrice.ui.common.base/build.properties
new file mode 100644
index 000000000..e9863e281
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/plugins/org.eclipse.etrice.ui.common.base/plugin.xml b/plugins/org.eclipse.etrice.ui.common.base/plugin.xml
new file mode 100644
index 000000000..25530acce
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/plugin.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.etrice.ui.common.base.concurrency.ConcurrentModificationObserver$Initializer">
+ </startup>
+ </extension>
+ <extension
+ point="org.eclipse.ltk.core.refactoring.renameParticipants">
+ <renameParticipant
+ class="org.eclipse.etrice.ui.common.base.refactoring.DiagramRenameParticipant"
+ id="org.eclipse.etrice.ui.common.renameParticipant"
+ name="eTrice Diagram Rename Participant">
+ <enablement>
+ <with
+ variable="element">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="room">
+ </test>
+ </adapt>
+ </with>
+ </enablement>
+ </renameParticipant>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceInitializer">
+ </initializer>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/UIBaseActivator.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/UIBaseActivator.java
new file mode 100644
index 000000000..d70db621c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/UIBaseActivator.java
@@ -0,0 +1,50 @@
+package org.eclipse.etrice.ui.common.base;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIBaseActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.etrice.ui.common.base"; //$NON-NLS-1$
+
+ // The shared instance
+ private static UIBaseActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public UIBaseActivator() {
+ }
+
+ /*
+ * (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;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIBaseActivator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/UpdateCommand.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/commands/UpdateCommand.java
index 45655e231..c96378159 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/UpdateCommand.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/commands/UpdateCommand.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.etrice.ui.common.commands;
+package org.eclipse.etrice.ui.common.base.commands;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/ConcurrentModificationObserver.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/ConcurrentModificationObserver.java
index 09afe38d7..bd4f0ad1c 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/ConcurrentModificationObserver.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/ConcurrentModificationObserver.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.concurrency;
+package org.eclipse.etrice.ui.common.base.concurrency;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/EditingDomainAdapter.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/EditingDomainAdapter.java
index 5c284aa05..f27099d0b 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/EditingDomainAdapter.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/EditingDomainAdapter.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.concurrency;
+package org.eclipse.etrice.ui.common.base.concurrency;
import java.util.HashMap;
import java.util.List;
@@ -35,7 +35,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle;
import org.eclipse.emf.transaction.TransactionalEditingDomainEvent;
import org.eclipse.emf.transaction.TransactionalEditingDomainListener;
import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.etrice.ui.common.Activator;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
@@ -162,7 +162,7 @@ public class EditingDomainAdapter extends AdapterImpl implements ResourceSetList
}
}
} else {
- throw new RollbackException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ throw new RollbackException(new Status(IStatus.ERROR, UIBaseActivator.PLUGIN_ID,
"Transaction aborted by user"));
}
}
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/SimpleDirtyResource.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/SimpleDirtyResource.java
index 6adb99f81..e6bc752a6 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/concurrency/SimpleDirtyResource.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/concurrency/SimpleDirtyResource.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.concurrency;
+package org.eclipse.etrice.ui.common.base.concurrency;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/dialogs/AbstractPropertyDialog.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java
index abed5d04e..86ac642a5 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/dialogs/AbstractPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.dialogs;
+package org.eclipse.etrice.ui.common.base.dialogs;
import java.util.ArrayList;
import java.util.Collection;
@@ -40,7 +40,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.etrice.ui.common.Activator;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.fieldassist.ControlDecoration;
@@ -205,7 +205,7 @@ public abstract class AbstractPropertyDialog extends FormDialog {
public AbstractPropertyDialog(Shell shell, String title) {
super(shell);
this.title = title;
- this.preferenceStore = Activator.getDefault().getPreferenceStore();
+ this.preferenceStore = UIBaseActivator.getDefault().getPreferenceStore();
}
abstract protected Image getImage();
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/dialogs/MultiValidator2.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java
index 1d6e06407..3c66bf4d5 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/dialogs/MultiValidator2.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java
@@ -1,4 +1,4 @@
-package org.eclipse.etrice.ui.common.dialogs;
+package org.eclipse.etrice.ui.common.base.dialogs;
/*******************************************************************************
* Copyright (c) 2011 protos software gmbh (http://www.protos.de).
* All rights reserved. This program and the accompanying materials
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomDiagramBehavior.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java
index f73c35f18..af2c7f3e2 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomDiagramBehavior.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java
@@ -10,8 +10,9 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
+import org.eclipse.etrice.ui.common.base.editor.CustomUpdateBehavior;
import org.eclipse.graphiti.ui.editor.DefaultUpdateBehavior;
import org.eclipse.graphiti.ui.editor.DiagramBehavior;
import org.eclipse.graphiti.ui.editor.IDiagramContainerUI;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomResourceSetProvider.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomResourceSetProvider.java
index 6c4f954a3..a42d07c35 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomResourceSetProvider.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomResourceSetProvider.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import static com.google.common.collect.Maps.newHashMap;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomUpdateBehavior.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomUpdateBehavior.java
index 1eee43d11..3916cac29 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/CustomUpdateBehavior.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomUpdateBehavior.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import org.eclipse.core.commands.operations.DefaultOperationHistory;
import org.eclipse.core.resources.IFile;
@@ -23,7 +23,9 @@ import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
import org.eclipse.emf.workspace.IWorkspaceCommandStack;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
-import org.eclipse.etrice.core.ui.RoomUiModule;
+import org.eclipse.etrice.core.fsm.ui.FSMUiModule;
+import org.eclipse.etrice.ui.common.base.editor.CustomResourceSetProvider;
+import org.eclipse.etrice.ui.common.base.editor.IInputUriHolder;
import org.eclipse.graphiti.ui.editor.DefaultUpdateBehavior;
import org.eclipse.graphiti.ui.editor.DiagramBehavior;
import org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl;
@@ -47,7 +49,7 @@ public class CustomUpdateBehavior extends DefaultUpdateBehavior {
public CustomUpdateBehavior(DiagramBehavior diagramBehavior) {
super(diagramBehavior);
- Injector injector = RoomUiModule.getInjector();
+ Injector injector = FSMUiModule.getInjector();
injector.injectMembers(resourceSetProvider);
}
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java
new file mode 100644
index 000000000..5465a5dba
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.ui.common.base.editor;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
+import org.eclipse.etrice.core.fsm.ui.FSMUiModule;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.ui.editor.DiagramBehavior;
+import org.eclipse.graphiti.ui.editor.DiagramEditor;
+import org.eclipse.graphiti.ui.editor.EditorInputAdapter;
+import org.eclipse.graphiti.ui.editor.IDiagramEditorInput;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.xtext.diagnostics.Severity;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.serializer.ISerializer;
+import org.eclipse.xtext.ui.editor.XtextEditor;
+import org.eclipse.xtext.util.CancelIndicator;
+import org.eclipse.xtext.util.concurrent.IUnitOfWork;
+import org.eclipse.xtext.validation.CheckMode;
+import org.eclipse.xtext.validation.IResourceValidator;
+import org.eclipse.xtext.validation.Issue;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+
+/**
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public abstract class DiagramEditorBase extends DiagramEditor implements IInputUriHolder {
+
+ @Inject
+ protected IResourceValidator resourceValidator;
+
+ protected ModificationTrackingEnabler mte = new ModificationTrackingEnabler();
+ protected URI inputUri;
+ protected Object textEditorClass;
+
+ private SaveOnFocusLostListener saveOnFocusListener;
+
+ private SuperClassListener superClassListener;
+
+ public DiagramEditorBase() {
+ Injector injector = FSMUiModule.getInjector();
+ injector.injectMembers(this);
+
+ TrayDialog.setDialogHelpAvailable(false);
+ }
+
+ @Override
+ protected DiagramBehavior createDiagramBehavior() {
+ return new CustomDiagramBehavior(this);
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ IEditorInput newInput = EditorInputAdapter.adaptToDiagramEditorInput(input);
+ if (newInput instanceof IDiagramEditorInput)
+ this.inputUri = ((IDiagramEditorInput) newInput).getUri();
+
+ super.init(site, input);
+ }
+
+ @Override
+ public void initializeGraphicalViewer() {
+ super.initializeGraphicalViewer();
+
+ ResourceSet resourceSet = getEditingDomain().getResourceSet();
+ Map<EObject, Collection<Setting>> result = EcoreUtil.UnresolvedProxyCrossReferencer.find(resourceSet);
+ if (!result.isEmpty())
+ System.err.println("ERROR in diagram viewer: could not resolve all proxies!");
+
+ mte.setTarget(getEditingDomain());
+ }
+
+ @Override
+ public void doSave(final IProgressMonitor monitor) {
+ ResourceSet rs = getEditingDomain().getResourceSet();
+ for (Resource res : rs.getResources()) {
+ if (res instanceof XtextResource) {
+ if (!res.isLoaded()) {
+ try {
+ res.load(Collections.EMPTY_MAP);
+ } catch (IOException e) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: couldn't load referenced resource "+res.getURI());
+ return;
+ }
+ }
+ if (res.isModified()) {
+
+ XtextResource xres = (XtextResource) res;
+ ISerializer serializer = xres.getSerializer();
+
+ if (xres.getContents().isEmpty()) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: part of textual model is empty, can't save");
+ return;
+ }
+
+ // HOWTO: call serializer to validate the concrete syntax
+ // this throws an exception which is caught further up the stack
+ // and a dialog will be displayed
+ serializer.serialize(xres.getContents().get(0));
+
+ List<Issue> result = resourceValidator.validate(res, CheckMode.NORMAL_AND_FAST, new CancelIndicator() {
+ public boolean isCanceled() {
+ return monitor.isCanceled();
+ }
+ });
+ if (!result.isEmpty()) {
+ boolean error = false;
+ MultiStatus ms = new MultiStatus(UIBaseActivator.PLUGIN_ID, Status.ERROR, "validation errors during diagram save", null);
+ for (Issue issue : result) {
+ if (issue.isSyntaxError() || issue.getSeverity()==Severity.ERROR) {
+ ms.add(new Status(Status.ERROR, UIBaseActivator.PLUGIN_ID, issue.getMessage()));
+ error = true;
+ }
+ }
+ if (error) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: model is invalid, can't save");
+ UIBaseActivator.getDefault().getLog().log(ms);
+ return;
+ }
+ }
+ }
+ }
+ }
+ super.doSave(monitor);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.editor.DiagramEditor#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ super.setFocus();
+
+ boolean dirtyAlready = isDirty();
+
+ // inside this call auto refresh will happen if (and turn the editor dirty)
+ super.setFocus();
+
+ if(superClassListener.isChangeInSuperClass())
+ superClassChanged();
+
+ if (!dirtyAlready && isDirty())
+ doSave(null);
+ }
+
+ public ModelComponent getModelComponent() {
+ Diagram diagram = getDiagramTypeProvider().getDiagram();
+ EObject bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(diagram);
+ if (bo instanceof ModelComponent)
+ return (ModelComponent) bo;
+
+ return null;
+ }
+
+ @Override
+ public void dispose() {
+ mte.unsetTarget(getEditingDomain());
+
+ getSite().getPage().removePartListener(saveOnFocusListener);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().removePartListener(superClassListener);
+ superClassListener.dispose();
+
+ super.dispose();
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+
+ saveOnFocusListener = new SaveOnFocusLostListener(this);
+ getSite().getPage().addPartListener(saveOnFocusListener);
+
+ superClassListener = new SuperClassListener(this, textEditorClass);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(superClassListener);
+
+ /* we have to save here whether changes have been done or not to get rid of the dirty state
+ * CAUTION: save in
+ * init(IEditorSite site, IEditorInput input)
+ * or
+ * setInput(IEditorInput input)
+ * did not work correctly
+ */
+ // if (AutoUpdateFeature.isLastDoneChanges())
+ doSave(new NullProgressMonitor());
+ }
+
+ /**
+ * Check whether the given diagram editor manages a super class
+ * @param editor
+ * @return
+ */
+ protected boolean registerSuperClassListener(DiagramEditorBase editor) {
+ if (!(this.getClass().equals(editor.getClass()) && this.getModelComponent()!=null))
+ return false;
+
+ ModelComponent editorSc = editor.getModelComponent();
+ if (editorSc!=null) {
+ URI editorResURI = toCurrentPlatformURI(editorSc.eResource().getURI());
+
+ ModelComponent base = getModelComponent();
+ while((base = base.getBase()) != null){
+ URI baseResURI = toCurrentPlatformURI(base.eResource().getURI());
+ if(editorResURI.equals(baseResURI))
+ if(editorSc.getComponentName().equals(base.getComponentName()))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check whether the given room editor has a super class
+ * @param editor
+ * @return
+ */
+ protected boolean registerSuperClassListener(XtextEditor editor) {
+ if (!((Class<?>)textEditorClass).isInstance(editor))
+ return false;
+ if (this.getModelComponent()==null)
+ return false;
+
+ return editor.getDocument().readOnly(new IUnitOfWork<Boolean, XtextResource>(){
+
+ @Override
+ public Boolean exec(XtextResource resource) throws Exception {
+
+ URI editorResURI = toCurrentPlatformURI(resource.getURI());
+ URI thisScResURI = toCurrentPlatformURI(getModelComponent().eResource().getURI());
+
+ // ignore if in same file (handled by graphiti)
+ if(thisScResURI.equals(editorResURI))
+ return false;
+
+ ModelComponent base = getModelComponent();
+ while((base = base.getBase()) != null){
+ URI baseResURI = toCurrentPlatformURI(base.eResource().getURI());
+ if(editorResURI.equals(baseResURI))
+ return true;
+ }
+
+ return false;
+ }
+ });
+ }
+
+ private URI toCurrentPlatformURI(URI uri) {
+ if(uri.isPlatform())
+ return uri;
+ else if(uri.isFile()){
+ final IPath rootPath = ResourcesPlugin.getWorkspace().getRoot().getLocation();
+ String rootString = rootPath.toFile().toString();
+ String fileString = uri.toFileString();
+ if(fileString.startsWith(rootString))
+ return URI.createPlatformResourceURI(fileString.replace(rootString, ""), false);
+ }
+ return null;
+ }
+
+ protected abstract void superClassChanged();
+
+ public URI getInputUri() {
+ return inputUri;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/DiagramExporter.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramExporter.java
index 36fd09de7..42a9b7942 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/DiagramExporter.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramExporter.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
@@ -21,10 +21,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.SWTGraphics;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.ui.common.Activator;
-import org.eclipse.etrice.ui.common.DiagramAccessBase;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
+import org.eclipse.etrice.ui.common.base.support.DiagramAccessBase;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.GraphicalViewer;
@@ -48,9 +48,9 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
@SuppressWarnings("restriction")
public class DiagramExporter {
- public static void export(StructureClass sc, DiagramAccessBase da, final String filename) {
+ public static void export(EObject sc, DiagramAccessBase da, final String filename) {
boolean wasOpen = false;
- RoomDiagramEditor editor = da.findDiagramEditor(sc);
+ DiagramEditorBase editor = da.findDiagramEditor(sc);
if (editor!=null)
wasOpen = true;
else
@@ -66,15 +66,15 @@ public class DiagramExporter {
// code copied from org.eclipse.graphiti.ui.internal.action.SaveImageAction
// and org.eclipse.graphiti.ui.internal.util.ui.print.ExportDiagramDialog
- public static void export(RoomDiagramEditor editor, final String filename) {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- String format = store.getString(PreferenceConstants.EXPORT_DIAGRAM_FORMAT);
+ public static void export(DiagramEditorBase editor, final String filename) {
+ IPreferenceStore store = UIBaseActivator.getDefault().getPreferenceStore();
+ String format = store.getString(UIBasePreferenceConstants.EXPORT_DIAGRAM_FORMAT);
int fmt = SWT.IMAGE_JPEG;
- if (format.equals(PreferenceConstants.FORMAT_BMP))
+ if (format.equals(UIBasePreferenceConstants.FORMAT_BMP))
fmt = SWT.IMAGE_BMP;
- else if (format.equals(PreferenceConstants.FORMAT_PNG))
+ else if (format.equals(UIBasePreferenceConstants.FORMAT_PNG))
fmt = SWT.IMAGE_PNG;
- else if (format.equals(PreferenceConstants.FORMAT_GIF))
+ else if (format.equals(UIBasePreferenceConstants.FORMAT_GIF))
fmt = SWT.IMAGE_GIF;
final String fname = filename+"."+format;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/IInputUriHolder.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/IInputUriHolder.java
index d7320b84d..a44278f0d 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/IInputUriHolder.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/IInputUriHolder.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import org.eclipse.emf.common.util.URI;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/ModificationTrackingEnabler.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/ModificationTrackingEnabler.java
index dcc950035..5564356ba 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/ModificationTrackingEnabler.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/ModificationTrackingEnabler.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/SaveOnFocusLostListener.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/SaveOnFocusLostListener.java
index 7c49d4900..e9da548ea 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/SaveOnFocusLostListener.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/SaveOnFocusLostListener.java
@@ -10,15 +10,15 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import java.util.EventObject;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.command.CommandStackListener;
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
-import org.eclipse.etrice.ui.common.Activator;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IPartListener;
@@ -36,7 +36,7 @@ public class SaveOnFocusLostListener implements IPartListener, CommandStackListe
public SaveOnFocusLostListener(DiagramEditor editor) {
this.editor = editor;
- this.store = Activator.getDefault().getPreferenceStore();
+ this.store = UIBaseActivator.getDefault().getPreferenceStore();
editor.getEditingDomain().getCommandStack().addCommandStackListener(this);
}
@@ -66,7 +66,7 @@ public class SaveOnFocusLostListener implements IPartListener, CommandStackListe
*/
@Override
public void partDeactivated(IWorkbenchPart part) {
- boolean save = store.getBoolean(PreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST);
+ boolean save = store.getBoolean(UIBasePreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST);
if (save && editor.isDirty()) {
if (editor.getEditingDomain() instanceof TransactionalEditingDomainImpl) {
TransactionalEditingDomainImpl ted = (TransactionalEditingDomainImpl) editor.getEditingDomain();
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/SuperClassListener.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/SuperClassListener.java
index de991fbfa..61cac5f7d 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/SuperClassListener.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/SuperClassListener.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.editor;
+package org.eclipse.etrice.ui.common.base.editor;
import java.util.ArrayList;
import java.util.List;
@@ -21,7 +21,6 @@ import org.eclipse.emf.transaction.ResourceSetChangeEvent;
import org.eclipse.emf.transaction.ResourceSetListener;
import org.eclipse.emf.transaction.RollbackException;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.etrice.core.ui.editor.RoomEditor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IPartListener;
@@ -29,21 +28,26 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.model.IXtextDocument;
import org.eclipse.xtext.ui.editor.model.IXtextModelListener;
public class SuperClassListener implements IPartListener, ResourceSetListener, IXtextModelListener {
- private RoomDiagramEditor diagramEditor;
+ private DiagramEditorBase diagramEditor;
+ private Object editorClass;
private List<TransactionalEditingDomain> domains;
private List<IXtextDocument> xtextDocuments;
private boolean changeInSuperClass;
- public SuperClassListener(RoomDiagramEditor diagramEditor) {
+ public SuperClassListener(DiagramEditorBase diagramEditor, Object editorClass) {
this.diagramEditor = diagramEditor;
+ this.editorClass = editorClass;
domains = new ArrayList<TransactionalEditingDomain>();
xtextDocuments = new ArrayList<IXtextDocument>();
changeInSuperClass = false;
+
+ assert(editorClass instanceof Class) : "Class expected";
}
public boolean isChangeInSuperClass() {
@@ -77,8 +81,8 @@ public class SuperClassListener implements IPartListener, ResourceSetListener, I
@Override
public void partClosed(IWorkbenchPart part) {
- if(part instanceof RoomDiagramEditor){
- RoomDiagramEditor editor = (RoomDiagramEditor)part;
+ if(part instanceof DiagramEditorBase){
+ DiagramEditorBase editor = (DiagramEditorBase)part;
TransactionalEditingDomain toRemove = editor.getEditingDomain();
if(toRemove != null){
toRemove.removeResourceSetListener(this);
@@ -86,8 +90,8 @@ public class SuperClassListener implements IPartListener, ResourceSetListener, I
}
}
- if(part instanceof RoomEditor){
- IXtextDocument toRemove = ((RoomEditor) part).getDocument();
+ if (((Class<?>)editorClass).isInstance(part)) {
+ IXtextDocument toRemove = ((XtextEditor) part).getDocument();
if(toRemove != null){
toRemove.removeModelListener(this);
xtextDocuments.remove(toRemove);
@@ -114,8 +118,8 @@ public class SuperClassListener implements IPartListener, ResourceSetListener, I
return;
}
- if(part instanceof RoomDiagramEditor){
- RoomDiagramEditor editor = (RoomDiagramEditor)part;
+ if(part instanceof DiagramEditorBase){
+ DiagramEditorBase editor = (DiagramEditorBase)part;
TransactionalEditingDomain domain = editor.getEditingDomain();
if(!domains.contains(domain) && diagramEditor.registerSuperClassListener(editor)){
domain.addResourceSetListener(this);
@@ -123,8 +127,8 @@ public class SuperClassListener implements IPartListener, ResourceSetListener, I
}
}
- if(part instanceof RoomEditor){
- RoomEditor editor = (RoomEditor) part;
+ if (((Class<?>)editorClass).isInstance(part)) {
+ XtextEditor editor = (XtextEditor) part;
IXtextDocument document = editor.getDocument();
if(!xtextDocuments.contains(document) && diagramEditor.registerSuperClassListener(editor)){
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceConstants.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceConstants.java
index b2dcf0bdb..545f69b28 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceConstants.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceConstants.java
@@ -10,12 +10,12 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.preferences;
+package org.eclipse.etrice.ui.common.base.preferences;
/**
* Constant definitions for plug-in preferences
*/
-public class PreferenceConstants extends org.eclipse.etrice.core.ui.editor.PreferenceConstants {
+public interface UIBasePreferenceConstants {
public static final String USE_GRID = "UseGrid";
public static final String SNAP_TO_GRID = "SnapToGrid";
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceInitializer.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceInitializer.java
new file mode 100644
index 000000000..264a9d5d6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/preferences/UIBasePreferenceInitializer.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.ui.common.base.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * Class used to initialize default preference values.
+ */
+public class UIBasePreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = UIBaseActivator.getDefault().getPreferenceStore();
+ store.setDefault(UIBasePreferenceConstants.USE_GRID, true);
+ store.setDefault(UIBasePreferenceConstants.SNAP_TO_GRID, false);
+ store.setDefault(UIBasePreferenceConstants.HOR_GRID_UNIT, 10);
+ store.setDefault(UIBasePreferenceConstants.VER_GRID_UNIT, 10);
+ store.setDefault(UIBasePreferenceConstants.CONFIRM_DELETE, true);
+ store.setDefault(UIBasePreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST, false);
+ store.setDefault(UIBasePreferenceConstants.EXPORT_DIAGRAM_PATH, "doc-gen/images");
+ store.setDefault(UIBasePreferenceConstants.EXPORT_DIAGRAM_PATH_RELATIVE_TO, UIBasePreferenceConstants.PATH_REL_TO_PROJECT);
+ store.setDefault(UIBasePreferenceConstants.EXPORT_DIAGRAM_FORMAT, UIBasePreferenceConstants.FORMAT_JPG);
+ store.setDefault(UIBasePreferenceConstants.MAX_LABEL_LINE_LENGTH, UIBasePreferenceConstants.MAX_LINE_LENGTH_DEFAULT);
+ store.setDefault(UIBasePreferenceConstants.MAX_LABEL_LINES, UIBasePreferenceConstants.MAX_LINES_DEFAULT);
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/AbstractQuickfixProvider.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/AbstractQuickfixProvider.java
index d8232d64c..3e50637a2 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/AbstractQuickfixProvider.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/AbstractQuickfixProvider.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.quickfix;
+package org.eclipse.etrice.ui.common.base.quickfix;
import java.lang.reflect.Method;
import java.util.List;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IDiagramModification.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IDiagramModification.java
index bbec57197..f43264e39 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IDiagramModification.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IDiagramModification.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.quickfix;
+package org.eclipse.etrice.ui.common.base.quickfix;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.mm.pictograms.Diagram;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IssueResolution.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IssueResolution.java
index 7b78428d6..43ceefa57 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IssueResolution.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IssueResolution.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.quickfix;
+package org.eclipse.etrice.ui.common.base.quickfix;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.graphiti.features.IFeatureProvider;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IssueResolutionAcceptor.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IssueResolutionAcceptor.java
index 1255f7c3a..ff0efd69d 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/quickfix/IssueResolutionAcceptor.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/quickfix/IssueResolutionAcceptor.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.quickfix;
+package org.eclipse.etrice.ui.common.base.quickfix;
import java.util.List;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/refactoring/DiagramRenameParticipant.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramRenameParticipant.java
index feb6322cd..3c03dee42 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/refactoring/DiagramRenameParticipant.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramRenameParticipant.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.refactoring;
+package org.eclipse.etrice.ui.common.base.refactoring;
import java.io.IOException;
import java.util.ArrayList;
@@ -36,7 +36,7 @@ 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.emf.ecore.util.EcoreUtil;
-import org.eclipse.etrice.ui.common.DiagramAccessBase;
+import org.eclipse.etrice.ui.common.base.support.DiagramAccessBase;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/AutoUpdateFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/AutoUpdateFeature.java
index 883fd4c86..fec679838 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/AutoUpdateFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/AutoUpdateFeature.java
@@ -1,4 +1,4 @@
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CantDeleteFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CantDeleteFeature.java
index c38fc8432..0f12e0c3d 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CantDeleteFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CantDeleteFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDeleteContext;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CantRemoveFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CantRemoveFeature.java
index 256f5ee65..b04e01334 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CantRemoveFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CantRemoveFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IRemoveContext;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCreateConnectionFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCreateConnectionFeature.java
index 72c25a8ef..1434692a9 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCreateConnectionFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCreateConnectionFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.change.ChangeDescription;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCreateFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCreateFeature.java
index d0ee10b77..ded7e2f07 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCreateFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCreateFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.change.ChangeDescription;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCustomFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCustomFeature.java
index 7f8682cff..93ea40741 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/ChangeAwareCustomFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/ChangeAwareCustomFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.change.ChangeDescription;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CommonSupportUtil.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CommonSupportUtil.java
index 4ca2a9136..1f46443cd 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/CommonSupportUtil.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/CommonSupportUtil.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import java.util.Iterator;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/DeleteWithoutConfirmFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/DeleteWithoutConfirmFeature.java
index 6795fb03f..d1679a128 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/DeleteWithoutConfirmFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/DeleteWithoutConfirmFeature.java
@@ -10,10 +10,10 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
-import org.eclipse.etrice.ui.common.Activator;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.ui.features.DefaultDeleteFeature;
@@ -34,8 +34,8 @@ public class DeleteWithoutConfirmFeature extends DefaultDeleteFeature {
*/
@Override
protected boolean getUserDecision(IDeleteContext context) {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- boolean confirm = store.getBoolean(PreferenceConstants.CONFIRM_DELETE);
+ IPreferenceStore store = UIBaseActivator.getDefault().getPreferenceStore();
+ boolean confirm = store.getBoolean(UIBasePreferenceConstants.CONFIRM_DELETE);
return confirm? super.getUserDecision(context) : true;
}
}
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/DiagramAccessBase.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/DiagramAccessBase.java
index 1b25c785a..c04b94b84 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/DiagramAccessBase.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/DiagramAccessBase.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common;
+package org.eclipse.etrice.ui.common.base.support;
import java.io.File;
import java.io.IOException;
@@ -23,6 +23,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.command.Command;
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.util.EcoreUtil;
@@ -30,11 +31,10 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.etrice.core.common.ui.linking.GlobalNonPlatformURIEditorOpener;
-import org.eclipse.etrice.core.room.RoomModel;
-import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.core.ui.RoomUiModule;
-import org.eclipse.etrice.ui.common.editor.RoomDiagramEditor;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
+import org.eclipse.etrice.core.fsm.ui.FSMUiModule;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.editor.DiagramEditorBase;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -65,19 +65,17 @@ public abstract class DiagramAccessBase {
public DiagramAccessBase() {
super();
- Injector injector = RoomUiModule.getInjector();
+ Injector injector = FSMUiModule.getInjector();
injector.injectMembers(this);
}
- public Diagram getDiagram(StructureClass sc) {
- Resource resource = sc.eResource();
+ public Diagram getDiagram(EObject rootObject) {
+ Resource resource = rootObject.eResource();
if (resource==null)
return null;
URI uri = resource.getURI();
- String modelName = ((RoomModel) sc.eContainer()).getName();
-
ResourceSet rs = newResourceSet(uri);
URI diagURI = null;
@@ -94,7 +92,7 @@ public abstract class DiagramAccessBase {
diagramFolder = parentFolder.getFolder(DIAGRAMS_FOLDER_NAME);
}
- IFile diagramFile = diagramFolder.getFile(modelName+"."+sc.getName()+getFileExtension());
+ IFile diagramFile = diagramFolder.getFile(getDigramFileName(rootObject));
diagURI = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
exists = diagramFile.exists();
}
@@ -102,7 +100,7 @@ public abstract class DiagramAccessBase {
File diagramFile = new File(uri.toFileString());
diagramFile = new File(diagramFile.getParent()
+File.separator+DIAGRAMS_FOLDER_NAME
- +File.separator+modelName+"."+sc.getName()+getFileExtension());
+ +File.separator+getDigramFileName(rootObject));
diagURI = URI.createFileURI(diagramFile.getPath());
exists = diagramFile.exists();
}
@@ -120,21 +118,21 @@ public abstract class DiagramAccessBase {
else {
Resource diagRes = rs.createResource(diagURI);
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- boolean snap = store.getBoolean(PreferenceConstants.SNAP_TO_GRID);
- boolean useGrid = store.getBoolean(PreferenceConstants.USE_GRID);
- int horUnit = useGrid? store.getInt(PreferenceConstants.HOR_GRID_UNIT) : 0;
- int verUnit = useGrid? store.getInt(PreferenceConstants.VER_GRID_UNIT) : 0;
+ IPreferenceStore store = UIBaseActivator.getDefault().getPreferenceStore();
+ boolean snap = store.getBoolean(UIBasePreferenceConstants.SNAP_TO_GRID);
+ boolean useGrid = store.getBoolean(UIBasePreferenceConstants.USE_GRID);
+ int horUnit = useGrid? store.getInt(UIBasePreferenceConstants.HOR_GRID_UNIT) : 0;
+ int verUnit = useGrid? store.getInt(UIBasePreferenceConstants.VER_GRID_UNIT) : 0;
Diagram diagram = Graphiti.getPeCreateService().createDiagram(
getDiagramTypeId(),
- getDiagramName(sc),
+ getDiagramName(rootObject),
horUnit,
verUnit,
snap);
diagRes.getContents().add(diagram);
- populateDiagram(sc, diagram);
+ populateDiagram(rootObject, diagram);
try {
diagRes.save(Collections.EMPTY_MAP);
@@ -160,8 +158,8 @@ public abstract class DiagramAccessBase {
return rs;
}
- private void populateDiagram(StructureClass ac, Diagram diagram) {
- ResourceSet rs = newResourceSet(ac.eResource().getURI());
+ private void populateDiagram(EObject rootObject, Diagram diagram) {
+ ResourceSet rs = newResourceSet(rootObject.eResource().getURI());
TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(rs);
if (editingDomain == null) {
@@ -170,10 +168,10 @@ public abstract class DiagramAccessBase {
}
// IMPORTANT STEP: this resolves the object and creates a new resource in the resource set
- URI boUri = EcoreUtil.getURI(ac);
- ac = (StructureClass) editingDomain.getResourceSet().getEObject(boUri, true);
+ URI boUri = EcoreUtil.getURI(rootObject);
+ rootObject = editingDomain.getResourceSet().getEObject(boUri, true);
- editingDomain.getCommandStack().execute(getInitialCommand(ac, diagram, editingDomain));
+ editingDomain.getCommandStack().execute(getInitialCommand(rootObject, diagram, editingDomain));
editingDomain.dispose();
}
@@ -209,17 +207,17 @@ public abstract class DiagramAccessBase {
editingDomain.dispose();
}
- public RoomDiagramEditor findDiagramEditor(StructureClass sc) {
- IFileEditorInput input = getEditorInput(sc);
+ public DiagramEditorBase findDiagramEditor(EObject rootObject) {
+ IFileEditorInput input = getEditorInput(rootObject);
- return (RoomDiagramEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findEditor(input);
+ return (DiagramEditorBase) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findEditor(input);
}
- public RoomDiagramEditor openDiagramEditor(StructureClass sc) {
- IFileEditorInput input = getEditorInput(sc);
+ public DiagramEditorBase openDiagramEditor(EObject rootObject) {
+ IFileEditorInput input = getEditorInput(rootObject);
try {
- return (RoomDiagramEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, getEditorId());
+ return (DiagramEditorBase) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, getEditorId());
} catch (PartInitException e) {
String error = "Error while opening diagram editor";
System.err.println(error);
@@ -227,8 +225,8 @@ public abstract class DiagramAccessBase {
return null;
}
- private IFileEditorInput getEditorInput(StructureClass sc) {
- Diagram diagram = getDiagram(sc);
+ private IFileEditorInput getEditorInput(EObject rootObject) {
+ Diagram diagram = getDiagram(rootObject);
URI uri = diagram.eResource().getURI();
String platformString = null;
@@ -244,10 +242,10 @@ public abstract class DiagramAccessBase {
return input;
}
- public abstract String getDiagramName(StructureClass sc);
- abstract protected String getFileExtension();
+ public abstract String getDiagramName(EObject rootObject);
+ abstract protected String getDigramFileName(EObject rootObject);
abstract protected String getDiagramTypeId();
abstract protected String getEditorId();
- abstract protected Command getInitialCommand(StructureClass ac, Diagram diagram, TransactionalEditingDomain editingDomain);
+ abstract protected Command getInitialCommand(EObject rootObject, Diagram diagram, TransactionalEditingDomain editingDomain);
abstract protected Command getUpdateCommand(Diagram diagram, TransactionalEditingDomain editingDomain);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/NoResizeFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/NoResizeFeature.java
index 9f80e93d5..562e0e15c 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/NoResizeFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/NoResizeFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IResizeConfiguration;
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/RemoveBendpointsFeature.java
index 7120531e2..cf50e80bd 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/RemoveBendpointsFeature.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.ui.common.support;
+package org.eclipse.etrice.ui.common.base.support;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICustomContext;
diff --git a/plugins/org.eclipse.etrice.ui.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.common/META-INF/MANIFEST.MF
index 0a97b0221..610871e3f 100644
--- a/plugins/org.eclipse.etrice.ui.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.common/META-INF/MANIFEST.MF
@@ -9,6 +9,7 @@ Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.etrice.core.room;bundle-version="0.5.0",
org.eclipse.etrice.core.room.ui;bundle-version="0.5.0",
org.eclipse.etrice.core.common.ui;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.0.5",
org.eclipse.emf.transaction;bundle-version="1.4.0",
org.eclipse.graphiti;bundle-version="0.8.0",
org.eclipse.ui.ide;bundle-version="3.6.0",
@@ -24,11 +25,8 @@ Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.emf.workspace;bundle-version="1.5.0"
Export-Package: org.eclipse.etrice.ui.common,
org.eclipse.etrice.ui.common.commands,
- org.eclipse.etrice.ui.common.dialogs,
org.eclipse.etrice.ui.common.editor,
- org.eclipse.etrice.ui.common.preferences,
- org.eclipse.etrice.ui.common.quickfix,
- org.eclipse.etrice.ui.common.support
+ org.eclipse.etrice.ui.common.preferences
Bundle-Activator: org.eclipse.etrice.ui.common.Activator
Bundle-ActivationPolicy: lazy
Import-Package: org.apache.log4j
diff --git a/plugins/org.eclipse.etrice.ui.common/plugin.xml b/plugins/org.eclipse.etrice.ui.common/plugin.xml
index 41f8b59a5..06a4669e0 100644
--- a/plugins/org.eclipse.etrice.ui.common/plugin.xml
+++ b/plugins/org.eclipse.etrice.ui.common/plugin.xml
@@ -3,12 +3,6 @@
<plugin>
<extension-point id="org.eclipse.etrice.ui.common.refactoring.rename" name="Diagram Rename Participant" schema="schema/org.eclipse.etrice.ui.common.refactoring.rename.exsd"/>
<extension
- point="org.eclipse.ui.startup">
- <startup
- class="org.eclipse.etrice.ui.common.concurrency.ConcurrentModificationObserver$Initializer">
- </startup>
- </extension>
- <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.etrice.ui.common.preferences.ETricePreferencePage"
@@ -22,25 +16,5 @@
class="org.eclipse.etrice.ui.common.preferences.PreferenceInitializer">
</initializer>
</extension>
- <extension
- point="org.eclipse.ltk.core.refactoring.renameParticipants">
- <renameParticipant
- class="org.eclipse.etrice.ui.common.refactoring.DiagramRenameParticipant"
- id="org.eclipse.etrice.ui.common.renameParticipant"
- name="eTrice Diagram Rename Participant">
- <enablement>
- <with
- variable="element">
- <adapt
- type="org.eclipse.core.resources.IFile">
- <test
- property="org.eclipse.core.resources.extension"
- value="room">
- </test>
- </adapt>
- </with>
- </enablement>
- </renameParticipant>
- </extension>
</plugin>
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java
index fffd35f46..507ff4515 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java
@@ -36,7 +36,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.core.room.StructureClass;
import org.eclipse.etrice.core.ui.RoomUiModule;
-import org.eclipse.etrice.ui.common.editor.RoomDiagramEditor;
+import org.eclipse.etrice.ui.common.base.editor.DiagramEditorBase;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -58,16 +58,16 @@ import com.google.inject.Injector;
public class ChangeDiagramInputJob extends Job {
@Inject
- private ILabelProvider roomLabelProvider;
+ private ILabelProvider labelProvider;
private Diagram diagram;
- private RoomDiagramEditor editor;
+ private DiagramEditorBase editor;
private boolean close, saveOnClose, reOpen;
private IFile roomFile;
private StructureClass sc;
- public ChangeDiagramInputJob(String name, RoomDiagramEditor editor) {
+ public ChangeDiagramInputJob(String name, DiagramEditorBase editor) {
super(name);
this.editor = editor;
@@ -78,7 +78,7 @@ public class ChangeDiagramInputJob extends Job {
close = saveOnClose = reOpen = true;
}
- public ChangeDiagramInputJob(String name, RoomDiagramEditor editor, boolean close, boolean saveOnClose, boolean reOpen) {
+ public ChangeDiagramInputJob(String name, DiagramEditorBase editor, boolean close, boolean saveOnClose, boolean reOpen) {
this(name, editor);
this.close = close;
this.saveOnClose = saveOnClose;
@@ -227,7 +227,7 @@ public class ChangeDiagramInputJob extends Job {
private StructureClass selectSc(RoomModel model){
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, roomLabelProvider);
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider);
dialog.setMultipleSelection(false);
dialog.setMessage("Select a new ROOM class");
dialog.setFilter("*");
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
index 795d66090..8c04e66ae 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
@@ -8,54 +8,13 @@
package org.eclipse.etrice.ui.common.editor;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.core.ui.RoomUiModule;
import org.eclipse.etrice.core.ui.editor.RoomEditor;
-import org.eclipse.etrice.ui.common.Activator;
+import org.eclipse.etrice.ui.common.base.editor.DiagramEditorBase;
import org.eclipse.etrice.ui.common.commands.ChangeDiagramInputJob;
import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.ui.editor.DiagramBehavior;
-import org.eclipse.graphiti.ui.editor.DiagramEditor;
-import org.eclipse.graphiti.ui.editor.EditorInputAdapter;
-import org.eclipse.graphiti.ui.editor.IDiagramEditorInput;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.xtext.diagnostics.Severity;
-import org.eclipse.xtext.resource.XtextResource;
-import org.eclipse.xtext.serializer.ISerializer;
-import org.eclipse.xtext.util.CancelIndicator;
-import org.eclipse.xtext.util.concurrent.IUnitOfWork;
-import org.eclipse.xtext.validation.CheckMode;
-import org.eclipse.xtext.validation.IResourceValidator;
-import org.eclipse.xtext.validation.Issue;
-
-import com.google.inject.Inject;
-import com.google.inject.Injector;
/**
* description
@@ -63,152 +22,13 @@ import com.google.inject.Injector;
* @author Henrik Rentz-Reichert initial contribution and API
*
*/
-public abstract class RoomDiagramEditor extends DiagramEditor implements IInputUriHolder {
-
- @Inject
- protected IResourceValidator resourceValidator;
-
- private SaveOnFocusLostListener partListener;
-
- private SuperClassListener superClassListener;
-
- private ModificationTrackingEnabler mte = new ModificationTrackingEnabler();
+public abstract class RoomDiagramEditor extends DiagramEditorBase {
private boolean showLostDiagramInputDialog = true;
- private URI inputUri;
-
public RoomDiagramEditor() {
super();
-
- Injector injector = RoomUiModule.getInjector();
- injector.injectMembers(this);
-
- TrayDialog.setDialogHelpAvailable(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.ui.editor.DiagramEditor#createDiagramBehavior()
- */
- @Override
- protected DiagramBehavior createDiagramBehavior() {
- return new CustomDiagramBehavior(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.ui.editor.DiagramEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- IEditorInput newInput = EditorInputAdapter.adaptToDiagramEditorInput(input);
- if (newInput instanceof IDiagramEditorInput)
- this.inputUri = ((IDiagramEditorInput) newInput).getUri();
-
- super.init(site, input);
- }
-
- @Override
- public void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- ResourceSet resourceSet = getEditingDomain().getResourceSet();
- Map<EObject, Collection<Setting>> result = EcoreUtil.UnresolvedProxyCrossReferencer.find(resourceSet);
- if (!result.isEmpty())
- System.err.println("ERROR in diagram viewer: could not resolve all proxies!");
-
- mte.setTarget(getEditingDomain());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal#dispose()
- */
- @Override
- public void dispose() {
- mte.unsetTarget(getEditingDomain());
-
- getSite().getPage().removePartListener(partListener);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().removePartListener(superClassListener);
- superClassListener.dispose();
-
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal#doSave(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void doSave(final IProgressMonitor monitor) {
- ResourceSet rs = getEditingDomain().getResourceSet();
- for (Resource res : rs.getResources()) {
- if (res instanceof XtextResource) {
- if (!res.isLoaded()) {
- try {
- res.load(Collections.EMPTY_MAP);
- } catch (IOException e) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: couldn't load referenced resource "+res.getURI());
- return;
- }
- }
- if (res.isModified()) {
-
- XtextResource xres = (XtextResource) res;
- ISerializer serializer = xres.getSerializer();
-
- if (xres.getContents().isEmpty()) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: part of textual model is empty, can't save");
- return;
- }
-
- // HOWTO: call serializer to validate the concrete syntax
- // this throws an exception which is caught further up the stack
- // and a dialog will be displayed
- serializer.serialize(xres.getContents().get(0));
-
- List<Issue> result = resourceValidator.validate(res, CheckMode.NORMAL_AND_FAST, new CancelIndicator() {
- public boolean isCanceled() {
- return monitor.isCanceled();
- }
- });
- if (!result.isEmpty()) {
- boolean error = false;
- MultiStatus ms = new MultiStatus(Activator.PLUGIN_ID, Status.ERROR, "validation errors during diagram save", null);
- for (Issue issue : result) {
- if (issue.isSyntaxError() || issue.getSeverity()==Severity.ERROR) {
- ms.add(new Status(Status.ERROR, Activator.PLUGIN_ID, issue.getMessage()));
- error = true;
- }
- }
- if (error) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: model is invalid, can't save");
- Activator.getDefault().getLog().log(ms);
- return;
- }
- }
- }
- }
- }
- super.doSave(monitor);
- }
-
- @Override
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
-
- partListener = new SaveOnFocusLostListener(this);
- getSite().getPage().addPartListener(partListener);
-
- superClassListener = new SuperClassListener(this);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(superClassListener);
-
- /* we have to save here whether changes have been done or not to get rid of the dirty state
- * CAUTION: save in
- * init(IEditorSite site, IEditorInput input)
- * or
- * setInput(IEditorInput input)
- * did not work correctly
- */
-// if (AutoUpdateFeature.isLastDoneChanges())
- doSave(new NullProgressMonitor());
+ textEditorClass = RoomEditor.class;
}
/* (non-Javadoc)
@@ -216,17 +36,8 @@ public abstract class RoomDiagramEditor extends DiagramEditor implements IInputU
*/
@Override
public void setFocus() {
- boolean dirtyAlready = isDirty();
-
- // inside this call auto refresh will happen if (and turn the editor dirty)
super.setFocus();
- if(superClassListener.isChangeInSuperClass())
- superClassChanged();
-
- if (!dirtyAlready && isDirty())
- doSave(null);
-
Diagram diagram = getDiagramTypeProvider().getDiagram();
EObject diagramBo = diagram.getLink().getBusinessObjects().iterator().next();
if(diagramBo == null || diagramBo.eIsProxy())
@@ -250,83 +61,6 @@ public abstract class RoomDiagramEditor extends DiagramEditor implements IInputU
new ChangeDiagramInputJob("Change input for "+diagram.getName(), this).schedule();
}
- /**
- * Check whether the given diagram editor manages a super class
- * @param editor
- * @return
- */
- protected boolean registerSuperClassListener(RoomDiagramEditor editor) {
- if(!(this.getClass().equals(editor.getClass()) && this.getStructureClass() instanceof ActorClass))
- return false;
-
- StructureClass editorSc = editor.getStructureClass();
- if(editorSc instanceof ActorClass){
- URI editorResURI = toCurrentPlatformURI(editorSc.eResource().getURI());
-
- ActorClass base = (ActorClass) getStructureClass();
- while((base = base.getActorBase()) != null){
- URI baseResURI = toCurrentPlatformURI(base.eResource().getURI());
- if(editorResURI.equals(baseResURI))
- if(editorSc.getName().equals(base.getName()))
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Check whether the given room editor has a super class
- * @param editor
- * @return
- */
- protected boolean registerSuperClassListener(RoomEditor editor) {
- if(!(this.getStructureClass() instanceof ActorClass))
- return false;
-
- return editor.getDocument().readOnly(new IUnitOfWork<Boolean, XtextResource>(){
-
- @Override
- public Boolean exec(XtextResource resource) throws Exception {
-
- URI editorResURI = toCurrentPlatformURI(resource.getURI());
- URI thisScResURI = toCurrentPlatformURI(getStructureClass().eResource().getURI());
-
- // ignore if in same file (handled by graphiti)
- if(thisScResURI.equals(editorResURI))
- return false;
-
- ActorClass base = (ActorClass) getStructureClass();
- while((base = base.getActorBase()) != null){
- URI baseResURI = toCurrentPlatformURI(base.eResource().getURI());
- if(editorResURI.equals(baseResURI))
- return true;
- }
-
- return false;
- }
- });
- }
-
- private URI toCurrentPlatformURI(URI uri){
- if(uri.isPlatform())
- return uri;
- else if(uri.isFile()){
- final IPath rootPath = ResourcesPlugin.getWorkspace().getRoot().getLocation();
- String rootString = rootPath.toFile().toString();
- String fileString = uri.toFileString();
- if(fileString.startsWith(rootString))
- return URI.createPlatformResourceURI(fileString.replace(rootString, ""), false);
- }
- return null;
- }
-
- protected abstract void superClassChanged();
-
protected abstract StructureClass getStructureClass();
- public URI getInputUri() {
- return inputUri;
- }
-
}
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/ETricePreferencePage.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/ETricePreferencePage.java
index f60792d3e..fef9530c1 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/ETricePreferencePage.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/ETricePreferencePage.java
@@ -12,7 +12,9 @@
package org.eclipse.etrice.ui.common.preferences;
-import org.eclipse.etrice.ui.common.Activator;
+import org.eclipse.etrice.core.ui.preferences.RoomPreferenceConstants;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
@@ -39,7 +41,7 @@ public class ETricePreferencePage
public ETricePreferencePage() {
super(GRID);
- setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setPreferenceStore(UIBaseActivator.getDefault().getPreferenceStore());
setDescription("eTrice Preferences");
}
@@ -47,7 +49,7 @@ public class ETricePreferencePage
addLabel("");
addLabel("Textual Model Editor");
BooleanFieldEditor autoSaveText = new BooleanFieldEditor(
- PreferenceConstants.SAVE_TEXT_ON_FOCUS_LOST,
+ RoomPreferenceConstants.SAVE_TEXT_ON_FOCUS_LOST,
"Auto-save textual model when focus changes",
getFieldEditorParent());
addField(autoSaveText);
@@ -56,67 +58,67 @@ public class ETricePreferencePage
addLabel("Diagram Editors");
addField(
new BooleanFieldEditor(
- PreferenceConstants.CONFIRM_DELETE,
+ UIBasePreferenceConstants.CONFIRM_DELETE,
"&Confirm diagram element deletion",
getFieldEditorParent()));
BooleanFieldEditor autoSave = new BooleanFieldEditor(
- PreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST,
+ UIBasePreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST,
"Auto-save diagram when focus changes",
getFieldEditorParent());
addField(autoSave);
- maxLineLength = new StringFieldEditor(PreferenceConstants.MAX_LABEL_LINE_LENGTH, "Max Transition Lable Line Length::", getFieldEditorParent());
+ maxLineLength = new StringFieldEditor(UIBasePreferenceConstants.MAX_LABEL_LINE_LENGTH, "Max Transition Lable Line Length::", getFieldEditorParent());
addField(maxLineLength);
- maxLines = new StringFieldEditor(PreferenceConstants.MAX_LABEL_LINES, "Max Transition Lable Lines::", getFieldEditorParent());
+ maxLines = new StringFieldEditor(UIBasePreferenceConstants.MAX_LABEL_LINES, "Max Transition Lable Lines::", getFieldEditorParent());
addField(maxLines);
- StringFieldEditor exportPath = new StringFieldEditor(PreferenceConstants.EXPORT_DIAGRAM_PATH, "&Export Diagram Path:", getFieldEditorParent());
+ StringFieldEditor exportPath = new StringFieldEditor(UIBasePreferenceConstants.EXPORT_DIAGRAM_PATH, "&Export Diagram Path:", getFieldEditorParent());
addField(exportPath);
RadioGroupFieldEditor exportRelTo = new RadioGroupFieldEditor(
- PreferenceConstants.EXPORT_DIAGRAM_PATH_RELATIVE_TO,
+ UIBasePreferenceConstants.EXPORT_DIAGRAM_PATH_RELATIVE_TO,
"Export Path Relative to",
2,
new String[][] {
- {"Project", PreferenceConstants.PATH_REL_TO_PROJECT},
- {"Model", PreferenceConstants.PATH_REL_TO_MODEL}
+ {"Project", UIBasePreferenceConstants.PATH_REL_TO_PROJECT},
+ {"Model", UIBasePreferenceConstants.PATH_REL_TO_MODEL}
},
getFieldEditorParent(),
true);
addField(exportRelTo);
RadioGroupFieldEditor imgFormat = new RadioGroupFieldEditor(
- PreferenceConstants.EXPORT_DIAGRAM_FORMAT,
+ UIBasePreferenceConstants.EXPORT_DIAGRAM_FORMAT,
"Image Format for Export:",
4,
new String[][] {
- {"BMP", PreferenceConstants.FORMAT_BMP},
- {"GIF", PreferenceConstants.FORMAT_GIF},
- {"JPG", PreferenceConstants.FORMAT_JPG},
- {"PNG", PreferenceConstants.FORMAT_PNG}
+ {"BMP", UIBasePreferenceConstants.FORMAT_BMP},
+ {"GIF", UIBasePreferenceConstants.FORMAT_GIF},
+ {"JPG", UIBasePreferenceConstants.FORMAT_JPG},
+ {"PNG", UIBasePreferenceConstants.FORMAT_PNG}
},
getFieldEditorParent(),
true);
addField(imgFormat);
BooleanFieldEditor useGrid = new BooleanFieldEditor(
- PreferenceConstants.USE_GRID,
+ UIBasePreferenceConstants.USE_GRID,
"Use &Grid (grid settings apply to new diagrams only)",
getFieldEditorParent());
addField(useGrid);
snap = new BooleanFieldEditor(
- PreferenceConstants.SNAP_TO_GRID,
+ UIBasePreferenceConstants.SNAP_TO_GRID,
"&Snap to Grid",
getFieldEditorParent());
addField(snap);
- hor = new StringFieldEditor(PreferenceConstants.HOR_GRID_UNIT, "&Horizontal Grid Unit [px]:", getFieldEditorParent());
+ hor = new StringFieldEditor(UIBasePreferenceConstants.HOR_GRID_UNIT, "&Horizontal Grid Unit [px]:", getFieldEditorParent());
addField(hor);
- ver = new StringFieldEditor(PreferenceConstants.VER_GRID_UNIT, "&Vertical Grid Unit [px]:", getFieldEditorParent());
+ ver = new StringFieldEditor(UIBasePreferenceConstants.VER_GRID_UNIT, "&Vertical Grid Unit [px]:", getFieldEditorParent());
addField(ver);
useGridCheck = (Button) useGrid.getDescriptionControl(getFieldEditorParent());
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceInitializer.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceInitializer.java
index bb781c6a7..a2f536f8c 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceInitializer.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/preferences/PreferenceInitializer.java
@@ -13,10 +13,10 @@
package org.eclipse.etrice.ui.common.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.etrice.core.ui.preferences.RoomPreferenceConstants;
+import org.eclipse.etrice.ui.common.base.UIBaseActivator;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.etrice.ui.common.Activator;
-
/**
* Class used to initialize default preference values.
*/
@@ -28,18 +28,8 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- store.setDefault(PreferenceConstants.USE_GRID, true);
- store.setDefault(PreferenceConstants.SNAP_TO_GRID, false);
- store.setDefault(PreferenceConstants.HOR_GRID_UNIT, 10);
- store.setDefault(PreferenceConstants.VER_GRID_UNIT, 10);
- store.setDefault(PreferenceConstants.CONFIRM_DELETE, true);
- store.setDefault(PreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST, false);
- store.setDefault(PreferenceConstants.EXPORT_DIAGRAM_PATH, "doc-gen/images");
- store.setDefault(PreferenceConstants.EXPORT_DIAGRAM_PATH_RELATIVE_TO, PreferenceConstants.PATH_REL_TO_PROJECT);
- store.setDefault(PreferenceConstants.EXPORT_DIAGRAM_FORMAT, PreferenceConstants.FORMAT_JPG);
- store.setDefault(PreferenceConstants.MAX_LABEL_LINE_LENGTH, PreferenceConstants.MAX_LINE_LENGTH_DEFAULT);
- store.setDefault(PreferenceConstants.MAX_LABEL_LINES, PreferenceConstants.MAX_LINES_DEFAULT);
+ IPreferenceStore store = UIBaseActivator.getDefault().getPreferenceStore();
+ store.setDefault(RoomPreferenceConstants.SAVE_TEXT_ON_FOCUS_LOST, false);
}
}
diff --git a/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF
index c3c0a02af..ae3a7ac9d 100644
--- a/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF
@@ -20,6 +20,7 @@ Require-Bundle: org.eclipse.graphiti;bundle-version="0.8.1",
org.eclipse.etrice.ui.behavior;bundle-version="0.5.0",
org.eclipse.etrice.ui.structure;bundle-version="0.5.0",
org.eclipse.etrice.ui.common;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.5.0",
org.eclipse.etrice.core.room;bundle-version="0.5.0",
org.eclipse.etrice.core.fsm;bundle-version="0.5.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java
index 62ef94afa..43aeedd2d 100644
--- a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java
+++ b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java
@@ -22,6 +22,7 @@ import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.etrice.ui.behavior.editor.BehaviorEditor;
+import org.eclipse.etrice.ui.common.base.editor.DiagramEditorBase;
import org.eclipse.etrice.ui.common.editor.RoomDiagramEditor;
import org.eclipse.gef.EditPart;
import org.eclipse.graphiti.mm.algorithms.AbstractText;
@@ -205,7 +206,7 @@ public abstract class ETriceDiagramLayoutManager extends
if (workbenchPart instanceof RoomDiagramEditor) {
mapping.setProperty(KimlGraphitiUtil.DIAGRAM_EDITOR,
- (RoomDiagramEditor) workbenchPart);
+ (DiagramEditorBase) workbenchPart);
}
EditPart layoutRootPart = null;
diff --git a/plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF
index 52ded56a7..119dc18c5 100644
--- a/plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF
@@ -8,6 +8,7 @@ Bundle-Vendor: Eclipse eTrice (Incubation)
Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.etrice.core.room.ui;bundle-version="0.5.0",
org.eclipse.etrice.core.common.ui;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.0.5",
org.eclipse.etrice.ui.common;bundle-version="0.5.0",
org.eclipse.etrice.ui.behavior;bundle-version="0.5.0",
org.eclipse.graphiti;bundle-version="0.8.0",
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java
index 5f27da299..10c60ff80 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java
@@ -14,21 +14,26 @@ package org.eclipse.etrice.ui.structure;
import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.etrice.ui.common.DiagramAccessBase;
+import org.eclipse.etrice.ui.common.base.support.DiagramAccessBase;
import org.eclipse.etrice.ui.structure.commands.UpdateDiagramCommand;
import org.eclipse.etrice.ui.structure.editor.StructureEditor;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.ui.services.GraphitiUi;
-
+import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.core.room.StructureClass;
public class DiagramAccess extends DiagramAccessBase {
- public String getDiagramName(StructureClass sc) {
- return "Structure of "+sc.getName();
+ public String getDiagramName(EObject rootObject) {
+ if (rootObject instanceof StructureClass) {
+ StructureClass sc = (StructureClass) rootObject;
+ return "Structure of "+sc.getName();
+ }
+ return "unknown";
}
protected String getDiagramTypeId() {
@@ -39,14 +44,22 @@ public class DiagramAccess extends DiagramAccessBase {
return StructureEditor.STRUCTURE_EDITOR_ID;
}
- protected String getFileExtension() {
- return ".structure";
+ protected String getDigramFileName(EObject rootObject) {
+ if (rootObject instanceof StructureClass) {
+ StructureClass sc = (StructureClass) rootObject;
+ String modelName = ((RoomModel) sc.eContainer()).getName();
+ return modelName+"."+sc.getName()+".structure";
+ }
+ return "unknown";
}
- protected Command getInitialCommand(StructureClass sc, Diagram diagram, TransactionalEditingDomain editingDomain) {
- IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram, DiagramTypeProvider.PROVIDER_ID); //$NON-NLS-1$
- IFeatureProvider featureProvider = dtp.getFeatureProvider();
- return new UpdateDiagramCommand(diagram, sc, editingDomain, featureProvider);
+ protected Command getInitialCommand(EObject rootObject, Diagram diagram, TransactionalEditingDomain editingDomain) {
+ if (rootObject instanceof StructureClass) {
+ IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram, DiagramTypeProvider.PROVIDER_ID); //$NON-NLS-1$
+ IFeatureProvider featureProvider = dtp.getFeatureProvider();
+ return new UpdateDiagramCommand(diagram, (StructureClass) rootObject, editingDomain, featureProvider);
+ }
+ return null;
}
@Override
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/ProviderDispatcher.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/ProviderDispatcher.java
index 989389b75..1b6cd28aa 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/ProviderDispatcher.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/ProviderDispatcher.java
@@ -24,7 +24,7 @@ import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.SPP;
import org.eclipse.etrice.core.room.StructureClass;
import org.eclipse.etrice.core.room.util.RoomSwitch;
-import org.eclipse.etrice.ui.common.support.RemoveBendpointsFeature;
+import org.eclipse.etrice.ui.common.base.support.RemoveBendpointsFeature;
import org.eclipse.etrice.ui.structure.support.ActorContainerRefSupport;
import org.eclipse.etrice.ui.structure.support.BindingSupport;
import org.eclipse.etrice.ui.structure.support.DiagramUpdateFeature;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/ActorContainerRefPropertyDialog.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/ActorContainerRefPropertyDialog.java
index 291100c08..58c7d46f7 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/ActorContainerRefPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/ActorContainerRefPropertyDialog.java
@@ -33,8 +33,8 @@ import org.eclipse.etrice.core.room.RoomPackage;
import org.eclipse.etrice.core.room.StructureClass;
import org.eclipse.etrice.core.room.SubSystemClass;
import org.eclipse.etrice.core.room.SubSystemRef;
-import org.eclipse.etrice.ui.common.dialogs.AbstractPropertyDialog;
-import org.eclipse.etrice.ui.common.dialogs.MultiValidator2;
+import org.eclipse.etrice.ui.common.base.dialogs.AbstractPropertyDialog;
+import org.eclipse.etrice.ui.common.base.dialogs.MultiValidator2;
import org.eclipse.etrice.ui.structure.Activator;
import org.eclipse.etrice.ui.structure.dialogs.PortPropertyDialog.Multiplicity2StringConverter;
import org.eclipse.etrice.ui.structure.dialogs.PortPropertyDialog.String2MultiplicityConverter;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java
index b52367d64..3a16019ae 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java
@@ -37,7 +37,7 @@ import org.eclipse.etrice.core.room.ProtocolClass;
import org.eclipse.etrice.core.room.RoomFactory;
import org.eclipse.etrice.core.room.RoomPackage;
import org.eclipse.etrice.core.room.SubSystemClass;
-import org.eclipse.etrice.ui.common.dialogs.AbstractPropertyDialog;
+import org.eclipse.etrice.ui.common.base.dialogs.AbstractPropertyDialog;
import org.eclipse.etrice.ui.structure.Activator;
import org.eclipse.etrice.ui.structure.support.SupportUtil;
import org.eclipse.jface.databinding.swt.SWTObservables;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SPPPropertyDialog.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SPPPropertyDialog.java
index 4656b60bf..430129e5b 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SPPPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SPPPropertyDialog.java
@@ -26,7 +26,7 @@ import org.eclipse.etrice.core.fsm.validation.FSMValidationUtil.Result;
import org.eclipse.etrice.core.room.ProtocolClass;
import org.eclipse.etrice.core.room.RoomPackage;
import org.eclipse.etrice.core.room.SPP;
-import org.eclipse.etrice.ui.common.dialogs.AbstractPropertyDialog;
+import org.eclipse.etrice.ui.common.base.dialogs.AbstractPropertyDialog;
import org.eclipse.etrice.ui.structure.Activator;
import org.eclipse.etrice.ui.structure.support.SupportUtil;
import org.eclipse.swt.graphics.Image;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java
index bfd450fa8..04d3802a9 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java
@@ -14,7 +14,7 @@ package org.eclipse.etrice.ui.structure.editor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.ui.common.editor.CustomDiagramBehavior;
+import org.eclipse.etrice.ui.common.base.editor.CustomDiagramBehavior;
import org.eclipse.etrice.ui.common.editor.RoomDiagramEditor;
import org.eclipse.etrice.ui.structure.Activator;
import org.eclipse.etrice.ui.structure.support.context.PositionUpdateContext;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureExporter.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureExporter.java
index ccc024f22..5f553e29e 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureExporter.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureExporter.java
@@ -15,7 +15,7 @@ package org.eclipse.etrice.ui.structure.editor;
import java.io.File;
import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.ui.common.editor.DiagramExporter;
+import org.eclipse.etrice.ui.common.base.editor.DiagramExporter;
import org.eclipse.etrice.ui.structure.DiagramAccess;
public class StructureExporter {
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java
index 2879897e7..434a57e79 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java
@@ -33,11 +33,11 @@ import org.eclipse.etrice.core.room.RoomFactory;
import org.eclipse.etrice.core.room.RoomPackage;
import org.eclipse.etrice.core.room.StructureClass;
import org.eclipse.etrice.core.room.SubSystemRef;
-import org.eclipse.etrice.ui.common.preferences.PreferenceConstants;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.CommonSupportUtil;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.preferences.UIBasePreferenceConstants;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.CommonSupportUtil;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.etrice.ui.structure.DiagramAccess;
import org.eclipse.etrice.ui.structure.DiagramTypeProvider;
import org.eclipse.etrice.ui.structure.ImageProvider;
@@ -733,7 +733,7 @@ public class ActorContainerRefSupport {
@Override
public boolean hasDoneChanges() {
ScopedPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.etrice.ui.common");
- boolean autoSave = store.getBoolean(PreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST);
+ boolean autoSave = store.getBoolean(UIBasePreferenceConstants.SAVE_DIAG_ON_FOCUS_LOST);
if (autoSave)
return true; // this is needed to trigger the save via a CommandStackListener after this command is completed
else
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
index 0479184ea..db2235b7f 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
@@ -22,9 +22,9 @@ import org.eclipse.etrice.core.room.GeneralProtocolClass;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.RoomFactory;
import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateConnectionFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateConnectionFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.etrice.ui.structure.ImageProvider;
import org.eclipse.etrice.ui.structure.dialogs.SubProtocolSelectionDialog;
import org.eclipse.etrice.ui.structure.support.context.ConnectionUpdateContext;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/InterfaceItemSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/InterfaceItemSupport.java
index 2dfe04f2a..fc6a03856 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/InterfaceItemSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/InterfaceItemSupport.java
@@ -21,10 +21,10 @@ import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.SPP;
import org.eclipse.etrice.core.room.SubSystemRef;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateFeature;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCustomFeature;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
-import org.eclipse.etrice.ui.common.support.NoResizeFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCustomFeature;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.NoResizeFeature;
import org.eclipse.etrice.ui.structure.support.context.PositionUpdateContext;
import org.eclipse.etrice.ui.structure.support.feature.ShapeUpdateFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/LayerConnectionSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/LayerConnectionSupport.java
index 210aff9de..7a2e53a33 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/LayerConnectionSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/LayerConnectionSupport.java
@@ -23,8 +23,8 @@ import org.eclipse.etrice.core.room.SAPoint;
import org.eclipse.etrice.core.room.SPP;
import org.eclipse.etrice.core.room.SPPoint;
import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.ui.common.support.ChangeAwareCreateConnectionFeature;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
+import org.eclipse.etrice.ui.common.base.support.ChangeAwareCreateConnectionFeature;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.etrice.ui.structure.ImageProvider;
import org.eclipse.etrice.ui.structure.support.context.ConnectionUpdateContext;
import org.eclipse.etrice.ui.structure.support.context.InitialAddConnectionContext;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java
index 69c05b2c7..e01cd9622 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java
@@ -28,7 +28,7 @@ import org.eclipse.etrice.core.room.SPP;
import org.eclipse.etrice.core.room.SPPoint;
import org.eclipse.etrice.core.room.ServiceImplementation;
import org.eclipse.etrice.core.room.StructureClass;
-import org.eclipse.etrice.ui.common.support.NoResizeFeature;
+import org.eclipse.etrice.ui.common.base.support.NoResizeFeature;
import org.eclipse.etrice.ui.structure.DiagramTypeProvider;
import org.eclipse.etrice.ui.structure.ImageProvider;
import org.eclipse.etrice.ui.structure.dialogs.SPPPropertyDialog;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java
index ee2521978..33d5333ce 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/StructureClassSupport.java
@@ -19,9 +19,9 @@ import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.StructureClass;
+import org.eclipse.etrice.ui.common.base.editor.DiagramEditorBase;
+import org.eclipse.etrice.ui.common.base.support.DeleteWithoutConfirmFeature;
import org.eclipse.etrice.ui.common.commands.ChangeDiagramInputJob;
-import org.eclipse.etrice.ui.common.editor.RoomDiagramEditor;
-import org.eclipse.etrice.ui.common.support.DeleteWithoutConfirmFeature;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
@@ -261,7 +261,7 @@ public class StructureClassSupport {
@Override
public void execute(ICustomContext context) {
- RoomDiagramEditor editor = (RoomDiagramEditor) getDiagramBehavior().getDiagramContainer();
+ DiagramEditorBase editor = (DiagramEditorBase) getDiagramBehavior().getDiagramContainer();
Job job = new ChangeDiagramInputJob("blub", editor);
job.setUser(true);
diff --git a/tests/org.eclipse.etrice.core.fsm.tests/about.html b/tests/org.eclipse.etrice.core.fsm.tests/about.html
new file mode 100644
index 000000000..c258ef55d
--- /dev/null
+++ b/tests/org.eclipse.etrice.core.fsm.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF
index d2fda52b2..88375e078 100644
--- a/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF
@@ -9,6 +9,7 @@ Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.etrice.core.room;bundle-version="0.5.0",
org.eclipse.etrice.ui.behavior;bundle-version="0.5.0",
org.eclipse.etrice.ui.common;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.5.0",
org.eclipse.etrice.ui.tests.base;bundle-version="0.5.0",
org.eclipse.ui,
org.eclipse.core.runtime,
diff --git a/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF
index 31ba3bf15..f9db24047 100644
--- a/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF
@@ -7,6 +7,7 @@ Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="0.5.0",
org.eclipse.etrice.core.room;bundle-version="0.5.0",
org.eclipse.etrice.ui.structure;bundle-version="0.5.0",
org.eclipse.etrice.ui.common;bundle-version="0.5.0",
+ org.eclipse.etrice.ui.common.base;bundle-version="0.5.0",
org.eclipse.etrice.ui.tests.base;bundle-version="0.5.0",
org.eclipse.ui,
org.eclipse.core.runtime,

Back to the top