IPerspectiveListener
This interface may be implemented by clients.
377378379380381382383384385386387
} } } }); PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(new IPerspectiveListener3() { @Override public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { if (_perspectiveStatusLine != null) { _perspectiveStatusLine.setText(perspective.getLabel()); }
105106107108109110111112113114115116117118
public void firePerspectiveDeactivated(final IWorkbenchPage page, final IPerspectiveDescriptor perspective) { Object[] array = getListeners(); for (int nX = 0; nX < array.length; nX++) { if (array[nX] instanceof IPerspectiveListener3) { final IPerspectiveListener3 l3 = (IPerspectiveListener3) array[nX]; fireEvent(new SafeRunnable() { public void run() { l3.perspectiveDeactivated(page, perspective); } }, l3, perspective, "deactivated::"); //$NON-NLS-1$ } } }
164165166167168169170171172173174175176177
public void firePerspectiveClosed(final IWorkbenchPage page, final IPerspectiveDescriptor perspective) { Object[] array = getListeners(); for (int nX = 0; nX < array.length; nX++) { if (array[nX] instanceof IPerspectiveListener3) { final IPerspectiveListener3 l3 = (IPerspectiveListener3) array[nX]; fireEvent(new SafeRunnable() { public void run() { l3.perspectiveClosed(page, perspective); } }, l3, perspective, "closed::"); //$NON-NLS-1$ } } }
184185186187188189190191192193194195196197
public void firePerspectiveOpened(final IWorkbenchPage page, final IPerspectiveDescriptor perspective) { Object[] array = getListeners(); for (int nX = 0; nX < array.length; nX++) { if (array[nX] instanceof IPerspectiveListener3) { final IPerspectiveListener3 l3 = (IPerspectiveListener3) array[nX]; fireEvent(new SafeRunnable() { public void run() { l3.perspectiveOpened(page, perspective); } }, l3, perspective, "opened::"); //$NON-NLS-1$ } } }
205206207208209210211212213214215216217218
final IPerspectiveDescriptor oldPerspective, final IPerspectiveDescriptor newPerspective) { Object[] array = getListeners(); for (int nX = 0; nX < array.length; nX++) { if (array[nX] instanceof IPerspectiveListener3) { final IPerspectiveListener3 l3 = (IPerspectiveListener3) array[nX]; fireEvent(new SafeRunnable() { public void run() { l3.perspectiveSavedAs(page, oldPerspective, newPerspective); } }, l3, newPerspective, "saveAs::"); //$NON-NLS-1$ } } }