Replaced the 'IProject' argument by 'IFile' in the debug target factory
methods - second phase.
Index:
ChangeLog
===================================================================
RCS
file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision
1.42
diff -u -r1.42 ChangeLog
--- ChangeLog 1 Nov 2002 17:15:50
-0000 1.42
+++ ChangeLog 1 Nov 2002 18:22:13 -0000
@@ -1,4 +1,9
@@
2002-10-31 Mikhail Khodjaiants
+ Replaced the 'IProject'
argument by 'IFile' in the debug target factory methods - second
phase.
+ * CDebugModel.java: removed unused debug target factory
methods.
+ * CDebugTarget.java: removed unused
constructor.
+
+2002-10-31 Mikhail Khodjaiants
Replaced the
'IProject' argument by 'IFile' in the debug target factory
methods.
* CDebugModel.java
*
CDebugTarget.java
Index:
src/org/eclipse/cdt/debug/core/CDebugModel.java
===================================================================
RCS
file:
/home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java,v
retrieving
revision 1.35
diff -u -r1.35 CDebugModel.java
---
src/org/eclipse/cdt/debug/core/CDebugModel.java 1 Nov 2002 17:15:50
-0000 1.35
+++ src/org/eclipse/cdt/debug/core/CDebugModel.java 1
Nov 2002 18:22:14 -0000
@@ -27,7 +27,6 @@
import
org.eclipse.cdt.debug.internal.core.model.CFormattedMemoryBlock;
import
org.eclipse.core.resources.IFile;
import
org.eclipse.core.resources.IMarker;
-import
org.eclipse.core.resources.IProject;
import
org.eclipse.core.resources.IResource;
import
org.eclipse.core.resources.IWorkspaceRunnable;
import
org.eclipse.core.resources.ResourcesPlugin;
@@ -85,117 +84,15
@@
* @param cdiTarget the CDI target to create a debug target
for
* @param name the name to associate with this target, which
will be
* returned from
<code>IDebugTarget.getName</code>.
- * @param process the
process to associate with the debug target,
+ * @param debuggeeProcess
the process to associate with the debug target,
*
which will be returned from
<code>IDebugTarget.getProcess</code>
+ * @param
debuggerProcess the process to associate with the debugger.
+ * @param
file the executable to debug.
* @param allowTerminate whether
the target will support termianation
* @param allowDisconnect
whether the target will support disconnection
* @param
stopInMain whether to set a temporary breakpoint in main.
*
@return a debug target
*/
-/*
- public static
IDebugTarget newDebugTarget( final ILaunch
launch,
-
final ICDITarget
cdiTarget,
-
final String
name,
-
final IProcess
process,
-
final IProject
project,
-
final boolean
allowTerminate,
-
final boolean
allowDisconnect,
-
final boolean stopInMain ) throws
DebugException
- {
- final IDebugTarget[] target = new
IDebugTarget[1];
-
- IWorkspaceRunnable r = new
IWorkspaceRunnable()
- {
- public void run(
IProgressMonitor m
)
- {
- target[0] = new
CDebugTarget(
launch,
-
ICDebugTargetType.TARGET_TYPE_LOCAL_RUN,
-
cdiTarget,
-
name,
-
process,
-
null,
-
project,
-
allowTerminate,
-
allowDisconnect
);
- }
- };
- try
- {
- ResourcesPlugin.getWorkspace().run(
r, null );
- }
- catch( CoreException e
)
- {
- CDebugCorePlugin.log( e
);
- throw new DebugException( e.getStatus()
);
- }
-
- ICDIConfiguration config =
cdiTarget.getSession().getConfiguration();
-
- if (
config.supportsBreakpoints() && stopInMain
)
- {
- stopInMain( (CDebugTarget)target[0]
);
- }
-
- if ( config.supportsResume()
)
- {
- target[0].resume();
- }
-
- return
target[0];
- }
-*/
- public static IDebugTarget
newDebugTarget( final ILaunch
launch,
-
final ICDITarget
cdiTarget,
-
final String
name,
-
final IProcess
debuggeeProcess,
-
final IProcess
debuggerProcess,
-
final IProject
project,
-
final boolean
allowTerminate,
-
final boolean
allowDisconnect,
-
final boolean stopInMain ) throws
DebugException
- {
- final IDebugTarget[] target = new
IDebugTarget[1];
-
- IWorkspaceRunnable r = new
IWorkspaceRunnable()
- {
- public void run(
IProgressMonitor m
)
- {
- target[0] = new
CDebugTarget(
launch,
-
ICDebugTargetType.TARGET_TYPE_LOCAL_RUN,
-
cdiTarget,
-
name,
-
debuggeeProcess,
-
debuggerProcess,
-
project,
-
allowTerminate,
-
allowDisconnect
);
- }
- };
- try
- {
- ResourcesPlugin.getWorkspace().run(
r, null );
- }
- catch( CoreException e
)
- {
- CDebugCorePlugin.log( e
);
- throw new DebugException( e.getStatus()
);
- }
-
- ICDIConfiguration config =
cdiTarget.getSession().getConfiguration();
-
- if (
config.supportsBreakpoints() && stopInMain
)
- {
- stopInMain( (CDebugTarget)target[0]
);
- }
-
- if ( config.supportsResume()
)
- {
- target[0].resume();
- }
-
- return
target[0];
- }
-
public static IDebugTarget
newDebugTarget( final ILaunch
launch,
final ICDITarget
cdiTarget,
final String name,
@@ -247,105 +144,6
@@
return
target[0];
}
-/*
- public static IDebugTarget
newAttachDebugTarget( final ILaunch
launch,
-
final ICDITarget
cdiTarget,
-
final String
name,
-
final IProject project ) throws DebugException
- {
- final
IDebugTarget[] target = new
IDebugTarget[1];
-
- IWorkspaceRunnable r = new
IWorkspaceRunnable()
- {
- public void run(
IProgressMonitor m
)
- {
- target[0] = new
CDebugTarget( launch,
-
ICDebugTargetType.TARGET_TYPE_LOCAL_ATTACH,
-
cdiTarget,
-
name,
-
null,
-
null,
-
project,
-
false,
-
true
);
- }
- };
- try
- {
- ResourcesPlugin.getWorkspace().run(
r, null );
- }
- catch( CoreException e
)
- {
- CDebugCorePlugin.log( e
);
- throw new DebugException( e.getStatus()
);
- }
-
- ((CDebugTarget)target[0]).handleDebugEvent(
new
ICDISuspendedEvent()
- {
- public
ICDISessionObject
getReason()
- {
- return
null;
- }
-
- public
ICDIObject
getSource()
- {
- return
cdiTarget;
- }
-
- }
);
-
- return target[0];
- }
-*/
- public
static IDebugTarget newAttachDebugTarget( final ILaunch
launch,
-
final ICDITarget
cdiTarget,
-
final String
name,
-
final IProcess
debuggerProcess,
-
final IProject project ) throws DebugException
- {
- final
IDebugTarget[] target = new
IDebugTarget[1];
-
- IWorkspaceRunnable r = new
IWorkspaceRunnable()
- {
- public void run(
IProgressMonitor m
)
- {
- target[0] = new
CDebugTarget( launch,
-
ICDebugTargetType.TARGET_TYPE_LOCAL_ATTACH,
-
cdiTarget,
-
name,
-
null,
-
debuggerProcess,
-
project,
-
false,
-
true
);
- }
- };
- try
- {
- ResourcesPlugin.getWorkspace().run(
r, null );
- }
- catch( CoreException e
)
- {
- CDebugCorePlugin.log( e
);
- throw new DebugException( e.getStatus()
);
- }
-
- ((CDebugTarget)target[0]).handleDebugEvent(
new
ICDISuspendedEvent()
- {
- public
ICDISessionObject
getReason()
- {
- return
null;
- }
-
- public
ICDIObject
getSource()
- {
- return
cdiTarget;
- }
-
- }
);
-
- return
target[0];
- }
public static IDebugTarget
newAttachDebugTarget( final ILaunch
launch,
final ICDITarget cdiTarget,
@@ -368,105 +166,6
@@
file,
false,
true
);
- }
- };
- try
- {
- ResourcesPlugin.getWorkspace().run(
r, null );
- }
- catch( CoreException e
)
- {
- CDebugCorePlugin.log( e
);
- throw new DebugException( e.getStatus()
);
- }
-
- ((CDebugTarget)target[0]).handleDebugEvent(
new
ICDISuspendedEvent()
- {
- public
ICDISessionObject
getReason()
- {
- return
null;
- }
-
- public
ICDIObject
getSource()
- {
- return
cdiTarget;
- }
-
- }
);
-
- return target[0];
- }
-/*
- public
static IDebugTarget newCoreFileDebugTarget( final ILaunch
launch,
-
final ICDITarget
cdiTarget,
-
final String
name,
-
final IProject project ) throws DebugException
- {
- final
IDebugTarget[] target = new
IDebugTarget[1];
-
- IWorkspaceRunnable r = new
IWorkspaceRunnable()
- {
- public void run(
IProgressMonitor m
)
- {
- target[0] = new
CDebugTarget( launch,
-
ICDebugTargetType.TARGET_TYPE_LOCAL_CORE_DUMP,
-
cdiTarget,
-
name,
-
null,
-
null,
-
project,
-
true,
-
false
);
- }
- };
- try
- {
- ResourcesPlugin.getWorkspace().run(
r, null );
- }
- catch( CoreException e
)
- {
- CDebugCorePlugin.log( e
);
- throw new DebugException( e.getStatus()
);
- }
-
- ((CDebugTarget)target[0]).handleDebugEvent(
new
ICDISuspendedEvent()
- {
- public
ICDISessionObject
getReason()
- {
- return
null;
- }
-
- public
ICDIObject
getSource()
- {
- return
cdiTarget;
- }
-
- }
);
-
- return target[0];
- }
-*/
- public
static IDebugTarget newCoreFileDebugTarget( final ILaunch
launch,
-
final ICDITarget
cdiTarget,
-
final String
name,
-
final IProcess
debuggerProcess,
-
final IProject project ) throws DebugException
- {
- final
IDebugTarget[] target = new
IDebugTarget[1];
-
- IWorkspaceRunnable r = new
IWorkspaceRunnable()
- {
- public void run(
IProgressMonitor m
)
- {
- target[0] = new
CDebugTarget( launch,
-
ICDebugTargetType.TARGET_TYPE_LOCAL_CORE_DUMP,
-
cdiTarget,
-
name,
-
null,
-
debuggerProcess,
-
project,
-
true,
-
false
);
}
};
try
Index:
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
===================================================================
RCS
file:
/home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java,v
retrieving
revision 1.50
diff -u -r1.50 CDebugTarget.java
---
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 1 Nov 2002
17:15:50 -0000 1.50
+++
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 1 Nov 2002
18:22:14 -0000
@@ -228,40 +228,6
@@
String
name,
IProcess
debuggeeProcess,
IProcess
debuggerProcess,
- IProject
project,
- boolean
allowsTerminate,
- boolean
allowsDisconnect )
- {
- super( null
);
- setLaunch( launch );
- setTargetType(
targetType );
- setDebugTarget( this );
- setName(
name );
- setProcesses( debuggeeProcess, debuggerProcess
);
- setCDITarget( cdiTarget );
- setBreakpoints(
new HashMap( 5 ) );
- setTemporaryBreakpoints( new ArrayList()
);
- getLaunch().setSourceLocator( createSourceLocator( project )
);
- setConfiguration( cdiTarget.getSession().getConfiguration()
);
- fSupportsTerminate = allowsTerminate &
getConfiguration().supportsTerminate();
- fSupportsDisconnect =
allowsDisconnect &
getConfiguration().supportsDisconnect();
- setThreadList( new
ArrayList( 5 )
);
- initialize();
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(
this
);
- DebugPlugin.getDefault().getExpressionManager().addExpressionListener(
this );
- getCDISession().getEventManager().addEventListener( this
);
- }
-
- /**
- * Constructor for
CDebugTarget.
- * @param target
- */
- public
CDebugTarget( ILaunch launch,
- int
targetType,
- ICDITarget cdiTarget,
- String
name,
- IProcess
debuggeeProcess,
- IProcess
debuggerProcess,
IFile
file,
boolean
allowsTerminate,
boolean
allowsDisconnect )