org.eclipse.ui.texteditor.IEditorStatusLine Java Examples
The following examples show how to use
org.eclipse.ui.texteditor.IEditorStatusLine.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EditorAPI.java From saros with GNU General Public License v2.0 | 6 votes |
@Override public void verifyKey(VerifyEvent event) { if (event.character > 0) { event.doit = false; Object adapter = getActiveEditor().getAdapter(IEditorStatusLine.class); if (adapter != null) { SarosView.showNotification( "Read-Only Notification", "You have only read access and therefore can't perform modifications."); Display display = SWTUtils.getDisplay(); if (!display.isDisposed()) display.beep(); } } }
Example #2
Source File: NLSKeyHyperlink.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Shows the given message as error on the status line. * * @param editor the editor part * @param message message to be displayed */ private static void showErrorInStatusLine(IEditorPart editor, final String message) { final Display display= editor.getSite().getShell().getDisplay(); display.beep(); final IEditorStatusLine statusLine= (IEditorStatusLine)editor.getAdapter(IEditorStatusLine.class); if (statusLine != null) { display.asyncExec(new Runnable() { /* * @see java.lang.Runnable#run() */ public void run() { statusLine.setMessage(true, message, null); } }); } }
Example #3
Source File: ToggleBreakpointAdapter.java From typescript.java with MIT License | 5 votes |
void reportToStatusLine(final IWorkbenchPart part, final String message) { getStandardDisplay().asyncExec(new Runnable() { public void run() { IEditorStatusLine statusLine = (IEditorStatusLine) part.getAdapter(IEditorStatusLine.class); if (statusLine != null) { if (message != null) { statusLine.setMessage(true, message, null); } else { statusLine.setMessage(true, null, null); } } } }); }
Example #4
Source File: EditorAPI.java From saros with GNU General Public License v2.0 | 5 votes |
public static void updateStatusLine(IEditorPart editorPart, String status) { Object adapter = editorPart.getAdapter(IEditorStatusLine.class); if (adapter == null) return; IEditorStatusLine statusLine = (IEditorStatusLine) adapter; statusLine.setMessage(false, status, null); }
Example #5
Source File: PyEditProjection.java From Pydev with Eclipse Public License 1.0 | 5 votes |
/** * Sets the given message as error message to this editor's status line. * * @param msg message to be set */ @Override public void setStatusLineErrorMessage(String msg) { IEditorStatusLine statusLine = (IEditorStatusLine) getAdapter(IEditorStatusLine.class); if (statusLine != null) { statusLine.setMessage(true, msg, null); } }
Example #6
Source File: PyEdit.java From Pydev with Eclipse Public License 1.0 | 5 votes |
public void updateForceTabsMessage() { boolean forceTabs = getIndentPrefs().getForceTabs(); IImageCache imageCache = SharedUiPlugin.getImageCache(); IImageDescriptor desc; if (forceTabs) { desc = imageCache.getDescriptor(UIConstants.FORCE_TABS_ACTIVE); } else { desc = imageCache.getDescriptor(UIConstants.FORCE_TABS_INACTIVE); } IEditorStatusLine statusLine = (IEditorStatusLine) getAdapter(IEditorStatusLine.class); if (statusLine != null) { statusLine.setMessage(false, forceTabs ? "Forcing tabs" : "Not forcing tabs.", ImageCache.asImageDescriptor(desc).createImage()); } }
Example #7
Source File: PyMoveLineAction.java From Pydev with Eclipse Public License 1.0 | 5 votes |
/** * Displays information in the status line why a line move is not possible */ private void showStatus() { ITextEditor textEditor = getTextEditor(); IEditorStatusLine status = textEditor.getAdapter(IEditorStatusLine.class); if (status == null) { return; } status.setMessage(false, "Move not possible - Uncheck \"Show Source of Selected Element Only\" to see the entire document", null); }
Example #8
Source File: JavaMoveLinesAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Displays information in the status line why a line move is not possible */ private void showStatus() { IEditorStatusLine status= (IEditorStatusLine) fSharedState.fEditor.getAdapter(IEditorStatusLine.class); if (status == null) return; status.setMessage(false, JavaEditorMessages.Editor_MoveLines_IllegalMove_status, null); }
Example #9
Source File: PropertyKeyHyperlinkDetector.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void showErrorInStatusLine(final String message, ITextEditor textEditor) { Display display= textEditor.getEditorSite().getShell().getDisplay(); display.beep(); final IEditorStatusLine statusLine= (IEditorStatusLine)textEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) { display.asyncExec(new Runnable() { /* * @see java.lang.Runnable#run() */ public void run() { statusLine.setMessage(true, message, null); } }); } }
Example #10
Source File: PropertyKeyHyperlink.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void showErrorInStatusLine(final String message) { fShell.getDisplay().beep(); final IEditorStatusLine statusLine= (IEditorStatusLine)fEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) { fShell.getDisplay().asyncExec(new Runnable() { /* * @see java.lang.Runnable#run() */ public void run() { statusLine.setMessage(true, message, null); } }); } }
Example #11
Source File: OpenAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Sets the error message in the status line. * * @since 3.7 */ private void setStatusLineMessage() { IEditorStatusLine statusLine= (IEditorStatusLine) fEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, ActionMessages.OpenAction_error_messageBadSelection, null); getShell().getDisplay().beep(); return; }
Example #12
Source File: LapseView.java From lapse-plus with GNU General Public License v3.0 | 5 votes |
private void setStatusBarMessage(String message, boolean isError) { IEditorStatusLine statusLine= (IEditorStatusLine) fEditor.getAdapter(IEditorStatusLine.class); if (statusLine != null) { statusLine.setMessage(false, message, JavaPluginImages.get(JavaPluginImages.IMG_MISC_PRIVATE)); }else { logError("No status line!"); } if(isError) { beep(); } }
Example #13
Source File: FindBreakContinueTargetOccurrencesAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private static void showMessage(Shell shell, JavaEditor editor, String msg) { IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, msg, null); shell.getDisplay().beep(); }
Example #14
Source File: FindMethodExitOccurrencesAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private static void showMessage(Shell shell, JavaEditor editor, String msg) { IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, msg, null); shell.getDisplay().beep(); }
Example #15
Source File: FindOccurrencesInFileAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private static void showMessage(Shell shell, JavaEditor editor, String msg) { IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, msg, null); shell.getDisplay().beep(); }
Example #16
Source File: FindExceptionOccurrencesAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private static void showMessage(Shell shell, JavaEditor editor, String msg) { IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, msg, null); shell.getDisplay().beep(); }
Example #17
Source File: FindImplementOccurrencesAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private static void showMessage(Shell shell, JavaEditor editor, String msg) { IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class); if (statusLine != null) statusLine.setMessage(true, msg, null); shell.getDisplay().beep(); }
Example #18
Source File: PyEdit.java From Pydev with Eclipse Public License 1.0 | 4 votes |
/** * Important: keep for scripting */ public void setMessage(boolean error, String message) { IEditorStatusLine statusLine = (IEditorStatusLine) this.getAdapter(IEditorStatusLine.class); statusLine.setMessage(error, message, null); }
Example #19
Source File: CopiedFromFindReplaceDialog.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public CopiedFromFindReplaceDialog(IFindReplaceTarget target, IEditorStatusLine statusLineManager) { this.fTarget = target; this.fStatusLineManager = statusLineManager; }
Example #20
Source File: EditorUtils.java From goclipse with Eclipse Public License 1.0 | 4 votes |
public static void setStatusLineErrorMessage(ITextEditor editor, String message, Image image) { IEditorStatusLine statusLine= (IEditorStatusLine)editor.getAdapter(IEditorStatusLine.class); if(statusLine != null) { statusLine.setMessage(true, message, image); } }