Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IAdapterManager


  @Override
  public void stop(BundleContext context) throws Exception {
    BrowserFactory.getRootLogger().removeHandler(SDK_LOG_HANDLER);
    plugin = null;
    IAdapterManager manager = Platform.getAdapterManager();
    manager.unregisterAdapters(breakpointWorkbenchAdapterFactory);
    super.stop(context);
  }
View Full Code Here


     * Get clusters contained in the selection.
     */
    static BitSet getClustersFromSelection(IStructuredSelection selection)
    {
        final IStructuredSelection ss = (IStructuredSelection) selection;
        final IAdapterManager mgr = Platform.getAdapterManager();

        final BitSet newSelection = new BitSet();
        for (Object selected : ss.toArray())
        {
            final Cluster c = (Cluster) mgr.getAdapter(selected, Cluster.class);            
            if (c == null) continue;
            newSelection.set(c.getId());
        }
       
        return newSelection;
View Full Code Here

   * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
   */
  public Object getAdapter(Class adapter) {
    if (adapter == null)
      return null;
    IAdapterManager manager = Activator.getDefault().getAdapterManager();
    if (manager == null)
      return null;
    return manager.loadAdapter(this, adapter.getName());
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
   */
  public Object getAdapter(Class adapter) {
    if (adapter == null) return null;
    IAdapterManager manager = Activator.getDefault().getAdapterManager();
    if (manager == null) return null;
    return manager.loadAdapter(this, adapter.getName());
  }
View Full Code Here

   */
  public Object getAdapter(Class adapter) {
    if (adapter.isInstance(this)) {
      return this;
    }
    final IAdapterManager adapterManager = DiscoveryPlugin.getDefault()
        .getAdapterManager();
    if (adapterManager == null)
      return null;
    return adapterManager.loadAdapter(this, adapter.getName());
  }
View Full Code Here

    // First, try to get the adapter manager via
    if (adapterManagerTracker == null) {
      adapterManagerTracker = new ServiceTracker(this.context, IAdapterManager.class.getName(), null);
      adapterManagerTracker.open();
    }
    IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker.getService();
    // Then, if the service isn't there, try to get from Platform class via
    // PlatformHelper class
    if (adapterManager == null)
      adapterManager = PlatformHelper.getPlatformAdapterManager();
    if (adapterManager == null)
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
   */
  public Object getAdapter(Class clazz) {
    IAdapterManager adapterManager = Activator.getDefault()
        .getAdapterManager();
    if (adapterManager == null)
      return null;
    return adapterManager.loadAdapter(this, clazz.getName());
  }
View Full Code Here

      return this;
    }
    ECFPlugin plugin = ECFPlugin.getDefault();
    if (plugin == null)
      return null;
    IAdapterManager adapterManager = plugin.getAdapterManager();
    return (adapterManager == null) ? null : adapterManager.loadAdapter(this, serviceType.getName());
  }
View Full Code Here

  public Object getAdapter(Class adapter) {
    if (adapter.isInstance(this)) {
      return this;
    }
    IAdapterManager adapterManager = PresencePlugin.getDefault().getAdapterManager();
    if (adapterManager == null)
      return null;
    return adapterManager.loadAdapter(this, adapter.getName());
  }
View Full Code Here

  public Object getAdapter(Class adapter) {
    if (adapter.isInstance(this)) {
      return this;
    }
    IAdapterManager adapterManager = ECFPlugin.getDefault().getAdapterManager();
    if (adapterManager == null)
      return null;
    return adapterManager.loadAdapter(this, adapter.getName());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IAdapterManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.