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.
I know we will have a "resolve broken reference" dialog, but in the current state the project(opened in previous IDE session) is not opened at all when it has set an invalid platform. It should: 1) behave the samy way like if you set the Invalid Platform in project properties (most of ant targets are not executable which can be easily solved by setting valid platform) 2) switch to default platform with some warning message for the user I could take a look at it (don't know yet how difficult to solve it is, probably not much :) )
Probably not easy, but a special case of the general problem that changing the platform at runtime has to be possible and reliable.
*** Issue 60577 has been marked as a duplicate of this issue. ***
I am using NetBeans IDE Dev (Build 200508291800). There is possible to open Module Suite that uses undefined Netbeans Platform, but with this exception on the console: java.io.IOException: Cannot examine dir /home/petr/TestSuite1/${nbplatform.NetBeans_Platform_Dev_(Build_200508181800).netbeans.dest.dir} at org.netbeans.modules.apisupport.project.universe.ModuleList.createModuleListFromBinaries(ModuleList.java:510) ... Any attempt to open some module from this Module Suite fails, of course (with lots of exceptions on the console). The problem is that user doesn't see any warning or error message and it is bit confusing when you cannot open module and you don't know why. (I spent lot of time before I found where is the problem.) I think that clear solution is to display warning when opening both the Module Suite and any module from this Module Suite (and allow to fix Module Suite properties by "resolve broken reference" dialog or by adding required platform in platform manager).
There is issue #61227 for adding the Broken References dialog for NBM projects but we do not have time for it in 4.2. In the meantime, probably fix would be to quietly reset platform to default platform.
This should be done soon. It is very confusing when (just broken) project is normally opened in IDE instance and then after you exit the IDE and start it again the project "disappear". > probably fix would be to quietly reset platform to default platform. This is exactly how Module's customizer (Properties) behave since yesterday. So just replacing code snipets: String platformS = baseEval.getProperty("nbplatform.active"); if (platformS != null) { providers.add(PropertyUtils.fixedPr...... } with: String platformS = baseEval.getProperty("nbplatform.active"); if (platformS == null) { Util.err.log("log some warning"); platformS = "default"; } providers.add(PropertyUtils.fixedPr...... should be very easy and solve, at least somehow, the problem. P2 -> this must be done until 4.2 (feel free to comment and reassign or, better ;), fix this)
That's the wrong place to fix it, but I think I have a working patch anyway.
committed Up-To-Date 1.105 apisupport/project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
verified