congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EditorPart.getAdapter
Code IndexAdd Tabnine to your IDE (free)

How to use
getAdapter
method
in
org.eclipse.ui.part.EditorPart

Best Java code snippets using org.eclipse.ui.part.EditorPart.getAdapter (Showing top 6 results out of 315)

origin: org.eclipse.platform/org.eclipse.ui.workbench

/**
 * If there is an adapter registered against the subclass of
 * MultiPageEditorPart return that. Otherwise, delegate to the internal
 * editor.
 *
 * @see org.eclipse.ui.part.WorkbenchPart#getAdapter(java.lang.Class)
 */
@Override
public <T> T getAdapter(Class<T> adapter) {
  T result = super.getAdapter(adapter);
  // restrict delegating to the UI thread for bug 144851
  if (result == null && Display.getCurrent()!=null) {
    IEditorPart innerEditor = getActiveEditor();
    // see bug 138823 - prevent some subclasses from causing
    // an infinite loop
    if (innerEditor != null && innerEditor != this) {
      result = Adapters.adapt(innerEditor, adapter);
    }
  }
  return result;
}
origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

  return (fSourceViewer == null ? null : (T) fSourceViewer);
return super.getAdapter(required);
origin: org.eclipse/org.eclipse.compare

public Object getAdapter(Class key) {
  
  if (key.equals(IContentOutlinePage.class)) {
    Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW);
    if (object instanceof Boolean && ((Boolean)object).booleanValue()) {
      if (fOutlinePage != null) {
        if (fOutlinePage.getControl() != null && fOutlinePage.getControl().isDisposed()) {
          fOutlinePage = null;
        } else {
          return fOutlinePage;
        }
      }
      fOutlinePage= new CompareOutlinePage(this);
      return fOutlinePage;
    }
  }
  
  if (key == IShowInSource.class
      || key == OutlineViewerCreator.class
      || key == IFindReplaceTarget.class) {
    Object input = getEditorInput();
    if (input != null) {
      return Utilities.getAdapter(input, key);
    }
  }
  
  return super.getAdapter(key);
}

origin: org.eclipse/org.eclipse.ui.workbench.texteditor

return super.getAdapter(required);
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

return super.getAdapter(required);
origin: org.eclipse.platform/org.eclipse.compare

return super.getAdapter(key);
org.eclipse.ui.partEditorPartgetAdapter

Popular methods of EditorPart

  • dispose
  • setInput
    Sets the input to this editor. This method simply updates the internal member variable.Unlike most o
  • firePropertyChange
  • getEditorInput
  • addPropertyListener
  • getPartName
  • getSite
  • getTitle
  • internalSetPartName
  • isDirty
  • removePropertyListener
  • setDefaultPartName
  • removePropertyListener,
  • setDefaultPartName,
  • setFocus,
  • setPartName,
  • setTitle

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Notification (javax.management)
  • Runner (org.openjdk.jmh.runner)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now