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(); } } }
/** * 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()); }
/** * 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()); } }