@Override protected void dispose() { super.dispose(); }
protected void init() { super.init(); // Ensure that initialization occurs in the UI thread Display.getDefault().asyncExec(new Runnable() { public void run() { JFaceResources.getFontRegistry().addListener(MavenConsoleImpl.this); initializeConsoleStreams(Display.getDefault()); dumpConsole(); } }); }
/** * Notification that an output stream connected to this console has been closed. * * @param stream stream that closed */ void streamClosed(IOConsoleOutputStream stream) { synchronized (openStreams) { openStreams.remove(stream); checkFinished(); } }
/** * Sets the font style to be used to decorate data written to this stream. * * @param newFontStyle the font style to be used to decorate data written to this stream */ public void setFontStyle(int newFontStyle) { if (newFontStyle != fontStyle) { int old = fontStyle; fontStyle = newFontStyle; console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, new Integer(old), new Integer(fontStyle)); } }
public void printDefaultMessage() { if (getConsole().getDocument().get().isEmpty()) { //getConsoleStream().println("LogViewer started!"); try { getConsoleStream().write("Paste messages into this console and check rules and filters in LogViewer.\n"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
public IOConsolePartitioner(IOConsoleInputStream inputStream, IOConsole console) { this.inputStream = inputStream; this.console = console; trimJob.setRule(console.getSchedulingRule()); }
public IPageBookViewPage createPage(IConsoleView view) { IOConsolePage page = (IOConsolePage) super.createPage(view); page.setReadOnly(); return page; }
/** * Constructs a new output stream on the given console. * * @param console I/O console */ IOConsoleOutputStream(IOConsole console) { this.console = console; this.partitioner = (IOConsolePartitioner) console.getPartitioner(); }
private void notifyParitioner(String encodedString) throws IOException { try { partitioner.streamAppended(this, encodedString); if (activateOnWrite) { console.activate(); } else { ConsolePlugin.getDefault().getConsoleManager().warnOfContentChange(console); } } catch (IOException e) { if (!closed) { close(); } throw e; } }
String encoding = console.getEncoding(); byte[] newData; if (encoding!=null)
/** * Sets this stream's font style. * * @param newFontStyle the font style to be used to decorate input in the associated console */ public void setFontStyle(int newFontStyle) { if (newFontStyle != fontStyle) { int old = fontStyle; fontStyle = newFontStyle; console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, Integer.valueOf(old), Integer.valueOf(fontStyle)); } }
/** * Constructs a console with the given name, type, image, encoding and lifecycle. * * @param name name to display for this console * @param consoleType console type identifier or <code>null</code> * @param imageDescriptor image to display for this console or <code>null</code> * @param autoLifecycle whether lifecycle methods should be called automatically * when this console is added/removed from the console manager */ public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle) { super(name, consoleType, imageDescriptor, autoLifecycle); if (encoding != null) { fEncoding = encoding; } openStreams = new ArrayList(); inputStream = new IOConsoleInputStream(this); synchronized (openStreams) { openStreams.add(inputStream); } partitioner = new IOConsolePartitioner(inputStream, this); partitioner.connect(getDocument()); }
public IOConsolePartitioner(IOConsoleInputStream inputStream, IOConsole console) { this.inputStream = inputStream; this.console = console; trimJob.setRule(console.getSchedulingRule()); }
@Override public IPageBookViewPage createPage(IConsoleView view) { IOConsolePage page = (IOConsolePage) super.createPage(view); page.setReadOnly(); return page; }
/** * Constructs a new output stream on the given console. * * @param console I/O console */ IOConsoleOutputStream(IOConsole console) { this.console = console; this.partitioner = (IOConsolePartitioner) console.getPartitioner(); }
private void notifyParitioner(String encodedString) throws IOException { try { partitioner.streamAppended(this, encodedString); if (activateOnWrite) { console.activate(); } else { ConsolePlugin.getDefault().getConsoleManager().warnOfContentChange(console); } } catch (IOException e) { if (!closed) { close(); } throw e; } }
String encoding = console.getEncoding(); byte[] newData; if (encoding!=null) {
/** * Sets this stream's font style. * * @param newFontStyle the font style to be used to decorate input in the associated console */ public void setFontStyle(int newFontStyle) { if (newFontStyle != fontStyle) { int old = fontStyle; fontStyle = newFontStyle; console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, new Integer(old), new Integer(fontStyle)); } }
public void shutdown() { // Call super dispose because we want the partitioner to be // disconnected. super.dispose(); if(commandColor != null) { commandColor.dispose(); } if(messageColor != null) { messageColor.dispose(); } if(errorColor != null) { errorColor.dispose(); } }
/** * Constructs a console with the given name, type, image, encoding and lifecycle. * * @param name name to display for this console * @param consoleType console type identifier or <code>null</code> * @param imageDescriptor image to display for this console or <code>null</code> * @param encoding the encoding that should be used to render the text, or <code>null</code> * if the system default encoding should be used * @param autoLifecycle whether lifecycle methods should be called automatically * when this console is added/removed from the console manager */ public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle) { super(name, consoleType, imageDescriptor, autoLifecycle); if (encoding != null) { fEncoding = encoding; } synchronized (openStreams) { inputStream = new IOConsoleInputStream(this); openStreams.add(inputStream); } if (inputStream instanceof IOConsoleInputStream) { partitioner = new IOConsolePartitioner((IOConsoleInputStream) inputStream, this); partitioner.connect(getDocument()); } }