mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Generics warnings cleanup (bug 178689).
This commit is contained in:
parent
11aaafc829
commit
caa4c1b355
33 changed files with 318 additions and 45 deletions
|
@ -25,6 +25,7 @@ public class DsfDebugUIPlugin extends AbstractUIPlugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
plugin = this;
|
plugin = this;
|
||||||
|
@ -34,6 +35,7 @@ public class DsfDebugUIPlugin extends AbstractUIPlugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
super.stop(context);
|
super.stop(context);
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class DebugViewSelectionRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
boolean potentialMatchFound = false;
|
boolean potentialMatchFound = false;
|
||||||
boolean matchFound = false;
|
boolean matchFound = false;
|
||||||
|
|
||||||
IDMContext<?> eventDmc = ((IDMEvent)event).getDMContext();
|
IDMContext<?> eventDmc = ((IDMEvent<?>)event).getDMContext();
|
||||||
for (IDMContext<?> eventDmcAncestor : DMContexts.toList(eventDmc)) {
|
for (IDMContext<?> eventDmcAncestor : DMContexts.toList(eventDmc)) {
|
||||||
IDMContext<?> inputDmcAncestor = DMContexts.getAncestorOfType(inputDmc, eventDmcAncestor.getClass());
|
IDMContext<?> inputDmcAncestor = DMContexts.getAncestorOfType(inputDmc, eventDmcAncestor.getClass());
|
||||||
if (inputDmcAncestor != null) {
|
if (inputDmcAncestor != null) {
|
||||||
|
@ -129,7 +129,10 @@ public class DebugViewSelectionRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
IStructuredSelection structSelection = (IStructuredSelection)selection;
|
IStructuredSelection structSelection = (IStructuredSelection)selection;
|
||||||
if (structSelection.getFirstElement() instanceof DMVMContext)
|
if (structSelection.getFirstElement() instanceof DMVMContext)
|
||||||
{
|
{
|
||||||
return ((DMVMContext)structSelection.getFirstElement()).getDMC();
|
// Correct cast: (AbstractDMVMLayoutNode<?>.DMVMContext) breaks the javac compiler
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
DMVMContext vmc = (DMVMContext)structSelection.getFirstElement();
|
||||||
|
return vmc.getDMC();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -190,6 +190,7 @@ public class StackFramesLayoutNode extends AbstractDMVMLayoutNode<IStack.IFrameD
|
||||||
update.setLabel(label.toString(), 0);
|
update.setLabel(label.toString(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void handleFailedUpdate(IViewerUpdate update) {
|
protected void handleFailedUpdate(IViewerUpdate update) {
|
||||||
if (update instanceof ILabelUpdate) {
|
if (update instanceof ILabelUpdate) {
|
||||||
// Avoid repainting the label if it's not available. This only slows
|
// Avoid repainting the label if it's not available. This only slows
|
||||||
|
@ -280,7 +281,7 @@ public class StackFramesLayoutNode extends AbstractDMVMLayoutNode<IStack.IFrameD
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IRunControl.IResumedDMEvent resumedEvent = (IRunControl.IResumedDMEvent)e;
|
IRunControl.IResumedDMEvent resumedEvent = e;
|
||||||
if (resumedEvent.getReason() != StateChangeReason.STEP) {
|
if (resumedEvent.getReason() != StateChangeReason.STEP) {
|
||||||
// Refresh the list of stack frames only if the run operation is not a step. Also, clear the list
|
// Refresh the list of stack frames only if the run operation is not a step. Also, clear the list
|
||||||
// of cached frames.
|
// of cached frames.
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class StandardLaunchRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
implements IVMRootLayoutNode
|
implements IVMRootLayoutNode
|
||||||
{
|
{
|
||||||
public static class LaunchesEvent {
|
public static class LaunchesEvent {
|
||||||
public enum Type { ADDED, REMOVED, CHANGED, TERMINATED };
|
public enum Type { ADDED, REMOVED, CHANGED, TERMINATED }
|
||||||
public final ILaunch[] fLaunches;
|
public final ILaunch[] fLaunches;
|
||||||
public final Type fType;
|
public final Type fType;
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ public class StandardLaunchRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
return flags | super.getDeltaFlags(e);
|
return flags | super.getDeltaFlags(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void createDelta(Object event, final GetDataDone<IModelDelta> done) {
|
public void createDelta(Object event, final GetDataDone<IModelDelta> done) {
|
||||||
/*
|
/*
|
||||||
* Create the root of the delta. Since the launch object is not at the
|
* Create the root of the delta. Since the launch object is not at the
|
||||||
|
@ -121,7 +122,7 @@ public class StandardLaunchRootLayoutNode extends AbstractVMRootLayoutNode
|
||||||
new Done() {
|
new Done() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
if (propagateError(getExecutor(), done, "Failed to create delta.")); //$NON-NLS-1$
|
if (propagateError(getExecutor(), done, "Failed to create delta.")) return; //$NON-NLS-1$
|
||||||
done.setData(viewRootDelta);
|
done.setData(viewRootDelta);
|
||||||
getExecutor().execute(done);
|
getExecutor().execute(done);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,14 +51,18 @@ public class StandardProcessLayoutNode extends AbstractVMLayoutNode {
|
||||||
fProcess = process;
|
fProcess = process;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IVMLayoutNode getLayoutNode() { return StandardProcessLayoutNode.this; }
|
public IVMLayoutNode getLayoutNode() { return StandardProcessLayoutNode.this; }
|
||||||
@SuppressWarnings("unchecked") public Object getAdapter(Class adapter) {
|
@Override
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Object getAdapter(Class adapter) {
|
||||||
Object vmcAdapter = super.getAdapter(adapter);
|
Object vmcAdapter = super.getAdapter(adapter);
|
||||||
if (vmcAdapter != null) {
|
if (vmcAdapter != null) {
|
||||||
return vmcAdapter;
|
return vmcAdapter;
|
||||||
}
|
}
|
||||||
return fProcess.getAdapter(adapter);
|
return fProcess.getAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public String toString() { return "IProcess " + fProcess.toString(); } //$NON-NLS-1$
|
public String toString() { return "IProcess " + fProcess.toString(); } //$NON-NLS-1$
|
||||||
|
|
||||||
public String getAttribute(String key) { return fProcess.getAttribute(key); }
|
public String getAttribute(String key) { return fProcess.getAttribute(key); }
|
||||||
|
@ -71,9 +75,11 @@ public class StandardProcessLayoutNode extends AbstractVMLayoutNode {
|
||||||
public boolean isTerminated() { return fProcess.isTerminated(); }
|
public boolean isTerminated() { return fProcess.isTerminated(); }
|
||||||
public void terminate() throws DebugException { fProcess.terminate(); }
|
public void terminate() throws DebugException { fProcess.terminate(); }
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
return other instanceof VMC && fProcess.equals(((VMC)other).fProcess);
|
return other instanceof VMC && fProcess.equals(((VMC)other).fProcess);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public int hashCode() { return fProcess.hashCode(); }
|
public int hashCode() { return fProcess.hashCode(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +138,7 @@ public class StandardProcessLayoutNode extends AbstractVMLayoutNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @see org.eclipse.dd.dsf.ui.viewmodel.IViewModelLayoutNode#retrieveLabel(org.eclipse.dd.dsf.ui.viewmodel.IVMContext, org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor)
|
// @see org.eclipse.dd.dsf.ui.viewmodel.IViewModelLayoutNode#retrieveLabel(org.eclipse.dd.dsf.ui.viewmodel.IVMContext, org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor)
|
||||||
public void updateLabel(IVMContext vmc, ILabelRequestMonitor result, String[] columns) {
|
public void updateLabel(@SuppressWarnings("unused")IVMContext vmc, ILabelRequestMonitor result, @SuppressWarnings("unused") String[] columns) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The implementation of IAdapterFactory that uses this node should not
|
* The implementation of IAdapterFactory that uses this node should not
|
||||||
|
@ -198,7 +204,7 @@ public class StandardProcessLayoutNode extends AbstractVMLayoutNode {
|
||||||
parent.addNode(new VMC((IProcess)event.getSource()), IModelDelta.STATE);
|
parent.addNode(new VMC((IProcess)event.getSource()), IModelDelta.STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleCreate(DebugEvent event, VMDelta parent) {
|
protected void handleCreate(@SuppressWarnings("unused") DebugEvent event, @SuppressWarnings("unused") VMDelta parent) {
|
||||||
// do nothing - Launch change notification handles this
|
// do nothing - Launch change notification handles this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,6 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||||
org.eclipse.debug.core,
|
org.eclipse.debug.core,
|
||||||
org.eclipse.dd.dsf
|
org.eclipse.dd.dsf
|
||||||
Eclipse-LazyStart: true
|
Eclipse-LazyStart: true
|
||||||
Export-Package: org.eclipse.dd.dsf.debug.service
|
Export-Package: org.eclipse.dd.dsf.debug.service,
|
||||||
|
org.eclipse.dd.dsf.debug.service.command
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class DsfDebugPlugin extends Plugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
fgBundleContext = context;
|
fgBundleContext = context;
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -52,6 +53,7 @@ public class DsfDebugPlugin extends Plugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
fgPlugin = null;
|
fgPlugin = null;
|
||||||
fgBundleContext = null;
|
fgBundleContext = null;
|
||||||
|
|
|
@ -75,10 +75,12 @@ public interface IModules extends IDMService {
|
||||||
this.fOffset = offset;
|
this.fOffset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return fModule.hashCode() + fSection.hashCode() + fOffset.intValue();
|
return fModule.hashCode() + fSection.hashCode() + fOffset.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (!(o instanceof ModuleSectionOffset)) return false;
|
if (!(o instanceof ModuleSectionOffset)) return false;
|
||||||
ModuleSectionOffset mso = (ModuleSectionOffset)o;
|
ModuleSectionOffset mso = (ModuleSectionOffset)o;
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2007 Wind River Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Wind River Systems - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.dd.dsf.debug.service.command;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Command interface for creating and manipulating GDB/MI commands
|
||||||
|
* for the DSF GDB reference implemenation. The command represents
|
||||||
|
* the GDB/MI request which will be put on the wire to the GDB
|
||||||
|
* backend.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface ICommand<V extends ICommandResult> {
|
||||||
|
/**
|
||||||
|
* Takes the supplied command and coalesces it with this one.
|
||||||
|
* The result is a new third command which represent the two
|
||||||
|
* original commands.
|
||||||
|
* <br>Note: the result type associated with the resurned command may be
|
||||||
|
* different than the result type associated with either of the commands
|
||||||
|
* being coalesced.
|
||||||
|
*
|
||||||
|
* @return newly created command, or null if command cannot be coalesced
|
||||||
|
*/
|
||||||
|
public ICommand<? extends ICommandResult> coalesceWith( ICommand<?> command );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2006 Wind River Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Wind River Systems - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.dd.dsf.debug.service.command;
|
||||||
|
|
||||||
|
import org.eclipse.dd.dsf.concurrent.GetDataDone;
|
||||||
|
import org.eclipse.dd.dsf.service.IDsfService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API for sending commands to the debugger and for receiving command results
|
||||||
|
* and asynchronous events.
|
||||||
|
*/
|
||||||
|
public interface ICommandControl extends IDsfService{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the specified command to the queue of commands to be processed.
|
||||||
|
*
|
||||||
|
* @param command Specific command to be processed
|
||||||
|
* @param done Completion notification handler
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
<V extends ICommandResult> void queueCommand(ICommand<V> command, GetDataDone<V> done);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the specified command from the processor queue.
|
||||||
|
*
|
||||||
|
* @param command Specific command to be removed
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
void removeCommand(ICommand<? extends ICommandResult> command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to cancel and already sent command. Some versions
|
||||||
|
* of GDB/MI implement control commands which allow this. The
|
||||||
|
* GDB/MI standard does not currently allow for this.
|
||||||
|
*
|
||||||
|
* @param command Specific command to be removed
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
void cancelCommand(ICommand<? extends ICommandResult> command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a notification handler for the Command processor.
|
||||||
|
*
|
||||||
|
* @param command listener to be added
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
void addCommandListener(ICommandListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a notification handler for the Command processor.
|
||||||
|
*
|
||||||
|
* @param command listener to be removed
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
void removeCommandListener(ICommandListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a notification handler for the Event processor.
|
||||||
|
*
|
||||||
|
* @param event listener to be added
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
void addEventListener(IEventListener listener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a notification handler for the Event processor.
|
||||||
|
*
|
||||||
|
* @param event listener to be removed
|
||||||
|
* @return None
|
||||||
|
*/
|
||||||
|
void removeEventListener(IEventListener listener);
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
package org.eclipse.dd.dsf.debug.service.command;
|
||||||
|
|
||||||
|
import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Synchronous listener to commands being sent and received.
|
||||||
|
* All the registered listeners will be called in the same
|
||||||
|
* dispatch cycle as when the result of the command is submitted.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ConfinedToDsfExecutor("")
|
||||||
|
public interface ICommandListener {
|
||||||
|
/**
|
||||||
|
* Notifies that the specified command has been added to the Command Queue.
|
||||||
|
* It has not yet been sent. In this state the command can be examined and
|
||||||
|
* possibly withdrawn because it has been coalesced with another command.
|
||||||
|
*
|
||||||
|
* @return None
|
||||||
|
* @param command Command which has been added to the Queue
|
||||||
|
*/
|
||||||
|
public void commandQueued(ICommand<? extends ICommandResult> command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notification that the given command was sent to the debugger. At this
|
||||||
|
* point the command is no longer in the Command Queue and should not be
|
||||||
|
* examined. The only thing which can be done is to try and cancel the
|
||||||
|
* command.
|
||||||
|
*
|
||||||
|
* @return None
|
||||||
|
* @param command
|
||||||
|
*/
|
||||||
|
public void commandSent(ICommand<? extends ICommandResult> command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies that the specified command has been removed from the
|
||||||
|
* Command Queue. This notification means that the command has
|
||||||
|
* been removed from the queue and not sent to the backend. The
|
||||||
|
* user has specifically removed it, perhaps because it has been
|
||||||
|
* combined with another. Or some state change has occured and
|
||||||
|
* there is no longer a need to get this particular set of data.
|
||||||
|
*
|
||||||
|
* @return None
|
||||||
|
* @param Command which has been sent to the backend
|
||||||
|
*/
|
||||||
|
public void commandRemoved(ICommand<? extends ICommandResult> command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies that the specified command has been completed.
|
||||||
|
*
|
||||||
|
* @return None
|
||||||
|
* @param Command which has been sent to the backend
|
||||||
|
*/
|
||||||
|
public void commandDone(ICommand<? extends ICommandResult> command, ICommandResult result);
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2007 Wind River Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Wind River Systems - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.dd.dsf.debug.service.command;
|
||||||
|
|
||||||
|
public interface ICommandResult {
|
||||||
|
/**
|
||||||
|
* Returns an ICommandResult which is a subset command result. The command
|
||||||
|
* result which is being passed in is from a coalesced command. The result
|
||||||
|
* which is desired is contained within those results. In this instance we
|
||||||
|
* are processing the command result from the coalesced command to get our
|
||||||
|
* command result.
|
||||||
|
* <i>Note:</i> The type of returned command result must match the type
|
||||||
|
* associated with the subset command that is passed in the argument.
|
||||||
|
*
|
||||||
|
* @return result for this particular command.
|
||||||
|
*/
|
||||||
|
public <V extends ICommandResult> V getSubsetResult( ICommand<V> command );
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.eclipse.dd.dsf.debug.service.command;
|
||||||
|
|
||||||
|
import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Synchronous listener for events issued from the debugger. All
|
||||||
|
* registered listeners will be called in the same dispatch cycle.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ConfinedToDsfExecutor("")
|
||||||
|
public interface IEventListener {
|
||||||
|
/**
|
||||||
|
* Notifies that the given asynchronous output was received from the
|
||||||
|
* debugger.
|
||||||
|
* @param output output that was received from the debugger. Format
|
||||||
|
* of the output data is debugger specific.
|
||||||
|
*/
|
||||||
|
public void eventReceived(Object output);
|
||||||
|
}
|
|
@ -37,6 +37,7 @@ public class DsfUIPlugin extends AbstractUIPlugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
fgBundleContext = context;
|
fgBundleContext = context;
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -46,6 +47,7 @@ public class DsfUIPlugin extends AbstractUIPlugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
fgPlugin = null;
|
fgPlugin = null;
|
||||||
fgBundleContext = null;
|
fgBundleContext = null;
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class SWTDispatchDsfExecutor extends DefaultDsfExecutor
|
||||||
{
|
{
|
||||||
return new Callable<V>()
|
return new Callable<V>()
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public V call() throws Exception
|
public V call() throws Exception
|
||||||
{
|
{
|
||||||
final Object[] v = new Object[1];
|
final Object[] v = new Object[1];
|
||||||
|
|
|
@ -412,32 +412,32 @@ abstract public class AbstractVMLayoutNode implements IVMLayoutNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class ElementsCountUpdate extends ViewerUpdate implements IChildrenCountUpdate {
|
protected class ElementsCountUpdate extends ViewerUpdate implements IChildrenCountUpdate {
|
||||||
private final GetDataDone<Integer> fDone;
|
private final GetDataDone<Integer> fElementCountDone;
|
||||||
|
|
||||||
public ElementsCountUpdate(GetDataDone<Integer> done, IModelDelta delta) {
|
public ElementsCountUpdate(GetDataDone<Integer> done, IModelDelta delta) {
|
||||||
super(done, delta);
|
super(done, delta);
|
||||||
fDone = done;
|
fElementCountDone = done;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChildCount(int numChildren) {
|
public void setChildCount(int numChildren) {
|
||||||
fDone.setData(numChildren);
|
fElementCountDone.setData(numChildren);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class ElementsUpdate extends ViewerUpdate implements IChildrenUpdate {
|
protected class ElementsUpdate extends ViewerUpdate implements IChildrenUpdate {
|
||||||
private final List<Object> fChildren = new ArrayList<Object>();
|
private final List<Object> fChildren = new ArrayList<Object>();
|
||||||
private GetDataDone<List<Object>> fDone;
|
private GetDataDone<List<Object>> fElementUpdateDone;
|
||||||
|
|
||||||
public ElementsUpdate(GetDataDone<List<Object>> done, IModelDelta delta) {
|
public ElementsUpdate(GetDataDone<List<Object>> done, IModelDelta delta) {
|
||||||
super(done, delta);
|
super(done, delta);
|
||||||
fDone = done;
|
fElementUpdateDone = done;
|
||||||
fDone.setData(fChildren);
|
fElementUpdateDone.setData(fChildren);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ElementsUpdate(GetDataDone<List<Object>> done, TreePath path) {
|
public ElementsUpdate(GetDataDone<List<Object>> done, TreePath path) {
|
||||||
super(done, path);
|
super(done, path);
|
||||||
fDone = done;
|
fElementUpdateDone = done;
|
||||||
fDone.setData(fChildren);
|
fElementUpdateDone.setData(fChildren);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
|
|
|
@ -543,11 +543,11 @@ abstract public class AbstractVMProvider implements IVMProvider
|
||||||
|
|
||||||
class HasElementsUpdate extends ViewerUpdate implements IHasChildrenUpdate {
|
class HasElementsUpdate extends ViewerUpdate implements IHasChildrenUpdate {
|
||||||
|
|
||||||
final private GetDataDone<Boolean> fDone;
|
final private GetDataDone<Boolean> fHasElemsDone;
|
||||||
|
|
||||||
HasElementsUpdate(IHasChildrenUpdate clientUpdate, GetDataDone<Boolean> done) {
|
HasElementsUpdate(IHasChildrenUpdate clientUpdate, GetDataDone<Boolean> done) {
|
||||||
super(clientUpdate, done);
|
super(clientUpdate, done);
|
||||||
fDone = done;
|
fHasElemsDone = done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -556,24 +556,24 @@ abstract public class AbstractVMProvider implements IVMProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHasChilren(boolean hasChildren) {
|
public void setHasChilren(boolean hasChildren) {
|
||||||
fDone.setData(hasChildren);
|
fHasElemsDone.setData(hasChildren);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
assert fDone.getData() != null || !fDone.getStatus().isOK();
|
assert fHasElemsDone.getData() != null || !fHasElemsDone.getStatus().isOK();
|
||||||
super.done();
|
super.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ElementsCountUpdate extends ViewerUpdate implements IChildrenCountUpdate {
|
class ElementsCountUpdate extends ViewerUpdate implements IChildrenCountUpdate {
|
||||||
final private GetDataDone<Integer> fDone;
|
final private GetDataDone<Integer> fCountDone;
|
||||||
final private TreePath fElementPath;
|
final private TreePath fElementPath;
|
||||||
|
|
||||||
ElementsCountUpdate(IViewerUpdate clientUpdate, GetDataDone<Integer> done, TreePath elementPath) {
|
ElementsCountUpdate(IViewerUpdate clientUpdate, GetDataDone<Integer> done, TreePath elementPath) {
|
||||||
super(clientUpdate, done);
|
super(clientUpdate, done);
|
||||||
fElementPath = elementPath;
|
fElementPath = elementPath;
|
||||||
fDone = done;
|
fCountDone = done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -582,12 +582,12 @@ abstract public class AbstractVMProvider implements IVMProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChildCount(int count) {
|
public void setChildCount(int count) {
|
||||||
fDone.setData(count);
|
fCountDone.setData(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
assert fDone.getData() != null || !fDone.getStatus().isOK();
|
assert fCountDone.getData() != null || !fCountDone.getStatus().isOK();
|
||||||
super.done();
|
super.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,8 @@ abstract public class AbstractVMRootLayoutNode extends AbstractVMLayoutNode impl
|
||||||
* There is no use case for a root node implementing this method, but its
|
* There is no use case for a root node implementing this method, but its
|
||||||
* easier to just impelemnt it for sake of uniformity of model.
|
* easier to just impelemnt it for sake of uniformity of model.
|
||||||
*/
|
*/
|
||||||
public void updateLabel(IVMContext vmc, ILabelUpdate update) {
|
public void updateLabel(@SuppressWarnings("unused")
|
||||||
|
IVMContext vmc, ILabelUpdate update) {
|
||||||
update.done();
|
update.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ abstract public class AbstractVMRootLayoutNode extends AbstractVMLayoutNode impl
|
||||||
new Done() {
|
new Done() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
if (propagateError(getExecutor(), done, "Failed to create delta.")); //$NON-NLS-1$
|
if (propagateError(getExecutor(), done, "Failed to create delta.")) return; //$NON-NLS-1$
|
||||||
done.setData(rootDelta);
|
done.setData(rootDelta);
|
||||||
getExecutor().execute(done);
|
getExecutor().execute(done);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ public class VMDelta extends ModelDelta {
|
||||||
* @param flags change flags for child
|
* @param flags change flags for child
|
||||||
* @return newly created child delta
|
* @return newly created child delta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public VMDelta addNode(Object element, int flags) {
|
public VMDelta addNode(Object element, int flags) {
|
||||||
VMDelta node = new VMDelta(element, flags);
|
VMDelta node = new VMDelta(element, flags);
|
||||||
node.setParent(this);
|
node.setParent(this);
|
||||||
|
@ -144,6 +145,7 @@ public class VMDelta extends ModelDelta {
|
||||||
* @param flags change flags
|
* @param flags change flags
|
||||||
* @return newly created child delta
|
* @return newly created child delta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public VMDelta addNode(Object element, Object replacement, int flags) {
|
public VMDelta addNode(Object element, Object replacement, int flags) {
|
||||||
VMDelta node = new VMDelta(element, replacement, flags);
|
VMDelta node = new VMDelta(element, replacement, flags);
|
||||||
node.setParent(this);
|
node.setParent(this);
|
||||||
|
@ -160,6 +162,7 @@ public class VMDelta extends ModelDelta {
|
||||||
* @param flags change flags
|
* @param flags change flags
|
||||||
* @return newly created child delta
|
* @return newly created child delta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public VMDelta addNode(Object element, int index, int flags) {
|
public VMDelta addNode(Object element, int index, int flags) {
|
||||||
VMDelta node = new VMDelta(element, index, flags);
|
VMDelta node = new VMDelta(element, index, flags);
|
||||||
node.setParent(this);
|
node.setParent(this);
|
||||||
|
@ -177,6 +180,7 @@ public class VMDelta extends ModelDelta {
|
||||||
* @param numChildren the number of children the element has
|
* @param numChildren the number of children the element has
|
||||||
* @return newly created child delta
|
* @return newly created child delta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public VMDelta addNode(Object element, int index, int flags, int numChildren) {
|
public VMDelta addNode(Object element, int index, int flags, int numChildren) {
|
||||||
VMDelta node = new VMDelta(element, index, flags, numChildren);
|
VMDelta node = new VMDelta(element, index, flags, numChildren);
|
||||||
node.setParent(this);
|
node.setParent(this);
|
||||||
|
@ -300,6 +304,7 @@ public class VMDelta extends ModelDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta#getChildCount()
|
* @see org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta#getChildCount()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getChildCount() {
|
public int getChildCount() {
|
||||||
return fChildCount;
|
return fChildCount;
|
||||||
}
|
}
|
||||||
|
@ -307,10 +312,12 @@ public class VMDelta extends ModelDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta#accept(org.eclipse.debug.internal.ui.viewers.provisional.IModelDeltaVisitor)
|
* @see org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta#accept(org.eclipse.debug.internal.ui.viewers.provisional.IModelDeltaVisitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void accept(IModelDeltaVisitor visitor) {
|
public void accept(IModelDeltaVisitor visitor) {
|
||||||
doAccept(visitor, 0);
|
doAccept(visitor, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void doAccept(IModelDeltaVisitor visitor, int depth) {
|
protected void doAccept(IModelDeltaVisitor visitor, int depth) {
|
||||||
if (visitor.visit(this, depth)) {
|
if (visitor.visit(this, depth)) {
|
||||||
ModelDelta[] childDeltas = getChildDeltas();
|
ModelDelta[] childDeltas = getChildDeltas();
|
||||||
|
|
|
@ -79,6 +79,7 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
* The IAdaptable implementation. If the adapter is the DM context,
|
* The IAdaptable implementation. If the adapter is the DM context,
|
||||||
* return the context, otherwise delegate to IDMContext.getAdapter().
|
* return the context, otherwise delegate to IDMContext.getAdapter().
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Object getAdapter(Class adapter) {
|
public Object getAdapter(Class adapter) {
|
||||||
Object superAdapter = super.getAdapter(adapter);
|
Object superAdapter = super.getAdapter(adapter);
|
||||||
|
@ -91,6 +92,7 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (!(other instanceof AbstractDMVMLayoutNode.DMVMContext)) return false;
|
if (!(other instanceof AbstractDMVMLayoutNode.DMVMContext)) return false;
|
||||||
DMVMContext otherVmc = (DMVMContext)other;
|
DMVMContext otherVmc = (DMVMContext)other;
|
||||||
|
@ -98,10 +100,12 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
fDmc.equals(otherVmc.fDmc);
|
fDmc.equals(otherVmc.fDmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return AbstractDMVMLayoutNode.this.hashCode() + fDmc.hashCode();
|
return AbstractDMVMLayoutNode.this.hashCode() + fDmc.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return fDmc.toString();
|
return fDmc.toString();
|
||||||
}
|
}
|
||||||
|
@ -134,6 +138,7 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
@ -339,7 +344,8 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
* @see IElementLabelProvider
|
* @see IElementLabelProvider
|
||||||
* @see IColumnPresentationFactoryAdapter
|
* @see IColumnPresentationFactoryAdapter
|
||||||
*/
|
*/
|
||||||
protected void fillColumnLabel(IDMContext<V> dmContext, V dmData, String columnId, int idx, ILabelUpdate update) {
|
protected void fillColumnLabel(@SuppressWarnings("unused") IDMContext<V> dmContext, @SuppressWarnings("unused") V dmData,
|
||||||
|
@SuppressWarnings("unused") String columnId, int idx, ILabelUpdate update) {
|
||||||
update.setLabel("", idx); //$NON-NLS-1$
|
update.setLabel("", idx); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,12 +353,12 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
public int getDeltaFlags(Object e) {
|
public int getDeltaFlags(Object e) {
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
if (e instanceof IDMEvent) {
|
if (e instanceof IDMEvent) {
|
||||||
flags = getNodeDeltaFlagsForDMEvent((IDMEvent)e);
|
flags = getNodeDeltaFlagsForDMEvent((IDMEvent<?>)e);
|
||||||
}
|
}
|
||||||
return flags | super.getDeltaFlags(e);
|
return flags | super.getDeltaFlags(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) {
|
protected int getNodeDeltaFlagsForDMEvent(@SuppressWarnings("unused") IDMEvent<?> e) {
|
||||||
return IModelDelta.NO_CHANGE;
|
return IModelDelta.NO_CHANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +370,7 @@ abstract public class AbstractDMVMLayoutNode<V extends IDMData> extends Abstract
|
||||||
if (DsfSession.isSessionActive(getSession().getId())) {
|
if (DsfSession.isSessionActive(getSession().getId())) {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
buildDeltaForDMEvent((IDMEvent)e, parentDelta, nodeOffset, done);
|
buildDeltaForDMEvent((IDMEvent<?>)e, parentDelta, nodeOffset, done);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -80,6 +80,7 @@ abstract public class AbstractDMVMProvider extends AbstractVMProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called to dispose the provider. */
|
/** Called to dispose the provider. */
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new Runnable() {
|
getSession().getExecutor().execute(new Runnable() {
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class DsfPlugin extends Plugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
fgBundleContext = context;
|
fgBundleContext = context;
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -52,6 +53,7 @@ public class DsfPlugin extends Plugin {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
fgBundleContext = null;
|
fgBundleContext = null;
|
||||||
super.stop(context);
|
super.stop(context);
|
||||||
|
|
|
@ -208,6 +208,7 @@ public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected Object getExecutable() { return fRunnable; }
|
protected Object getExecutable() { return fRunnable; }
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -234,6 +235,7 @@ public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor
|
||||||
fCallable = callable;
|
fCallable = callable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected Object getExecutable() { return fCallable; }
|
protected Object getExecutable() { return fCallable; }
|
||||||
|
|
||||||
public T call() throws Exception {
|
public T call() throws Exception {
|
||||||
|
|
|
@ -67,6 +67,7 @@ abstract public class Done extends DsfRunnable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Done: " + getStatus().toString(); //$NON-NLS-1$
|
return "Done: " + getStatus().toString(); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,6 @@ public class DsfExecutable {
|
||||||
assert ASSERTIONS_ENABLED = true;
|
assert ASSERTIONS_ENABLED = true;
|
||||||
DEBUG_EXECUTOR = DsfPlugin.DEBUG && "true".equals( //$NON-NLS-1$
|
DEBUG_EXECUTOR = DsfPlugin.DEBUG && "true".equals( //$NON-NLS-1$
|
||||||
Platform.getDebugOption("org.eclipse.dd.dsf/debug/executor")); //$NON-NLS-1$
|
Platform.getDebugOption("org.eclipse.dd.dsf/debug/executor")); //$NON-NLS-1$
|
||||||
assert ASSERTIONS_ENABLED = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -101,10 +101,12 @@ abstract public class DsfQuery<V> extends DsfRunnable
|
||||||
return (state & (STATE_DONE | STATE_CANCELLED)) != 0;
|
return (state & (STATE_DONE | STATE_CANCELLED)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected int tryAcquireShared(int ignore) {
|
protected int tryAcquireShared(int ignore) {
|
||||||
return doIsDone()? 1 : -1;
|
return doIsDone()? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected boolean tryReleaseShared(int ignore) {
|
protected boolean tryReleaseShared(int ignore) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,6 +284,7 @@ abstract public class DsfSequence extends DsfRunnable implements Future<Object>
|
||||||
abortExecution(getStatus());
|
abortExecution(getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "DsfSequence \"" + fTaskName + "\", result for executing step #" + fStepIdx + " = " + getStatus(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
return "DsfSequence \"" + fTaskName + "\", result for executing step #" + fStepIdx + " = " + getStatus(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
}
|
}
|
||||||
|
@ -335,7 +336,7 @@ abstract public class DsfSequence extends DsfRunnable implements Future<Object>
|
||||||
} else {
|
} else {
|
||||||
abortRollBack(getStatus());
|
abortRollBack(getStatus());
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "DsfSequence \"" + fTaskName + "\", result for rolling back step #" + fStepIdx + " = " + getStatus(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
return "DsfSequence \"" + fTaskName + "\", result for rolling back step #" + fStepIdx + " = " + getStatus(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
|
@ -450,10 +451,12 @@ abstract public class DsfSequence extends DsfRunnable implements Future<Object>
|
||||||
return (state & (STATE_FINISHED | STATE_CANCELLED | STATE_ABORTED)) != 0;
|
return (state & (STATE_FINISHED | STATE_CANCELLED | STATE_ABORTED)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected int tryAcquireShared(int ignore) {
|
protected int tryAcquireShared(int ignore) {
|
||||||
return doIsDone()? 1 : -1;
|
return doIsDone()? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected boolean tryReleaseShared(int ignore) {
|
protected boolean tryReleaseShared(int ignore) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public abstract class GetDataDone<V> extends Done {
|
||||||
*/
|
*/
|
||||||
public V getData() { return fData; }
|
public V getData() { return fData; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
if (getData() != null) {
|
if (getData() != null) {
|
||||||
return getData().toString();
|
return getData().toString();
|
||||||
|
|
|
@ -20,6 +20,7 @@ class StackTraceWrapper {
|
||||||
|
|
||||||
StackTraceWrapper(StackTraceElement[] elements) { fStackTraceElements = elements; }
|
StackTraceWrapper(StackTraceElement[] elements) { fStackTraceElements = elements; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder(fStackTraceElements.length * 30);
|
StringBuilder builder = new StringBuilder(fStackTraceElements.length * 30);
|
||||||
for (int i = 0; i < fStackTraceElements.length && i < 10; i++) {
|
for (int i = 0; i < fStackTraceElements.length && i < 10; i++) {
|
||||||
|
|
|
@ -103,6 +103,7 @@ abstract public class AbstractDMContext<V extends IDMData> extends PlatformObjec
|
||||||
* session is equally important.
|
* session is equally important.
|
||||||
* @see org.eclipse.runtime.IAdapterManager
|
* @see org.eclipse.runtime.IAdapterManager
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Object getAdapter(Class adapterType) {
|
public Object getAdapter(Class adapterType) {
|
||||||
Object retVal = null;
|
Object retVal = null;
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class ServiceDMContext<V extends IDMService> extends AbstractDMContext<V>
|
||||||
fServiceDMID = serviceDMID;
|
fServiceDMID = serviceDMID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() { return baseToString() + fServiceDMID; }
|
public String toString() { return baseToString() + fServiceDMID; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class DsfServicesTracker {
|
||||||
fFilter = filter;
|
fFilter = filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
// I guess this doesn't have to assume fFilter can be null, but oh well.
|
// I guess this doesn't have to assume fFilter can be null, but oh well.
|
||||||
return other instanceof ServiceKey &&
|
return other instanceof ServiceKey &&
|
||||||
|
@ -64,6 +65,7 @@ public class DsfServicesTracker {
|
||||||
(fFilter != null && fFilter.equals(((ServiceKey)other).fFilter)));
|
(fFilter != null && fFilter.equals(((ServiceKey)other).fFilter)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return (fClassName == null ? 0 : fClassName.hashCode()) + (fFilter == null ? 0 : fFilter.hashCode());
|
return (fClassName == null ? 0 : fClassName.hashCode()) + (fFilter == null ? 0 : fFilter.hashCode());
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,10 +195,12 @@ public class DsfSession
|
||||||
fFilter = filter;
|
fFilter = filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
return other instanceof ListenerEntry && fListener.equals(((ListenerEntry)other).fListener);
|
return other instanceof ListenerEntry && fListener.equals(((ListenerEntry)other).fListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int hashCode() { return fListener.hashCode(); }
|
public int hashCode() { return fListener.hashCode(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,6 +280,7 @@ public class DsfSession
|
||||||
public void dispatchEvent(final Object event, final Dictionary serviceProperties) {
|
public void dispatchEvent(final Object event, final Dictionary serviceProperties) {
|
||||||
getExecutor().submit(new DsfRunnable() {
|
getExecutor().submit(new DsfRunnable() {
|
||||||
public void run() { doDispatchEvent(event, serviceProperties);}
|
public void run() { doDispatchEvent(event, serviceProperties);}
|
||||||
|
@Override
|
||||||
public String toString() { return "Event: " + event + ", from service " + serviceProperties; } //$NON-NLS-1$ //$NON-NLS-2$
|
public String toString() { return "Event: " + event + ", from service " + serviceProperties; } //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -317,11 +320,13 @@ public class DsfSession
|
||||||
return fAdapters.get(adapterType);
|
return fAdapters.get(adapterType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
return other instanceof DsfSession && fId.equals(((DsfSession)other).fId);
|
return other instanceof DsfSession && fId.equals(((DsfSession)other).fId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public int hashCode() { return fId.hashCode(); }
|
public int hashCode() { return fId.hashCode(); }
|
||||||
|
|
||||||
|
@ -340,11 +345,12 @@ public class DsfSession
|
||||||
return ((IDsfService)o1.fListener).getStartupNumber() - ((IDsfService)o2.fListener).getStartupNumber();
|
return ((IDsfService)o1.fListener).getStartupNumber() - ((IDsfService)o2.fListener).getStartupNumber();
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
return obj == this;
|
return obj == this;
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Build a list of listeners and methods that are registered for this event class.
|
// Build a list of listeners and methods that are registered for this event class.
|
||||||
|
|
Loading…
Add table
Reference in a new issue