diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java index c519506f688..5fba35f857a 100644 --- a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java @@ -174,7 +174,6 @@ public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2 // Returns the adapter type for the launch object. if (adapterType.equals(IElementContentProvider.class)) return adapterSet.fViewModelAdapter; else if (adapterType.equals(IModelProxyFactory.class)) return adapterSet.fViewModelAdapter; - else if (adapterType.equals(IColumnPresentationFactory.class)) return adapterSet.fViewModelAdapter; else return null; } diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java.html b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java.html new file mode 100644 index 00000000000..3d98e729b68 --- /dev/null +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/PDAAdapterFactory.java.html @@ -0,0 +1,223 @@ + + +
+1: /******************************************************************************* + 2: * Copyright (c) 2006 Wind River Systems and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * Wind River Systems - initial API and implementation + 10: *******************************************************************************/ + 11: package org.eclipse.dd.examples.pda.ui; + + 13: import java.util.Collections; + 14: import java.util.HashMap; + 15: import java.util.Map; + + 17: import org.eclipse.core.runtime.IAdapterFactory; + 18: import org.eclipse.dd.dsf.concurrent.Immutable; + 19: import org.eclipse.dd.dsf.concurrent.ThreadSafe; + 20: import org.eclipse.dd.dsf.debug.ui.actions.DsfResumeCommand; + 21: import org.eclipse.dd.dsf.debug.ui.actions.DsfStepIntoCommand; + 22: import org.eclipse.dd.dsf.debug.ui.actions.DsfStepOverCommand; + 23: import org.eclipse.dd.dsf.debug.ui.actions.DsfStepReturnCommand; + 24: import org.eclipse.dd.dsf.debug.ui.actions.DsfSuspendCommand; + 25: import org.eclipse.dd.dsf.debug.ui.sourcelookup.MISourceDisplayAdapter; + 26: import org.eclipse.dd.dsf.service.DsfSession; + 27: import org.eclipse.dd.examples.pda.PDAPlugin; + 28: import org.eclipse.dd.examples.pda.launch.PDALaunch; + 29: import org.eclipse.dd.examples.pda.ui.actions.PDATerminateCommand; + 30: import org.eclipse.dd.examples.pda.ui.viewmodel.PDAVMAdapter; + 31: import org.eclipse.debug.core.DebugPlugin; + 32: import org.eclipse.debug.core.ILaunch; + 33: import org.eclipse.debug.core.ILaunchesListener2; + 34: import org.eclipse.debug.core.commands.IResumeHandler; + 35: import org.eclipse.debug.core.commands.IStepIntoHandler; + 36: import org.eclipse.debug.core.commands.IStepOverHandler; + 37: import org.eclipse.debug.core.commands.IStepReturnHandler; + 38: import org.eclipse.debug.core.commands.ISuspendHandler; + 39: import org.eclipse.debug.core.commands.ITerminateHandler; + 40: import org.eclipse.debug.core.model.IDebugModelProvider; + 41: import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; + 42: import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory; + 43: import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider; + 44: import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory; + 45: import org.eclipse.debug.ui.sourcelookup.ISourceDisplay; + + 47: /** + 48: * The adapter factory is the central point of control of view model and other + 49: * UI adapters of a DSF-based debugger. As new launches are created and + 50: * old ones removed, this factory manages the life cycle of the associated + 51: * UI adapters. + 52: * <p> + 53: * As a platform adapter factory, this factory only provides adapters for + 54: * the launch object. Adapters for all other objects in the DSF model hierarchy + 55: * are registered with the DSF session. + 56: * </p> + 57: */ + 58: @ThreadSafe + 59: @SuppressWarnings({"restriction"}) + 60: public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2 + 61: { + 62: /** + 63: * Contains the set of adapters that are created for eacy launch instance. + 64: */ + 65: @Immutable + 66: private static class LaunchAdapterSet { + 67: // View Model adapter + 68: final PDAVMAdapter fViewModelAdapter; + 69: + 70: // Source lookup and positioning adapter + 71: final MISourceDisplayAdapter fSourceDisplayAdapter; + 72: + 73: // Command adapters + 74: final DsfStepIntoCommand fStepIntoCommand; + 75: final DsfStepOverCommand fStepOverCommand; + 76: final DsfStepReturnCommand fStepReturnCommand; + 77: final DsfSuspendCommand fSuspendCommand; + 78: final DsfResumeCommand fResumeCommand; + 79: final PDATerminateCommand fTerminateCommand; + 80: + 81: // Adapters for integration with other UI actions + 82: final IDebugModelProvider fDebugModelProvider; + 83: final PDALaunch fLaunch; + + 85: LaunchAdapterSet(PDALaunch launch) { + 86: // Initialize launch and session. + 87: fLaunch = launch; + 88: DsfSession session = launch.getSession(); + 89: + 90: // Initialize VM + 91: fViewModelAdapter = new PDAVMAdapter(session); + + 93: // Initialize source lookup + 94: fSourceDisplayAdapter = new MISourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator()); + 95: session.registerModelAdapter(ISourceDisplay.class, fSourceDisplayAdapter); + 96: + 97: // Initialize retargetable command handler. + 98: fStepIntoCommand = new DsfStepIntoCommand(session); + 99: fStepOverCommand = new DsfStepOverCommand(session); +100: fStepReturnCommand = new DsfStepReturnCommand(session); +101: fSuspendCommand = new DsfSuspendCommand(session); +102: fResumeCommand = new DsfResumeCommand(session); +103: fTerminateCommand = new PDATerminateCommand(session); +104: session.registerModelAdapter(IStepIntoHandler.class, fStepIntoCommand); +105: session.registerModelAdapter(IStepOverHandler.class, fStepOverCommand); +106: session.registerModelAdapter(IStepReturnHandler.class, fStepReturnCommand); +107: session.registerModelAdapter(ISuspendHandler.class, fSuspendCommand); +108: session.registerModelAdapter(IResumeHandler.class, fResumeCommand); +109: session.registerModelAdapter(ITerminateHandler.class, fTerminateCommand); + +111: // Initialize debug model provider +112: fDebugModelProvider = new IDebugModelProvider() { +113: public String[] getModelIdentifiers() { +114: return new String[] { PDAPlugin.ID_PDA_DEBUG_MODEL }; +115: } +116: }; +117: session.registerModelAdapter(IDebugModelProvider.class, fDebugModelProvider); +118: +119: // Register the launch as an adapter This ensures that the launch, +120: // and debug model ID will be associated with all DMContexts from this +121: // session. +122: session.registerModelAdapter(ILaunch.class, fLaunch); +123: } +124: +125: void dispose() { +126: DsfSession session = fLaunch.getSession(); + +128: fViewModelAdapter.dispose(); + +130: session.unregisterModelAdapter(ISourceDisplay.class); +131: if (fSourceDisplayAdapter != null) fSourceDisplayAdapter.dispose(); +132: +133: session.unregisterModelAdapter(IStepIntoHandler.class); +134: session.unregisterModelAdapter(IStepOverHandler.class); +135: session.unregisterModelAdapter(IStepReturnHandler.class); +136: session.unregisterModelAdapter(ISuspendHandler.class); +137: session.unregisterModelAdapter(IResumeHandler.class); +138: session.unregisterModelAdapter(ITerminateHandler.class); +139: fStepIntoCommand.dispose(); +140: fStepOverCommand.dispose(); +141: fStepReturnCommand.dispose(); +142: fSuspendCommand.dispose(); +143: fResumeCommand.dispose(); +144: fTerminateCommand.dispose(); +145: } +146: } + +148: private Map<PDALaunch, LaunchAdapterSet> fLaunchAdapterSets = +149: Collections.synchronizedMap(new HashMap<PDALaunch, LaunchAdapterSet>()); +150: +151: public PDAAdapterFactory() { +152: DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); +153: } + +155: // This IAdapterFactory method returns adapters for the PDA launch object only. +156: @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3 +157: public Object getAdapter(Object adaptableObject, Class adapterType) { +158: if (!(adaptableObject instanceof PDALaunch)) return null; + +160: PDALaunch launch = (PDALaunch)adaptableObject; + +162: // Find the correct set of adapters based on the launch. If not found +163: // it means that we have a new launch, and we have to create a +164: // new set of adapters. +165: LaunchAdapterSet adapterSet; +166: synchronized(fLaunchAdapterSets) { +167: adapterSet = fLaunchAdapterSets.get(launch); +168: if (adapterSet == null) { +169: adapterSet = new LaunchAdapterSet(launch); +170: fLaunchAdapterSets.put(launch, adapterSet); +171: } +172: } +173: +174: // Returns the adapter type for the launch object. +175: if (adapterType.equals(IElementContentProvider.class)) return adapterSet.fViewModelAdapter; +176: else if (adapterType.equals(IModelProxyFactory.class)) return adapterSet.fViewModelAdapter; +177: else return null; +178: } + +180: @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3 +181: public Class[] getAdapterList() { +182: return new Class[] { IElementContentProvider.class, IModelProxyFactory.class, IColumnPresentationFactory.class }; +183: } + +185: public void launchesRemoved(ILaunch[] launches) { +186: // Dispose the set of adapters for a launch only after the launch is +187: // removed from the view. If the launch is terminated, the adapters +188: // are still needed to populate the contents of the view. +189: for (ILaunch launch : launches) { +190: if (launch instanceof PDALaunch) { +191: PDALaunch pdaLaunch = (PDALaunch)launch; +192: synchronized(fLaunchAdapterSets) { +193: if ( fLaunchAdapterSets.containsKey(pdaLaunch) ) { +194: fLaunchAdapterSets.remove(pdaLaunch).dispose(); +195: } +196: } +197: } +198: } +199: } + +201: public void launchesTerminated(ILaunch[] launches) { +202: } + +204: public void launchesAdded(ILaunch[] launches) { +205: } +206: +207: public void launchesChanged(ILaunch[] launches) { +208: } +209: +210: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java index ac1adb19cc3..0fe04f06fc6 100644 --- a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java @@ -12,13 +12,11 @@ package org.eclipse.dd.examples.pda.ui.viewmodel; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider; -import org.eclipse.dd.dsf.debug.ui.viewmodel.modules.ModulesVMProvider; -import org.eclipse.dd.dsf.debug.ui.viewmodel.register.RegisterVMProvider; import org.eclipse.dd.dsf.debug.ui.viewmodel.variable.VariableVMProvider; import org.eclipse.dd.dsf.service.DsfSession; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMAdapter; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; -import org.eclipse.dd.examples.pda.ui.viewmodel.launch.LaunchVMProvider; +import org.eclipse.dd.examples.pda.ui.viewmodel.launch.PDALaunchVMProvider; import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; import org.eclipse.debug.ui.IDebugUIConstants; @@ -44,11 +42,9 @@ public class PDAVMAdapter extends AbstractDMVMAdapter @Override protected AbstractDMVMProvider createViewModelProvider(IPresentationContext context) { if ( IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId()) ) { - return new LaunchVMProvider(this, context, getSession()); + return new PDALaunchVMProvider(this, context, getSession()); } else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) ) { return new VariableVMProvider(this, context, getSession()); - } else if (IDebugUIConstants.ID_REGISTER_VIEW.equals(context.getId()) ) { - return new RegisterVMProvider(this, context, getSession()); } else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) { return new ExpressionVMProvider(this, context, getSession()); } diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java.html b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java.html new file mode 100644 index 00000000000..3b9ea80e322 --- /dev/null +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/PDAVMAdapter.java.html @@ -0,0 +1,66 @@ + + + +
1: /******************************************************************************* + 2: * Copyright (c) 2006 Wind River Systems and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * Wind River Systems - initial API and implementation + 10: *******************************************************************************/ + 11: package org.eclipse.dd.examples.pda.ui.viewmodel; + + 13: import org.eclipse.dd.dsf.concurrent.ThreadSafe; + 14: import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider; + 15: import org.eclipse.dd.dsf.debug.ui.viewmodel.variable.VariableVMProvider; + 16: import org.eclipse.dd.dsf.service.DsfSession; + 17: import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMAdapter; + 18: import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; + 19: import org.eclipse.dd.examples.pda.ui.viewmodel.launch.LaunchVMProvider; + 20: import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory; + 21: import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; + 22: import org.eclipse.debug.ui.IDebugUIConstants; + + 24: /* + 25: * + 26: */ + 27: @ThreadSafe + 28: @SuppressWarnings("restriction") + 29: public class PDAVMAdapter extends AbstractDMVMAdapter + 30: { + 31: public PDAVMAdapter(DsfSession session) { + 32: super(session); + 33: getSession().registerModelAdapter(IColumnPresentationFactory.class, this); + 34: } + + 36: @Override + 37: public void dispose() { + 38: getSession().unregisterModelAdapter(IColumnPresentationFactory.class); + 39: super.dispose(); + 40: } + 41: + 42: @Override + 43: protected AbstractDMVMProvider createViewModelProvider(IPresentationContext context) { + 44: if ( IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId()) ) { + 45: return new PDALaunchVMProvider(this, context, getSession()); + 46: } else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) ) { + 47: return new VariableVMProvider(this, context, getSession()); + 48: } else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) { + 49: return new ExpressionVMProvider(this, context, getSession()); + 50: } + 51: return null; + 52: } + 53: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/LaunchVMProvider.java b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDALaunchVMProvider.java similarity index 92% rename from plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/LaunchVMProvider.java rename to plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDALaunchVMProvider.java index 3cbd4c36cef..44ff9952a85 100644 --- a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/LaunchVMProvider.java +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDALaunchVMProvider.java @@ -43,11 +43,11 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont * */ @SuppressWarnings("restriction") -public class LaunchVMProvider extends AbstractDMVMProvider +public class PDALaunchVMProvider extends AbstractDMVMProvider implements IDebugEventSetListener, ILaunchesListener2 { @ThreadSafe - public LaunchVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) + public PDALaunchVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) { super(adapter, presentationContext, session); @@ -55,13 +55,13 @@ public class LaunchVMProvider extends AbstractDMVMProvider setRootNode(launchNode); // Launch node is a parent to the processes and program nodes. - IVMNode threadsNode = new PDAProgramVMNode(this, getSession()); + IVMNode pdaProgramNode = new PDAProgramVMNode(this, getSession()); IVMNode processesNode = new StandardProcessVMNode(this); - addChildNodes(launchNode, new IVMNode[] { threadsNode, processesNode}); + addChildNodes(launchNode, new IVMNode[] { pdaProgramNode, processesNode}); // Stack frames node is under the PDA program node. IVMNode stackFramesNode = new StackFramesVMNode(this, getSession()); - addChildNodes(threadsNode, new IVMNode[] { stackFramesNode }); + addChildNodes(pdaProgramNode, new IVMNode[] { stackFramesNode }); // Register the LaunchVM provider as a listener to debug and launch // events. These events are used by the launch and processes nodes. diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDALaunchVMProvider.java.html b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDALaunchVMProvider.java.html new file mode 100644 index 00000000000..0c9a409f3c6 --- /dev/null +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDALaunchVMProvider.java.html @@ -0,0 +1,149 @@ + + + +
1: /******************************************************************************* + 2: * Copyright (c) 2006 Wind River Systems and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * Wind River Systems - initial API and implementation + 10: * Ericsson - Modified for new functionality + 11: *******************************************************************************/ + 12: package org.eclipse.dd.examples.pda.ui.viewmodel.launch; + + 14: import java.util.concurrent.RejectedExecutionException; + + 16: import org.eclipse.dd.dsf.concurrent.ThreadSafe; + 17: import org.eclipse.dd.dsf.debug.ui.viewmodel.launch.LaunchRootVMNode; + 18: import org.eclipse.dd.dsf.debug.ui.viewmodel.launch.StackFramesVMNode; + 19: import org.eclipse.dd.dsf.debug.ui.viewmodel.launch.StandardProcessVMNode; + 20: import org.eclipse.dd.dsf.debug.ui.viewmodel.launch.LaunchRootVMNode.LaunchesEvent; + 21: import org.eclipse.dd.dsf.service.DsfSession; + 22: import org.eclipse.dd.dsf.ui.viewmodel.AbstractVMAdapter; + 23: import org.eclipse.dd.dsf.ui.viewmodel.IRootVMNode; + 24: import org.eclipse.dd.dsf.ui.viewmodel.IVMNode; + 25: import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; + 26: import org.eclipse.debug.core.DebugEvent; + 27: import org.eclipse.debug.core.DebugPlugin; + 28: import org.eclipse.debug.core.IDebugEventSetListener; + 29: import org.eclipse.debug.core.ILaunch; + 30: import org.eclipse.debug.core.ILaunchesListener2; + 31: import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; + + + 34: /** + 35: * View Model provider for the Launch (AKA Debug) view. The PDA debugger is + 36: * single-threaded, so there is no need for a debug target element to be visible + 37: * in the debug view. Therefore the launch VM provider is configured with three nodes: + 38: * <ul> + 39: * <li> LaunchRootVMNode - This is the root of the PDA view model.</li> + 40: * <li> ThreadVMNode - Supplies the PDA program element.</li> + 41: * <li> StackFramesVMNode - Supplies the stack frame elements.</li> + 42: * <li> StandardProcessVMNode - Supplies elements representing the PDA debugger process.</li> + 43: * </ul> + 44: */ + 45: @SuppressWarnings("restriction") + 46: public class PDALaunchVMProvider extends AbstractDMVMProvider + 47: implements IDebugEventSetListener, ILaunchesListener2 + 48: { + 49: @ThreadSafe + 50: public PDALaunchVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) + 51: { + 52: super(adapter, presentationContext, session); + 53: + 54: IRootVMNode launchNode = new LaunchRootVMNode(this); + 55: setRootNode(launchNode); + + 57: // Launch node is a parent to the processes and program nodes. + 58: IVMNode pdaProgramNode = new PDAProgramVMNode(this, getSession()); + 59: IVMNode processesNode = new StandardProcessVMNode(this); + 60: addChildNodes(launchNode, new IVMNode[] { pdaProgramNode, processesNode}); + 61: + 62: // Stack frames node is under the PDA program node. + 63: IVMNode stackFramesNode = new StackFramesVMNode(this, getSession()); + 64: addChildNodes(pdaProgramNode, new IVMNode[] { stackFramesNode }); + + 66: // Register the LaunchVM provider as a listener to debug and launch + 67: // events. These events are used by the launch and processes nodes. + 68: DebugPlugin.getDefault().addDebugEventListener(this); + 69: DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); + 70: } + 71: + 72: + 73: public void handleDebugEvents(final DebugEvent[] events) { + 74: if (isDisposed()) return; + 75: + 76: // This method may be called on any thread. Switch to the + 77: // view model executor thread before processing. + 78: try { + 79: getExecutor().execute(new Runnable() { + 80: public void run() { + 81: if (isDisposed()) return; + 82: + 83: for (final DebugEvent event : events) { + 84: handleEvent(event); + 85: } + 86: }}); + 87: } catch (RejectedExecutionException e) { + 88: // Ignore. This exception could be thrown if the view model is being + 89: // shut down. + 90: } + 91: } + + 93: @Override + 94: public void dispose() { + 95: DebugPlugin.getDefault().removeDebugEventListener(this); + 96: DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); + 97: super.dispose(); + 98: } + 99: +100: public void launchesAdded(ILaunch[] launches) { +101: handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.ADDED)); +102: } +103: +104: public void launchesRemoved(ILaunch[] launches) { +105: handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.REMOVED)); +106: } +107: +108: public void launchesChanged(ILaunch[] launches) { +109: handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.CHANGED)); +110: } +111: +112: public void launchesTerminated(ILaunch[] launches) { +113: handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.TERMINATED)); +114: } +115: +116: private void handleLaunchesEvent(final LaunchesEvent event) { +117: if (isDisposed()) return; +118: +119: // This method also may be called on any thread. Switch to the +120: // view model executor thread before processing. +121: try { +122: getExecutor().execute(new Runnable() { +123: public void run() { +124: if (isDisposed()) return; +125: +126: IRootVMNode rootLayoutNode = getRootVMNode(); +127: if (rootLayoutNode != null && rootLayoutNode.getDeltaFlags(event) != 0) { +128: handleEvent(event); +129: } +130: }}); +131: } catch (RejectedExecutionException e) { +132: // Ignore. This exception could be thrown if the view model is being +133: // shut down. +134: } +135: } +136: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDAProgramVMNode.java b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDAProgramVMNode.java index 16b27393312..b5ebe9f9544 100644 --- a/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDAProgramVMNode.java +++ b/plugins/org.eclipse.dd.examples.pda.ui/src/org/eclipse/dd/examples/pda/ui/viewmodel/launch/PDAProgramVMNode.java @@ -133,16 +133,18 @@ public class PDAProgramVMNode extends AbstractDMVMNode @Override protected void updateElementsInSessionThread(final IChildrenUpdate update) { - // Check if service is still available. checkService() is a convenience - // method that marks the update as failed if the needed service is not - // available. - if (!checkService(PDACommandControl.class, null, update)) return; - // Get the instance of the service. Note that there is no race condition // in getting the service since this method is called only in the - // service executor thred. + // service executor thread. final PDACommandControl commandControl = getServicesTracker().getService(PDACommandControl.class); - + + // Check if the service is available. If it is not, no elements are + // updated. + if (commandControl == null) { + handleFailedUpdate(update); + return; + } + update.setChild(createVMContext(commandControl.getProgramDMContext()), 0); update.done(); } @@ -172,8 +174,11 @@ public class PDAProgramVMNode extends AbstractDMVMNode @ConfinedToDsfExecutor("getSession().getExecutor()") private void updateProgramLabelInSessionThread(final ILabelUpdate update) { // Get a reference to the run control service. - if (!checkService(IRunControl.class, null, update)) return; final IRunControl runControl = getServicesTracker().getService(IRunControl.class); + if (runControl == null) { + handleFailedUpdate(update); + return; + } // Find the PDA program context. final PDAProgramDMContext programCtx = @@ -191,7 +196,7 @@ public class PDAProgramVMNode extends AbstractDMVMNode } update.setImageDescriptor(DebugUITools.getImageDescriptor(imageKey), 0); - // Retrieve the last state chagne reason + // Retrieve the last state change reason runControl.getExecutionData( programCtx, new DataRequestMonitor
1: /******************************************************************************* + 2: * Copyright (c) 2006 Wind River Systems and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * Wind River Systems - initial API and implementation + 10: * Ericsson - Modified for multi threaded functionality + 11: *******************************************************************************/ + 12: package org.eclipse.dd.examples.pda.ui.viewmodel.launch; + + 14: import java.util.concurrent.RejectedExecutionException; + + 16: import org.eclipse.core.runtime.CoreException; + 17: import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; + 18: import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; + 19: import org.eclipse.dd.dsf.concurrent.DsfRunnable; + 20: import org.eclipse.dd.dsf.concurrent.ImmediateExecutor; + 21: import org.eclipse.dd.dsf.concurrent.RequestMonitor; + 22: import org.eclipse.dd.dsf.datamodel.IDMEvent; + 23: import org.eclipse.dd.dsf.debug.service.IRunControl; + 24: import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext; + 25: import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMData; + 26: import org.eclipse.dd.dsf.debug.service.IRunControl.IResumedDMEvent; + 27: import org.eclipse.dd.dsf.debug.service.IRunControl.ISuspendedDMEvent; + 28: import org.eclipse.dd.dsf.service.DsfSession; + 29: import org.eclipse.dd.dsf.ui.viewmodel.AbstractVMContext; + 30: import org.eclipse.dd.dsf.ui.viewmodel.IVMAdapter; + 31: import org.eclipse.dd.dsf.ui.viewmodel.IVMNode; + 32: import org.eclipse.dd.dsf.ui.viewmodel.VMDelta; + 33: import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMNode; + 34: import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; + 35: import org.eclipse.dd.examples.pda.PDAPlugin; + 36: import org.eclipse.dd.examples.pda.launch.PDALaunch; + 37: import org.eclipse.dd.examples.pda.service.PDACommandControl; + 38: import org.eclipse.dd.examples.pda.service.PDAProgramDMContext; + 39: import org.eclipse.dd.examples.pda.service.PDAStartedEvent; + 40: import org.eclipse.debug.core.ILaunch; + 41: import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate; + 42: import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate; + 43: import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider; + 44: import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate; + 45: import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate; + 46: import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; + 47: import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate; + 48: import org.eclipse.debug.ui.DebugUITools; + 49: import org.eclipse.debug.ui.IDebugUIConstants; + 50: import org.eclipse.jface.viewers.TreePath; + + 52: /** + 53: * View Model node representing a PDA program. + 54: */ + 55: @SuppressWarnings("restriction") + 56: public class PDAProgramVMNode extends AbstractDMVMNode + 57: implements IElementLabelProvider + 58: { + 59: // View model context representing a terminated PDA program. + 60: // It's purpose is to show a terminated program in the debug view + 61: // even after the DSF session is terminated. + 62: // + 63: // Note: this context does not implement the IDMVMContext + 64: // interfaces, as it does not use an IDMContext as its root. + 65: // + 66: // To implement comparison methods, this contexts uses the + 67: // VM node object, such that two terminated program contexts + 68: // from the same instance of VM node will be equal. + 69: private static class TerminatedProgramVMContext extends AbstractVMContext { + 70: TerminatedProgramVMContext(IVMAdapter adapter, IVMNode node) { + 71: super(adapter, node); + 72: } + 73: + 74: @Override + 75: public boolean equals(Object obj) { + 76: if (obj instanceof TerminatedProgramVMContext) { + 77: TerminatedProgramVMContext context = (TerminatedProgramVMContext)obj; + 78: return getVMNode().equals(context.getVMNode()); + 79: } + 80: return false; + 81: } + 82: + 83: @Override + 84: public int hashCode() { + 85: return getVMNode().hashCode(); + 86: } + 87: } + 88: + 89: public PDAProgramVMNode(AbstractDMVMProvider provider, DsfSession session) { + 90: super(provider, session, IExecutionDMContext.class); + 91: } + + 93: @Override + 94: public void update(IHasChildrenUpdate[] updates) { + 95: for (IHasChildrenUpdate update : updates) { + 96: // Check if the launch is initialized. PDA program element should + 97: // be shown only if the launch has completed initializing. + 98: PDALaunch launch = findLaunchInPath(update.getElementPath()); + 99: update.setHasChilren(launch != null && launch.isInitialized()); +100: update.done(); +101: } +102: } + +104: @Override +105: public void update(IChildrenCountUpdate[] updates) { +106: for (IChildrenCountUpdate update : updates) { +107: // Check if the launch is initialized. PDA program element should +108: // be shown only if the launch has completed initializing. +109: PDALaunch launch = findLaunchInPath(update.getElementPath()); +110: if (launch != null && launch.isInitialized()) { +111: update.setChildCount(1); +112: } else { +113: update.setChildCount(0); +114: } +115: update.done(); +116: } +117: } + +119: @Override +120: public void update(IChildrenUpdate[] updates) { +121: for (IChildrenUpdate update : updates) { +122: PDALaunch launch = findLaunchInPath(update.getElementPath()); +123: if (launch != null && launch.isInitialized() && launch.isShutDown()) { +124: // If the debug session has been shut down, add a dummy +125: // VM context representing the PDA thread. +126: update.setChild(new TerminatedProgramVMContext(getVMProvider().getVMAdapter(), this), 0); +127: update.done(); +128: } else { +129: super.update(new IChildrenUpdate[] { update }); +130: } +131: } +132: } +133: +134: @Override +135: protected void updateElementsInSessionThread(final IChildrenUpdate update) { +136: // Get the instance of the service. Note that there is no race condition +137: // in getting the service since this method is called only in the +138: // service executor thread. +139: final PDACommandControl commandControl = getServicesTracker().getService(PDACommandControl.class); + +141: // Check if the service is available. If it is not, no elements are +142: // updated. +143: if (commandControl == null) { +144: handleFailedUpdate(update); +145: return; +146: } +147: +148: update.setChild(createVMContext(commandControl.getProgramDMContext()), 0); +149: update.done(); +150: } + +152: public void update(final ILabelUpdate[] updates) { +153: for (final ILabelUpdate update : updates) { +154: if (update.getElement() instanceof TerminatedProgramVMContext) { +155: // If the element is a terminated program, update the label +156: // in the View Model thread. +157: updateTerminatedThreadLabel(update); +158: } else { +159: // If the element is the PDA Program context, try to switch +160: // to the DSF session thread before updating the label. +161: try { +162: getSession().getExecutor().execute(new DsfRunnable() { +163: public void run() { +164: updateProgramLabelInSessionThread(update); +165: }}); +166: } catch (RejectedExecutionException e) { +167: // Acceptable race condition: DSF session terminated. +168: handleFailedUpdate(update); +169: } +170: } +171: } +172: } +173: +174: @ConfinedToDsfExecutor("getSession().getExecutor()") +175: private void updateProgramLabelInSessionThread(final ILabelUpdate update) { +176: // Get a reference to the run control service. +177: final IRunControl runControl = getServicesTracker().getService(IRunControl.class); +178: if (runControl == null) { +179: handleFailedUpdate(update); +180: return; +181: } +182: +183: // Find the PDA program context. +184: final PDAProgramDMContext programCtx = +185: findDmcInPath(update.getViewerInput(), update.getElementPath(), PDAProgramDMContext.class); + +187: // Call service to get current program state +188: final boolean isSuspended = runControl.isSuspended(programCtx); + +190: // Set the program icon based on the running state of the program. +191: String imageKey = null; +192: if (isSuspended) { +193: imageKey = IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED; +194: } else { +195: imageKey = IDebugUIConstants.IMG_OBJS_THREAD_RUNNING; +196: } +197: update.setImageDescriptor(DebugUITools.getImageDescriptor(imageKey), 0); + +199: // Retrieve the last state chagne reason +200: runControl.getExecutionData( +201: programCtx, +202: new DataRequestMonitor<IExecutionDMData>(ImmediateExecutor.getInstance(), null) +203: { +204: @Override +205: public void handleCompleted(){ +206: // If the request failed, fail the udpate. +207: if (!getStatus().isOK()) { +208: handleFailedUpdate(update); +209: return; +210: } +211: +212: // Compose the thread name string. +213: final StringBuilder builder = new StringBuilder(); +214: +215: builder.append("PDA ["); +216: builder.append(programCtx.getProgram()); +217: builder.append("]"); +218: +219: if(isSuspended) { +220: builder.append(" (Suspended"); +221: } else { +222: builder.append(" (Running"); +223: } +224: // Reason will be null before ContainerSuspendEvent is fired +225: if(getData().getStateChangeReason() != null) { +226: builder.append(" : "); +227: builder.append(getData().getStateChangeReason()); +228: } +229: builder.append(")"); +230: update.setLabel(builder.toString(), 0); +231: update.done(); +232: } +233: }); +234: } +235: +236: private void updateTerminatedThreadLabel(ILabelUpdate update) { +237: update.setLabel("<terminated> PDA [" + getProgramName(update) + "]", 0); +238: update.setImageDescriptor(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED), 0); +239: update.done(); +240: } + +242: private String getProgramName(IViewerUpdate update) { +243: // Retrieve the program name from the launch object in the update path. +244: String program = "unknown program"; +245: ILaunch launch = findLaunchInPath(update.getElementPath()); +246: if (launch != null) { +247: try { +248: program = launch.getLaunchConfiguration().getAttribute(PDAPlugin.ATTR_PDA_PROGRAM, program); +249: } catch (CoreException e) { +250: // Ignore, label will revert to default. +251: } +252: } +253: return program; +254: } +255: +256: private PDALaunch findLaunchInPath(TreePath path) { +257: for (int i = 0; i < path.getSegmentCount(); i++) { +258: if (path.getSegment(i) instanceof PDALaunch) { +259: return (PDALaunch)path.getSegment(i); +260: } +261: } +262: return null; +263: } + +265: public int getDeltaFlags(Object e) { +266: if(e instanceof IResumedDMEvent || e instanceof ISuspendedDMEvent) { +267: return IModelDelta.STATE; +268: } +269: if (e instanceof PDAStartedEvent) { +270: return IModelDelta.EXPAND | IModelDelta.SELECT; +271: } +272: return IModelDelta.NO_CHANGE; +273: } + +275: public void buildDelta(Object e, VMDelta parentDelta, int nodeOffset, RequestMonitor rm) { +276: if(e instanceof IResumedDMEvent || e instanceof ISuspendedDMEvent) { +277: // If a suspended/resumed event is received, just update the +278: // state of the program. StackFramesVMNode will take care of +279: // refreshing the stack frames. +280: parentDelta.addNode(createVMContext(((IDMEvent<?>)e).getDMContext()), IModelDelta.STATE); +281: } +282: if (e instanceof PDAStartedEvent) { +283: // When debug session is started expand and select the program. +284: // If the program hits a breakpoint, the top stack frame will then +285: // be selected. +286: parentDelta.addNode(createVMContext(((PDAStartedEvent)e).getDMContext()), IModelDelta.EXPAND | IModelDelta.SELECT); +287: } +288: rm.done(); +289: } +290: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java index 6341c937efe..99d726d6d2d 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java @@ -43,17 +43,19 @@ import org.eclipse.debug.core.model.ITerminate; */ @ThreadSafe public class PDALaunch extends Launch - implements ITerminate +implements ITerminate { // DSF executor and session. Both are created and shutdown by the launch. private final DefaultDsfExecutor fExecutor; private final DsfSession fSession; // Objects used to track the status of the DSF session. - private Sequence fInitializationSequence = null; private boolean fInitialized = false; private boolean fShutDown = false; + @ConfinedToDsfExecutor("getSession().getExecutor()") + private Sequence fInitializationSequence = null; + /** * Launch constructor creates the launch for given parameters. The * constructor also creates a DSF session and an executor, so that @@ -90,7 +92,7 @@ public class PDALaunch extends Launch { // Double-check that we're being called in the correct thread. assert fExecutor.isInExecutorThread(); - + // Check if shutdownServices() was called already, which would be // highly unusual, but if so we don't need to do anything except set // the initialized flag. @@ -100,51 +102,47 @@ public class PDALaunch extends Launch return; } } - + // Register the launch as listener for services events. fSession.addServiceEventListener(PDALaunch.this, null); - - // Initialize the fInitializationSequence attribute in a synchronized - // block, because it may be accessed in another thread by shutdown(). + // The initialization sequence is stored in a field to allow it to be // canceled if shutdownServices() is called before the sequence // completes. - synchronized(this) { - fInitializationSequence = new PDAServicesInitSequence( - getSession(), program, requestPort, eventPort, - new RequestMonitor(ImmediateExecutor.getInstance(), rm) { - @Override - protected void handleCompleted() { - // Set the initialized flag and check whether the - // shutdown flag is set. Access the flags in a - // synchronized section as these flags can be accessed - // on any thread. - boolean doShutdown = false; - synchronized (this) { - fInitialized = true; - fInitializationSequence = null; - if (fShutDown) { - doShutdown = true; - } + fInitializationSequence = new PDAServicesInitSequence( + getSession(), program, requestPort, eventPort, + new RequestMonitor(ImmediateExecutor.getInstance(), rm) { + @Override + protected void handleCompleted() { + // Set the initialized flag and check whether the + // shutdown flag is set. Access the flags in a + // synchronized section as these flags can be accessed + // on any thread. + boolean doShutdown = false; + synchronized (this) { + fInitialized = true; + fInitializationSequence = null; + if (fShutDown) { + doShutdown = true; } - - if (doShutdown) { - // If shutdownServices() was already called, start the - // shutdown sequence now. - doShutdown(rm); - } else { - // If there was an error in the startup sequence, - // report the error to the client. - if (getStatus().getSeverity() == IStatus.ERROR) { - rm.setStatus(getStatus()); - } - rm.done(); - } - fireChanged(); } - }); - } - + + if (doShutdown) { + // If shutdownServices() was already called, start the + // shutdown sequence now. + doShutdown(rm); + } else { + // If there was an error in the startup sequence, + // report the error to the client. + if (getStatus().getSeverity() == IStatus.ERROR) { + rm.setStatus(getStatus()); + } + rm.done(); + } + fireChanged(); + } + }); + // Finally, execute the sequence. getSession().getExecutor().execute(fInitializationSequence); } @@ -163,7 +161,7 @@ public class PDALaunch extends Launch public synchronized boolean isInitialized() { return fInitialized; } - + /** * Returns whether the DSF services have been set to shut down. * @return @@ -171,7 +169,7 @@ public class PDALaunch extends Launch public synchronized boolean isShutDown() { return fShutDown; } - + @Override public boolean canTerminate() { return super.canTerminate() && isInitialized() && !isShutDown(); @@ -223,7 +221,7 @@ public class PDALaunch extends Launch rm.done(); } } - + @ConfinedToDsfExecutor("getSession().getExecutor()") private void doShutdown(final RequestMonitor rm) { fExecutor.execute( new PDAServicesShutdownSequence( @@ -242,13 +240,13 @@ public class PDALaunch extends Launch // session-ended event, finish step only after the dispatch. fExecutor.shutdown(); fireTerminate(); - + rm.setStatus(getStatus()); rm.done(); } }) ); } - + @SuppressWarnings("unchecked") @Override public Object getAdapter(Class adapter) { diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java.html b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java.html new file mode 100644 index 00000000000..fb914a97cd8 --- /dev/null +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunch.java.html @@ -0,0 +1,271 @@ + + + +
1: /******************************************************************************* + 2: * Copyright (c) 2008 Wind River Systems and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * Wind River Systems - initial API and implementation + 10: *******************************************************************************/ + 11: package org.eclipse.dd.examples.pda.launch; + + 13: import org.eclipse.core.runtime.IStatus; + 14: import org.eclipse.core.runtime.MultiStatus; + 15: import org.eclipse.core.runtime.Platform; + 16: import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; + 17: import org.eclipse.dd.dsf.concurrent.DefaultDsfExecutor; + 18: import org.eclipse.dd.dsf.concurrent.ImmediateExecutor; + 19: import org.eclipse.dd.dsf.concurrent.RequestMonitor; + 20: import org.eclipse.dd.dsf.concurrent.Sequence; + 21: import org.eclipse.dd.dsf.concurrent.ThreadSafe; + 22: import org.eclipse.dd.dsf.service.DsfServiceEventHandler; + 23: import org.eclipse.dd.dsf.service.DsfSession; + 24: import org.eclipse.dd.examples.pda.PDAPlugin; + 25: import org.eclipse.dd.examples.pda.service.PDATerminatedEvent; + 26: import org.eclipse.debug.core.DebugException; + 27: import org.eclipse.debug.core.ILaunchConfiguration; + 28: import org.eclipse.debug.core.Launch; + 29: import org.eclipse.debug.core.model.ISourceLocator; + 30: import org.eclipse.debug.core.model.ITerminate; + + 32: /** + 33: * The PDA launch object. In general, a DSF-based debugger has to override + 34: * the base launch class in order to supply its own content providers for the + 35: * debug view. Additionally, the PDA launch is used to monitor the state of the + 36: * PDA debugger and to shutdown the DSF services and session belonging to the + 37: * launch. + 38: * <p> + 39: * The PDA launch class mostly contains methods and fields that can be accessed + 40: * on any thread. However, some fields and methods used for managing the DSF + 41: * session need to be synchronized using the DSF executor. + 42: * </p> + 43: */ + 44: @ThreadSafe + 45: public class PDALaunch extends Launch + 46: implements ITerminate + 47: { + 48: // DSF executor and session. Both are created and shutdown by the launch. + 49: private final DefaultDsfExecutor fExecutor; + 50: private final DsfSession fSession; + + 52: // Objects used to track the status of the DSF session. + 53: private boolean fInitialized = false; + 54: private boolean fShutDown = false; + 55: + 56: @ConfinedToDsfExecutor("getSession().getExecutor()") + 57: private Sequence fInitializationSequence = null; + + 59: /** + 60: * Launch constructor creates the launch for given parameters. The + 61: * constructor also creates a DSF session and an executor, so that + 62: * {@link #getSession()} returns a valid value, however no services + 63: * are initialized yet. + 64: * + 65: * @see Launch + 66: */ + 67: public PDALaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator) { + 68: super(launchConfiguration, mode, locator); + + 70: // Create the dispatch queue to be used by debugger control and services + 71: // that belong to this launch + 72: final DefaultDsfExecutor dsfExecutor = new DefaultDsfExecutor(PDAPlugin.ID_PDA_DEBUG_MODEL); + 73: dsfExecutor.prestartCoreThread(); + 74: fExecutor = dsfExecutor; + 75: fSession = DsfSession.startSession(fExecutor, PDAPlugin.ID_PDA_DEBUG_MODEL); + 76: } + + 78: /** + 79: * Returns the DSF services session that belongs to this launch. This + 80: * method will always return a DsfSession object, however if the debugger + 81: * is shut down, the session will no longer active. + 82: */ + 83: public DsfSession getSession() { return fSession; } + + 85: /** + 86: * Initializes the DSF services using the specified parameters. This + 87: * method has to be called on the executor thread in order to avoid + 88: * synchronization issues. + 89: */ + 90: @ConfinedToDsfExecutor("getSession().getExecutor()") + 91: public void initializeServices(String program, int requestPort, int eventPort, final RequestMonitor rm) + 92: { + 93: // Double-check that we're being called in the correct thread. + 94: assert fExecutor.isInExecutorThread(); + + 96: // Check if shutdownServices() was called already, which would be + 97: // highly unusual, but if so we don't need to do anything except set + 98: // the initialized flag. + 99: synchronized(this) { +100: if (fShutDown) { +101: fInitialized = true; +102: return; +103: } +104: } + +106: // Register the launch as listener for services events. +107: fSession.addServiceEventListener(PDALaunch.this, null); + +109: // The initialization sequence is stored in a field to allow it to be +110: // canceled if shutdownServices() is called before the sequence +111: // completes. +112: fInitializationSequence = new PDAServicesInitSequence( +113: getSession(), program, requestPort, eventPort, +114: new RequestMonitor(ImmediateExecutor.getInstance(), rm) { +115: @Override +116: protected void handleCompleted() { +117: // Set the initialized flag and check whether the +118: // shutdown flag is set. Access the flags in a +119: // synchronized section as these flags can be accessed +120: // on any thread. +121: boolean doShutdown = false; +122: synchronized (this) { +123: fInitialized = true; +124: fInitializationSequence = null; +125: if (fShutDown) { +126: doShutdown = true; +127: } +128: } + +130: if (doShutdown) { +131: // If shutdownServices() was already called, start the +132: // shutdown sequence now. +133: doShutdown(rm); +134: } else { +135: // If there was an error in the startup sequence, +136: // report the error to the client. +137: if (getStatus().getSeverity() == IStatus.ERROR) { +138: rm.setStatus(getStatus()); +139: } +140: rm.done(); +141: } +142: fireChanged(); +143: } +144: }); + +146: // Finally, execute the sequence. +147: getSession().getExecutor().execute(fInitializationSequence); +148: } + +150: /** +151: * Event handler for a debugger terminated event. +152: */ +153: @DsfServiceEventHandler +154: public void eventDispatched(PDATerminatedEvent event) { +155: shutdownServices(new RequestMonitor(ImmediateExecutor.getInstance(), null)); +156: } + +158: /** +159: * Returns whether the DSF service initialization sequence has completed yet. +160: */ +161: public synchronized boolean isInitialized() { +162: return fInitialized; +163: } + +165: /** +166: * Returns whether the DSF services have been set to shut down. +167: * @return +168: */ +169: public synchronized boolean isShutDown() { +170: return fShutDown; +171: } + +173: @Override +174: public boolean canTerminate() { +175: return super.canTerminate() && isInitialized() && !isShutDown(); +176: } + +178: @Override +179: public boolean isTerminated() { +180: return super.isTerminated() || isShutDown(); +181: } + + +184: @Override +185: public void terminate() throws DebugException { +186: if (isShutDown()) return; +187: super.terminate(); +188: } + +190: /** +191: * Shuts down the services, the session and the executor associated with +192: * this launch. +193: * <p> +194: * Note: The argument request monitor to this method should NOT use the +195: * executor that belongs to this launch. By the time the shutdown is +196: * complete, this executor will not be dispatching anymore and the +197: * request monitor will never be invoked. Instead callers should use +198: * the {@link ImmediateExecutor}. +199: * </p> +200: * @param rm The request monitor invoked when the shutdown is complete. +201: */ +202: @ConfinedToDsfExecutor("getSession().getExecutor()") +203: public void shutdownServices(final RequestMonitor rm) { +204: // Check initialize and shutdown flags to determine if the shutdown +205: // sequence can be called yet. +206: boolean doShutdown = false; +207: synchronized (this) { +208: if (!fInitialized && fInitializationSequence != null) { +209: // Launch has not yet initialized, try to cancel the +210: // shutdown sequence. +211: fInitializationSequence.cancel(false); +212: } else { +213: doShutdown = !fShutDown && fInitialized; +214: } +215: fShutDown = true; +216: } + +218: if (doShutdown) { +219: doShutdown(rm); +220: } else { +221: rm.done(); +222: } +223: } + +225: @ConfinedToDsfExecutor("getSession().getExecutor()") +226: private void doShutdown(final RequestMonitor rm) { +227: fExecutor.execute( new PDAServicesShutdownSequence( +228: fExecutor, fSession.getId(), +229: new RequestMonitor(fSession.getExecutor(), rm) { +230: @Override +231: public void handleCompleted() { +232: fSession.removeServiceEventListener(PDALaunch.this); +233: if (!getStatus().isOK()) { +234: PDAPlugin.getDefault().getLog().log(new MultiStatus( +235: PDAPlugin.PLUGIN_ID, -1, new IStatus[]{getStatus()}, "Session shutdown failed", null)); //$NON-NLS-1$ +236: } +237: // Last order of business, shutdown the dispatch queue. +238: DsfSession.endSession(fSession); +239: // endSession takes a full dispatch to distribute the +240: // session-ended event, finish step only after the dispatch. +241: fExecutor.shutdown(); +242: fireTerminate(); + +244: rm.setStatus(getStatus()); +245: rm.done(); +246: } +247: }) ); +248: } + +250: @SuppressWarnings("unchecked") +251: @Override +252: public Object getAdapter(Class adapter) { +253: // Force adapters to be loaded. Otherwise the adapter manager may not find +254: // the model proxy adapter for DSF-based debug elements. +255: Platform.getAdapterManager().loadAdapter(this, adapter.getName()); +256: return super.getAdapter(adapter); +257: } +258: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunchDelegate.java.html b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunchDelegate.java.html new file mode 100644 index 00000000000..f6c4b38f025 --- /dev/null +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDALaunchDelegate.java.html @@ -0,0 +1,234 @@ + + + +
1: /******************************************************************************* + 2: * Copyright (c) 2005, 2008 IBM Corporation and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * IBM Corporation - initial API and implementation + 10: * Bjorn Freeman-Benson - initial API and implementation + 11: * Wind River Systems - adopted to use with DSF + 12: *******************************************************************************/ + 13: package org.eclipse.dd.examples.pda.launch; + + 15: import java.io.File; + 16: import java.io.IOException; + 17: import java.net.ServerSocket; + 18: import java.text.MessageFormat; + 19: import java.util.ArrayList; + 20: import java.util.List; + 21: import java.util.concurrent.ExecutionException; + + 23: import org.eclipse.core.resources.IFile; + 24: import org.eclipse.core.resources.ResourcesPlugin; + 25: import org.eclipse.core.runtime.CoreException; + 26: import org.eclipse.core.runtime.IProgressMonitor; + 27: import org.eclipse.core.runtime.IStatus; + 28: import org.eclipse.core.runtime.Path; + 29: import org.eclipse.core.runtime.Status; + 30: import org.eclipse.core.variables.IValueVariable; + 31: import org.eclipse.core.variables.VariablesPlugin; + 32: import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; + 33: import org.eclipse.dd.dsf.concurrent.Query; + 34: import org.eclipse.dd.examples.pda.PDAPlugin; + 35: import org.eclipse.debug.core.DebugException; + 36: import org.eclipse.debug.core.DebugPlugin; + 37: import org.eclipse.debug.core.ILaunch; + 38: import org.eclipse.debug.core.ILaunchConfiguration; + 39: import org.eclipse.debug.core.model.IPersistableSourceLocator; + 40: import org.eclipse.debug.core.model.ISourceLocator; + 41: import org.eclipse.debug.core.model.LaunchConfigurationDelegate; + 42: import org.eclipse.debug.core.sourcelookup.IPersistableSourceLocator2; + + + 45: /** + 46: * Launches PDA program on a PDA interpretter written in Perl + 47: */ + 48: public class PDALaunchDelegate extends LaunchConfigurationDelegate { + + 50: @Override + 51: public ILaunch getLaunch(ILaunchConfiguration configuration, String mode) throws CoreException { + 52: // Need to configure the source locator before creating the launch + 53: // because once the launch is created and added to launch manager, + 54: // the adapters will be created for the whole session, including + 55: // the source lookup adapter. + 56: ISourceLocator locator = getSourceLocator(configuration); + + 58: return new PDALaunch(configuration, mode, locator); + 59: } + + 61: @Override + 62: public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { + 63: // PDA programs do not require building. + 64: return false; + 65: } + + 67: /** + 68: * Returns a source locator created based on the attributes in the launch configuration. + 69: */ + 70: private ISourceLocator getSourceLocator(ILaunchConfiguration configuration) throws CoreException { + 71: String type = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null); + 72: if (type == null) { + 73: type = configuration.getType().getSourceLocatorId(); + 74: } + 75: if (type != null) { + 76: IPersistableSourceLocator locator = DebugPlugin.getDefault().getLaunchManager().newSourceLocator(type); + 77: String memento = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, (String)null); + 78: if (memento == null) { + 79: locator.initializeDefaults(configuration); + 80: } else { + 81: if(locator instanceof IPersistableSourceLocator2) + 82: ((IPersistableSourceLocator2)locator).initializeFromMemento(memento, configuration); + 83: else + 84: locator.initializeFromMemento(memento); + 85: } + 86: return locator; + 87: } + 88: return null; + 89: } + + 91: public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { + 92: String program = configuration.getAttribute(PDAPlugin.ATTR_PDA_PROGRAM, (String)null); + 93: if (program == null) { + 94: abort("Perl program unspecified.", null); + 95: } + + 97: int requestPort = findFreePort(); + 98: int eventPort = findFreePort(); + 99: if (requestPort == -1 || eventPort == -1) { +100: abort("Unable to find free port", null); +101: } + +103: launchProcess(launch, program, requestPort, eventPort); +104: PDALaunch pdaLaunch = (PDALaunch)launch; +105: initServices(pdaLaunch, program, requestPort, eventPort); +106: } + +108: /** +109: * Launches PDA interpreter with the given program. +110: * +111: * @param launch Launch that will contain the new process. +112: * @param program PDA program to use in the interpreter. +113: * @param requestPort The port number for connecting the request socket. +114: * @param eventPort The port number for connecting the events socket. +115: * +116: * @throws CoreException +117: */ +118: private void launchProcess(ILaunch launch, String program, int requestPort, int eventPort) throws CoreException { +119: List<String> commandList = new ArrayList<String>(); + +121: // Find Perl executable +122: IValueVariable perl = VariablesPlugin.getDefault().getStringVariableManager().getValueVariable(PDAPlugin.VARIALBE_PERL_EXECUTABLE); +123: if (perl == null) { +124: abort("Perl executable location undefined. Check value of ${dsfPerlExecutable}.", null); +125: } +126: String path = perl.getValue(); +127: if (path == null) { +128: abort("Perl executable location unspecified. Check value of ${dsfPerlExecutable}.", null); +129: } +130: File exe = new File(path); +131: if (!exe.exists()) { +132: abort(MessageFormat.format("Specified Perl executable {0} does not exist. Check value of $dsfPerlExecutable.", new Object[]{path}), null); +133: } +134: commandList.add(path); + +136: // Add PDA VM +137: File vm = PDAPlugin.getFileInPlugin(new Path("pdavm/pda.pl")); +138: if (vm == null) { +139: abort("Missing PDA VM", null); +140: } +141: commandList.add(vm.getAbsolutePath()); + +143: // Add PDA program +144: IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(program)); +145: if (!file.exists()) { +146: abort(MessageFormat.format("Perl program {0} does not exist.", new Object[] {file.getFullPath().toString()}), null); +147: } + +149: commandList.add(file.getLocation().toOSString()); + +151: // Add debug arguments - i.e. '-debug requestPort eventPort' +152: commandList.add("-debug"); +153: commandList.add("" + requestPort); +154: commandList.add("" + eventPort); + +156: // Launch the perl process. +157: String[] commandLine = commandList.toArray(new String[commandList.size()]); +158: Process process = DebugPlugin.exec(commandLine, null); + +160: // Create a debug platform process object and add it to the launch. +161: DebugPlugin.newProcess(launch, process, path); +162: } + +164: /** +165: * Calls the launch to initialize DSF services for this launch. +166: */ +167: private void initServices(final PDALaunch pdaLaunch, final String program, final int requestPort, final int eventPort) +168: throws CoreException +169: { +170: // Synchronization object to use when waiting for the services initialization. +171: Query<Object> initQuery = new Query<Object>() { +172: @Override +173: protected void execute(DataRequestMonitor<Object> rm) { +174: pdaLaunch.initializeServices(program, requestPort, eventPort, rm); +175: } +176: }; + +178: // Submit the query to the executor. +179: pdaLaunch.getSession().getExecutor().execute(initQuery); +180: try { +181: // Block waiting for query results. +182: initQuery.get(); +183: } catch (InterruptedException e1) { +184: throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, "Interrupted Exception in dispatch thread", e1)); //$NON-NLS-1$ +185: } catch (ExecutionException e1) { +186: throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in launch sequence", e1.getCause())); //$NON-NLS-1$ +187: } +188: } + +190: /** +191: * Throws an exception with a new status containing the given +192: * message and optional exception. +193: * +194: * @param message error message +195: * @param e underlying exception +196: * @throws CoreException +197: */ +198: private void abort(String message, Throwable e) throws CoreException { +199: throw new CoreException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, 0, message, e)); +200: } + +202: /** +203: * Returns a free port number on localhost, or -1 if unable to find a free port. +204: */ +205: public static int findFreePort() { +206: ServerSocket socket= null; +207: try { +208: socket= new ServerSocket(0); +209: return socket.getLocalPort(); +210: } catch (IOException e) { +211: } finally { +212: if (socket != null) { +213: try { +214: socket.close(); +215: } catch (IOException e) { +216: } +217: } +218: } +219: return -1; +220: } +221: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java index a92a61fc79d..781e8c505e3 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java @@ -44,12 +44,6 @@ public class PDAServicesInitSequence extends Sequence { fCommandControl = new PDACommandControl(fSession, fProgram, fRequestPort, fEventPort); fCommandControl.initialize(requestMonitor); } - - @Override - public void rollBack(RequestMonitor rm) { - // TODO Auto-generated method stub - super.rollBack(rm); - } }, new Step() { @Override @@ -77,7 +71,7 @@ public class PDAServicesInitSequence extends Sequence { @Override public void execute(final RequestMonitor requestMonitor) { // Create the breakpoint mediator and start tracking PDA breakpoints. - + final BreakpointsMediator bpmService = new BreakpointsMediator( fSession, new PDABreakpointAttributeTranslator()); bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) { @@ -88,19 +82,22 @@ public class PDAServicesInitSequence extends Sequence { }); } }, - new Step() { @Override + new Step() { + @Override public void execute(RequestMonitor requestMonitor) { // Start the stack service. new PDAStack(fSession).initialize(requestMonitor); } }, - new Step() { @Override + new Step() { + @Override public void execute(RequestMonitor requestMonitor) { // Start the service to track expressions. new PDAExpressions(fSession).initialize(requestMonitor); } }, - new Step() { @Override + new Step() { + @Override public void execute(RequestMonitor requestMonitor) { fRunControl.resume(fCommandControl.getProgramDMContext(), requestMonitor); } @@ -125,7 +122,7 @@ public class PDAServicesInitSequence extends Sequence { fRequestPort = requestPort; fEventPort = eventPort; } - + @Override public Step[] getSteps() { return fSteps; diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java.html b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java.html new file mode 100644 index 00000000000..7f4aae65d3d --- /dev/null +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesInitSequence.java.html @@ -0,0 +1,140 @@ + + + +
1: /******************************************************************************* + 2: * Copyright (c) 2008 Wind River Systems and others. + 3: * All rights reserved. This program and the accompanying materials + 4: * are made available under the terms of the Eclipse Public License v1.0 + 5: * which accompanies this distribution, and is available at + 6: * http://www.eclipse.org/legal/epl-v10.html + 7: * + 8: * Contributors: + 9: * Wind River Systems - initial API and implementation + 10: *******************************************************************************/ + 11: package org.eclipse.dd.examples.pda.launch; + + 13: import org.eclipse.dd.dsf.concurrent.RequestMonitor; + 14: import org.eclipse.dd.dsf.concurrent.Sequence; + 15: import org.eclipse.dd.dsf.debug.service.BreakpointsMediator; + 16: import org.eclipse.dd.dsf.debug.service.StepQueueManager; + 17: import org.eclipse.dd.dsf.service.DsfSession; + 18: import org.eclipse.dd.examples.pda.service.PDABreakpointAttributeTranslator; + 19: import org.eclipse.dd.examples.pda.service.PDABreakpoints; + 20: import org.eclipse.dd.examples.pda.service.PDACommandControl; + 21: import org.eclipse.dd.examples.pda.service.PDAExpressions; + 22: import org.eclipse.dd.examples.pda.service.PDARunControl; + 23: import org.eclipse.dd.examples.pda.service.PDAStack; + + 25: /** + 26: * The initialization sequence for PDA debugger services. This sequence contains + 27: * the series of steps that are executed to properly initialize the PDA-DSF debug + 28: * session. If any of the individual steps fail, the initialization will abort. + 29: * <p> + 30: * The order in which services are initialized is important. Some services depend + 31: * on other services and they assume that they will be initialized only if those + 32: * services are active. Also the service events are prioritized and their priority + 33: * depends on the order in which the services were initialized. + 34: * </p> + 35: */ + 36: public class PDAServicesInitSequence extends Sequence { + + 38: Step[] fSteps = new Step[] { + 39: new Step() + 40: { + 41: @Override + 42: public void execute(RequestMonitor requestMonitor) { + 43: // Create the connection to PDA debugger. + 44: fCommandControl = new PDACommandControl(fSession, fProgram, fRequestPort, fEventPort); + 45: fCommandControl.initialize(requestMonitor); + 46: } + 47: }, + 48: new Step() { + 49: @Override + 50: public void execute(RequestMonitor requestMonitor) { + 51: // Start the run control service. + 52: fRunControl = new PDARunControl(fSession); + 53: fRunControl.initialize(requestMonitor); + 54: } + 55: }, + 56: new Step() { + 57: @Override + 58: public void execute(RequestMonitor requestMonitor) { + 59: // Start the service to manage step actions. + 60: new StepQueueManager(fSession).initialize(requestMonitor); + 61: } + 62: }, + 63: new Step() { + 64: @Override + 65: public void execute(final RequestMonitor requestMonitor) { + 66: // Start the low-level breakpoint service + 67: new PDABreakpoints(fSession).initialize(new RequestMonitor(getExecutor(), requestMonitor)); + 68: } + 69: }, + 70: new Step() { + 71: @Override + 72: public void execute(final RequestMonitor requestMonitor) { + 73: // Create the breakpoint mediator and start tracking PDA breakpoints. + + 75: final BreakpointsMediator bpmService = new BreakpointsMediator( + 76: fSession, new PDABreakpointAttributeTranslator()); + 77: bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) { + 78: @Override + 79: protected void handleOK() { + 80: bpmService.startTrackingBreakpoints(fCommandControl.getProgramDMContext(), requestMonitor); + 81: } + 82: }); + 83: } + 84: }, + 85: new Step() { @Override + 86: public void execute(RequestMonitor requestMonitor) { + 87: // Start the stack service. + 88: new PDAStack(fSession).initialize(requestMonitor); + 89: } + 90: }, + 91: new Step() { @Override + 92: public void execute(RequestMonitor requestMonitor) { + 93: // Start the service to track expressions. + 94: new PDAExpressions(fSession).initialize(requestMonitor); + 95: } + 96: }, + 97: new Step() { @Override + 98: public void execute(RequestMonitor requestMonitor) { + 99: fRunControl.resume(fCommandControl.getProgramDMContext(), requestMonitor); +100: } +101: }, +102: }; + +104: // Sequence input parameters, used in initializing services. +105: private DsfSession fSession; +106: private String fProgram; +107: private int fRequestPort; +108: private int fEventPort; + +110: // Service references, initialized when created and used in initializing other services. +111: private PDACommandControl fCommandControl; +112: private PDARunControl fRunControl; + +114: public PDAServicesInitSequence(DsfSession session, String program, int requestPort, int eventPort, RequestMonitor rm) +115: { +116: super(session.getExecutor(), rm); +117: fSession = session; +118: fProgram = program; +119: fRequestPort = requestPort; +120: fEventPort = eventPort; +121: } + +123: @Override +124: public Step[] getSteps() { +125: return fSteps; +126: } +127: } ++ + + diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpointAttributeTranslator.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpointAttributeTranslator.java index ccdf9aef3ca..c8dc52927c6 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpointAttributeTranslator.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpointAttributeTranslator.java @@ -63,7 +63,7 @@ public class PDABreakpointAttributeTranslator implements IBreakpointAttributeTra } public List