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 221582 - IDE tries to open project as it remembers it even if project is no longer that type.
Summary: IDE tries to open project as it remembers it even if project is no longer tha...
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.2.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-06 20:19 UTC by javydreamercsw
Modified: 2012-11-21 07:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Video (2.48 MB, application/x-zip-compressed)
2012-11-13 15:18 UTC, javydreamercsw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2012-11-06 20:19:01 UTC
In my case we have a Free Form project that has been being moved to a Maven project. If we remove the nbproject folder and open it with an IDE which doesn't have it cached as a free form project, it opens as a maven project. If you try to open it with an IDE which has it cached (in the recent closed projects) as a free form project, it'll open it as such creating the nbproject folder.

Step to reproduce:
1) Checkout PCGen code from: https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk
2) Open the project in the IDE (notice it is detected as Free Form)
3) Close IDE and remove the nbproject folder.
4) Open IDE with clean user dir and try to open the project (notice it shows as Maven project)
5) Open IDE with user dir from step 2. (Notice it is opened as Free form project and the nbfolder is created)

This is still present on 7.3 daily builds and probably happening from earlier than 7.2.1.
Comment 1 Milos Kleint 2012-11-07 08:27:31 UTC
do you have the java edition only or the full ide? with or without initially disabled project type wizards?
Comment 2 Milos Kleint 2012-11-07 10:15:43 UTC
I cannot reproduce. In the IDe with previously opened freeform, upon restart and deletion of nbproject folder I get the freeform icon+name in Recent projects menu item. That's correct, as we cache the icon and name to avoid loading the projects just for the sake of icon in main menu. However upon clicking the menu, maven project opens for me. I don't have ergonomics enabled/present (the code responsible for proxying and lazy enabling the various features in full ide.)
Comment 3 javydreamercsw 2012-11-07 12:56:34 UTC
I have full IDE with Java, Jave SE enabled.
Comment 4 Milos Kleint 2012-11-07 14:30:47 UTC
I've tried with freshly built complete IDE. everything worked both ways for me. Open as freeform, exit, delete nbproject, restart.. it's maven. exit. svn update . restart ide, now it's freeform. tried with both closing the project before IDE exit or keeping it open. In all cases the right type of project opened for me. The only minor ui glitch is the icon for in recent projects list when project changes type, but that's something I will not fix, the scenario is fairly rare and the icon caching is important to avoid reloading the closed projects.

closing as worksforme.
Comment 5 javydreamercsw 2012-11-13 15:17:50 UTC
I'm still having the issue. I'll attach a video showing the behavior. Hopefully it helps.
Comment 6 javydreamercsw 2012-11-13 15:18:20 UTC
Created attachment 127732 [details]
Video
Comment 7 javydreamercsw 2012-11-13 15:24:02 UTC
If I close and open the IDE after deleting the nbproject folder it did open as a Maven project.
Comment 8 Milos Kleint 2012-11-21 07:29:54 UTC
ok, you might have noticed that the nbproject folder gets indeed created but the crucial files are not present (project.xml for example). You've pulled the plug on a project that is still residing inside netbeans as a live instance, it's still there, registered as THE project at given directory. that's why it's picked up again when reopening.

Closing and opening are significant stages in the lifecycle of a project but they are not the start or final stages. Closing a project merely removes it from UI and deregisters it from global classpath recognized by the IDE.
A project can be loaded even without being opened at all. Eg. if you have project B depending on project A, and only open project B in the IDE, project A still gets loaded and the switch to a different project type as describe above won't work either.

I consider this working as expected. Changing a project type of a project is rare operation for advanced users only and requires a restart of the IDE.