This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 43022 - Need implementation of Step Into action in j2seproject
Summary: Need implementation of Step Into action in j2seproject
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Konecny
: 42851 (view as bug list)
Depends on:
Blocks: 41448 42851
  Show dependency tree
Reported: 2004-05-10 17:30 UTC by Jan Jancura
Modified: 2007-09-26 09:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Jancura 2004-05-10 17:30:35 UTC
There is Step Into action starting debugger. We
have one common action for all debugger

JPDADebugger implements step into for simple J2SE
project - it should add Class Breakpoint to the
main class of project.
But JPDA debugger is not able to implement Step
Into Action for JSP - they use different
definition of Step Into.

Thats why we need to detect type of Main project
in StepIntoActionProvider.

Does J2SE project type contain some specific class
to recognize it?
And is it possible to get a className for the main
project somehow?
Or some other suggestions how to implement Step
Into action?
Comment 1 Jesse Glick 2004-05-10 17:44:05 UTC
Provisionally reassigning back to debugger. To answer your main
question, no there is no particular way to detect the "type" of any
project, and in fact if you are asking the question you are doing
something wrong. If you want this kind of functionality, probably you
need to define some interface in the debugger which represents what
kind of pluggable functionality the project should have, and make sure
some impl is in the project lookup for relevant project types.

I assume you are talking about invoking Step Into when the debugger is
not yet running, right? I.e. that once the debugger is running the
debuggerjpda module can take over?

Keeping Petr on CC since I have not followed the details of debugger's
usage of main-project-sensitive actions so I may be missing something.
Comment 2 Jan Jancura 2004-05-11 09:00:02 UTC
I do not want to add a new unnecessary compile dependency.
Is it possible to add a new Project Type action? 
Like ActionProvider ("debug-stop", lookup)
And a new parameter to JPDAStart ant task?
It will be better for me because I need this information inside the
ant task implementation.
In this case the Project Type can easily specify if it supports Step
Into starting debugging.
Comment 3 Jan Jancura 2004-05-11 09:14:43 UTC
So its issue for Ja2SE project type now...
Comment 4 Jesse Glick 2004-05-11 11:33:22 UTC
David and/or Petr could you take a look at this? AFAIK Hanz can add
this action himself but I am not sure what it would look like in the
build script.
Comment 5 Jan Jancura 2004-05-11 14:08:06 UTC
So, we have agreement (with David) how to do it.
I will start.
Comment 6 David Konecny 2004-05-11 14:21:55 UTC
The <nbjpdastart> Ant task will be enhanced with new property (name is
illustrative) "".
The J2SE project type will set this property when Step.Into action is

As for the Web project, Step Into should stop after loading some
class. Hanz needs to talk to Web team and make sure that this solution
works for them too. They might need something like
"stopAfterLoadingClass=..." attribute.
Comment 7 Jesse Glick 2004-05-11 17:03:11 UTC
OK, sounds reasonable. Maybe

<... stopat="fully.qualified.clazz.Name.main" ...>

which might be usable for web apps too (if you change the method to be
the service method of a servlet or whatever).
Comment 8 Jan Jancura 2004-05-12 00:02:24 UTC
*** Issue 42851 has been marked as a duplicate of this issue. ***
Comment 9 Jan Jancura 2004-05-15 22:53:09 UTC
Should be fixed on my side now.
My StepInto action calls ActionProvider ("debug-stepInto", lookup).
And I have added new parameter "stopClassName" to JPDAStart ANT task.

You should implement "debug-stepInto" action and call JPDAStart with
"stopClassName" = main class name.
Comment 10 David Konecny 2004-05-18 09:05:38 UTC
I will do that. But first I would like to hear from somebody from Web
team that this works also for them and that their project type will
just set a special class where to stop and that's it. Hanz could you
put somebody from Web team on CC and ask him to confirm that. Thanx.
Comment 11 David Konecny 2004-05-19 10:21:44 UTC
Back to Hanz to get the answer.
Comment 12 Jan Jancura 2004-05-19 10:25:10 UTC
MGrebas is responsible for JSPDebugger. 
Comment 13 David Konecny 2004-05-19 16:23:57 UTC
mgrebac told me offline that it is OK with him.

Fixed in:
new revision: 1.20; previous revision: 1.19
new revision: 1.7; previous revision: 1.6
new revision: 1.12; previous revision: 1.11
new revision: 1.10; previous revision: 1.9
new revision: 1.5; previous revision: 1.4