本文整理汇总了Java中org.eclipse.debug.core.DebugEvent.getKind方法的典型用法代码示例。如果您正苦于以下问题:Java DebugEvent.getKind方法的具体用法?Java DebugEvent.getKind怎么用?Java DebugEvent.getKind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.DebugEvent
的用法示例。
在下文中一共展示了DebugEvent.getKind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleDebugEvent
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
@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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
@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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
@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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
@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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
@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
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
public void handleDebugEvents(DebugEvent[] events) {
for (final DebugEvent e : events) {
if (e.getSource() instanceof IProcess
&& e.getKind() == DebugEvent.TERMINATE) {
fireEnablementChanged();
}
}
}
示例9: handleDebugEvents
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
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);
}
}
}
}
示例10: handleDebugEvents
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
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;
}
}
}
示例11: handleDebugEvent
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
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;
}
}
示例12: handleDebugEvent
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
protected void handleDebugEvent(DebugEvent debugEvent) {
switch (debugEvent.getKind()) {
case DebugEvent.TERMINATE:
handleDebugTargetTerminated(debugEvent);
break;
}
}
示例13: handleDebugEvents
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
public void handleDebugEvents(DebugEvent[] events) {
for (DebugEvent debugEvent : events) {
if (debugEvent.getKind() == DebugEvent.TERMINATE) {
Object source = debugEvent.getSource();
if (source instanceof IAdaptable) {
Object adapter = ((IAdaptable) source).getAdapter(IDebugTarget.class);
if (adapter instanceof SCTDebugTarget) {
unregisterSCTTarget((SCTDebugTarget) adapter);
}
}
}
}
}
示例14: handleDebugEvent
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
/**
* Handles {@link DebugEvent.SUSPEND} and {@link DebugEvent.RESUME} events
* based on the input event's properties.
*/
private void handleDebugEvent(DebugEvent event) {
if (event.getKind() == DebugEvent.SUSPEND) {
handleSuspendEvent(event);
} else if (event.getKind() == DebugEvent.RESUME) {
handleResumeEvent(event);
}
}
示例15: getDebugEventListener
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
/**
* Registers an event listener on the debug session that responds to
* {@link DebugEvent.TERMINATE} events. This will stop the MBBean connection
* job, the {@link RuntimeDataProvider} and the {@link MBeanProvider}<br>
* <br>
* This will also cleanup the services registered during this debug session.
*
* @param launch
* the launch process
*/
private IDebugEventSetListener getDebugEventListener(final ILaunch launch) throws CoreException {
final IProcess process = launch.getProcesses()[0];
final String memento =
launch.getLaunchConfiguration().getMemento();
return new IDebugEventSetListener() {
@Override
public void handleDebugEvents(final DebugEvent[] events) {
if (events == null) {
return;
}
for (final DebugEvent event : events) {
if ( process != null
&& process.equals(event.getSource())
&& event.getKind() == DebugEvent.TERMINATE)
{
final JMXServiceDescriptor descriptor = mbeanProviderDataMap.get(memento).getJmxServiceDescriptor();
jmxServiceManager.remove(descriptor);
final MBeanServerConnectionJob job = mbeanProviderDataMap.get(memento).getMBeanServerConnectionJob();
if (job != null) {
job.cancel();
}
final RuntimeDataProvider runtimeDataProvider = mbeanProviderDataMap.get(memento).getRuntimeDataProvider();
runtimeDataProviderManager.remove(runtimeDataProvider);
if (runtimeDataProvider != null) {
runtimeDataProvider.stop();
}
final MBeanProvider mbeanProvider = mbeanProviderDataMap.get(memento).getMbeanProvider();
mbeanProviderManager.remove(mbeanProvider);
if (mbeanProvider != null) {
mbeanProvider.close();
}
}
}
}
};
}