本文整理汇总了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;
}
示例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);
}
};
}
示例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;
}
}
示例4: init
import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
@Override
public void init(IConsole console) {
IDEUtil.removeAllValidationErrorsOfConsoleOutput();
rememberOutputHandler = IDEUtil.createOutputHandlerForValidationErrorsOnConsole();
document = console.getDocument();
}
示例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();
}
}
});
}
});
}
示例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;
}
示例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+");
}
示例8: init
import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
public void init(IConsole console) {
m_console = console;
}
示例9: init
import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
public void init(IConsole console) {
fConsole= console;
}
示例10: init
import org.eclipse.debug.ui.console.IConsole; //导入依赖的package包/类
@Override
public void init(IConsole console) {
this.console = console;
}