Build for xtext 0.8.0.
diff --git a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/plugin.xml_gen b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/plugin.xml_gen
index 3220ee0..36dae83 100644
--- a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/plugin.xml_gen
+++ b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/plugin.xml_gen
@@ -100,12 +100,6 @@
</command>
</menuContribution>
</extension>
- <extension
- point="org.eclipse.xtext.ui.core.languageBuilder">
- <languageBuilder
- class="org.eclipse.amp.amf.abase.ABaseExecutableExtensionFactory:org.eclipse.xtext.ui.core.builder.ILanguageBuilder">
- </languageBuilder>
- </extension>
<!-- adding resource factories -->
diff --git a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/ABaseExecutableExtensionFactory.java b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/ABaseExecutableExtensionFactory.java
index 6357a89..e3967d1 100644
--- a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/ABaseExecutableExtensionFactory.java
+++ b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/ABaseExecutableExtensionFactory.java
@@ -5,24 +5,52 @@
package org.eclipse.amp.amf.abase;
-import org.eclipse.xtext.ui.core.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IExecutableExtensionFactory;
+import org.eclipse.core.runtime.Status;
import org.osgi.framework.Bundle;
import com.google.inject.Injector;
/**
- *@generated
+ * generated
*/
-public class ABaseExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
+public class ABaseExecutableExtensionFactory implements IExecutableExtensionFactory, IExecutableExtension {
- @Override
- protected Bundle getBundle() {
- return org.eclipse.amp.amf.abase.internal.ABaseActivator.getInstance().getBundle();
+ private Logger log = Logger.getLogger(ABaseExecutableExtensionFactory.class);
+ private String clazzName;
+ private IConfigurationElement config;
+
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
+ throws CoreException {
+ if (data instanceof String) {
+ clazzName = (String) data;
+ this.config = config;
+ }
+ else {
+ throw new IllegalArgumentException("couldn't handle passed data : "+data);
+ }
}
- @Override
- protected Injector getInjector() {
- return org.eclipse.amp.amf.abase.internal.ABaseActivator.getInstance().getInjector("org.eclipse.amp.amf.abase.ABase");
+ public Object create() throws CoreException {
+ org.eclipse.amp.amf.abase.internal.ABaseActivator instance = org.eclipse.amp.amf.abase.internal.ABaseActivator.getInstance();
+ if (instance == null)
+ throw new IllegalStateException("The bundle has not yet been activated. Make sure the Manifest.MF contains 'Bundle-ActivationPolicy: lazy'.");
+ Bundle bundle = instance.getBundle();
+ try {
+ final Class<?> clazz = bundle.loadClass(clazzName);
+ final Injector injector = org.eclipse.amp.amf.abase.internal.ABaseActivator.getInstance().getInjector("org.eclipse.amp.amf.abase.ABase");
+ final Object result = injector.getInstance(clazz);
+ if (result instanceof IExecutableExtension)
+ ((IExecutableExtension) result).setInitializationData(config, null, null);
+ return result;
+ }
+ catch (Exception e) {
+ log.error(e);
+ throw new CoreException(new Status(Status.ERROR, bundle.getSymbolicName(), e.getMessage(),e));
+ }
}
-
}
diff --git a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/AbstractABaseUiModule.java b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/AbstractABaseUiModule.java
index d571242..c45940c 100644
--- a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/AbstractABaseUiModule.java
+++ b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/AbstractABaseUiModule.java
@@ -108,20 +108,15 @@
}
// contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
+ public Class<? extends org.eclipse.xtext.ui.core.editor.validation.ValidationJob.Factory> bindValidationJob$Factory() {
+ return org.eclipse.xtext.ui.core.editor.validation.DefaultValidationJobFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
public Class<? extends org.eclipse.xtext.ui.core.editor.validation.IXtextResourceChecker> bindIXtextResourceChecker() {
return org.eclipse.xtext.ui.core.editor.validation.DefaultXtextResourceChecker.class;
}
- // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
- public Class<? extends com.google.inject.Provider<org.eclipse.xtext.index.IXtextIndex>> provideIXtextIndex() {
- return org.eclipse.xtext.ui.core.index.IndexProvider.class;
- }
-
- // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
- public Class<? extends org.eclipse.xtext.ui.core.builder.ILanguageBuilder> bindILanguageBuilder() {
- return org.eclipse.xtext.ui.core.builder.impl.SimpleProjectLanguageBuilder.class;
- }
-
// contributed by de.itemis.xtext.antlr.XtextAntlrGeneratorFragment
public Class<? extends org.eclipse.jface.text.rules.ITokenScanner> bindITokenScanner() {
return org.eclipse.xtext.ui.common.editor.syntaxcoloring.antlr.AntlrTokenScanner.class;
diff --git a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/internal/ABaseActivator.java b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/internal/ABaseActivator.java
index a66ca08..504779c 100644
--- a/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/internal/ABaseActivator.java
+++ b/org.eclipse.amp.amf/plugins/org.eclipse.amp.amf.abase.ui/src-gen/org/eclipse/amp/amf/abase/internal/ABaseActivator.java
@@ -4,7 +4,6 @@
*/
package org.eclipse.amp.amf.abase.internal;
-import org.apache.log4j.Logger;
import org.eclipse.xtext.ui.common.service.UIPluginModule;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -32,17 +31,12 @@
public void start(BundleContext context) throws Exception {
super.start(context);
INSTANCE = this;
- try {
-
- injectors.put("org.eclipse.amp.amf.abase.ABase", Guice.createInjector(
- new org.eclipse.amp.amf.abase.ABaseUiModule(),
- createUIPluginModule()
- ));
-
- } catch (Exception e) {
- Logger.getLogger(getClass()).error(e.getMessage(), e);
- throw e;
- }
+
+ injectors.put("org.eclipse.amp.amf.abase.ABase", Guice.createInjector(
+ new org.eclipse.amp.amf.abase.ABaseUiModule(),
+ createUIPluginModule()
+ ));
+
}
public static ABaseActivator getInstance() {