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


Java IConsole类代码示例

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


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

示例1: getFlusher

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
private ConsoleStreamFlusher getFlusher(Object context) {
	if (context instanceof IEvaluationContext) {
		IEvaluationContext evaluationContext = (IEvaluationContext) context;
		Object o = evaluationContext.getVariable(ISources.ACTIVE_PART_NAME);
		if (!(o instanceof IWorkbenchPart)) {
			return null;
		}
		IWorkbenchPart part = (IWorkbenchPart) o;
		if (part instanceof IConsoleView && ((IConsoleView) part).getConsole() instanceof IConsole) {
			IConsole activeConsole = (IConsole) ((IConsoleView) part).getConsole();
			IProcess process = activeConsole.getProcess();
			return (ConsoleStreamFlusher) process.getAdapter(ConsoleStreamFlusher.class);
		}
	}
	return null;
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:17,代码来源:FlushConsoleHandler.java

示例2: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
@Override
public void init(final IConsole console) {
    IProcess process = console.getProcess();
    if (process != null) {
        ILaunch launch = process.getLaunch();
        if (launch != null) {
            initLaunchConfiguration(launch.getLaunchConfiguration());
        }
    }
    this.linkContainer = new ILinkContainer() {

        @Override
        public void addLink(IHyperlink link, int offset, int length) {
            console.addLink(link, offset, length);
        }

        @Override
        public String getContents(int offset, int length) throws BadLocationException {
            return console.getDocument().get(offset, length);
        }
    };
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:23,代码来源:PythonConsoleLineTracker.java

示例3: DLabProConsoleHyperlink

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param sLine
 * @param sFile
 * @param console
 */
public DLabProConsoleHyperlink(String sLine, String sFile, IConsole console)
{
  try
  {
    // Get rid of ambiguous case in Windows
    iFile = new Path((new File(sFile)).getCanonicalPath());
  }
  catch (IOException e1)
  {
    // Silently ignore exceptions
  }
  try
  {
    nLine = Integer.parseInt(sLine);
  }
  catch (NumberFormatException e)
  {
    nLine = -1;
  }
}
 
开发者ID:matthias-wolff,项目名称:dLabPro-Plugin,代码行数:28,代码来源:DLabProConsoleHyperlink.java

示例4: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
@Override
public void init(IConsole console) {
	IDEUtil.removeAllValidationErrorsOfConsoleOutput();
	
	rememberOutputHandler = IDEUtil.createOutputHandlerForValidationErrorsOnConsole();
	document = console.getDocument();
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:8,代码来源:EGradleConsoleLineTracker.java

示例5: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
@Override
public void init(IConsole console) {
    final CodenvyRunnerProcess runnerProcess = (CodenvyRunnerProcess)console.getProcess();

    runnerProcess.addWebApplicationListener(new WebApplicationListener() {
        private IWebBrowser      webApplicationBrowser;
        private final IWorkbench workbench = PlatformUI.getWorkbench();

        @Override
        public void webApplicationStarted(final WebApplicationEvent event) {
            workbench.getDisplay().syncExec(new Runnable() {
                @Override
                public void run() {
                    try {

                        webApplicationBrowser = workbench.getBrowserSupport()
                                                         .createBrowser(NAVIGATION_BAR | LOCATION_BAR, null, null, null);

                        webApplicationBrowser.openURL(new URL(event.webApplicationLink.href()));

                    } catch (PartInitException | MalformedURLException e) {
                        throw new RuntimeException(e);
                    }
                }
            });
        }

        @Override
        public void webApplicationStopped() {
            workbench.getDisplay().syncExec(new Runnable() {
                @Override
                public void run() {
                    if (webApplicationBrowser != null) {
                        webApplicationBrowser.close();
                    }
                }
            });
        }
    });
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:41,代码来源:RunOnCodenvyConsoleLineTracker.java

示例6: consoleDispatch

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
/**
 * When called from a console context, use paste
 * 
 * @see com.mulgasoft.emacsplus.commands.IConsoleDispatch#consoleDispatch(org.eclipse.ui.console.TextConsoleViewer, org.eclipse.ui.console.IConsoleView, org.eclipse.core.commands.ExecutionEvent)
 */
public Object consoleDispatch(TextConsoleViewer viewer, IConsoleView activePart, ExecutionEvent event) {

	StyledText st = viewer.getTextWidget();
	try {
		// set directly from the widget
		widgetEol = st.getLineDelimiter();
		paste(event,st,activePart.getConsole() instanceof IConsole);
	} finally {
		st.redraw();
		widgetEol = null;
	}
	
	return null;
}
 
开发者ID:MulgaSoft,项目名称:e4macs,代码行数:20,代码来源:BaseYankHandler.java

示例7: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
public void init(IConsole console)
{
  this.console       = console;
  fErrorMatcher      = new StringMatcher("*):*error*"      ,false,false);
  fWarningMatcher    = new StringMatcher("*):*warning*"    ,false,false);
  fBreakPointMatcher = new StringMatcher("*):*BREAK POINT*",false,false);
  fLineNumberMatcher = Pattern.compile("\\(\\d+\\):");
  fLineNumber        = Pattern.compile("\\d+");
}
 
开发者ID:matthias-wolff,项目名称:dLabPro-Plugin,代码行数:10,代码来源:DLabProConsoleLineTracker.java

示例8: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
public void init(IConsole console) {
	m_console = console;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:4,代码来源:ConsoleTracker.java

示例9: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
public void init(IConsole console) {
	fConsole= console;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:JavadocConsoleLineTracker.java

示例10: init

import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
@Override
public void init(IConsole console) {
    this.console = console;
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:5,代码来源:BuildOnCodenvyConsoleLineTracker.java


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