Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Does your view uses a <a href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IPartListener2.html" rel="nofollow noreferrer"><code>org.eclipse.ui.IPartListener2</code></a> ?</p> <p>That is what is using this <a href="http://www.koders.com/java/fidC16A4CE2FC6A7F818AD035376967CA06F87DBA4F.aspx?s=EditorListener+IPartListener2#L27" rel="nofollow noreferrer">EditorListener</a>, whose job is to react, for a given view, to Editor events (including open and close)</p> <pre class="lang-java prettyprint-override"><code>public class EditorListener implements ISelectionListener, IFileBufferListener, IPartListener2 { protected BytecodeOutlineView view; EditorListener(BytecodeOutlineView view){ this.view = view; } [...] /** * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference) */ public void partOpened(IWorkbenchPartReference partRef) { view.handlePartVisible(partRef.getPart(false)); } </code></pre> <hr> <p>Now if your <code>ViewPart</code> directly implements an <code>IPartListener2</code>, it can register itself to the various <code>Editors</code>, like this <a href="http://www.koders.com/java/fid44B9CA94742C6FE34142932F9531FB5E438F338E.aspx?s=EditorListener+IPartListener2" rel="nofollow noreferrer"><code>BytecodeReferenceView</code></a> </p> <pre class="lang-java prettyprint-override"><code>public class BytecodeReferenceView extends ViewPart implements IPartListener2, ISelectionListener { [...] public void createPartControl(Composite parent) { browser = new Browser(parent, SWT.BORDER); browser.setText(BytecodeOutlinePlugin.getResourceString(NLS_PREFIX + "empty.selection.text")); final IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow(); workbenchWindow.getPartService().addPartListener(this); [...] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload