本文整理了Java中org.eclipse.core.internal.runtime.AdapterManager.getDefault()
方法的一些代码示例,展示了AdapterManager.getDefault()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AdapterManager.getDefault()
方法的具体详情如下:
包路径:org.eclipse.core.internal.runtime.AdapterManager
类名称:AdapterManager
方法名:getDefault
暂无
代码示例来源:origin: org.eclipse.core/runtime
/**
* @see Platform#getAdapterManager()
*/
public IAdapterManager getAdapterManager() {
assertInitialized();
return AdapterManager.getDefault();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.registry
/**
* Constructs a new adapter manager.
*/
public AdapterManagerListener() {
theAdapterManager = AdapterManager.getDefault();
theAdapterManager.registerLazyFactoryProvider(this);
}
代码示例来源:origin: org.eclipse/core-runtime
/**
* @see Platform#getAdapterManager()
*/
public IAdapterManager getAdapterManager() {
assertInitialized();
return AdapterManager.getDefault();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.runtime
/**
* @see Platform#getAdapterManager()
*/
public IAdapterManager getAdapterManager() {
assertInitialized();
return AdapterManager.getDefault();
}
代码示例来源:origin: org.eclipse.equinox/registry
/**
* Constructs a new adapter manager.
*/
public AdapterManagerListener() {
theAdapterManager = AdapterManager.getDefault();
theAdapterManager.registerLazyFactoryProvider(this);
}
代码示例来源:origin: org.eclipse/equinox-registry
/**
* Constructs a new adapter manager.
*/
public AdapterManagerListener() {
theAdapterManager = AdapterManager.getDefault();
theAdapterManager.registerLazyFactoryProvider(this);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.registry
/**
* Constructs a new adapter manager.
*/
public AdapterManagerListener() {
theAdapterManager = AdapterManager.getDefault();
theAdapterManager.registerLazyFactoryProvider(this);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
private static Object queryAdapterManager(Object sourceObject, String adapterId, boolean allowActivation) {
Object result;
if (allowActivation) {
result = AdapterManager.getDefault().loadAdapter(sourceObject, adapterId);
} else {
result = AdapterManager.getDefault().getAdapter(sourceObject, adapterId);
}
return result;
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.core.runtime
/**
* @see Platform#getAdapterManager()
*/
public IAdapterManager getAdapterManager() {
assertInitialized();
return AdapterManager.getDefault();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
@Override
public <T> T getAdapter(Class<T> adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
@Override
public <T> T getAdapter(Class<T> adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: org.eclipse.equinox/common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common
public void start(BundleContext context) throws Exception {
RuntimeLog.setLogWriter(getPlatformWriter(context));
bundleContext = context;
singleton = this;
Dictionary urlProperties = new Hashtable();
urlProperties.put("protocol", "platform"); //$NON-NLS-1$ //$NON-NLS-2$
platformURLConverterService = context.registerService(URLConverter.class.getName(), new PlatformURLConverter(), urlProperties);
adapterManagerService = context.registerService(IAdapterManager.class.getName(), AdapterManager.getDefault(), null);
installPlatformURLSupport();
}
代码示例来源:origin: org.eclipse.equinox/common
public void start(BundleContext context) throws Exception {
bundleContext = context;
singleton = this;
RuntimeLog.setLogWriter(getPlatformWriter(context));
Dictionary urlProperties = new Hashtable();
urlProperties.put("protocol", "platform"); //$NON-NLS-1$ //$NON-NLS-2$
platformURLConverterService = context.registerService(URLConverter.class.getName(), new PlatformURLConverter(), urlProperties);
adapterManagerService = context.registerService(IAdapterManager.class.getName(), AdapterManager.getDefault(), null);
installPlatformURLSupport();
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common
@Override
public void start(BundleContext context) throws Exception {
bundleContext = context;
singleton = this;
RuntimeLog.setLogWriter(getPlatformWriter(context));
Dictionary<String, Object> urlProperties = new Hashtable<String, Object>();
urlProperties.put("protocol", "platform"); //$NON-NLS-1$ //$NON-NLS-2$
platformURLConverterService = context.registerService(URLConverter.class, new PlatformURLConverter(), urlProperties);
adapterManagerService = context.registerService(IAdapterManager.class, AdapterManager.getDefault(), null);
installPlatformURLSupport();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
@Override
public void start(BundleContext context) throws Exception {
bundleContext = context;
singleton = this;
RuntimeLog.setLogWriter(getPlatformWriter(context));
Dictionary<String, Object> urlProperties = new Hashtable<>();
urlProperties.put("protocol", "platform"); //$NON-NLS-1$ //$NON-NLS-2$
platformURLConverterService = context.registerService(URLConverter.class, new PlatformURLConverter(), urlProperties);
adapterManagerService = context.registerService(IAdapterManager.class, AdapterManager.getDefault(), null);
installPlatformURLSupport();
Hashtable<String, String> properties = new Hashtable<>(2);
properties.put(DebugOptions.LISTENER_SYMBOLICNAME, PLUGIN_ID);
debugRegistration = context.registerService(DebugOptionsListener.class, TracingOptions.DEBUG_OPTIONS_LISTENER, properties);
}
内容来源于网络,如有侵权,请联系作者删除!