本文整理汇总了Java中org.eclipse.ui.console.MessageConsole.setWaterMarks方法的典型用法代码示例。如果您正苦于以下问题:Java MessageConsole.setWaterMarks方法的具体用法?Java MessageConsole.setWaterMarks怎么用?Java MessageConsole.setWaterMarks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.console.MessageConsole
的用法示例。
在下文中一共展示了MessageConsole.setWaterMarks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMessageConsole
import org.eclipse.ui.console.MessageConsole; //导入方法依赖的package包/类
/**
* get message console object
*
* @param messageConsole
* @return
*/
private MessageConsole getMessageConsole() {
IConsoleManager conMan = getConsoleManager();
MessageConsole messageConsole = getConsoleFromExistingConsoles(conMan);
if(messageConsole == null){
messageConsole = createNewMessageConsole(conMan);
logger.debug("No existing console found, created new one");
}
int lowWaterMark = getConsoleBufferSize();
messageConsole.setWaterMarks(lowWaterMark, lowWaterMark + DEFAULT_CONSOLE_HIGH_WATER_MARK_OFFSET);
return messageConsole;
}
示例2: start
import org.eclipse.ui.console.MessageConsole; //导入方法依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
pluginPreferencesStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, PLUGIN_ID);
// Set up the console
console = new MessageConsole("RoboVM Console", null);
console.setWaterMarks(40000, 80000);
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { console });
Display display = getDisplay();
debugStream = console.newMessageStream();
final Color debugColor = new Color(display, 0x99, 0x99, 0x99);
infoStream = console.newMessageStream();
final Color infoColor = new Color(display, 0x00, 0x99, 0x00);
warnStream = console.newMessageStream();
final Color warnColor = new Color(display, 0xFF, 0x00, 0xFF);
errorStream = console.newMessageStream();
final Color errorColor = new Color(display, 0xFF, 0x00, 0x00);
display.asyncExec(new Runnable() {
@Override
public void run() {
debugStream.setColor(debugColor);
infoStream.setColor(infoColor);
warnStream.setColor(warnColor);
errorStream.setColor(errorColor);
}
});
Job job = new Job("RoboVM Interface Builder Integrator launcher") {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
RoboVMProjectObserver.getInstance().start(monitor);
IBIntegratorManager.getInstance().start(monitor);
} catch (CoreException e) {
log(e);
}
return Status.OK_STATUS;
}
};
job.schedule();
}