This is a replacement for IPartListener.
IPartListener
This interface may be implemented by clients.
186187188189190191192193194195196
public void perspectiveDeactivated( IWorkbenchPage page, IPerspectiveDescriptor perspective ) { updateTitle( false ); } } ); configurer.getWindow().getPartService().addPartListener( new IPartListener2() { public void partActivated( IWorkbenchPartReference ref ) { if ( ref instanceof IEditorReference ) {
226227228229230231232233234235236
public void perspectiveDeactivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { updateTitle(); } }); configurer.getWindow().getPartService().addPartListener( new IPartListener2() { public void partActivated(IWorkbenchPartReference ref) { if (ref instanceof IEditorReference) { updateTitle(); } }
149150151152153154155156157158159
* * @author Andreas Br�ker * @author Markus Kr�ger */ public void createPartControl(Composite parent) { EditorUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(new IPartListener2(){ public void partActivated(IWorkbenchPartReference partRef) { } public void partBroughtToTop(IWorkbenchPartReference partRef) { } public void partClosed(IWorkbenchPartReference partRef) {
596597598599600601602603604605606
}); buildActions(); fillToolBar(); partListener = new IPartListener2() { public void partActivated(IWorkbenchPartReference partRef) { } public void partBroughtToTop(IWorkbenchPartReference partRef) { } public void partClosed(IWorkbenchPartReference partRef) {
5455565758596061626364
partListener = createPartListener(); getSite().getPage().addPartListener(partListener); } private IPartListener2 createPartListener() { return new IPartListener2() { @Override public void partVisible(IWorkbenchPartReference partRef) { if(ID.equals(partRef.getId())) { isVisible = true; setNotifyOff();
90919293949596979899100
partListener = createPartListener(); getSite().getPage().addPartListener(partListener); } private IPartListener2 createPartListener() { return new IPartListener2() { @Override public void partVisible(IWorkbenchPartReference partRef) { if(ID.equals(partRef.getId())) { isViewVisible = true; stopNotifier();
125126127128129130131132133134135
createPartListener(workbenchPages[idx]); } } private void createPartListener(IWorkbenchPage page) { IPartListener2 listener = new IPartListener2() { @Override public void partActivated(IWorkbenchPartReference partRef) { } @Override
656657658659660661662663664665666
/** * Initializes the PartListener. */ private void initPartListener() { view.getSite().getPage().addPartListener( new IPartListener2() { /** * This implementation deactivates the shortcuts when the part is deactivated. */ public void partDeactivated( IWorkbenchPartReference partRef )
354355356357358359360361362363364
updateActionsStates(); } } ); // Initializing the PartListener getSite().getPage().addPartListener( new IPartListener2() { /** * This implementation deactivates the shortcuts when the part is deactivated. */ public void partDeactivated( IWorkbenchPartReference partRef )
610611612613614615616617618619620