public Shell getShell() { return fOpenAction.getShell(); }
@Override public Shell getShell() { return fOpenAction.getShell(); }
@Override public Shell getShell() { return fOpenAction.getShell(); }
/** * Sets the error message in the status line. * * @since 3.7 */ private void setStatusLineMessage() { IEditorStatusLine statusLine= fEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, ActionMessages.OpenAction_error_messageBadSelection, null); getShell().getDisplay().beep(); return; }
/** * Sets the error message in the status line. * * @since 3.7 */ private void setStatusLineMessage() { IEditorStatusLine statusLine= fEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, ActionMessages.OpenAction_error_messageBadSelection, null); getShell().getDisplay().beep(); return; }
public void run(ITextSelection selection) { if (!isProcessable()) return; try { IJavaElement[] elements= SelectionConverter.codeResolveForked(fEditor, false); if (elements == null || elements.length == 0) { IEditorStatusLine statusLine= (IEditorStatusLine) fEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, ActionMessages.OpenAction_error_messageBadSelection, null); getShell().getDisplay().beep(); return; } IJavaElement element= elements[0]; if (elements.length > 1) { element= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.OpenAction_select_element); if (element == null) return; } int type= element.getElementType(); if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.PACKAGE_FRAGMENT) element= EditorUtility.getEditorInputJavaElement(fEditor, false); run(new Object[] {element} ); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message); } catch (InterruptedException e) { // ignore } }
ErrorDialog.openError(getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message, children.length == 1 ? children[0] : status);
ErrorDialog.openError(getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message, children.length == 1 ? children[0] : status);
ErrorDialog.openError(getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message, children.length == 1 ? children[0] : status);
if (elements.length > 1) { if (needsUserSelection(elements, input)) { element= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.OpenAction_select_element); if (element == null) return; ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message); } catch (InterruptedException e) {