public RefreshEditorAction(ITextEditor textEditor) { super(textEditor.getSite()); fTextEditor= textEditor; update(); }
private IWorkbenchPartSite getSite() { ITextEditor textEditor = super.getAdapter(ITextEditor.class); return textEditor.getSite(); }
private Shell getShell() { ITextEditor editor= getTextEditor(); if (editor != null) { IWorkbenchPartSite site= editor.getSite(); Shell shell= site.getShell(); if (shell != null && !shell.isDisposed()) { return shell; } } return null; }
private Shell getShell() { ITextEditor editor= getTextEditor(); if (editor != null) { IWorkbenchPartSite site= editor.getSite(); Shell shell= site.getShell(); if (shell != null && !shell.isDisposed()) { return shell; } } return null; }
private Shell getShell() { ITextEditor editor= getTextEditor(); if (editor != null) { IWorkbenchPartSite site= editor.getSite(); Shell shell= site.getShell(); if (shell != null && !shell.isDisposed()) { return shell; } } return null; }
@Override protected IJavaStackFrame getStackFrame(ITextViewer viewer, ITextEditor textEditor) { IAdaptable adaptable = DebugUITools.getPartDebugContext(textEditor.getSite()); if (adaptable != null) { return adaptable.getAdapter(IJavaStackFrame.class); } return null; }
/** * Notifies the user that there are no suggestions. */ private void notifyUser() { // TODO notify via status line? getTextEditor().getSite().getShell().getDisplay().beep(); }
/** * Notifies the user that there are no suggestions. */ private void notifyUser() { // TODO notify via status line? getTextEditor().getSite().getShell().getDisplay().beep(); }
/** * Notifies the user that there are no suggestions. */ private void notifyUser() { // TODO notify via status line? getTextEditor().getSite().getShell().getDisplay().beep(); }
@Override public void run() { if (fBreakpoint != null) { try { fBreakpoint.setEnabled(!fBreakpoint.isEnabled()); } catch (CoreException e) { DebugUIPlugin.errorDialog(getEditor().getSite().getShell(), ActionMessages.RulerEnableDisableBreakpointAction_0, ActionMessages.RulerEnableDisableBreakpointAction_1, e.getStatus()); } } }
@Override public void run() { getTextEditor().getSite().getPage().saveEditor(getTextEditor(), false); }
@Override public void run() { getTextEditor().getSite().getPage().saveEditor(getTextEditor(), false); }
public void run() { final IResource resource= fTextEditor == null ? null : (IResource)fTextEditor.getEditorInput().getAdapter(IResource.class); if (resource == null) return; RefreshAction impl= new RefreshAction(fTextEditor.getSite().getShell()) { protected List getSelectedResources() { List result= new ArrayList(1); result.add(resource); return result; } }; impl.run(); }
public void run() { IMarker marker= chooseMarker(getMarkers()); if (marker == null) return; IWorkbenchPage page= fTextEditor.getSite().getPage(); MarkerViewUtil.showMarker(page, marker, false); gotoMarker(marker); }
@Override public void run() { IMarker marker= chooseMarker(getMarkers()); if (marker == null) return; IWorkbenchPage page= fTextEditor.getSite().getPage(); MarkerViewUtil.showMarker(page, marker, false); gotoMarker(marker); }
protected void addMarker() { IResource resource= getResource(); if (resource == null) return; TaskPropertiesDialog dialog = new TaskPropertiesDialog(getTextEditor().getSite().getShell()); dialog.setResource(resource); dialog.setInitialAttributes(getInitialAttributes()); dialog.open(); } }
@Override protected void addMarker() { IResource resource= getResource(); if (resource == null) return; TaskPropertiesDialog dialog = new TaskPropertiesDialog(getTextEditor().getSite().getShell()); dialog.setResource(resource); dialog.setInitialAttributes(getInitialAttributes()); dialog.open(); } }
private void updateImages(String commandId) { ICommandImageService imgService= getTextEditor().getSite().getService(ICommandImageService.class); if (imgService == null) { return; } setImageDescriptor(imgService.getImageDescriptor(commandId)); setDisabledImageDescriptor(imgService.getImageDescriptor(commandId, ICommandImageService.TYPE_DISABLED)); setHoverImageDescriptor(imgService.getImageDescriptor(commandId, ICommandImageService.TYPE_HOVER)); }
public void run() { IResource resource= getResource(); if (resource == null) return; Map attributes= getInitialAttributes(); TaskPropertiesDialog dialog= new TaskPropertiesDialog(getTextEditor().getSite().getShell()); dialog.setResource(resource); dialog.setInitialAttributes(attributes); dialog.open(); } }
@Override public void run() { IResource resource= getResource(); if (resource == null) return; Map<String, Object> attributes= getInitialAttributes(); TaskPropertiesDialog dialog= new TaskPropertiesDialog(getTextEditor().getSite().getShell()); dialog.setResource(resource); dialog.setInitialAttributes(attributes); dialog.open(); } }