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 67148 - NPE trying to open Project context menu
Summary: NPE trying to open Project context menu
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2005-10-19 19:01 UTC by Jeri Lockhart
Modified: 2005-12-06 02:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE stack trace (2.35 KB, text/plain)
2005-10-19 19:02 UTC, Jeri Lockhart
Details
zip file of plugin project (87.04 KB, application/octet-stream)
2005-10-19 19:03 UTC, Jeri Lockhart
Details
NPE stacktrace (2.56 KB, text/plain)
2005-11-22 10:19 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeri Lockhart 2005-10-19 19:01:13 UTC
When trying to open the context menu of a plugin project in the Project View, I
get an NPE.  When I first created the project and for some time after I was able
to open the context menu, but now I can't.  I don't know what changed. 


I am able to open the context menu for project in the Files View.


Attached is the stack trace and a zip file of the project.
Comment 1 Jeri Lockhart 2005-10-19 19:02:12 UTC
Created attachment 26146 [details]
NPE stack trace
Comment 2 Jeri Lockhart 2005-10-19 19:03:37 UTC
Created attachment 26147 [details]
zip file of plugin project
Comment 3 Jan Lahoda 2005-10-19 20:47:07 UTC
=>apisupport/project.
Comment 4 Martin Krauskopf 2005-10-20 08:36:36 UTC
Probably your module is a suite component which suite doesn't have set a correct
platform -> so as a workaround set a correct platform for your suite.
But definitely a bug, suite platform should be checked.
Comment 5 Jesse Glick 2005-10-20 18:16:12 UTC
Can certainly check for that, but as Martin said it probably means your suite
project is somehow corrupt anyway.
Comment 6 Jeri Lockhart 2005-10-20 18:21:53 UTC
yes, I restored to a prior version of my suite and the problem cleared up.
Comment 7 Jesse Glick 2005-10-21 00:27:11 UTC
With other changes:

committed     Up-To-Date  1.12       
apisupport/project/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
Comment 8 pzajac 2005-11-22 10:16:21 UTC
I cannot open the attached project in netbeans ide. NPE was thrown. 
Comment 9 pzajac 2005-11-22 10:19:28 UTC
Created attachment 27128 [details]
NPE stacktrace
Comment 10 Martin Krauskopf 2005-11-24 15:39:46 UTC
very similar problem like in issue 69029. in this case project is
suite-component, but without suite:

--> it's suite.dir points to nowhere
--> cannot resolve user.properties.file (which is defined in a suite)
--> cannot resolve nbplatform.some_platform_id.netbeans.dest.dir
--> netbeans.dest.dir in property evaluator is not resolved
--> nbmoduleproject.getplatform(boolean fallback) return null
--> nbmoduleproject.getmodulelist() throws npe

probably the easiest would be just throwing an ioexception from within
nbmoduleproject.getmodulelist() if plaf == null until we have some stronger
resolving techniques.
in this case required project list would be just empty and project opened
and... it would fail later :). but presuambly in much more friendly manner.
Comment 11 Jesse Glick 2005-12-06 02:38:48 UTC
Fixed w/ issue #69097.

BTW for the future please open fresh bug reports for new bugs, as this I think was.

committed   * Up-To-Date  1.132      
apisupport/project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
committed   * Up-To-Date  1.5        
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/BrokenPlatformReferenceTest.java
committed   * Up-To-Date  1.28       
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/TestBase.java