[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [jdt-debug-dev] Re: Programmatically setting breakpoint using JDIDebugModel
|
Title: RE: [jdt-debug-dev] Re: Programmatically setting breakpoint using JDIDebugModel
In which package is the ManageBreakpointRulerAction class ?
thanks.
Olivier
-----Message d'origine-----
De : Darin Swanson [mailto:darin_swanson@xxxxxxx]
Envoye : mercredi 6 novembre 2002 14:48
A : jdt-debug-dev@xxxxxxxxxxx
Objet : [jdt-debug-dev] Re: Programmatically setting breakpoint using
JDIDebugModel
You must really need an answer...cross posting to all these places ;-)
You are not setting the required attributes for the behavior you require.
To get member details you need to set the member start and end attributes.
See ManageBreakpointRulerAction#addMarker and its call to
BreakpointUtils#addJavaBreakpointAttributesWithMemberDetails(Map,
IJavaElement, int int) for the attributes that JDT debug sets for the
observed GUI behavior.
You will need to set these same attributes...currently you are not setting
any attributes.
HTH
Darins
"olivier.roques2" <olivier.roques2@xxxxxxxxxx> wrote in message
news:aqasjl$46l$1@xxxxxxxxxxxxx...
> Hi every body,
>
> In order to programmatically create a breakpoint at a given line of a
file,
> I have writen the following method :
>
> it works nearly fine except that :
>
> 1) when in the Eclipse IDE, in the breakpoint view, I right click on a
> breakpoint (that I have set with this method),
> the "Go to file" item doesn't work whereas the marker is well created.
> 2) when editing the breakpoint property of a breakpoint that I have set
> programmatically, the field "Member" DOESN'T appear in the property
window.
> (whereas it appears with a breakpoint created with the GUI).
>
> I really appreciate any help.
>
>
>
> Thanks
>
> Olivier Roques
>
> public void createBreakPoint(String filePath, String fullClassName, int
> lineNumber) {
>
> try {
>
>
> System.out.println("********************** BEGIN *****************
> CREATEBREAKPOINT*********************");
>
> IFile aFile = getResourceFile(filePath);
>
> if (lineBreakpointExists(filePath, lineNumber) != true) {
>
>
> IJavaLineBreakpoint bp =
>
> JDIDebugModel.createLineBreakpoint(aFile, fullClassName,
lineNumber, -1, -1,
> 0, true, null);
>
>
> System.out.println("bp.getMarker() = "+ bp.getMarker());
>
> bp.getMarker().setAttribute(IMarker.LINE_NUMBER,16);
>
>
System.out.println("bp.getMarker().getResource()"+bp.getMarker().getResource
> ().getName());
>
>
> System.out.println("bp.getMarker() = "+ bp.getMarker());
>
> System.out.println("BreakPoint set at line " + bp.getLineNumber());
>
> System.out.println("********************** END *****************
> CREATEBREAKPOINT*********************");
>
> }
>
> } catch (CoreException ce) {}
>
> }
>
>
>
_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-debug-dev