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


Java DebugEvent.getKind方法代码示例

本文整理汇总了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());
		}
	});
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:19,代码来源:SimulationView.java

示例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;
    }
  }
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:22,代码来源:JsInspectExpression.java

示例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();
            }
        }
    }
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:20,代码来源:KarafRemoteConsole.java

示例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;
		}
	}
}
 
开发者ID:TestRoots,项目名称:watchdog,代码行数:22,代码来源:DebuggerListener.java

示例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();
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:25,代码来源:AbstractJiveView.java

示例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;
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:14,代码来源:XpectConfigurationDelegate.java

示例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();
			}
		}
	}
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:33,代码来源:TerminationListener.java

示例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();
    }
  }
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:9,代码来源:DumpExecutionDataHandler.java

示例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);
      }
    }
  }
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:15,代码来源:EclEmmaCorePlugin.java

示例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;
			}
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:16,代码来源:SCTPerspectiveManager.java

示例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;
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:16,代码来源:HighlightingSubmachineDecorationProvider.java

示例12: handleDebugEvent

import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
protected void handleDebugEvent(DebugEvent debugEvent) {
	switch (debugEvent.getKind()) {
	case DebugEvent.TERMINATE:
		handleDebugTargetTerminated(debugEvent);
		break;
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:8,代码来源:SCTSourceDisplayDispatcher.java

示例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);
				}
			}
		}
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:14,代码来源:SCTHotModelReplacementManager.java

示例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);
	}
}
 
开发者ID:TestRoots,项目名称:watchdog,代码行数:12,代码来源:DebugEventListener.java

示例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();
                    }
                }
            }
        }
    };
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:54,代码来源:KarafMBeanProviderWorkbenchService.java


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