当前位置: 首页>>代码示例>>Java>>正文


Java IExecutableExtension类代码示例

本文整理汇总了Java中org.eclipse.core.runtime.IExecutableExtension的典型用法代码示例。如果您正苦于以下问题:Java IExecutableExtension类的具体用法?Java IExecutableExtension怎么用?Java IExecutableExtension使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IExecutableExtension类属于org.eclipse.core.runtime包,在下文中一共展示了IExecutableExtension类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createExecutableExtension

import org.eclipse.core.runtime.IExecutableExtension; //导入依赖的package包/类
public Object createExecutableExtension( String propertyName )
		throws CoreException
{
	String value = attributes.get( propertyName );
	if ( value != null )
	{
		try
		{
			Class<?> clazz = Class.forName( value );
			Object inst = clazz.newInstance( );

			if( inst instanceof IExecutableExtension )
			{
			    ((IExecutableExtension)inst).setInitializationData( 
			            this, propertyName, null ); // TODO support adapter data
			}
			return inst;
		}
		catch ( Exception e )
		{
			throw new CoreException( new Status( IStatus.ERROR,
					"org.eclipse.birt.core", 0, e.getMessage( ), e ) ); //$NON-NLS-1$
		}
	}
	return null;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:27,代码来源:ConfigurationElement.java

示例2: create

import org.eclipse.core.runtime.IExecutableExtension; //导入依赖的package包/类
public Object create() throws CoreException {
	try {
		final Class<?> clazz = getBundle().loadClass(clazzName);
		final Injector injector = getInjector();
		final Object result = injector.getInstance(clazz);
		if (result instanceof IExecutableExtension)
               ((IExecutableExtension)result).setInitializationData(config, null, null);
           return result;
       } catch (Throwable e) {
           try {
               Thread.currentThread().getContextClassLoader().loadClass(clazzName);
           } catch (ClassNotFoundException e1) {
               e1.printStackTrace();
           }
           throw new CoreException(new Status(IStatus.ERROR, getBundle().getSymbolicName(), e.getMessage(), e));
       }
}
 
开发者ID:markus1978,项目名称:clickwatch,代码行数:18,代码来源:GuiceAwareExecutableExtensionFactory.java

示例3: create

import org.eclipse.core.runtime.IExecutableExtension; //导入依赖的package包/类
@Override
public final Object create() throws CoreException {
	try {
		final Class<?> clazz = getClassLoader().loadClass(clazzName);
		final Injector injector = getInjector();
		final Object result = injector.getInstance(clazz);
		if (result instanceof IExecutableExtension) {
			((IExecutableExtension) result).setInitializationData(config, null, null);
		}
		return result;
	} catch (final Exception e) {
		throw new CoreException(new Status(ERROR, getBunleId(),
				nullToEmpty(e.getMessage()) + " ExtensionFactory: " + getClass().getName(), e));
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:N4ExecutableExtensionFactory.java

示例4: create

import org.eclipse.core.runtime.IExecutableExtension; //导入依赖的package包/类
public Object create() throws CoreException {
	try {
		final Class<?> clazz = getBundle().loadClass(clazzName);
		final Injector injector = getInjector();
		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(IStatus.ERROR, getBundle().getSymbolicName(), e.getMessage() + " ExtensionFactory: "+ getClass().getName(), e));
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:AbstractGuiceAwareExecutableExtensionFactory.java

示例5: create

import org.eclipse.core.runtime.IExecutableExtension; //导入依赖的package包/类
public Object create() throws CoreException {
	try {
		final Class<?> clazz = getBundle().loadClass(clazzName);
		final Injector injector = getInjector();
		final Object result = injector.getInstance(clazz);
		if (result instanceof IExecutableExtension)
			((IExecutableExtension) result).setInitializationData(config, null, null);
		return result;
	}
	catch (Exception e) {
		Activator.logErrorMessage(e.getMessage(), e);
		throw new CoreException(new Status(IStatus.ERROR, getBundle().getSymbolicName(), e.getMessage() + " ExtensionFactory: "+ getClass().getName(), e));
	}
}
 
开发者ID:diverse-project,项目名称:k3,代码行数:15,代码来源:K3XtendExecutableExtensionFactory.java


注:本文中的org.eclipse.core.runtime.IExecutableExtension类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。