public void consolesRemoved(IConsole[] consoles) { Display display = ConsolePlugin.getStandardDisplay(); display.asyncExec(new Runnable() { public void run() { if (fMenu != null) { fMenu.dispose(); } update(); } }); } }
public void consolesAdded(IConsole[] consoles) { Display display = ConsolePlugin.getStandardDisplay(); display.asyncExec(new Runnable() { public void run() { update(); } }); }
public void setWaterMarks(int low, int high) { lowWaterMark = low; highWaterMark = high; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { public void run() { checkBufferSize(); } }); }
public void setWaterMarks(int low, int high) { lowWaterMark = low; highWaterMark = high; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { @Override public void run() { checkBufferSize(); } }); }
/** * makes the associated text widget uneditable. */ public void setReadOnly() { ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { public void run() { StyledText text = getTextWidget(); if (text != null && !text.isDisposed()) { text.setEditable(false); } } }); }
/** * makes the associated text widget uneditable. */ public void setReadOnly() { ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { @Override public void run() { StyledText text = getTextWidget(); if (text != null && !text.isDisposed()) { text.setEditable(false); } } }); }
/** * makes the associated text widget uneditable. */ public void setReadOnly() { ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { @Override public void run() { StyledText text = getTextWidget(); if (text != null && !text.isDisposed()) { text.setEditable(false); } } }); }
/** * Sets the console to have a fixed character width. Use -1 to indicate that * a fixed width should not be used. * * @param width * fixed character width of the console, or -1 */ public void setConsoleWidth(int width) { if (consoleWidth != width) { consoleWidth = width; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { @Override public void run() { if (documentAdapter != null) { documentAdapter.setWidth(consoleWidth); } } }); } }
/** * Sets the tab width used in this console. * * @param newTabWidth the tab width */ public void setTabWidth(final int newTabWidth) { if (fTabWidth != newTabWidth) { final int oldTabWidth = fTabWidth; fTabWidth = newTabWidth; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { @Override public void run() { firePropertyChange(TextConsole.this, IConsoleConstants.P_TAB_SIZE, Integer.valueOf(oldTabWidth), Integer.valueOf(fTabWidth)); } }); } }
/** * Sets the console to have a fixed character width. Use -1 to indicate that * a fixed width should not be used. * * @param width * fixed character width of the console, or -1 */ public void setConsoleWidth(int width) { if (consoleWidth != width) { consoleWidth = width; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { public void run() { if (documentAdapter != null) { documentAdapter.setWidth(consoleWidth); } } }); } }
public void warnOfContentChange(final IConsole console) { if (!fWarnQueued) { fWarnQueued = true; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable(){ public void run() { IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (window != null) { IWorkbenchPage page= window.getActivePage(); if (page != null) { IConsoleView consoleView= (IConsoleView)page.findView(IConsoleConstants.ID_CONSOLE_VIEW); if (consoleView != null) { consoleView.warnOfContentChange(console); } } } fWarnQueued = false; } }); } }
/** * Returns the hand cursor. * * @return the hand cursor */ protected Cursor getHandCursor() { if (handCursor == null) { handCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_HAND); } return handCursor; }
/** * Sets the tab width used in this console. * * @param newTabWidth the tab width */ public void setTabWidth(final int newTabWidth) { if (fTabWidth != newTabWidth) { final int oldTabWidth = fTabWidth; fTabWidth = newTabWidth; ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() { public void run() { firePropertyChange(TextConsole.this, IConsoleConstants.P_TAB_SIZE, new Integer(oldTabWidth), new Integer(fTabWidth)); } }); } }
/** * Returns the text cursor. * * @return the text cursor */ protected Cursor getTextCursor() { if (textCursor == null) { textCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_IBEAM); } return textCursor; }
/** * Returns the text cursor. * * @return the text cursor */ protected Cursor getTextCursor() { if (textCursor == null) { textCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_IBEAM); } return textCursor; }
/** * Returns the hand cursor. * * @return the hand cursor */ protected Cursor getHandCursor() { if (handCursor == null) { handCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_HAND); } return handCursor; }
public void run() { BusyIndicator.showWhile(ConsolePlugin.getStandardDisplay(), new Runnable() { public void run() { fText.setText(""); //$NON-NLS-1$ } }); } }
public void run() { BusyIndicator.showWhile(ConsolePlugin.getStandardDisplay(), new Runnable() { public void run() { if (fIOConsole == null) { IDocument document = fViewer.getDocument(); if (document != null) { document.set(""); //$NON-NLS-1$ } fViewer.setSelectedRange(0, 0); } else { fIOConsole.clearConsole(); } } }); } }
@Override public void run() { BusyIndicator.showWhile(ConsolePlugin.getStandardDisplay(), new Runnable() { @Override public void run() { if (fIOConsole == null) { IDocument document = fViewer.getDocument(); if (document != null) { document.set(""); //$NON-NLS-1$ } fViewer.setSelectedRange(0, 0); } else { fIOConsole.clearConsole(); } } }); } }
@Override public void warnOfContentChange(final IConsole console) { if (!fWarnQueued) { fWarnQueued = true; Job job = new UIJob(ConsolePlugin.getStandardDisplay(), ConsoleMessages.ConsoleManager_consoleContentChangeJob) { @Override public IStatus runInUIThread(IProgressMonitor monitor) { IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (window != null) { IWorkbenchPage page= window.getActivePage(); if (page != null) { IConsoleView consoleView= (IConsoleView)page.findView(IConsoleConstants.ID_CONSOLE_VIEW); if (consoleView != null) { consoleView.warnOfContentChange(console); } } } fWarnQueued = false; return Status.OK_STATUS; } }; job.setSystem(true); job.schedule(); } }