1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 10:45:37 +02:00

Avoid breaking API change by keeping and deprecating obsolete methods (bug 118100)

This commit is contained in:
Anton Leherbauer 2008-05-09 09:37:08 +00:00
parent 97f1304af9
commit e65eee8ef2

View file

@ -129,6 +129,7 @@ public class CDIDebugModel {
* @throws DebugException * @throws DebugException
* @deprecated * @deprecated
*/ */
@Deprecated
public static IDebugTarget newDebugTarget( final ILaunch launch, final IProject project, final ICDITarget cdiTarget, final String name, final IProcess debuggeeProcess, final IBinaryObject file, final boolean allowTerminate, final boolean allowDisconnect, final boolean stopInMain, final boolean resumeTarget ) throws DebugException { public static IDebugTarget newDebugTarget( final ILaunch launch, final IProject project, final ICDITarget cdiTarget, final String name, final IProcess debuggeeProcess, final IBinaryObject file, final boolean allowTerminate, final boolean allowDisconnect, final boolean stopInMain, final boolean resumeTarget ) throws DebugException {
final IDebugTarget[] target = new IDebugTarget[1]; final IDebugTarget[] target = new IDebugTarget[1];
IWorkspaceRunnable r = new IWorkspaceRunnable() { IWorkspaceRunnable r = new IWorkspaceRunnable() {
@ -171,6 +172,37 @@ public class CDIDebugModel {
return newDebugTarget( launch, project, cdiTarget, name, debuggeeProcess, file, allowTerminate, allowDisconnect, null, resumeTarget ); return newDebugTarget( launch, project, cdiTarget, name, debuggeeProcess, file, allowTerminate, allowDisconnect, null, resumeTarget );
} }
/**
* Creates and returns a line breakpoint for the source defined by the given source handle, at the given line number. The marker associated with the
* breakpoint will be created on the specified resource.
*
* @param sourceHandle
* the handle to the breakpoint source
* @param resource
* the resource on which to create the associated breakpoint marker
* @param lineNumber
* the line number on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
* @param enabled
* whether to enable or disable this breakpoint
* @param ignoreCount
* the number of times this breakpoint will be ignored
* @param condition
* the breakpoint condition
* @param register
* whether to add this breakpoint to the breakpoint manager
* @return a line breakpoint
* @throws CoreException
* if this method fails. Reasons include:
* <ul>
* <li>Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.</li>
* </ul>
* @deprecated as of CDT 5.0 use {@link #createLineBreakpoint(String, IResource, int, int, boolean, int, String, boolean)}
*/
@Deprecated
public static ICLineBreakpoint createLineBreakpoint( String sourceHandle, IResource resource, int lineNumber, boolean enabled, int ignoreCount, String condition, boolean register ) throws CoreException {
return createLineBreakpoint(sourceHandle, resource, ICBreakpointType.REGULAR, lineNumber, enabled, ignoreCount, condition, register);
}
/** /**
* Creates and returns a line breakpoint for the source defined by the given source handle, at the given line number. The marker associated with the * Creates and returns a line breakpoint for the source defined by the given source handle, at the given line number. The marker associated with the
* breakpoint will be created on the specified resource. * breakpoint will be created on the specified resource.
@ -210,6 +242,33 @@ public class CDIDebugModel {
return new CLineBreakpoint( resource, attributes, register ); return new CLineBreakpoint( resource, attributes, register );
} }
/**
* Creates and returns an address breakpoint for the source defined by the
* given source handle, at the given address. The marker associated with the
* breakpoint will be created on the specified resource.
*
* @param module the module name the breakpoint is set in
* @param sourceHandle the handle to the breakpoint source
* @param resource the resource on which to create the associated breakpoint marker
* @param address the address on which the breakpoint is set
* @param enabled whether to enable or disable this breakpoint
* @param ignoreCount the number of times this breakpoint will be ignored
* @param condition the breakpoint condition
* @param register whether to add this breakpoint to the breakpoint manager
* @return an address breakpoint
* @throws CoreException if this method fails. Reasons include:
* <ul>
* <li>Failure creating underlying marker. The exception's
* status contains the underlying exception responsible for the
* failure.</li>
* </ul>
* @deprecated as of CDT 5.0 use {@link #createAddressBreakpoint(String, String, IResource, int, int, IAddress, boolean, int, String, boolean)}
*/
@Deprecated
public static ICAddressBreakpoint createAddressBreakpoint( String module, String sourceHandle, IResource resource, IAddress address, boolean enabled, int ignoreCount, String condition, boolean register ) throws CoreException {
return createAddressBreakpoint( module, sourceHandle, resource, ICBreakpointType.REGULAR, -1, address, enabled, ignoreCount, condition, register );
}
/** /**
* Creates and returns an address breakpoint for the source defined by the * Creates and returns an address breakpoint for the source defined by the
* given source handle, at the given address. The marker associated with the * given source handle, at the given address. The marker associated with the
@ -392,6 +451,41 @@ public class CDIDebugModel {
attributes.put( ICWatchpoint.WRITE, Boolean.valueOf( writeAccess ) ); attributes.put( ICWatchpoint.WRITE, Boolean.valueOf( writeAccess ) );
} }
/**
* Creates and returns a breakpoint for the function defined by the given
* name. The marker associated with the breakpoint will be created on the
* specified resource.
*
* @param sourceHandle the handle to the breakpoint source
* @param resource the resource on which to create the associated breakpoint marker
* @param function the name of the function this breakpoint suspends execution in
* @param charStart the first character index associated with the breakpoint, or
* -1 if unspecified, in the source file in which the breakpoint
* is set
* @param charEnd the last character index associated with the breakpoint, or -1
* if unspecified, in the source file in which the breakpoint is
* set
* @param lineNumber the lineNumber on which the breakpoint is set, or -1 if
* unspecified - line numbers are 1 based, associated with the
* source file in which the breakpoint is set
* @param enabled whether to enable or disable this breakpoint
* @param ignoreCount the number of times this breakpoint will be ignored
* @param condition the breakpoint condition
* @param register whether to add this breakpoint to the breakpoint manager
* @return an address breakpoint
* @throws CoreException if this method fails. Reasons include:
* <ul>
* <li>Failure creating underlying marker. The exception's
* status contains the underlying exception responsible for the
* failure.</li>
* </ul>
* @deprecated as of CDT 5.0 use {@link #createFunctionBreakpoint(String, IResource, int, String, int, int, int, boolean, int, String, boolean)}
*/
@Deprecated
public static ICFunctionBreakpoint createFunctionBreakpoint( String sourceHandle, IResource resource, String function, int charStart, int charEnd, int lineNumber, boolean enabled, int ignoreCount, String condition, boolean register ) throws CoreException {
return createFunctionBreakpoint(sourceHandle, resource, ICBreakpointType.REGULAR, function, charStart, charEnd, lineNumber, enabled, ignoreCount, condition, register);
}
/** /**
* Creates and returns a breakpoint for the function defined by the given * Creates and returns a breakpoint for the function defined by the given
* name. The marker associated with the breakpoint will be created on the * name. The marker associated with the breakpoint will be created on the
@ -545,6 +639,7 @@ public class CDIDebugModel {
/** /**
* @deprecated * @deprecated
*/ */
@Deprecated
public static IDebugTarget newDebugTarget( ILaunch launch, ICDITarget target, String name, IProcess iprocess, IProcess debuggerProcess, IFile file, boolean allowTerminate, boolean allowDisconnect, boolean stopInMain ) throws CoreException { public static IDebugTarget newDebugTarget( ILaunch launch, ICDITarget target, String name, IProcess iprocess, IProcess debuggerProcess, IFile file, boolean allowTerminate, boolean allowDisconnect, boolean stopInMain ) throws CoreException {
IBinaryExecutable exeFile = getBinary( file ); IBinaryExecutable exeFile = getBinary( file );
String stopSymbol = null; String stopSymbol = null;
@ -556,6 +651,7 @@ public class CDIDebugModel {
/** /**
* @deprecated * @deprecated
*/ */
@Deprecated
public static IDebugTarget newAttachDebugTarget( ILaunch launch, ICDITarget target, String name, IProcess debuggerProcess, IFile file ) throws CoreException { public static IDebugTarget newAttachDebugTarget( ILaunch launch, ICDITarget target, String name, IProcess debuggerProcess, IFile file ) throws CoreException {
IBinaryExecutable exeFile = getBinary( file ); IBinaryExecutable exeFile = getBinary( file );
return newDebugTarget( launch, file.getProject(), target, name, null, exeFile, true, true, false ); return newDebugTarget( launch, file.getProject(), target, name, null, exeFile, true, true, false );
@ -564,6 +660,7 @@ public class CDIDebugModel {
/** /**
* @deprecated * @deprecated
*/ */
@Deprecated
public static IDebugTarget newCoreFileDebugTarget( final ILaunch launch, final ICDITarget target, final String name, final IProcess debuggerProcess, final IFile file ) throws CoreException { public static IDebugTarget newCoreFileDebugTarget( final ILaunch launch, final ICDITarget target, final String name, final IProcess debuggerProcess, final IFile file ) throws CoreException {
IBinaryExecutable exeFile = getBinary( file ); IBinaryExecutable exeFile = getBinary( file );
return newDebugTarget( launch, file.getProject(), target, name, null, exeFile, true, false, false ); return newDebugTarget( launch, file.getProject(), target, name, null, exeFile, true, false, false );