当前位置: 首页>>代码示例>>Java>>正文


Java ConsolePlugin.getDefault方法代码示例

本文整理汇总了Java中org.eclipse.ui.console.ConsolePlugin.getDefault方法的典型用法代码示例。如果您正苦于以下问题:Java ConsolePlugin.getDefault方法的具体用法?Java ConsolePlugin.getDefault怎么用?Java ConsolePlugin.getDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.console.ConsolePlugin的用法示例。


在下文中一共展示了ConsolePlugin.getDefault方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: partOpened

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
	public void partOpened(IWorkbenchPart part) {
		super.partOpened(part);

		if (getComponentCanvas() != null) {
			ConsolePlugin plugin = ConsolePlugin.getDefault();
			IConsoleManager conMan = plugin.getConsoleManager();

			String consoleName = getComponentCanvas().getActiveProject() + "." + getComponentCanvas().getJobName();

			IConsole consoleToShow = getConsole(consoleName, conMan);

			if (consoleToShow != null) {
//				Fix for : Console window is getting displayed if user maximize canvas window and then try to create new job (Ctrl+J)
//				conMan.showConsoleView(consoleToShow);
			} else {
				addDummyConsole();
			}
		}
	}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:21,代码来源:HydrographConsole.java

示例2: getConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
/**
 * Get the console with the given name. If the console does not exist, then
 * a new one is created.
 * 
 * @param name
 * @return
 */
public static MessageConsole getConsole(String name) {
	ConsolePlugin plugin = ConsolePlugin.getDefault();
	IConsoleManager conMan = plugin.getConsoleManager();
	IConsole[] existing = conMan.getConsoles();
	for (int i = 0; i < existing.length; i++) {
		if (name.equals(existing[i].getName())) {
			return (MessageConsole) existing[i];
		}
	}

	// no console found, so create a new one
	MessageConsole console = new MessageConsole(name, null);
	conMan.addConsoles(new IConsole[] { console });

	// create a new logger handler
	Logger.addHandler(new EclipseConsoleHandler(console));

	return console;
}
 
开发者ID:turnus,项目名称:turnus,代码行数:27,代码来源:EclipseUtils.java

示例3: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private MessageConsole findConsole(String name) {
	ConsolePlugin plugin = ConsolePlugin.getDefault();
	IConsoleManager conMan = plugin.getConsoleManager();
	
	// search existing consoles
	IConsole[] existing = conMan.getConsoles();
	for (int i = 0; i < existing.length; i++) {
		if (name.equals(existing[i].getName())){
			return (MessageConsole) existing[i];
		}
	}
	
	// no console found, so create a new one
	MessageConsole myConsole = new MessageConsole(name, null);
	conMan.addConsoles(new IConsole[]{myConsole});
	conMan.showConsoleView(myConsole);
	return myConsole;
}
 
开发者ID:alexander-bergmayr,项目名称:caml2tosca,代码行数:19,代码来源:C2TRunHandler.java

示例4: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private static MessageConsole findConsole(String name) {//Find and return console, otherwise make one

		if (ConsolePlugin.getDefault() == null)
			return null;
		ConsolePlugin plugin = ConsolePlugin.getDefault();
		IConsoleManager YangConsole = plugin.getConsoleManager();
		IConsole[] existing = YangConsole.getConsoles();
		for (int i = 0; i < existing.length; i++)
			if (name.equals(existing[i].getName())) {
				YangConsole.showConsoleView(existing[i]);
				return (MessageConsole) existing[i];
			}
		MessageConsole myConsole = new MessageConsole(name, null);
		YangConsole.addConsoles(new IConsole[] { myConsole });
		return myConsole;
	}
 
开发者ID:att,项目名称:yang-design-studio,代码行数:17,代码来源:YangToPNG.java

