diff options
author | eutarass | 2009-09-02 20:30:27 +0000 |
---|---|---|
committer | eutarass | 2009-09-02 20:30:27 +0000 |
commit | 63c23ca255c52bd0ca6c29fd4f3758cdef1da49a (patch) | |
tree | 383f60e29ff169e42ee13c6dcc402c077fbb4bde /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug | |
parent | d1598d1e38275606cade2dbcfed327bf9593ff5f (diff) | |
download | org.eclipse.tcf-63c23ca255c52bd0ca6c29fd4f3758cdef1da49a.tar.gz org.eclipse.tcf-63c23ca255c52bd0ca6c29fd4f3758cdef1da49a.tar.xz org.eclipse.tcf-63c23ca255c52bd0ca6c29fd4f3758cdef1da49a.zip |
Code cleanup: trailing spaces are removed from the source line
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug')
31 files changed, 325 insertions, 325 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java index b90c6b989..7ed7c16f7 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2009 Wind River Systems, Inc. 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 + * 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 *******************************************************************************/ @@ -56,16 +56,16 @@ public class Activator extends Plugin { plugin = null; super.stop(context); } - + /** * Returns the shared instance - * + * * @return the shared instance */ public static Activator getDefault() { return plugin; } - + public static TCFBreakpointsModel getBreakpointsModel() { return bp_model; } @@ -84,5 +84,5 @@ public class Activator extends Plugin { plugin.getLog().log(new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), IStatus.OK, msg, err)); } - } + } } diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java index 7e298146f..5c2d956b8 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -21,7 +21,7 @@ import org.eclipse.tm.tcf.protocol.Protocol; * it does not make sense to execute two step commands concurrently. * If user requests actions faster then they are executed, * actions are placed into a FIFO queue. - * + * * Clients are expected to implement run() method to perform the action job. * When the job is done, client code should call done() method. */ @@ -29,7 +29,7 @@ public abstract class TCFAction implements Runnable { protected final TCFLaunch launch; protected final String context_id; - + public TCFAction(TCFLaunch launch, String context_id) { assert Protocol.isDispatchThread(); assert context_id != null; @@ -37,7 +37,7 @@ public abstract class TCFAction implements Runnable { this.context_id = context_id; launch.addContextAction(this, context_id); } - + protected void done() { assert Protocol.isDispatchThread(); launch.removeContextAction(this, context_id); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java index b2595ae0b..40735ad34 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java @@ -20,7 +20,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl private final boolean src_step; private final IRunControl rc = launch.getService(IRunControl.class); - + private IRunControl.RunControlContext ctx; private TCFDataCache<TCFContextState> state; private TCFDataCache<TCFSourceRef> line_info; @@ -28,15 +28,15 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl private BigInteger pc0; private BigInteger pc1; private int step_cnt; - + protected boolean exited; - + public TCFActionStepInto(TCFLaunch launch, IRunControl.RunControlContext ctx, boolean src_step) { super(launch, ctx.getID()); this.ctx = ctx; this.src_step = src_step; } - + protected abstract TCFDataCache<TCFContextState> getContextState(); protected abstract TCFDataCache<TCFSourceRef> getLineInfo(); protected abstract TCFDataCache<?> getStackTrace(); @@ -161,7 +161,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl exit(new Exception("Step into is not supported")); } } - + private boolean isSameLine(ILineNumbers.CodeArea x, ILineNumbers.CodeArea y) { if (x == null || y == null) return false; if (x.start_line != y.start_line) return false; @@ -169,7 +169,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl if (x.file != y.file && (x.file == null || !x.file.equals(y.file))) return false; return true; } - + protected void exit(Throwable error) { if (exited) return; rc.removeListener(this); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java index b6e64a286..d4c598c7f 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java @@ -16,27 +16,27 @@ import org.eclipse.tm.tcf.util.TCFDataCache; public abstract class TCFActionStepOut extends TCFAction implements IRunControl.RunControlListener { private static final long TIMEOUT = 10000; - + private final IRunControl rc = launch.getService(IRunControl.class); private final IBreakpoints bps = launch.getService(IBreakpoints.class); - + private IRunControl.RunControlContext ctx; private TCFDataCache<TCFContextState> state; private int step_cnt; private Map<String,Object> bp; - + protected boolean exited; public TCFActionStepOut(TCFLaunch launch, IRunControl.RunControlContext ctx) { super(launch, ctx.getID()); this.ctx = ctx; } - + protected abstract TCFDataCache<TCFContextState> getContextState(); protected abstract TCFDataCache<?> getStackTrace(); protected abstract TCFDataCache<IStackTrace.StackTraceContext> getStackFrame(); protected abstract int getStackFrameIndex(); - + public void run() { if (exited) return; if (state == null) { @@ -114,7 +114,7 @@ public abstract class TCFActionStepOut extends TCFAction implements IRunControl. exit(new Exception("Step out is not supported")); } } - + protected void exit(Throwable error) { if (exited) return; if (bp != null) { diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java index f262faa2b..0d4a28ff0 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java @@ -23,7 +23,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl private final boolean src_step; private final IRunControl rc = launch.getService(IRunControl.class); private final IBreakpoints bps = launch.getService(IBreakpoints.class); - + private IRunControl.RunControlContext ctx; private TCFDataCache<TCFContextState> state; private TCFDataCache<TCFSourceRef> line_info; @@ -32,21 +32,21 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl private BigInteger pc1; private int step_cnt; private Map<String,Object> bp; - + protected boolean exited; - + public TCFActionStepOver(TCFLaunch launch, IRunControl.RunControlContext ctx, boolean src_step) { super(launch, ctx.getID()); this.ctx = ctx; this.src_step = src_step; } - + protected abstract TCFDataCache<TCFContextState> getContextState(); protected abstract TCFDataCache<TCFSourceRef> getLineInfo(); protected abstract TCFDataCache<?> getStackTrace(); protected abstract TCFDataCache<IStackTrace.StackTraceContext> getStackFrame(); protected abstract int getStackFrameIndex(); - + public void run() { if (exited) return; if (state == null) { @@ -212,7 +212,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl exit(new Exception("Step over is not supported")); } } - + protected void exit(Throwable error) { if (exited) return; if (bp != null) { @@ -270,7 +270,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl exit(null); } } - + private boolean isSameLine(ILineNumbers.CodeArea x, ILineNumbers.CodeArea y) { if (x == null || y == null) return false; if (x.start_line != y.start_line) return false; @@ -278,7 +278,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl if (x.file != y.file && (x.file == null || !x.file.equals(y.file))) return false; return true; } - + private boolean isMyBreakpoint(String pc, String reason) { if (bp == null) return false; if (pc == null) return false; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java index dfd78ecc3..1322814da 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2009 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -40,14 +40,14 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate { int cnt; public void run() { // Need to delay at least one dispatch cycle to work around - // a possible racing between thread that calls getLaunch() and - // the process of activation of other TCF plug-ins. + // a possible racing between thread that calls getLaunch() and + // the process of activation of other TCF plug-ins. if (cnt++ < 2) Protocol.invokeLater(this); else done(new TCFLaunch(configuration, mode)); } }.getE(); } - + public void launch(final ILaunchConfiguration configuration, final String mode, final ILaunch launch, final IProgressMonitor monitor) throws CoreException { String local_id = null; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java index 0f13f44dd..cd195a841 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2009 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -32,17 +32,17 @@ import org.osgi.framework.Bundle; /** * This class checks that TCF Agent is running on the local host, - * and starts a new instance of the agent if it cannot be located. + * and starts a new instance of the agent if it cannot be located. */ public class TCFLocalAgent { - + private static final String AGENT_HOST = "127.0.0.1", AGENT_PORT = "1534"; - + private static Process agent; private static boolean destroed; - + private static String getAgentFileName() { String os = System.getProperty("os.name"); String arch = System.getProperty("os.arch"); @@ -56,7 +56,7 @@ public class TCFLocalAgent { if (os.equals("Linux")) os = "GNU/Linux"; return "agent/" + os + "/" + arch + "/" + fnm; } - + static synchronized String runLocalAgent() throws CoreException { if (destroed) return null; String id = getLocalAgentID(); @@ -129,13 +129,13 @@ public class TCFLocalAgent { "Cannot start local agent: file not available: " + fnm, null)); } - + private static boolean isLocalAgent(IPeer p) { String host = p.getAttributes().get(IPeer.ATTR_IP_HOST); String port = p.getAttributes().get(IPeer.ATTR_IP_PORT); return AGENT_HOST.equals(host) && AGENT_PORT.equals(port); } - + public static synchronized String getLocalAgentID() { return new TCFTask<String>() { public void run() { @@ -150,7 +150,7 @@ public class TCFLocalAgent { } }.getE(); } - + private static String waitAgentReady() { return new TCFTask<String>() { public void run() { @@ -187,7 +187,7 @@ public class TCFLocalAgent { } }.getE(); } - + public static synchronized void destroy() { if (agent != null) { destroed = true; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java index 2e044bd0b..1d7ad8d84 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java index 5ef55e5ee..70ce05485 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java index 02bca97fd..1cdcff8a3 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java index 1a757ad49..5f1d70cfb 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java @@ -20,14 +20,14 @@ import org.eclipse.tm.tcf.protocol.Protocol; * The class represents manually configured (user defined) TCF peers (targets). * Unlike auto-discovered peers, manually configured ones are persistent - * they exist until explicitly deleted by user. - * Eclipse plug-in state storage is used to keep the configuration data. + * Eclipse plug-in state storage is used to keep the configuration data. */ public class TCFUserDefPeer extends AbstractPeer { public TCFUserDefPeer(Map<String, String> attrs) { super(attrs); } - + /** * Load manually configured peers from persistent storage. */ @@ -57,7 +57,7 @@ public class TCFUserDefPeer extends AbstractPeer { Activator.log("Cannot read peer list", x); } } - + /** * Save manually configured peers to persistent storage. */ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java index 8e4cb24b2..c214c872a 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java index acc0a9b68..d1ea95f94 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java index 387fb170a..adf7b6f8a 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -33,9 +33,9 @@ import org.eclipse.tm.tcf.services.IBreakpoints; public class TCFBreakpoint extends Breakpoint { public static final String MARKER_TYPE = "org.eclipse.tm.tcf.debug.breakpoint.marker"; - + private static long last_id = 0; - + private static String createNewID() { assert Protocol.isDispatchThread(); long id = System.currentTimeMillis(); @@ -43,9 +43,9 @@ public class TCFBreakpoint extends Breakpoint { last_id = id; return Long.toHexString(id); } - + private String text; - + public TCFBreakpoint() { } @@ -79,7 +79,7 @@ public class TCFBreakpoint extends Breakpoint { public String getModelIdentifier() { return ITCFConstants.ID_TCF_DEBUG_MODEL; } - + public String getText() { if (text == null) { IMarker marker = getMarker(); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java index a9db30408..8064d13ec 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -39,18 +39,18 @@ import org.eclipse.tm.tcf.services.IBreakpoints; /** * TCFBreakpointsModel class handles breakpoints for all active TCF launches. - * It downloads initial set of breakpoint data when launch is activated, + * It downloads initial set of breakpoint data when launch is activated, * listens for Eclipse breakpoint manager events and propagates breakpoint changes to TCF targets. */ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointManagerListener { private final IBreakpointManager bp_manager = DebugPlugin.getDefault().getBreakpointManager(); - + public TCFBreakpointsModel() { bp_manager.addBreakpointListener(this); bp_manager.addBreakpointManagerListener(this); } - + public static TCFBreakpointsModel getBreakpointsModel() { return Activator.getBreakpointsModel(); } @@ -59,12 +59,12 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana bp_manager.removeBreakpointListener(this); bp_manager.removeBreakpointManagerListener(this); } - + public boolean isSupported(IChannel channel, IBreakpoint bp) { // TODO: implement per-channel breakpoint filtering return true; } - + public String getBreakpointID(IBreakpoint bp) throws CoreException { IMarker marker = bp.getMarker(); String id = (String)marker.getAttributes().get(ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID); @@ -73,7 +73,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana if (id == null) return null; return id + ':' + marker.getId(); } - + @SuppressWarnings("unchecked") public void downloadBreakpoints(final IChannel channel, final Runnable done) throws IOException, CoreException { @@ -165,15 +165,15 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana Activator.log("Unhandled exception in breakpoint listener", x); } } - + private abstract class BreakpointUpdate implements Runnable { - + private final IBreakpoint breakpoint; private final ILaunch[] launches; private final Map<String,Object> marker_attrs; private final String marker_file; private final String marker_id; - + IBreakpoints service; IBreakpoints.DoneCommand done; Map<String,Object> tcf_attrs; @@ -186,13 +186,13 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana marker_id = getBreakpointID(breakpoint); launches = DebugPlugin.getDefault().getLaunchManager().getLaunches(); } - + synchronized void exec() throws InterruptedException { assert !Protocol.isDispatchThread(); Protocol.invokeLater(this); wait(); } - + public void run() { if (marker_id != null) { tcf_attrs = toBreakpointAttributes(marker_id, marker_file, marker_attrs); @@ -222,7 +222,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana } }); }; - + abstract void update(); } @@ -246,7 +246,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana Activator.log("Unhandled exception in breakpoint listener", x); } } - + @SuppressWarnings("unchecked") private Set<String> calcMarkerDeltaKeys(IMarker marker, IMarkerDelta delta) throws CoreException { assert delta.getKind() == IResourceDelta.CHANGED; @@ -310,7 +310,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana Activator.log("Unhandled exception in breakpoint listener", x); } } - + public Map<String,Object> toMarkerAttributes(Map<String,Object> p) { assert Protocol.isDispatchThread(); Map<String,Object> m = new HashMap<String,Object>(); @@ -331,7 +331,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana m.put(IBreakpoint.PERSISTED, Boolean.TRUE); m.put(IBreakpoint.ID, ITCFConstants.ID_TCF_DEBUG_MODEL); String msg = ""; - if (p.get(IBreakpoints.PROP_LOCATION) != null) msg += p.get(IBreakpoints.PROP_LOCATION); + if (p.get(IBreakpoints.PROP_LOCATION) != null) msg += p.get(IBreakpoints.PROP_LOCATION); m.put(IMarker.MESSAGE, "Breakpoint: " + msg); Number line = (Number)p.get(IBreakpoints.PROP_LINE); if (line != null) { @@ -344,7 +344,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana } return m; } - + public Map<String,Object> toBreakpointAttributes(String id, String file, Map<String,Object> p) { assert Protocol.isDispatchThread(); Map<String,Object> m = new HashMap<String,Object>(); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java index 35797a85a..669b2a797 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -23,17 +23,17 @@ import org.eclipse.tm.tcf.services.IBreakpoints; public class TCFBreakpointsStatus { - + private final IBreakpoints service; private final Map<String,Map<String,Object>> status = new HashMap<String,Map<String,Object>>(); private final Set<ITCFBreakpointListener> listeners = new HashSet<ITCFBreakpointListener>(); - + private static final Map<String,Object> status_not_supported = new HashMap<String,Object>(); - + static { status_not_supported.put(IBreakpoints.STATUS_ERROR, "Not supported"); } - + TCFBreakpointsStatus(TCFLaunch launch) { assert Protocol.isDispatchThread(); service = launch.getChannel().getRemoteService(IBreakpoints.class); @@ -74,7 +74,7 @@ public class TCFBreakpointsStatus { }); } } - + public Map<String,Object> getStatus(String id) { assert id != null; assert Protocol.isDispatchThread(); @@ -92,12 +92,12 @@ public class TCFBreakpointsStatus { return status_not_supported; } } - + public void addListener(ITCFBreakpointListener listener) { assert Protocol.isDispatchThread(); listeners.add(listener); } - + public void removeListener(ITCFBreakpointListener listener) { assert Protocol.isDispatchThread(); listeners.remove(listener); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java index 3a9dd15a8..9589096a3 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -15,7 +15,7 @@ import java.util.Map; public class TCFContextState { public boolean is_suspended; public boolean is_terminated; - + public String suspend_pc; public String suspend_reason; public Map<String,Object> suspend_params; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java index 81d422056..5a9d8540d 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java index 8e4d2eb29..4ee4715dc 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -52,17 +52,17 @@ import org.eclipse.tm.tcf.services.IProcesses.ProcessContext; public class TCFLaunch extends Launch { public interface Listener { - + public void onCreated(TCFLaunch launch); - public void onConnected(TCFLaunch launch); + public void onConnected(TCFLaunch launch); public void onDisconnected(TCFLaunch launch); public void onContextActionsStart(TCFLaunch launch); - + public void onContextActionsDone(TCFLaunch launch); - + public void onProcessOutput(TCFLaunch launch, String process_id, int stream_id, byte[] data); } @@ -84,9 +84,9 @@ public class TCFLaunch extends Launch { private int context_action_cnt; private final HashMap<String,LinkedList<Runnable>> context_action_queue = new HashMap<String,LinkedList<Runnable>>(); - + private HashMap<String,String> stream_ids = new HashMap<String,String>(); - + private final IStreams.StreamsListener streams_listener = new IStreams.StreamsListener() { public void created(String stream_type, String stream_id, String context_id) { @@ -102,14 +102,14 @@ public class TCFLaunch extends Launch { public void disposed(String stream_type, String stream_id) { } }; - + private final IProcesses.ProcessesListener prs_listener = new IProcesses.ProcessesListener() { public void exited(String process_id, int exit_code) { if (process_id.equals(process.getID())) process_exit_code = exit_code; } }; - + public TCFLaunch(ILaunchConfiguration launchConfiguration, String mode) { super(launchConfiguration, mode, null); for (Listener l : listeners) l.onCreated(TCFLaunch.this); @@ -119,7 +119,7 @@ public class TCFLaunch extends Launch { // The method is called when TCF channel is successfully connected. subscribeStreamsService(); } - + private void onDisconnected(Throwable error) { // The method is called when TCF channel is closed. assert !disconnected; @@ -139,7 +139,7 @@ public class TCFLaunch extends Launch { } }); } - + private void subscribeStreamsService() { try { IStreams streams = getService(IStreams.class); @@ -194,7 +194,7 @@ public class TCFLaunch extends Launch { } }); } - + private String[] toArgsArray(String file, String cmd) { // Create arguments list from a command line. int i = 0; @@ -225,7 +225,7 @@ public class TCFLaunch extends Launch { } return arr.toArray(new String[arr.size()]); } - + @SuppressWarnings("unchecked") protected void runLaunchSequence(final Runnable done) { try { @@ -295,7 +295,7 @@ public class TCFLaunch extends Launch { channel.terminate(x); } } - + private void copyFileToRemoteTarget(String local_file, String remote_file, final Runnable done) { if (local_file == null) { channel.terminate(new Exception("Program does not exist")); @@ -311,12 +311,12 @@ public class TCFLaunch extends Launch { final InputStream inp = new FileInputStream(local_file); int flags = IFileSystem.TCF_O_WRITE | IFileSystem.TCF_O_CREAT | IFileSystem.TCF_O_TRUNC; fs.open(remote_file, flags, null, new IFileSystem.DoneOpen() { - + IFileHandle handle; long offset = 0; final Set<IToken> cmds = new HashSet<IToken>(); final byte[] buf = new byte[0x1000]; - + public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) { this.handle = handle; if (error != null) { @@ -328,7 +328,7 @@ public class TCFLaunch extends Launch { write_next(); } } - + private void write_next() { try { while (cmds.size() < 8) { @@ -338,7 +338,7 @@ public class TCFLaunch extends Launch { break; } cmds.add(fs.write(handle, offset, buf, 0, rd, new IFileSystem.DoneWrite() { - + public void doneWrite(IToken token, FileSystemException error) { cmds.remove(token); if (error != null) channel.terminate(error); @@ -352,13 +352,13 @@ public class TCFLaunch extends Launch { channel.terminate(x); } } - + private void close() { if (cmds.size() > 0) return; try { inp.close(); fs.close(handle, new IFileSystem.DoneClose() { - + public void doneClose(IToken token, FileSystemException error) { if (error != null) channel.terminate(error); else done.run(); @@ -375,7 +375,7 @@ public class TCFLaunch extends Launch { channel.terminate(x); } } - + private String getProgramPath(String project_name, String local_file) { if (project_name == null || project_name.length() == 0) { File f = new File(local_file); @@ -393,7 +393,7 @@ public class TCFLaunch extends Launch { } return program_path.toOSString(); } - + private void connectProcessStreams() { assert process_start_command == null; final IStreams streams = getService(IStreams.class); @@ -416,7 +416,7 @@ public class TCFLaunch extends Launch { } } } - + private void connectStream(final String id, final int no) { final String peocess_id = process.getID(); final IStreams streams = getService(IStreams.class); @@ -442,7 +442,7 @@ public class TCFLaunch extends Launch { streams.read(id, 0x1000, done); streams.read(id, 0x1000, done); } - + private void disconnectStream(String id) { stream_ids.remove(id); if (channel.getState() != IChannel.STATE_OPEN) return; @@ -454,17 +454,17 @@ public class TCFLaunch extends Launch { } }); } - + protected void runShutdownSequence(final Runnable done) { done.run(); } - + /*--------------------------------------------------------------------------------------------*/ public Throwable getError() { return error; } - + public void setError(Throwable x) { error = x; if (x != null) { @@ -477,7 +477,7 @@ public class TCFLaunch extends Launch { } fireChanged(); } - + public TCFBreakpointsStatus getBreakpointsStatus() { return breakpoints_status; } @@ -496,11 +496,11 @@ public class TCFLaunch extends Launch { assert Protocol.isDispatchThread(); return channel; } - + public IProcesses.ProcessContext getProcessContext() { return process; } - + public void writeProcessInputStream(byte[] buf, int pos, int len) { assert Protocol.isDispatchThread(); if (channel.getState() != IChannel.STATE_OPEN) return; @@ -513,16 +513,16 @@ public class TCFLaunch extends Launch { } }); } - + public boolean isConnecting() { return connecting; } - + public void onLastContextRemoved() { last_context_exited = true; closeChannel(); } - + public void closeChannel() { assert Protocol.isDispatchThread(); if (channel == null) return; @@ -561,7 +561,7 @@ public class TCFLaunch extends Launch { public boolean isDisconnected() { return disconnected; } - + public void disconnect() throws DebugException { try { Protocol.invokeLater(new Runnable() { @@ -574,7 +574,7 @@ public class TCFLaunch extends Launch { disconnected = true; } } - + public boolean canTerminate() { return false; } @@ -589,11 +589,11 @@ public class TCFLaunch extends Launch { public boolean isExited() { return last_context_exited; } - + public int getExitCode() { return process_exit_code; } - + public void launchTCF(String mode, String id) { assert Protocol.isDispatchThread(); this.mode = mode; @@ -615,28 +615,28 @@ public class TCFLaunch extends Launch { channel = peer.openChannel(); while (path.size() > 0) channel.redirect(path.removeFirst()); channel.addChannelListener(new IChannel.IChannelListener() { - + public void onChannelOpened() { onConnected(); } - + public void congestionLevel(int level) { } - + public void onChannelClosed(Throwable error) { channel.removeChannelListener(this); onDisconnected(error); } - + }); - assert channel.getState() == IChannel.STATE_OPENNING; + assert channel.getState() == IChannel.STATE_OPENNING; connecting = true; } catch (Throwable e) { onDisconnected(e); } } - + public void addContextAction(TCFAction action, String context_id) { assert Protocol.isDispatchThread(); LinkedList<Runnable> list = context_action_queue.get(context_id); @@ -651,7 +651,7 @@ public class TCFLaunch extends Launch { } if (list.getFirst() == action) Protocol.invokeLater(action); } - + public void removeContextAction(TCFAction action, String context_id) { assert Protocol.isDispatchThread(); LinkedList<Runnable> list = context_action_queue.get(context_id); @@ -667,7 +667,7 @@ public class TCFLaunch extends Launch { for (Listener l : listeners) l.onContextActionsDone(this); } } - + public void removeContextActions(String context_id) { assert Protocol.isDispatchThread(); LinkedList<Runnable> list = context_action_queue.remove(context_id); @@ -677,7 +677,7 @@ public class TCFLaunch extends Launch { for (Listener l : listeners) l.onContextActionsDone(this); } } - + public boolean hasPendingContextActions() { return context_action_cnt > 0; } diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java index 049edcd7c..e433f6c59 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -16,7 +16,7 @@ import org.eclipse.tm.tcf.services.ILineNumbers; import org.eclipse.tm.tcf.services.IMemory; /** - * Objects of this class represent a mapping between an address and source code area. + * Objects of this class represent a mapping between an address and source code area. */ public class TCFSourceRef { public IMemory.MemoryContext context; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java index 0672fa6c8..434339f69 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java @@ -1,20 +1,20 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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.tm.internal.tcf.debug.tests; /** - * Each (sub)test in TCF Test Suite should implement this interface. + * Each (sub)test in TCF Test Suite should implement this interface. */ interface ITCFTest { - + /** * Start execution of the test. */ diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java index b5e473eaf..8724c35ca 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -21,14 +21,14 @@ import org.eclipse.tm.tcf.protocol.IPeer; import org.eclipse.tm.tcf.protocol.Protocol; /** - * This class is user to run TCF test suite from command line. + * This class is user to run TCF test suite from command line. */ public class Main { - + private static class EventQueue extends Thread implements IEventQueue { - + private final LinkedList<Runnable> queue = new LinkedList<Runnable>(); - + EventQueue() { setName("TCF Event Dispatch"); start(); @@ -56,7 +56,7 @@ public class Main { System.exit(1); } } - + public synchronized int getCongestion() { int n = queue.size() - 100; if (n > 100) n = 100; @@ -72,9 +72,9 @@ public class Main { return Thread.currentThread() == this; } } - + private static class RemotePeer extends AbstractPeer { - + public RemotePeer(Map<String,String> attrs) { super(attrs); } @@ -108,7 +108,7 @@ public class Main { } return peer; } - + private static void runTestSuite(IPeer peer) { TCFTestSuite.TestListener listenr = new TCFTestSuite.TestListener() { @@ -126,7 +126,7 @@ public class Main { public void progress(String label, int done, int total) { if (label != null) System.out.println(label); } - + }; try { new TCFTestSuite(peer, listenr); @@ -140,7 +140,7 @@ public class Main { /** * Command line should contain peer description string, for example: - * "ID=Test:TransportName=TCP:Host=127.0.0.1:Port=1534" + * "ID=Test:TransportName=TCP:Host=127.0.0.1:Port=1534" */ public static void main(final String[] args) { if (args.length != 1) { diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java index e2589902b..786f91044 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -25,21 +25,21 @@ import org.eclipse.tm.tcf.protocol.Protocol; /** * TCF Test Suite implements stress testing of communication channels and capabilities of remote peer. * It is intended to be used before starting a debug session for a first time to make sure the selected - * target is stable and reliable. + * target is stable and reliable. */ public class TCFTestSuite { - + private final static int NUM_CHANNELS = 4; - + private final TestListener listener; private final IChannel[] channels; - private final LinkedList<Runnable> pending_tests = new LinkedList<Runnable>(); + private final LinkedList<Runnable> pending_tests = new LinkedList<Runnable>(); private final Collection<Throwable> errors = new ArrayList<Throwable>(); private final Map<ITCFTest,IChannel> active_tests = new HashMap<ITCFTest,IChannel>(); - + private int count_total; private int count_done; - + boolean cancel; boolean canceled; boolean target_lock; @@ -48,7 +48,7 @@ public class TCFTestSuite { public void progress(String label, int done, int total); public void done(Collection<Throwable> errors); } - + public TCFTestSuite(final IPeer peer, final TestListener listener) throws IOException { this.listener = listener; pending_tests.add(new Runnable() { @@ -152,7 +152,7 @@ public class TCFTestSuite { } }); } - + private void openChannels(IPeer peer) { listener.progress("Openning communication channels...", count_done, count_total); for (int i = 0; i < channels.length; i++) { @@ -194,7 +194,7 @@ public class TCFTestSuite { }); } } - + public void cancel() { cancel = true; if (canceled) return; @@ -214,15 +214,15 @@ public class TCFTestSuite { if (c != null && c.getState() != IChannel.STATE_CLOSED) c.close(); } } - + public boolean isCanceled() { return canceled; } - + boolean isActive(ITCFTest test) { return active_tests.get(test) != null; } - + void done(ITCFTest test, Throwable error) { assert active_tests.get(test) != null; if (error != null && !canceled) errors.add(error); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java index c8776e968..ccb301772 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -22,24 +22,24 @@ import org.eclipse.tm.tcf.services.IRunControl; import org.eclipse.tm.tcf.services.IRunControl.RunControlContext; class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener { - + private final TCFTestSuite test_suite; private final IDiagnostics diag; private final IRunControl rc; - + private final HashMap<String,IRunControl.RunControlContext> map = new HashMap<String,IRunControl.RunControlContext>(); private final HashSet<String> process_ids = new HashSet<String>(); - + private int cnt; private int wait_cnt; - + TestAttachTerminate(TCFTestSuite test_suite, IChannel channel) { this.test_suite = test_suite; diag = channel.getRemoteService(IDiagnostics.class); rc = channel.getRemoteService(IRunControl.class); } - + public void start() { if (diag == null) { test_suite.done(this, null); @@ -65,7 +65,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener { }); } } - + private void startProcess() { if (test_suite.cancel || cnt == 4) { if (!process_ids.isEmpty()) { @@ -127,7 +127,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener { } }); } - + private void exit(Throwable x) { if (!test_suite.isActive(this)) return; if (rc != null) rc.removeListener(this); @@ -161,7 +161,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener { } public void contextException(String context, String msg) { - IRunControl.RunControlContext ctx = map.get(context); + IRunControl.RunControlContext ctx = map.get(context); if (ctx == null) return; if (process_ids.contains(ctx.getParentID())) { exit(new Error("Unexpected 'contextException' event for " + context + ": " + msg)); @@ -181,7 +181,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener { public void contextSuspended(String context, String pc, String reason, Map<String, Object> params) { assert context != null; - IRunControl.RunControlContext ctx = map.get(context); + IRunControl.RunControlContext ctx = map.get(context); if (ctx == null) return; if (process_ids.contains(ctx.getParentID())) { ctx.resume(IRunControl.RM_RESUME, 1, new IRunControl.DoneCommand() { diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java index 14364896e..e094ffbd8 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -28,7 +28,7 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho { this.test_suite = test_suite; diag = channel.getRemoteService(IDiagnostics.class); } - + public void start() { if (diag == null) { test_suite.done(this, null); @@ -50,7 +50,7 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho { }); } } - + private void sendMessage() { StringBuffer buf = new StringBuffer(); buf.append(Integer.toHexString(count)); @@ -63,7 +63,7 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho { diag.echo(s, this); count++; } - + public void doneEcho(IToken token, Throwable error, String b) { String s = msgs.removeFirst(); if (!test_suite.isActive(this)) return; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java index 358c22fd9..28ee0323b 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java @@ -21,7 +21,7 @@ public class TestEchoFP implements ITCFTest, IDiagnostics.DoneEchoFP { this.test_suite = test_suite; diag = channel.getRemoteService(IDiagnostics.class); } - + public void start() { if (diag == null) { test_suite.done(this, null); @@ -30,18 +30,18 @@ public class TestEchoFP implements ITCFTest, IDiagnostics.DoneEchoFP { for (int i = 0; i < 32; i++) sendMessage(); } } - + private void sendMessage() { BigDecimal n = BigDecimal.valueOf(rnd.nextInt(), rnd.nextInt(61) - 30); msgs.add(n); diag.echoFP(n, this); count++; } - + private boolean cmp(double x, double y) { return (float)x == (float)y; } - + public void doneEchoFP(IToken token, Throwable error, BigDecimal b) { BigDecimal s = msgs.removeFirst(); if (!test_suite.isActive(this)) return; diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java index faf2dd9a4..e664fb4c9 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -25,14 +25,14 @@ import org.eclipse.tm.tcf.services.IStackTrace; class TestExpressions implements ITCFTest, IRunControl.RunControlListener, IExpressions.ExpressionsListener, IBreakpoints.BreakpointsListener { - + private final TCFTestSuite test_suite; private final IDiagnostics diag; private final IExpressions expr; private final IStackTrace stk; private final IRunControl rc; private final IBreakpoints bp; - + private String bp_id; private boolean bp_ok; private IDiagnostics.ISymbol sym_func3; @@ -49,7 +49,7 @@ class TestExpressions implements ITCFTest, new HashMap<String,IExpressions.Expression>(); private final Map<String,IExpressions.Value> expr_val = new HashMap<String,IExpressions.Value>(); - + private static String[] test_expressions = { "func2_local1 == func2_local1", "func2_local1 != func2_local2", @@ -83,7 +83,7 @@ class TestExpressions implements ITCFTest, "((func2_local1 + func2_local2) * 2 - 2) / 2 == 2", "func2_local3.f_struct->f_struct->f_struct == &func2_local3" }; - + TestExpressions(TCFTestSuite test_suite, IChannel channel) { this.test_suite = test_suite; diag = channel.getRemoteService(IDiagnostics.class); @@ -362,7 +362,7 @@ class TestExpressions implements ITCFTest, } }); } - + private void exit(Throwable x) { if (!test_suite.isActive(this)) return; expr.removeListener(this); @@ -372,7 +372,7 @@ class TestExpressions implements ITCFTest, } //--------------------------- Run Control listener ---------------------------// - + public void containerResumed(String[] context_ids) { } diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java index 94ae1494d..7f2d5cbb0 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -31,7 +31,7 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat, IFileSystem.DoneRename, IFileSystem.DoneRealPath, IFileSystem.DoneRemove, IFileSystem.DoneRoots, IFileSystem.DoneReadDir { - + private final TCFTestSuite test_suite; private final int channel_id; @@ -42,7 +42,7 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat, STATE_OUT = 3, STATE_INP = 4, STATE_EXIT = 5; - + private final IFileSystem files; private final byte[] data = new byte[0x1000]; private String root; @@ -50,13 +50,13 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat, private String file_name; private IFileHandle handle; private int state = STATE_PRE; - + TestFileSystem(TCFTestSuite test_suite, IChannel channel, int channel_id) { this.test_suite = test_suite; this.channel_id = channel_id; files = channel.getRemoteService(IFileSystem.class); } - + public void start() { if (files == null) { test_suite.done(this, null); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java index 0bd4836f0..f4088090e 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. 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 - * + * 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 *******************************************************************************/ @@ -56,8 +56,8 @@ class TestRCBP1 implements ITCFTest, private final Map<IToken,String> get_state_cmds = new HashMap<IToken,String>(); private final Map<String,Map<String,IRegisters.RegistersContext>> regs = new HashMap<String,Map<String,IRegisters.RegistersContext>>(); - private final Map<String,Map<String,Object>> bp_list = new HashMap<String,Map<String,Object>>(); - + private final Map<String,Map<String,Object>> bp_list = new HashMap<String,Map<String,Object>>(); + private String context_id; // Test process context ID private IRunControl.RunControlContext context; private String main_thread_id; @@ -70,8 +70,8 @@ class TestRCBP1 implements ITCFTest, private boolean done_starting_test_process; private int resume_cnt = 0; private IToken cancel_test_cmd; - private boolean bp_set_done; - private boolean bp_change_done; + private boolean bp_set_done; + private boolean bp_change_done; private class SuspendedContext { final String id; @@ -79,7 +79,7 @@ class TestRCBP1 implements ITCFTest, final String reason; final Map<String,Object> params; boolean resumed; - + SuspendedContext(String id, String pc, String reason, Map<String,Object> params) { this.id = id; this.pc = pc; @@ -87,7 +87,7 @@ class TestRCBP1 implements ITCFTest, this.params = params; } } - + private final IBreakpoints.BreakpointsListener bp_listener = new IBreakpoints.BreakpointsListener() { public void breakpointStatusChanged(String id, Map<String,Object> status) { @@ -111,7 +111,7 @@ class TestRCBP1 implements ITCFTest, public void contextRemoved(String[] ids) { } - + private boolean checkBPData(Map<String,Object> m0, Map<String,Object> m1) { if (m1 == null) return true; m0 = new HashMap<String,Object>(m0); @@ -135,7 +135,7 @@ class TestRCBP1 implements ITCFTest, bp = channel.getRemoteService(IBreakpoints.class); ln = channel.getRemoteService(ILineNumbers.class); } - + public void start() { if (diag == null || rc == null) { test_suite.done(this, null); @@ -148,7 +148,7 @@ class TestRCBP1 implements ITCFTest, } if (bp != null) bp.addListener(bp_listener); } - + public void doneGetTestList(IToken token, Throwable error, String[] list) { assert test_suite.isActive(this); if (error != null) { @@ -164,7 +164,7 @@ class TestRCBP1 implements ITCFTest, } exit(null); } - + public void doneRunTest(IToken token, Throwable error, String context_id) { if (error != null) { exit(error); @@ -223,7 +223,7 @@ class TestRCBP1 implements ITCFTest, }); } } - + @SuppressWarnings("unchecked") private void iniBreakpoints() { assert !bp_set_done; @@ -359,7 +359,7 @@ class TestRCBP1 implements ITCFTest, doneStartingTestProcess(); } } - + private void doneStartingTestProcess() { assert !done_starting_test_process; assert get_state_cmds.isEmpty(); @@ -451,7 +451,7 @@ class TestRCBP1 implements ITCFTest, } }); } - + public void containerResumed(String[] context_ids) { for (String id : context_ids) contextResumed(id); } @@ -516,7 +516,7 @@ class TestRCBP1 implements ITCFTest, exit(new Exception("Test main thread breakpoint count = " + bp_cnt + ", expected 30")); } rc.removeListener(this); - // Flush communication channel of pending commands + // Flush communication channel of pending commands Protocol.sync(new Runnable() { public void run() { exit(null); @@ -532,14 +532,14 @@ class TestRCBP1 implements ITCFTest, if (!isAlienBreakpoint(sc)) suspended_prev.put(id, sc); running.add(id); } - + private String toSymName(long addr) { if (func0.getValue().longValue() == addr) return "tcf_test_func0"; if (func1.getValue().longValue() == addr) return "tcf_test_func1"; if (func2.getValue().longValue() == addr) return "tcf_test_func2"; return "0x" + Long.toHexString(addr); } - + private void checkSuspendedContext(SuspendedContext sp, ISymbol sym) { long pc = Long.parseLong(sp.pc); if (pc != sym.getValue().longValue() || !"Breakpoint".equals(sp.reason)) { @@ -547,7 +547,7 @@ class TestRCBP1 implements ITCFTest, ", expected breakpoint at '" + toSymName(sym.getValue().longValue()) + "' " + sym.getValue())); } } - + private boolean isAlienBreakpoint(SuspendedContext sc) { // Check if context suspended by a breakpoint from another debug session // Test should ignore such breakpoints. @@ -624,7 +624,7 @@ class TestRCBP1 implements ITCFTest, ln_done.doneMapToSource(null, null, null); } } - + private void resume(final SuspendedContext sc) { assert done_starting_test_process || resume_cnt == 0; if (!done_starting_test_process) return; @@ -642,7 +642,7 @@ class TestRCBP1 implements ITCFTest, }); } } - + private void runMemoryTest(final SuspendedContext sc) { if (test_suite.target_lock) { resume(sc); @@ -699,7 +699,7 @@ class TestRCBP1 implements ITCFTest, } }); } - + private void testSetMemoryCommand(final SuspendedContext sc, final IMemory.MemoryContext mem_ctx, final Number addr, final byte[] buf) { @@ -739,7 +739,7 @@ class TestRCBP1 implements ITCFTest, } }); } - + private void testFillMemoryCommand(final SuspendedContext sc, final IMemory.MemoryContext mem_ctx, final Number addr, final byte[] buf) { @@ -781,7 +781,7 @@ class TestRCBP1 implements ITCFTest, } }); } - + private void runRegistersTest(final SuspendedContext sc) { if (regs.get(sc.id) == null) { final Map<String,IRegisters.RegistersContext> reg_map = @@ -830,7 +830,7 @@ class TestRCBP1 implements ITCFTest, testGetSetRegisterCommands(sc); } } - + private void testGetSetRegisterCommands(final SuspendedContext sc) { final Set<IToken> cmds = new HashSet<IToken>(); Map<String,IRegisters.RegistersContext> reg_map = regs.get(sc.id); @@ -907,7 +907,7 @@ class TestRCBP1 implements ITCFTest, resume(sc); } } - + void cancel(final Runnable done) { if (rc != null) rc.removeListener(this); if (context_id == null) { diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java index 19dc9a0cf..ff0917f12 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java @@ -15,10 +15,10 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { private final IStreams streams; private final Random rnd = new Random(); private final HashSet<String> stream_ids = new HashSet<String>(); - + private String inp_id; private String out_id; - + private int test_count; TestStreams(TCFTestSuite test_suite, IChannel channel) { @@ -26,7 +26,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { diag = channel.getRemoteService(IDiagnostics.class); streams = channel.getRemoteService(IStreams.class); } - + public void start() { if (diag == null ||streams == null) { test_suite.done(this, null); @@ -35,7 +35,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { subsrcibe(); } } - + private void subsrcibe() { streams.subscribe(IDiagnostics.NAME, this, new IStreams.DoneSubscribe() { @@ -49,7 +49,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { } }); } - + private void createStream() { diag.createTestStreams(1153, 947, new IDiagnostics.DoneCreateTestStreams() { @@ -64,7 +64,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { if (id.equals(inp_id)) continue; if (id.equals(out_id)) continue; streams.disconnect(id, new IStreams.DoneDisconnect() { - + public void doneDisconnect(IToken token, Exception error) { if (error != null) { exit(error); @@ -77,13 +77,13 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { } }); } - + private void testReadWrite() { final byte[] data_out = new byte[rnd.nextInt(10000) + 1000]; new Random().nextBytes(data_out); final HashSet<IToken> cmds = new HashSet<IToken>(); IStreams.DoneRead done_read = new IStreams.DoneRead() { - + private int offs = 0; private boolean eos; @@ -138,7 +138,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { cmds.add(streams.read(out_id, 227, done_read)); cmds.add(streams.read(out_id, 229, done_read)); cmds.add(streams.read(out_id, 233, done_read)); - + IStreams.DoneWrite done_write = new IStreams.DoneWrite() { public void doneWrite(IToken token, Exception error) { @@ -159,7 +159,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { } }); } - + private void disposeStreams() { final HashSet<IToken> cmds = new HashSet<IToken>(); IStreams.DoneDisconnect done_disconnect = new IStreams.DoneDisconnect() { @@ -191,7 +191,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { cmds.add(diag.disposeTestStream(out_id, done_dispose)); cmds.add(streams.disconnect(out_id, done_disconnect)); } - + private void unsubscribe() { streams.unsubscribe(IDiagnostics.NAME, this, new IStreams.DoneUnsubscribe() { @@ -214,7 +214,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { if (!test_suite.isActive(this)) return; test_suite.done(this, x); } - + /************************** StreamsListener **************************/ public void created(String stream_type, String stream_id, String context_id) { @@ -225,7 +225,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener { if (inp_id.equals(stream_id)) exit(new Exception("Invalid stream ID in Streams.created event")); if (out_id.equals(stream_id)) exit(new Exception("Invalid stream ID in Streams.created event")); streams.disconnect(stream_id, new IStreams.DoneDisconnect() { - + public void doneDisconnect(IToken token, Exception error) { if (error != null) { exit(error); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java index 09985831b..a8ec24d41 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java @@ -59,7 +59,7 @@ class TestSysMonitor implements ITCFTest { }); } } - + private void getEnvironment() { final HashSet<IToken> cmds = new HashSet<IToken>(); for (final String id : procs.keySet()) { @@ -78,7 +78,7 @@ class TestSysMonitor implements ITCFTest { })); } } - + private void getCommandLine() { final HashSet<IToken> cmds = new HashSet<IToken>(); for (final String id : procs.keySet()) { |