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 47012 - Run | Fix always disabled
Summary: Run | Fix always disabled
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: RANDOM
Depends on:
Blocks: 42680
  Show dependency tree
 
Reported: 2004-08-09 12:04 UTC by Jan Becicka
Modified: 2006-03-24 09:49 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (2.31 KB, text/plain)
2004-09-01 15:02 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2004-08-09 12:04:36 UTC
I've never seen this item enabled.
I'm attaching debugger to an application running
on another virtual machine using dt_shmem. Fix
action is always disabled. I'm unable to fix & cont.
Comment 1 Maros Sandor 2004-08-09 12:29:51 UTC
Cannot reproduce.
Fix action is disabled if:
1) the debugee VM does not support the feature
2) there is no Main project in IDE
3) the Main project does not support the "debug.fix" command
4) build.xml file is missing from the J2SE project
5) Projects Sources directory is not set

Please check if anything applies to your case and/or provide more 
info about how to reproduce, including versions of JDK and OS used, 
project configuration, etc.
Comment 2 Jan Becicka 2004-08-09 13:31:00 UTC
1. JDK 1.4.2_03
2. Main project is Editor
3. I don't have IDEA what "debug.fix" command is. Is this command
documented somewhere?
4. I have build.xml file
5. Projects Sources as well.
Comment 3 Maros Sandor 2004-08-09 15:07:25 UTC
I see that the Editor and all other Netbeans' projects does not 
support the debug.fix command. It is one of those build, run, debug, 
etc. commands that projects support. Standard J2SE project supports 
the debug.fix command and Fix works just fine there. You can verify 
that by creating a simple J2SE project from scratch. Assigning to 
apisupport for evaluation because I see this is the provider of nb 
projects.
Comment 4 Jesse Glick 2004-08-09 16:01:51 UTC
Right, debug.fix is not currently supported for NBM projects. I think
it could be easily. Have not evaluated yet.
Comment 5 Jan Becicka 2004-08-18 10:27:58 UTC
NBM projects is the only type of project I'm using. This issue
prevents me from switching from NB 3.6 debugger to NB 4.0 debugger.
I really appreciate if "debug.fix" command will be implemented soon.
Comment 6 Jesse Glick 2004-08-20 23:03:50 UTC
Hopefully fixed, but I don't have things set up to test it properly,
so please verify or reopen as needed:

committed   * Up-To-Date  1.21       
apisupport/project/src/org/netbeans/modules/apisupport/project/Actions.java
committed   * Up-To-Date  1.23        nbbuild/templates/projectized.xml
Comment 7 Jan Becicka 2004-08-25 09:46:51 UTC
"Run | Fix" is still always disabled :(
Comment 8 Jesse Glick 2004-08-25 19:48:38 UTC
Well the ActionProvider for an NBM project returns true from
isActionEnabled(JavaProjectConstants.COMMAND_DEBUG_FIX,
Lookups.singleton(DataObject.find(someJavaFileInProject)); I just unit
tested it. However the Fix menu item is indeed disabled. I can't guess
why; this menu item is implemented in the debugger module and its impl
is not trivial.
Comment 9 Jan Jancura 2004-08-26 12:41:38 UTC
This issue does not affect our users (they do not need NBM projects as
I know). So it can not be a P2.
Comment 10 Jan Becicka 2004-08-26 13:34:01 UTC
NetBeans developers are also NetBeans users. You should not ignore
this community. P2 is adequate priority according bug priority guidelines:
1. Product feature is significantly affected, a workaround may exist
but is difficult to use or impractical
2. Affects another developer's progress

Let this issue be P2 or provide me a workaround.
Comment 11 Jesse Glick 2004-08-27 03:27:31 UTC
Agree with Hanz - was marked P2 in apisupport, but it is not
necessarily a P2 for debuggercore or the product.

Now it looks to me like Fix is enabled if and only if (1) the debugger
is already running (of course), (2) the source file is contained in
the main project. This is so regardless for both NBM projects and
j2seproject's. True? If so, doesn't #2 prevent you from fixing code in
a subproject while debugging the master project? I'm not sure I
understand what's going on here.
Comment 12 Jan Becicka 2004-08-27 12:11:48 UTC
I'm sorry. Jesses fix works somehow. I did not have Main Project
properly set. 
Anyway this command still does not work for me. Output from debugger
console:

debug-fix-nb:
Classes to be reloaded:
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$1
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$2
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$3
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$DiffList
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$ErrorInfoImpl
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$ErrorList
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$PosInfo
 org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl
D:\sources\trunk\nbbuild\templates\projectized.xml:353:
java.lang.NullPointerException
BUILD FAILED (total time: 0 seconds)

Any ideas?
Comment 13 Jesse Glick 2004-08-30 23:44:23 UTC
Run with -verbose to get a stack trace!
Comment 14 Jan Becicka 2004-08-31 08:09:38 UTC
This NPE is random. I'll attach stack trace as soon as it happens again.
Comment 15 Jan Becicka 2004-09-01 15:02:12 UTC
I have a stack trace.

Comment 16 Jan Becicka 2004-09-01 15:02:39 UTC
Created attachment 17288 [details]
Stack trace
Comment 17 David Konecny 2004-09-30 11:25:03 UTC
The NPE was fixed in issue 47953. Reopen if still does not work.
Comment 18 David Konecny 2004-09-30 11:57:30 UTC
One more issue which I just fixed was that Run->Fix did not work on
unit tests.

Fixed in:
apisupport/project/src/org/netbeans/modules/apisupport/project/Actions.java;
new revision: 1.26; previous revision: 1.25
nbbuild/templates/projectized.xml;
new revision: 1.27; previous revision: 1.26
Comment 19 Jan Becicka 2005-03-18 12:36:23 UTC
VERIFIED