示例5: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private static MessageConsole findConsole(String name) {//Find and return console, otherwise make one

   if (ConsolePlugin.getDefault() == null)
    	return null;
   ConsolePlugin plugin = ConsolePlugin.getDefault();
   IConsoleManager YangConsole = plugin.getConsoleManager();
   IConsole[] existing = YangConsole.getConsoles();
   for (int i = 0; i < existing.length; i++)
      if (name.equals(existing[i].getName())) {
      	YangConsole.showConsoleView(existing[i]);
      	return (MessageConsole) existing[i];
      }
   MessageConsole myConsole = new MessageConsole(name, null);
   YangConsole.addConsoles(new IConsole[] { myConsole });
   return myConsole;
}
 
开发者ID:att,项目名称:yang-design-studio,代码行数:17,代码来源:YangToSkelxml.java

示例6: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private static MessageConsole findConsole(String name) {//Find and return console, otherwise make one

   if (ConsolePlugin.getDefault() == null)
    	return null;
   ConsolePlugin plugin = ConsolePlugin.getDefault();
   IConsoleManager YangConsole = plugin.getConsoleManager();
   IConsole[] existing = YangConsole.getConsoles();
   for (int i = 0; i < existing.length; i++)
      if (name.equals(existing[i].getName())) {
      	YangConsole.showConsoleView(existing[i]);
      	return (MessageConsole) existing[i];
      }
   // no console found, so create a new one
   MessageConsole myConsole = new MessageConsole(name, null);
   YangConsole.addConsoles(new IConsole[] { myConsole });
   return myConsole;
}
 
开发者ID:att,项目名称:yang-design-studio,代码行数:18,代码来源:YangToDsdl.java

示例7: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private static MessageConsole findConsole(String name) {//Find and return console, otherwise make one

          			if (ConsolePlugin.getDefault() == null)
          				return null;
          			ConsolePlugin plugin = ConsolePlugin.getDefault();
          			IConsoleManager YangConsole = plugin.getConsoleManager();
          			IConsole[] existing = YangConsole.getConsoles();
          			for (int i = 0; i < existing.length; i++)
          				if (name.equals(existing[i].getName())) {
          					YangConsole.showConsoleView(existing[i]);
          					return (MessageConsole) existing[i];
          				}
          			MessageConsole myConsole = new MessageConsole(name, null);
          			YangConsole.addConsoles(new IConsole[] { myConsole });
          			return myConsole;
          		}
 
开发者ID:att,项目名称:yang-design-studio,代码行数:17,代码来源:YangToTree.java

示例8: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private static MessageConsole findConsole(String name) {//Find and return console, otherwise make one

            			if (ConsolePlugin.getDefault() == null)
            				return null;
            			ConsolePlugin plugin = ConsolePlugin.getDefault();
            			IConsoleManager YangConsole = plugin.getConsoleManager();
            			IConsole[] existing = YangConsole.getConsoles();
            			for (int i = 0; i < existing.length; i++)
            				if (name.equals(existing[i].getName())) {
            					YangConsole.showConsoleView(existing[i]);
            					return (MessageConsole) existing[i];
            				}
            			MessageConsole myConsole = new MessageConsole(name, null);
            			YangConsole.addConsoles(new IConsole[] { myConsole });
            			return myConsole;
            		}
 
开发者ID:att,项目名称:yang-design-studio,代码行数:17,代码来源:YangToYin.java

