Package com._1c.g5.wiring
Class AbstractGuiceAwareExecutableExtensionFactory
- java.lang.Object
-
- com._1c.g5.wiring.AbstractGuiceAwareExecutableExtensionFactory
-
- All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.core.runtime.IExecutableExtensionFactory
public abstract class AbstractGuiceAwareExecutableExtensionFactory extends Object implements org.eclipse.core.runtime.IExecutableExtensionFactory, org.eclipse.core.runtime.IExecutableExtension
Abstract guice module aware executable extension factory which allows to provide injected instances in Extension Points.Example of usage in
plugin.xml
inside Extension description class attribute:class="com._1c.g5.v8.dt.ExamleExecutableExtensionFactory:com._1c.g5.v8.dt.ExamleExtensionParticipant"
Also, factory allows to provide Guice
named
elements as parameters:<class class="com._1c.g5.v8.dt.ExamleExecutableExtensionFactory"> <parameter name="className" value="com._1c.g5.v8.dt.IExamleInterface"/> <parameter name="named" value="ExampleNamed"/> </class>
- See Also:
Injector
,IExecutableExtensionFactory
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAMETER_CLASS_NAME
static String
PARAMETER_NAMED
-
Constructor Summary
Constructors Constructor Description AbstractGuiceAwareExecutableExtensionFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object
create()
protected abstract org.osgi.framework.Bundle
getBundle()
Returns the bundle to crete extension factory for.protected abstract com.google.inject.Injector
getInjector()
Returns the Guice Injector to use to initalize creating classes.void
setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, String propertyName, Object data)
-
-
-
Field Detail
-
PARAMETER_CLASS_NAME
public static final String PARAMETER_CLASS_NAME
- See Also:
- Constant Field Values
-
PARAMETER_NAMED
public static final String PARAMETER_NAMED
- See Also:
- Constant Field Values
-
-
Method Detail
-
setInitializationData
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, String propertyName, Object data) throws org.eclipse.core.runtime.CoreException
- Specified by:
setInitializationData
in interfaceorg.eclipse.core.runtime.IExecutableExtension
- Throws:
org.eclipse.core.runtime.CoreException
-
create
public Object create() throws org.eclipse.core.runtime.CoreException
- Specified by:
create
in interfaceorg.eclipse.core.runtime.IExecutableExtensionFactory
- Throws:
org.eclipse.core.runtime.CoreException
-
getBundle
protected abstract org.osgi.framework.Bundle getBundle()
Returns the bundle to crete extension factory for. Typically, impementation returns parent plug-in instance bundle.- Returns:
- the bundle to crete extension factory for, cannot be
null
-
getInjector
protected abstract com.google.inject.Injector getInjector()
Returns the Guice Injector to use to initalize creating classes.- Returns:
- the Guice Injector to use to initalize creating classes, cannot be
null
- See Also:
Injector
-
-