本文整理汇总了Java中org.eclipse.debug.core.DebugEvent.TERMINATE属性的典型用法代码示例。如果您正苦于以下问题:Java DebugEvent.TERMINATE属性的具体用法?Java DebugEvent.TERMINATE怎么用?Java DebugEvent.TERMINATE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.debug.core.DebugEvent
的用法示例。
在下文中一共展示了DebugEvent.TERMINATE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleDebugEvent
protected void handleDebugEvent(DebugEvent debugEvent) {
updateActions();
switch (debugEvent.getKind()) {
case DebugEvent.TERMINATE :
setViewerInput(null);
break;
case DebugEvent.SUSPEND :
break;
case DebugEvent.RESUME :
break;
}
Display.getDefault().asyncExec(() -> {
if (debugEvent.getSource() != null) {
sessionDropdown.refresh();
targets.removeIf(dt -> dt.isTerminated());
}
});
}
示例2: handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) {
for (DebugEvent event : events) {
switch (event.getKind()) {
case DebugEvent.TERMINATE:
if (event.getSource().equals(getDebugTarget())) {
DebugPlugin.getDefault().getExpressionManager().removeExpression(this);
}
break;
case DebugEvent.SUSPEND:
if (event.getDetail() != DebugEvent.EVALUATION_IMPLICIT &&
event.getSource() instanceof IDebugElement) {
IDebugElement source = (IDebugElement) event.getSource();
if (source.getDebugTarget().equals(getDebugTarget())) {
DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {
new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.CONTENT) });
}
}
break;
}
}
}
示例3: handleDebugEvents
@Override
public void handleDebugEvents(final DebugEvent[] events) {
for (final DebugEvent event : events) {
if (event.getSource().equals(process)) {
if (event.getKind() == DebugEvent.TERMINATE) {
if (shellConnection != null) {
try {
shellConnection.disconnect();
} catch (final IOException e) {
KarafUIPluginActivator.getLogger().error("Unable to disconnect from SSH server", e);
}
}
DebugPlugin.getDefault().removeDebugEventListener(this);
resetName();
}
}
}
}
示例4: handleDebugEvents
@Override
public void handleDebugEvents(DebugEvent[] events) {
for (DebugEvent event : events) {
switch (event.getKind()) {
case DebugEvent.CREATE:
if (event.getSource() instanceof IDebugTarget) {
WatchDogEventType.START_DEBUG.process(this);
}
break;
case DebugEvent.TERMINATE:
if (event.getSource() instanceof IDebugTarget) {
WatchDogEventType.END_DEBUG.process(this);
}
break;
default:
break;
}
}
}
示例5: handleDebugEvents
@Override
public void handleDebugEvents(final DebugEvent[] events)
{
// allow views to be selectively enabled/disabled
if (!this.isEnabled())
{
return;
}
// dispatch an async update for at most one event
DebugEvent updateEvent = null;
for (final DebugEvent event : events)
{
if (event.getKind() == DebugEvent.RESUME || event.getKind() == DebugEvent.SUSPEND
|| event.getKind() == DebugEvent.TERMINATE || event.getKind() == DebugEvent.STATE)
{
updateEvent = event;
break;
}
}
if (updateEvent != null)
{
updateActionBar();
}
}
示例6: handleDebugEvents
@Override
public void handleDebugEvents(DebugEvent[] events) {
for (DebugEvent e : events) {
switch (e.getKind()) {
case DebugEvent.TERMINATE:
DebugPlugin.getDefault().removeDebugEventListener(this);
terminateProcess();
break;
default:
break;
}
}
}
示例7: handleDebugEvents
@Override
public void handleDebugEvents(DebugEvent[] events) {
for (int i = 0; i < events.length; i++) {
DebugEvent debugEvent = events[i];
if (debugEvent.getKind() == DebugEvent.TERMINATE) {
// this event is fired for each thread and stuff, but we only want to remove our breakpoints,
// when the JVM process terminates
if (debugEvent.getSource() instanceof RuntimeProcess) {
// remove this debug event listener to release it for garbage collection
DebugPlugin.getDefault().removeDebugEventListener(this);
// remove temporary jimple breakpoints
try {
JimpleBreakpointManager.getInstance().removeTemporaryBreakpoints();
} catch (CoreException e) {
logger.error("Couldn't delete temporary jimple breakpoints after termination", e);
}
// stop the monitoring server
monitoringServer.stop();
// delete the agent jar
if (agentJar != null && agentJar.exists()) {
agentJar.delete();
}
// remove the jimple instruction pointer marker (green debug line highlighting)
removeJimpleInstructionPointerMarker();
}
}
}
}
示例8: handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) {
// type of event was a terminate...
if(events.length>0){
if (events[0].getKind() == DebugEvent.TERMINATE) {
Object source = events[0].getSource();
if (source instanceof IProcess) {
// check for Derby Network Servre process.
Object proj = servers.get(source);
if (proj != null) {
try {
//remove it from the hashmap, update the ui
servers.remove(source);
if(proj instanceof IJavaProject){
setRunning(((IJavaProject)proj).getProject(), null);
}else if(proj instanceof IProject){
setRunning((IProject)proj,null);
}
}
catch (CoreException ce) {
Logger.log("DerbyServerTracker.handleDebugEvents: "+ce, IStatus.ERROR);
}catch(Exception e){
Logger.log("DerbyServerTracker.handleDebugEvents: "+e, IStatus.ERROR);
}
}
}
}
}
}
示例9: handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) {
for (final DebugEvent e : events) {
if (e.getSource() instanceof IProcess
&& e.getKind() == DebugEvent.TERMINATE) {
fireEnablementChanged();
}
}
}
示例10: handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) {
for (final DebugEvent e : events) {
if (e.getSource() instanceof IProcess
&& e.getKind() == DebugEvent.TERMINATE) {
final IProcess proc = (IProcess) e.getSource();
final ILaunch launch = proc.getLaunch();
if (launch instanceof CoverageLaunch) {
final CoverageLaunch coverageLaunch = (CoverageLaunch) launch;
coverageLaunch.getAgentServer().stop();
checkExecutionData(coverageLaunch);
}
}
}
}
示例11: done
@Override
public void done(IJobChangeEvent event) {
DebugEvent endEvent = new DebugEvent(thisProcess,
DebugEvent.TERMINATE);
DebugEvent[] events = { endEvent };
DebugPlugin.getDefault().fireDebugEventSet(events);
}
示例12: handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) {
if (events != null) {
int size = events.length;
for (int i = 0; i < size; i++) {
if (events[i].getKind() == DebugEvent.TERMINATE) {
Object source = events[i].getSource();
// THe event source should be a thread as remote debugging
// does not launch a separate local process
// However, multiple threads may be associated with the
// debug target, so to check if an app
// is disconnected from the debugger, additional termination
// checks need to be performed on the debug target
// itself
if (source instanceof IThread) {
IDebugTarget debugTarget = ((IThread) source).getDebugTarget();
// Be sure to only handle events from the debugger
// source that generated the termination event. Do not
// handle
// any other application that is currently connected to
// the debugger.
if (eventSource.equals(debugTarget) && debugTarget.isDisconnected()) {
DebugPlugin.getDefault().removeDebugEventListener(this);
ApplicationDebugLauncher.terminateLaunch(launchId);
return;
}
}
}
}
}
}
示例13: handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) {
for (DebugEvent debugEvent : events) {
if ((debugEvent.getSource() instanceof SCTDebugTarget))
switch (debugEvent.getKind()) {
case DebugEvent.TERMINATE :
if (allTargetsTerminated())
schedulePerspectiveSwitchJob(ID_PERSPECTIVE_SCT_MODELING);
break;
case DebugEvent.SUSPEND :
break;
case DebugEvent.RESUME :
break;
}
}
}
示例14: handleDebugEvent
protected void handleDebugEvent(DebugEvent debugEvent) {
switch (debugEvent.getKind()) {
case DebugEvent.TERMINATE:
Display.getDefault().asyncExec(new Runnable() {
public void run() {
debugTarget = null;
}
});
break;
case DebugEvent.SUSPEND:
break;
case DebugEvent.RESUME:
break;
}
}
示例15: handleDebugEvent
protected void handleDebugEvent(DebugEvent debugEvent) {
switch (debugEvent.getKind()) {
case DebugEvent.TERMINATE:
handleDebugTargetTerminated(debugEvent);
break;
}
}