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(); } }); }
@Override protected void init() { super.init(); // create a stream to write info message to try (IOConsoleOutputStream info = newOutputStream()) { info.write(PDEUIMessages.OSGiConsoleFactory_title); info.write('\n'); } catch (IOException e) { PDEPlugin.log(e); } BundleContext context = PDEPlugin.getDefault().getBundle().getBundleContext(); context.registerService(ConsoleSession.class.getName(), session, null); }
/** * @see org.eclipse.ui.console.AbstractConsole#init() */ @Override protected void init() { super.init(); if (fProcess.isTerminated()) { closeStreams(); resetName(); } else { DebugPlugin.getDefault().addDebugEventListener(this); } IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); store.addPropertyChangeListener(this); JFaceResources.getFontRegistry().addListener(this); if (store.getBoolean(IDebugPreferenceConstants.CONSOLE_WRAP)) { setConsoleWidth(store.getInt(IDebugPreferenceConstants.CONSOLE_WIDTH)); } setTabWidth(store.getInt(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH)); if (store.getBoolean(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT)) { int highWater = store.getInt(IDebugPreferenceConstants.CONSOLE_HIGH_WATER_MARK); int lowWater = store.getInt(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK); setWaterMarks(lowWater, highWater); } DebugUIPlugin.getStandardDisplay().asyncExec(() -> { setFont(JFaceResources.getFont(IDebugUIConstants.PREF_CONSOLE_FONT)); setBackground(DebugUIPlugin.getPreferenceColor(IDebugPreferenceConstants.CONSOLE_BAKGROUND_COLOR)); }); }