congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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