@Override public IWorkbenchPart getActivePart() { return parent.getActivePart(); }
private IWorkbenchPart getActivePart() { IWorkbenchWindow window= getSite().getWorkbenchWindow(); IPartService service= window.getPartService(); IWorkbenchPart part= service.getActivePart(); return part; }
private IWorkbenchPart getActivePart() { IWorkbenchWindow window= getSite().getWorkbenchWindow(); IPartService service= window.getPartService(); IWorkbenchPart part= service.getActivePart(); return part; }
private IWorkbenchPart getActivePart() { IWorkbenchWindow window = getSite().getWorkbenchWindow(); IPartService service = window.getPartService(); return service.getActivePart(); }
@Override public void init(IWorkbenchWindow window) { this.fWindow = window; IPartService partService = window.getPartService(); partService.addPartListener(this); IWorkbenchPart part = partService.getActivePart(); if (part != null) { partActivated(part); } } /* (non-Javadoc)
private IWorkbenchPart getActivePart() { IWorkbenchWindow window= getSite().getWorkbenchWindow(); IPartService service= window.getPartService(); IWorkbenchPart part= service.getActivePart(); return part; }
private RetargetAction createSubmenuAction(IPartService partService, String actionID, String text, String actionDefinitionId) { RetargetAction action= new RetargetAction(actionID, text); action.setActionDefinitionId(actionDefinitionId); partService.addPartListener(action); IWorkbenchPart activePart = partService.getActivePart(); if (activePart != null) { action.partActivated(activePart); } return action; }
public void update() { if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= (IFindReplaceTarget) fWorkbenchPart.getAdapter(IFindReplaceTarget.class); else fTarget= null; setEnabled(fTarget != null && fTarget.canPerformFind()); }
public void update() { if(fShell == null){ if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= (IFindReplaceTarget) fWorkbenchPart.getAdapter(IFindReplaceTarget.class); else fTarget= null; } setEnabled(fTarget != null && fTarget.canPerformFind()); } }
@Override public void update() { if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= fWorkbenchPart.getAdapter(IFindReplaceTarget.class); else fTarget= null; setEnabled(fTarget != null && fTarget.canPerformFind()); }
private RetargetAction createSubmenuAction(IPartService partService, String actionID, String text, String actionDefinitionId) { RetargetAction action= new RetargetAction(actionID, text); action.setActionDefinitionId(actionDefinitionId); partService.addPartListener(action); IWorkbenchPart activePart = partService.getActivePart(); if (activePart != null) { action.partActivated(activePart); } return action; }
public void update() { if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= (IFindReplaceTarget) fWorkbenchPart.getAdapter(IncrementalFindTarget.class); else fTarget= null; setEnabled(fTarget != null && fTarget.canPerformFind()); }
@Override public void update() { if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= fWorkbenchPart.getAdapter(IFindReplaceTarget.class); else fTarget= null; setEnabled(fTarget != null && fTarget.canPerformFind()); }
@Override public void update() { if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= fWorkbenchPart.getAdapter(IncrementalFindTarget.class); else fTarget= null; setEnabled(fTarget != null && fTarget.canPerformFind()); }
@Override public void update() { if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= fWorkbenchPart.getAdapter(IncrementalFindTarget.class); else fTarget= null; setEnabled(fTarget != null && fTarget.canPerformFind()); }
private RetargetAction createSubmenuAction(IPartService partService, String actionID, String text, String actionDefinitionId) { RetargetAction action= new RetargetAction(actionID, text); action.setActionDefinitionId(actionDefinitionId); partService.addPartListener(action); IWorkbenchPart activePart = partService.getActivePart(); if (activePart != null) { action.partActivated(activePart); } return action; }
@Override public void update() { if(fShell == null){ if (fWorkbenchPart == null && fWorkbenchWindow != null) fWorkbenchPart= fWorkbenchWindow.getPartService().getActivePart(); if (fWorkbenchPart != null) fTarget= fWorkbenchPart.getAdapter(IFindReplaceTarget.class); else fTarget= null; } setEnabled(fTarget != null && fTarget.canPerformFind()); } }
/** * Creates a new find/replace dialog accessor anchored at the given part site. * * @param site the part site */ public FindReplaceDialogStub(IWorkbenchPartSite site) { this(site.getShell()); fWindow= site.getWorkbenchWindow(); IPartService service= fWindow.getPartService(); service.addPartListener(this); partActivated(service.getActivePart()); }
/** * Creates a new find/replace dialog accessor anchored at the given part site. * * @param site the part site */ public FindReplaceDialogStub(IWorkbenchPartSite site) { this(site.getShell()); fWindow= site.getWorkbenchWindow(); IPartService service= fWindow.getPartService(); service.addPartListener(this); partActivated(service.getActivePart()); }
/** * Creates a new find/replace dialog accessor anchored at the given part site. * * @param site the part site */ public FindReplaceDialogStub(IWorkbenchPartSite site) { this(site.getShell()); fWindow= site.getWorkbenchWindow(); IPartService service= fWindow.getPartService(); service.addPartListener(this); partActivated(service.getActivePart()); }