本文整理汇总了Java中org.eclipse.debug.internal.ui.views.console.ProcessConsole类的典型用法代码示例。如果您正苦于以下问题:Java ProcessConsole类的具体用法?Java ProcessConsole怎么用?Java ProcessConsole使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProcessConsole类属于org.eclipse.debug.internal.ui.views.console包,在下文中一共展示了ProcessConsole类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.eclipse.debug.internal.ui.views.console.ProcessConsole; //导入依赖的package包/类
@Override
public void init(IPageBookViewPage page, IConsole console) {
if (!(console instanceof ProcessConsole)) {
return;
}
ProcessConsole processConsole = (ProcessConsole) console;
IProcess process = processConsole.getProcess();
if (process == null) {
return;
}
String attribute = process.getAttribute(Constants.PYDEV_DEBUG_IPROCESS_ATTR);
if (!Constants.PYDEV_DEBUG_IPROCESS_ATTR_TRUE.equals(attribute)) {
//Only provide the console page
return;
}
if (page instanceof IOConsolePage) {
final CurrentPyStackFrameForConsole currentPyStackFrameForConsole = new CurrentPyStackFrameForConsole(
console);
IOConsolePage consolePage = (IOConsolePage) page;
this.promptOverlay = new PromptOverlay(consolePage, processConsole, currentPyStackFrameForConsole);
}
}
示例2: propertyChanged
import org.eclipse.debug.internal.ui.views.console.ProcessConsole; //导入依赖的package包/类
public void propertyChanged(Object source, int propId)
{
if (source instanceof ConsoleView)
try
{
ConsoleView iCv = (ConsoleView)source;
ProcessConsole iPc = (ProcessConsole)iCv.getConsole();
if (iPc!=null)
m_iProc = iPc.getProcess();
else
m_iProc = null;
update();
}
catch (ClassCastException e1)
{
}
catch (Exception e)
{
DdUtils.EXCEPTION(e);
}
}
示例3: getConsoleContent
import org.eclipse.debug.internal.ui.views.console.ProcessConsole; //导入依赖的package包/类
private String getConsoleContent() {
waitForIdleState();
final IViewPart viewPart = showView(CONSOLE_VIEW_ID);
final ConsoleView consoleView = assertInstanceOf(viewPart, ConsoleView.class);
final IConsole console = consoleView.getConsole();
// Can be null, if nothing was logged to the console yet. Such cases return with empty string instead.
if (console == null) {
return "";
}
final ProcessConsole processConsole = assertInstanceOf(console, ProcessConsole.class);
return processConsole.getDocument().get();
}
示例4: RestartLaunchAction
import org.eclipse.debug.internal.ui.views.console.ProcessConsole; //导入依赖的package包/类
public RestartLaunchAction(IPageBookViewPage page, ProcessConsole console) {
this.page = page;
this.console = console;
launch = this.console.getProcess().getLaunch();
launchConfiguration = launch.getLaunchConfiguration();
lastLaunch = launch;
lastConfig = launch.getLaunchConfiguration();
update();
}
示例5: init
import org.eclipse.debug.internal.ui.views.console.ProcessConsole; //导入依赖的package包/类
@Override
public void init(IPageBookViewPage page, IConsole console) {
try {
if (!(console instanceof ProcessConsole)) {
return;
}
ProcessConsole processConsole = (ProcessConsole) console;
IProcess process = processConsole.getProcess();
if (process == null) {
return;
}
String attribute = process.getAttribute(RelaunchConstants.PYDEV_ADD_RELAUNCH_IPROCESS_ATTR);
if (!RelaunchConstants.PYDEV_ADD_RELAUNCH_IPROCESS_ATTR_TRUE.equals(attribute)) {
//Only provide relaunch if specified
return;
}
this.fConsole = processConsole;
DebugPlugin.getDefault().addDebugEventListener(this);
IActionBars bars = page.getSite().getActionBars();
IToolBarManager toolbarManager = bars.getToolBarManager();
restartLaunchAction = new RestartLaunchAction(page, processConsole);
terminateAllLaunchesAction = new TerminateAllLaunchesAction();
toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, restartLaunchAction);
toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAllLaunchesAction);
bars.updateActionBars();
} catch (Exception e) {
Log.log(e);
}
}