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


Java TextConsole类代码示例

本文整理汇总了Java中org.eclipse.ui.console.TextConsole的典型用法代码示例。如果您正苦于以下问题:Java TextConsole类的具体用法?Java TextConsole怎么用?Java TextConsole使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: matchFound

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
@Override
public void matchFound(PatternMatchEvent event) {
  if (event.getSource() instanceof TextConsole) {
    try {
      final TextConsole console = (TextConsole) event.getSource();
      final int start = event.getOffset();
      final int length = event.getLength();
      IHyperlink link = new BrowserSupportBasedHyperlink(console.getDocument().get(start, length));
      console.addHyperlink(link, start, length);
    } catch (BadLocationException e) {
      logger.log(Level.SEVERE, "Cannot create hyperlink", e);
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:15,代码来源:PatternToHyperlinkConverter.java

示例2: DevModeStackTraceHyperlink

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
public DevModeStackTraceHyperlink(String url, TextConsole console) {
  super(console);
  assert (url.startsWith(JAVA_SOURCE_URL_PREFIX));
  url = url.substring(JAVA_SOURCE_URL_PREFIX.length());

  try {
    url = URLDecoder.decode(url, "UTF-8");
  } catch (UnsupportedEncodingException e) {
    // Should never happen, but if it did, then presumably encoding failed
    // as well, so ignore
  }
  this.url = url;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:14,代码来源:LogContent.java

示例3: getLaunchConsole

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
/**
 * Find the TextConsole associated with the launch. This is required by the
 * {@link JavaStackTraceHyperlink} class (which we subclass).
 */
private TextConsole getLaunchConsole() {
  LaunchConfiguration launchConfiguration = null;
  T entity = log.getEntity();

  if (entity instanceof BrowserTab) {
    BrowserTab browserTab = (BrowserTab) entity;
    launchConfiguration = browserTab.getLaunchConfiguration();
  } else if (entity instanceof LaunchConfiguration) {
    launchConfiguration = (LaunchConfiguration) entity;
  }

  if (launchConfiguration != null) {
    IProcess[] processes = launchConfiguration.getLaunch().getProcesses();
    if (processes.length > 0) {
      /*
       * Just get the console for the first process. If there are multiple
       * processes, they will all link back to the same ILaunch (which is what
       * JavaStackTraceHyperlink uses the console for anyway).
       */
      IConsole console = DebugUITools.getConsole(processes[0]);
      if (console instanceof TextConsole) {
        return (TextConsole) console;
      }
    }
  }

  return null;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:33,代码来源:LogContent.java

示例4: openJavaSource

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
private void openJavaSource(String url) {
  TextConsole console = getLaunchConsole();
  if (console != null) {
    new DevModeStackTraceHyperlink(url, console).linkActivated();
  } else {
    MessageDialog.openInformation(getShell(), "GWT Eclipse Plugin",
        "Could not find Java source context.");
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:10,代码来源:LogContent.java

示例5: init

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public void init(IPageBookViewPage page, IConsole console)
{
	if (console instanceof TextConsole)
	{
		TextConsole textConsole = (TextConsole) console;
		Object themeConsoleStreamToColor = textConsole.getAttribute(THEME_CONSOLE_STREAM_TO_COLOR_ATTRIBUTE);
		if (themeConsoleStreamToColor instanceof Map<?, ?>)
		{
			Map m = (Map) themeConsoleStreamToColor;
			Set<Map.Entry> entrySet = m.entrySet();
			for (Map.Entry entry : entrySet)
			{
				if (!(entry.getKey() instanceof IOConsoleOutputStream) || !(entry.getValue() instanceof String))
				{
					return; // Cannot handle it.
				}
			}
			this.extension = new ConsoleThemer(textConsole, (Map) themeConsoleStreamToColor);
		}
		if (page instanceof TextConsolePage)
		{
			TextConsolePage tcp = (TextConsolePage) page;
			TextViewerThemer themer = new TextViewerThemer(tcp.getViewer());
			themer.apply();
		}
	}
	this.page = page;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:30,代码来源:ConsoleThemePageParticipant.java

示例6: ConsoleThemer

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
/**
 * Should be called in the UI thread. Usually, there's no way to create this extension from any console, as the
 * ConsoleThemePageParticipant takes care of that for all consoles (provided they are properly configured).
 * 
 * @see com.aptana.theme.extensions.ConsoleThemePageParticipant
 * @param textConsole
 *            console with the streams.
 * @param themeConsoleStreamToColor
 *            a map with the stream to the related color name (one of the CONSOLE_XXX constants in this class).
 */
public ConsoleThemer(TextConsole textConsole, Map themeConsoleStreamToColor)
{
	this.fConsole = textConsole;
	this.fThemeConsoleStreamToColor = themeConsoleStreamToColor;

	this.listenForThemeChanges();

	// apply theme
	this.applyTheme();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:21,代码来源:ConsoleThemer.java

示例7: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
public void connect(TextConsole console) {
	try {
		/*
		 * Now we have to go digging for the Connect IQ project.
		 * 
		 * It seems to be rather difficult to find, and we do with the debug
		 * info file.
		 */
		Object consoleProcessObj = console
				.getAttribute("org.eclipse.debug.ui.ATTR_CONSOLE_PROCESS");
		if (!(consoleProcessObj instanceof RuntimeProcess))
			return;
		RuntimeProcess rp = (RuntimeProcess) consoleProcessObj;

		ILaunch launch = rp.getLaunch();
		if (launch == null)
			return;
		ILaunchConfiguration launchConf = launch.getLaunchConfiguration();
		if (launchConf == null)
			return;
		String debugInfoFile = launchConf.getAttribute(
				"connectiq.debugInfo", (String) null);
		if (debugInfoFile == null)
			return;

		myDebugInfo = DebugInfoManager.getDebugInfo(debugInfoFile);
		myGlobalDebugInfo = getGlobalDebugInfo();
		myConsole = console;
	} catch (CoreException e) {
	}
}
 
开发者ID:blackdogit,项目名称:connectiq-monkeyc,代码行数:32,代码来源:PCMatcher.java

示例8: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
public void connect(TextConsole console) {
 fConsole = console;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:4,代码来源:PathMatcher.java

示例9: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
@Override
public void connect(TextConsole console) {
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:4,代码来源:PatternToHyperlinkConverter.java

示例10: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
public void connect(TextConsole console) {
	// Do nothing
}
 
开发者ID:eclipse,项目名称:cft,代码行数:4,代码来源:AbstractConsoleMonitorAppStateTracker.java

示例11: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
public void connect(TextConsole console) {
	  fConsole= console;
}
 
开发者ID:umple,项目名称:umple,代码行数:4,代码来源:UmplePatternMatcher.java

示例12: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
@Override
public void connect(TextConsole console)
{
	this.console = console;
}
 
开发者ID:mjwach,项目名称:ErrorLinkyThing,代码行数:6,代码来源:ErrorLinkyPatternMatchListenerDelegate.java

示例13: getConsole

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
protected TextConsole getConsole() {
	return myConsole;
}
 
开发者ID:blackdogit,项目名称:connectiq-monkeyc,代码行数:4,代码来源:PCMatcher.java

示例14: connect

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
@Override
public void connect(TextConsole console) {
	pattern = Pattern.compile(patternMsg);
}
 
开发者ID:wangzw,项目名称:CppStyle,代码行数:5,代码来源:CppStyleConsolePatternMatchListener.java

示例15: setConsole

import org.eclipse.ui.console.TextConsole; //导入依赖的package包/类
public boolean setConsole(IConsole iConsole){ // from add console;
		String needleConsoleName=iConsole.getName();
		Iterator<String> iter=unfinishedBuilds.keySet().iterator();
		while (iter.hasNext()) {
			String consoleName=iter.next();
			if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_LAUNCHING)) {
				System.out.print("needleConsoleName="+needleConsoleName+", consoleName= "+consoleName);
			}

			if (needleConsoleName.equals(consoleName)){
				if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_LAUNCHING)) System.out.print("Got match");
				VDTRunnerConfiguration runConfig=unfinishedBuilds.get(consoleName);
				runConfig.setIConsole(iConsole);
				// Add console listener here to detect change name
				final IConsole fIconsole=iConsole; 
				final String fConsoleName=fIconsole.getName();	
				final IPropertyChangeListener fListener =new IPropertyChangeListener() {
					public void propertyChange(PropertyChangeEvent event) {
//						ProcessConsole console = (ProcessConsole) event.getSource();
//						TextConsole console = (TextConsole) event.getSource();
						if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_LAUNCHING)) {
							String txt = ((TextConsole) event.getSource()).getDocument().get();
							System.out.println("==== Console contents at "+event.getProperty()+" ====");
							System.out.println("fConsoleName="+fConsoleName+" fIconsole.getName()="+fIconsole.getName());
							System.out.println(txt);
							System.out.println("==== End of console contents at "+event.getProperty()+" ====");
						}
						if (!fConsoleName.equals(fIconsole.getName())){
							fIconsole.removePropertyChangeListener(this);
							if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_LAUNCHING)) {
								System.out.println(">>> "+fConsoleName+" -> "+fIconsole.getName());
							}
							String ctxt = ((TextConsole) event.getSource()).getDocument().get(); // To search for good/bad completion
							removeConsole(fIconsole, ctxt); // changed name means "<terminated>..."
						}
					}
				};
				fIconsole.addPropertyChangeListener(fListener);
				if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_LAUNCHING)){
					System.out.println("fiCons.getName()="+fIconsole.getName()+"addPropertyChangeListener()");
				}
				return true;
			}
		}
		return false;
	}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:47,代码来源:RunningBuilds.java


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