示例9: createConsoles

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private void createConsoles() {
	ConsolePlugin consolePlugin = ConsolePlugin.getDefault();
	IConsoleManager consoleManager = consolePlugin.getConsoleManager();
	
	stdoutConsole = new MessageConsole("Stdout", ImageDescriptor.createFromFile(getClass(), "/consoles/stdout.gif"));
	stdoutConsole.setTabWidth(TAB_WIDTH);
	stdoutConsoleStream = stdoutConsole.newMessageStream();
	stderrConsoleStream = stdoutConsole.newMessageStream();
	stderrConsoleStream.setColor(stderrConsoleStreamColor);
	
	engineConsole = new MessageConsole("Engine", ImageDescriptor.createFromFile(getClass(), "/consoles/engine.gif"));
	engineConsole.setTabWidth(TAB_WIDTH);
	engineConsoleStream = engineConsole.newMessageStream();

	consoleManager.addConsoles(new IConsole[] {
		engineConsole,
		stdoutConsole
	});
	
	consolePipes = new ConsolePipes();
	
	debugConsoleStream = new MessageConsoleStream(engineConsole) {

		@Override
		public void write(String str) throws IOException {
			if (str.endsWith("\n")) {
				str = str.substring(0, str.length() - 1);
			}
			Engine.logStudio.info("[debug] " + str);
		}
		
	};
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:34,代码来源:ConvertigoPlugin.java

示例10: getConsoleManager

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
/**
 * 
 *  get default console manager
 * 
 * @return ConsoleManager
 */
private IConsoleManager getConsoleManager() {
	ConsolePlugin plugin = ConsolePlugin.getDefault();
	logger.debug("Retrieved Console plugin object");
	IConsoleManager conMan = plugin.getConsoleManager();
	logger.debug("Retrieved Console manager");
	return conMan;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:14,代码来源:ConsoleLogger.java

示例11: addDummyConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private void addDummyConsole() {
		ConsolePlugin plugin = ConsolePlugin.getDefault();
		IConsoleManager conMan = plugin.getConsoleManager();

		IConsole consoleToShow = getConsole(DEFAULT_CONSOLE, conMan);

		if (consoleToShow == null) {
			consoleToShow = createNewMessageConsole(DEFAULT_CONSOLE, conMan);
		}
//		Fix for : Console window is getting displayed if user maximize canvas window and then try to create new job (Ctrl+J)
//		conMan.showConsoleView(consoleToShow);
	}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:HydrographConsole.java

示例12: addDummyConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private void addDummyConsole(){
		ConsolePlugin plugin = ConsolePlugin.getDefault();
		IConsoleManager consoleManager = plugin.getConsoleManager();

		IConsole consoleToShow = getConsole(DEFAULT_CONSOLE, consoleManager);	

		if(consoleToShow == null){
			consoleToShow = createNewMessageConsole(DEFAULT_CONSOLE,consoleManager);
		}
//		Fix for : Console window is getting displayed if user maximize canvas window and then try to create new job (Ctrl+J) 
//		consoleManager.showConsoleView(consoleToShow);
	}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:ELTGraphicalEditor.java

示例13: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private MessageConsole findConsole(final String name) {
  final ConsolePlugin plugin = ConsolePlugin.getDefault();
  final IConsoleManager conMan = plugin.getConsoleManager();
  final IConsole[] existing = conMan.getConsoles();
  for (int i = 0; i < existing.length; i++) {
    if (name.equals(existing[i].getName())) {
      return (MessageConsole) existing[i];
    }
  }
  // no console found, so create a new one
  final MessageConsole myConsole = new MessageConsole(name, null);
  conMan.addConsoles(new IConsole[] {myConsole});
  return myConsole;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:15,代码来源:LaunchModel.java

示例14: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private MessageConsole findConsole(String name) {
	ConsolePlugin plugin = ConsolePlugin.getDefault();
	IConsoleManager conMan = plugin.getConsoleManager();
	IConsole[] existing = conMan.getConsoles();
	for (int i = 0; i < existing.length; i++) {
		if (name.equals(existing[i].getName()))
			return (MessageConsole) existing[i];
	}
	//no console found, so create a new one
	MessageConsole myConsole = new MessageConsole(name, null);
	conMan.addConsoles(new IConsole[]{myConsole});
	return myConsole;
}
 
开发者ID:jason-lang,项目名称:jason-eclipse-plugin,代码行数:14,代码来源:RunJasonFileEditor.java

示例15: findConsole

import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
private EGradleSystemConsole findConsole(String name) {
	ConsolePlugin plugin = ConsolePlugin.getDefault();
	IConsoleManager conMan = plugin.getConsoleManager();
	IConsole[] existing = conMan.getConsoles();
	for (int i = 0; i < existing.length; i++) {
		if (name.equals(existing[i].getName())) {
			return (EGradleSystemConsole) existing[i];
		}

	}
	// no console found, so create a new one
	EGradleSystemConsole myConsole = createConsole(name, conMan);
	return myConsole;
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:15,代码来源:EGradleSystemConsoleFactory.java


注:本文中的org.eclipse.ui.console.ConsolePlugin.getDefault方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。