本文整理汇总了Java中org.eclipse.debug.core.DebugEvent.getSource方法的典型用法代码示例。如果您正苦于以下问题:Java DebugEvent.getSource方法的具体用法?Java DebugEvent.getSource怎么用?Java DebugEvent.getSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.DebugEvent
的用法示例。
在下文中一共展示了DebugEvent.getSource方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onAfterCodeServerStarted
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
private void onAfterCodeServerStarted(DebugEvent event) {
if (!(event.getSource() instanceof IProcess)) {
return;
}
IProcess runtimeProcess = (IProcess) event.getSource();
final ILaunch launch = runtimeProcess.getLaunch();
IProcess[] processes = launch.getProcesses();
final IProcess process = processes[0];
// Look for the links in the sdm console output
consoleStreamListenerCodeServer = new IStreamListener() {
@Override
public void streamAppended(String text, IStreamMonitor monitor) {
displayCodeServerUrlInDevMode(launch, text);
}
};
// Listen to Console output
streamMonitorCodeServer = process.getStreamsProxy().getOutputStreamMonitor();
streamMonitorCodeServer.addListener(consoleStreamListenerCodeServer);
}
示例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(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;
}
}
}
示例4: 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();
}
}
}
}
示例5: 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();
}
}
}
示例6: 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);
}
}
}
}
示例7: 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;
}
}
}
示例8: handleDebugEvents
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
public final void handleDebugEvents(DebugEvent[] events) {
for (DebugEvent debugEvent : events) {
// Only notify about events fired from the active debug target
if ((debugEvent.getSource() instanceof SCTDebugTarget) && debugEvent.getSource() == debugTarget)
handleDebugEvent(debugEvent);
}
}
示例9: handleDebugTargetTerminated
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
protected void handleDebugTargetTerminated(DebugEvent debugEvent) {
Object source = debugEvent.getSource();
if (source instanceof IDebugTarget) {
IDebugTarget target = (IDebugTarget) source;
if (target == activeDebugTarget) {
activeSourceDisplay.terminate(true);
activeSourceDisplay = null;
}
}
}
示例10: 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);
}
}
}
}
}
示例11: onAfterWebServerStarted
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
private void onAfterWebServerStarted(DebugEvent event) {
if (!(event.getSource() instanceof IProcess)) {
return;
}
// nothing at the moment
}
示例12: onServerStarted
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
/**
* Possibly start the GWT Super Dev Mode CodeServer. <br/>
* <br/>
* This starts as separate process, which allows for custom args modification. <br/>
* It adds a launcher id to both processes for reference. <br/>
* 1. Get it from classic launch config <br/>
* 2. Get it from server VM properties <br/>
*/
protected void onServerStarted(DebugEvent event) {
onAfterWebServerStarted(event);
IProcess runtimeProcess = (IProcess) event.getSource();
ILaunch launch = runtimeProcess.getLaunch();
ILaunchConfiguration launchConfig = launch.getLaunchConfiguration();
String launchMode = launch.getLaunchMode();
IServer server = null;
try {
server = ServerUtil.getServer(launchConfig);
} catch (CoreException e) {
logError("possiblyLaunchGwtSuperDevModeCodeServer: Could get the WTP server.", e);
return;
}
if (server == null) {
logMessage("possiblyLaunchGwtSuperDevModeCodeServer: No WTP server runtime found.");
return;
}
IFacetedProject gwtFacetedProject = GwtFacetUtils.getGwtFacetedProject(server);
// If one of the server modules has a gwt facet
if (gwtFacetedProject == null) {
logMessage("possiblyLaunchGwtSuperDevModeCodeServer: Does not have a GWT Facet.");
return;
}
// Sync Option - the sync is off, ignore stopping the server
if (!GWTProjectProperties.getFacetSyncCodeServer(gwtFacetedProject.getProject())) {
logMessage("possiblyLaunchGwtSuperDevModeCodeServer: GWT Facet project properties, the code server sync is off.");
return;
}
/**
* Get the war output path for the `-launcherDir` in SDM launcher
*/
String launcherDir = getLauncherDirectory(server, launchConfig, gwtFacetedProject);
// LauncherId used to reference and terminate the the process
String launcherId = setLauncherIdToWtpRunTimeLaunchConfig(launchConfig);
logMessage("possiblyLaunchGwtSuperDevModeCodeServer: Launching GWT Super Dev Mode CodeServer. launcherId="
+ launcherId + " launcherDir=" + launcherDir);
// Just in case
if (launchMode == null) {
// run the code server, no need to debug it
launchMode = "run";
}
if (launcherId == null) { // ids to link two processes together
logMessage("possiblyLaunchGwtSuperDevModeCodeServer: No launcherId.");
}
// Add server urls to DevMode view for easy clicking on
addServerUrlsToDevModeView(launch);
// Creates ore launches an existing Super Dev Mode Code Server process
GwtSuperDevModeCodeServerLaunchUtil.launch(gwtFacetedProject.getProject(), launchMode, launcherDir, launcherId);
}
示例13: isVariableModificationEvent
import org.eclipse.debug.core.DebugEvent; //导入方法依赖的package包/类
private static boolean isVariableModificationEvent(DebugEvent event) {
return event.getSource() instanceof IVariable
&& event.getKind() == DebugEvent.CHANGE
&& event.getDetail() == DebugEvent.CONTENT;
}