Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml1
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java13
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/.project5
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties5
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java15
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IExtensionLookup.java2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CoreExpressionEditor.java2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ExpressionIdDialog.java6
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuElementsEditor.java2
11 files changed, 53 insertions, 11 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml
index 759090b9..cad2595f 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml
@@ -4,4 +4,5 @@
<service>
<provide interface="org.eclipse.e4.tools.emf.ui.common.IExtensionLookup"/>
</service>
+ <property name="service.ranking" type="Integer" value="1000"/>
</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java
index 4cce764f..88c4114e 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java
@@ -11,14 +11,21 @@
package org.eclipse.e4.tools.emf.editor3x;
import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.e4.tools.emf.ui.common.IExtensionLookup;
import org.eclipse.pde.internal.core.PDEExtensionRegistry;
public class PDEExtensionLookup implements IExtensionLookup {
- public IExtension[] findExtensions(String extensionPointId) {
- PDEExtensionRegistry reg = new PDEExtensionRegistry();
- return reg.findExtensions(extensionPointId, true);
+ public IExtension[] findExtensions(String extensionPointId, boolean liveModel) {
+ if( liveModel ) {
+ IExtensionRegistry registry = RegistryFactory.getRegistry();
+ return registry.getExtensionPoint(extensionPointId).getExtensions();
+ } else {
+ PDEExtensionRegistry reg = new PDEExtensionRegistry();
+ return reg.findExtensions(extensionPointId, true);
+ }
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/.project b/bundles/org.eclipse.e4.tools.emf.liveeditor/.project
index e796110f..8f237706 100644
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.project
+++ b/bundles/org.eclipse.e4.tools.emf.liveeditor/.project
@@ -20,6 +20,11 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF
index 5ea74a55..e4b46dae 100644
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF
@@ -16,5 +16,8 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.6.0",
org.eclipse.e4.core.contexts;bundle-version="0.9.0",
org.eclipse.e4.core.di;bundle-version="0.9.0",
- org.eclipse.jface;bundle-version="3.6.0"
+ org.eclipse.jface;bundle-version="3.6.0",
+ org.eclipse.equinox.registry;bundle-version="3.5.0"
Bundle-Vendor: %Bundle-Vendor
+Service-Component: OSGI-INF/extensionlookup.xml
+Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml b/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml
new file mode 100644
index 00000000..658799d9
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.liveeditor">
+ <implementation class="org.eclipse.e4.tools.emf.liveeditor.RuntimeExtensionLookup"/>
+ <service>
+ <provide interface="org.eclipse.e4.tools.emf.ui.common.IExtensionLookup"/>
+ </service>
+ <property name="service.ranking" type="Integer" value="0"/>
+</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties b/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties
index aab247e2..c15df501 100644
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties
+++ b/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties
@@ -1,7 +1,8 @@
-source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
about.html,\
- OSGI-INF/
+ OSGI-INF/,\
+ OSGI-INF/extensionlookup.xml
+source.. = src/
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java
new file mode 100644
index 00000000..a2005021
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java
@@ -0,0 +1,15 @@
+package org.eclipse.e4.tools.emf.liveeditor;
+
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.e4.tools.emf.ui.common.IExtensionLookup;
+
+public class RuntimeExtensionLookup implements IExtensionLookup {
+
+ public IExtension[] findExtensions(String extensionPointId, boolean liveModel) {
+ IExtensionRegistry registry = RegistryFactory.getRegistry();
+ return registry.getExtensionPoint(extensionPointId).getExtensions();
+ }
+
+}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IExtensionLookup.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IExtensionLookup.java
index 71b6a1e1..24a2ebb1 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IExtensionLookup.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IExtensionLookup.java
@@ -13,5 +13,5 @@ package org.eclipse.e4.tools.emf.ui.common;
import org.eclipse.core.runtime.IExtension;
public interface IExtensionLookup {
- public IExtension[] findExtensions(String extensionPointId);
+ public IExtension[] findExtensions(String extensionPointId, boolean liveModel);
}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CoreExpressionEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CoreExpressionEditor.java
index f8924c94..99c47c8f 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CoreExpressionEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CoreExpressionEditor.java
@@ -121,7 +121,7 @@ public class CoreExpressionEditor extends AbstractComponentEditor {
b.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- ExpressionIdDialog dialog = new ExpressionIdDialog(t.getShell(), getEditor().getExtensionLookup(), (MCoreExpression) getMaster().getValue(), getEditingDomain());
+ ExpressionIdDialog dialog = new ExpressionIdDialog(t.getShell(), getEditor().getExtensionLookup(), (MCoreExpression) getMaster().getValue(), getEditingDomain(), getEditor().isLiveModel());
dialog.open();
}
});
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ExpressionIdDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ExpressionIdDialog.java
index f1468433..abdeb0b8 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ExpressionIdDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ExpressionIdDialog.java
@@ -51,12 +51,14 @@ public class ExpressionIdDialog extends TitleAreaDialog {
private TableViewer viewer;
private EditingDomain domain;
private MCoreExpression expression;
+ private boolean liveModel;
- public ExpressionIdDialog(Shell parentShell, IExtensionLookup lookup, MCoreExpression expression, EditingDomain domain) {
+ public ExpressionIdDialog(Shell parentShell, IExtensionLookup lookup, MCoreExpression expression, EditingDomain domain, boolean liveModel) {
super(parentShell);
this.lookup = lookup;
this.expression = expression;
this.domain = domain;
+ this.liveModel = liveModel;
}
@Override
@@ -120,7 +122,7 @@ public class ExpressionIdDialog extends TitleAreaDialog {
private List<IConfigurationElement> getElements(IExtensionLookup lookup) {
List<IConfigurationElement> list = new ArrayList<IConfigurationElement>();
- for (IExtension ext : lookup.findExtensions("org.eclipse.core.expressions.definitions")) { //$NON-NLS-1$
+ for (IExtension ext : lookup.findExtensions("org.eclipse.core.expressions.definitions", liveModel)) { //$NON-NLS-1$
for (IConfigurationElement el : ext.getConfigurationElements()) {
list.add(el);
}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuElementsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuElementsEditor.java
index 02e44a4e..baebd345 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuElementsEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuElementsEditor.java
@@ -109,7 +109,7 @@ public class VMenuElementsEditor extends AbstractComponentEditor {
viewer.setContentProvider(cp);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 120;
+ gd.heightHint = 300;
viewer.getControl().setLayoutData(gd);
viewer.setLabelProvider(new ComponentLabelProvider(getEditor()));

Back to the top