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 206309 - Compile File, Run File and Debug File actions disabled on form node
Summary: Compile File, Run File and Debug File actions disabled on form node
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 7.2
Hardware: All All
: P1 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: REGRESSION, TEST
: 206404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-13 08:48 UTC by Jiri Skrivanek
Modified: 2011-12-15 08:04 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2011-12-13 08:48:19 UTC
Actions Compile File, Run File and Debug File are disabled on form node. To reproduce:

- create a new Java project
- right-click javaapplication1 package node and select "New|JFrame Form"
- finish the wizard
- right-click NewJFrame.java but above mentioned actions are disabled

Product Version: NetBeans IDE Dev (Build 201112120600)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb)
Comment 1 Tomas Zezula 2011-12-13 13:52:20 UTC
Caused by 61691117f0c0.
The problem is with the forms, they are MultiDataObjects and they have both java and form file in the lookup. When the ActionUtils.findSelectedFiles is invoked with form lookup and strict == true it returns null as the second file (form file) does not match the suffix predicate.
Comment 2 Jesse Glick 2011-12-13 15:51:18 UTC
(In reply to comment #1)
> they are MultiDataObjects and they have both java and form file in the lookup

Interesting; questionable whether we really want both files in the lookup. But as a workaround I guess I can simply ignore *.form files. The alternative is to call DataObject.find and check the primary file, which would contradict the reason for checking only FileObject to begin with.
Comment 3 Jesse Glick 2011-12-13 16:00:00 UTC
core-main #d50eca69603b
Comment 4 Jaroslav Tulach 2011-12-14 08:31:15 UTC
DataObject.files() are returned from DataObject.getLookup().lookupAll(FileObject.class) since DataObject.getLookup() was introduced.
Comment 5 Quality Engineering 2011-12-14 12:10:50 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/d50eca69603b
User: Jesse Glick <jglick@netbeans.org>
Log: #206309: Compile File, Run File and Debug File actions disabled on form node
Comment 6 Jesse Glick 2011-12-14 23:15:41 UTC
*** Bug 206404 has been marked as a duplicate of this bug. ***