Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-07-18 09:39:36 -0400
committerHenrik Rentz-Reichert2011-07-18 09:39:36 -0400
commit93a1fc6dae7384fbfd714afeced2bacc1baab58f (patch)
tree6ae4f94855fe7601bc778a82ce464d83cc008c55 /plugins/org.eclipse.etrice.ui.structure
parent61eb3b254ec4e57be0782b648654d5f19ba49682 (diff)
parentb8bea276e4a9ed70e0b82d6845f4a7aa549d6509 (diff)
downloadorg.eclipse.etrice-93a1fc6dae7384fbfd714afeced2bacc1baab58f.tar.gz
org.eclipse.etrice-93a1fc6dae7384fbfd714afeced2bacc1baab58f.tar.xz
org.eclipse.etrice-93a1fc6dae7384fbfd714afeced2bacc1baab58f.zip
[core.room, ui.behavior, ui.structure] rename refactoring
not handled yet: - actor class rename (with diagram file rename) - rename initiated by structure diagram (e.g. interface port rename affects containing actor class) Merge branch 'master' of ssh://hrentzreich@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git Conflicts: plugins/org.eclipse.etrice.generator.java/src/templates/ProtocolClass.xpt
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/plugin.xml14
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ExecutableExtensionFactory.java29
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ResourceModule.java36
4 files changed, 82 insertions, 1 deletions
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 dbd88f346..b72e13289 100644
--- a/plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.structure/META-INF/MANIFEST.MF
@@ -22,7 +22,9 @@ Require-Bundle: org.eclipse.etrice.core.room;bundle-version="0.1.0",
org.eclipse.gef;bundle-version="3.6.1",
org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.xtext;bundle-version="2.0.0"
+ org.eclipse.xtext;bundle-version="2.0.0",
+ org.eclipse.xtext.ui;bundle-version="2.0.0",
+ org.eclipse.xtext.ui.shared;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.etrice.ui.structure,
diff --git a/plugins/org.eclipse.etrice.ui.structure/plugin.xml b/plugins/org.eclipse.etrice.ui.structure/plugin.xml
index 84d551c82..18b39d6d0 100644
--- a/plugins/org.eclipse.etrice.ui.structure/plugin.xml
+++ b/plugins/org.eclipse.etrice.ui.structure/plugin.xml
@@ -48,4 +48,18 @@
</imageProvider>
</extension>
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"
+ type="structure">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.etrice.ui.structure.link.ExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="structure">
+ </resourceServiceProvider>
+ </extension>
+
</plugin>
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ExecutableExtensionFactory.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ExecutableExtensionFactory.java
new file mode 100644
index 000000000..d5db24c02
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ExecutableExtensionFactory.java
@@ -0,0 +1,29 @@
+package org.eclipse.etrice.ui.structure.link;
+
+import static com.google.inject.Guice.createInjector;
+import static com.google.inject.util.Modules.override;
+
+import org.eclipse.etrice.ui.structure.Activator;
+import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.eclipse.xtext.ui.resource.generic.EmfUiModule;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.osgi.framework.Bundle;
+
+import com.google.inject.Injector;
+
+public class ExecutableExtensionFactory extends
+ AbstractGuiceAwareExecutableExtensionFactory {
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ @Override
+ protected Injector getInjector() {
+ return createInjector(override(
+ override(new ResourceModule()).with(new SharedStateModule()))
+ .with(new EmfUiModule(Activator.getDefault())));
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ResourceModule.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ResourceModule.java
new file mode 100644
index 000000000..a34c32166
--- /dev/null
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/link/ResourceModule.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *******************************************************************************/
+
+package org.eclipse.etrice.ui.structure.link;
+
+import org.eclipse.xtext.resource.generic.AbstractGenericResourceRuntimeModule;
+
+/**
+ * @author Henrik Rentz-Reichert - initial contribution and API
+ *
+ */
+public class ResourceModule extends
+ AbstractGenericResourceRuntimeModule {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.xtext.resource.generic.AbstractGenericResourceRuntimeModule#getLanguageName()
+ */
+ @Override
+ protected String getLanguageName() {
+ return "org.eclipse.etrice.structure.diagrams";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.xtext.resource.generic.AbstractGenericResourceRuntimeModule#getFileExtensions()
+ */
+ @Override
+ protected String getFileExtensions() {
+ return "structure";
+ }
+
+}

Back to the top