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 18365 - Modes are propagated among projects - number of modes still rises !
Summary: Modes are propagated among projects - number of modes still rises !
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on: 17995
Blocks:
  Show dependency tree
 
Reported: 2001-12-05 15:50 UTC by Lukas Hasik
Modified: 2008-12-23 09:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch18365.jar (202.82 KB, application/octet-stream)
2001-12-07 12:44 UTC, mslama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2001-12-05 15:50:32 UTC
[200112042300] , jdk1.4b88

the easiest steps to make problem visible :
1-start IDE
2-undock Filesystem as New Single Frame
3-create new project
4-in new project undock Filesystem as New Single Frame
5-title of window is Filesystem_1

If you open a few windows (undock/dock Filesystem tab)  and then switch to
another project and back you will see saved modes(.wsmode+dirs)  in project
where they wasn't created !

see userdir/system/Projects/NewProject/system/Windows/WindowMananager/Editing 
directory where are store even (non-default)modes from previous project(s)

Note: after step 3, order of tabs is changed


together with issue #17995 number of modes rise really fast ;)
Comment 1 mslama 2001-12-05 16:17:14 UTC
I take this.
Comment 2 Marian Mirilovic 2001-12-05 16:20:53 UTC
CC-ing me
Comment 3 mslama 2001-12-05 16:49:52 UTC
The same on JDK 1.3.1_01.
Comment 4 mslama 2001-12-06 09:54:35 UTC
When project is closed all modes are closed too but not cleared from
WorkspaceImpl. 

If user defined modes will be deleted when closed as suggested in fix
of issue #17995 it will fix also this problem. To be sure to test also
this case after #17995 is fixed I mark this issue as depends on #17995
not its duplicate.
Comment 5 mslama 2001-12-06 11:55:35 UTC
Previous comment was incorrect. This problem must be fixed in
different way. We need to remove user defined modes just from
WorkspaceImpl during project close not their XMLs from file system.
So this is different from #17995.
Comment 6 mslama 2001-12-07 12:42:32 UTC
Currently fix of #17995 plus one change in WorkspaceImpl solves also
this issue. Both fixes must be applied together.

!! Attached patch contains fix of #17995 + #18365. !!

Diff:
[windows]> cvs di WorkspaceImpl.java
Index: WorkspaceImpl.java
===================================================================
RCS file: /cvs/core/src/org/netbeans/core/windows/WorkspaceImpl.java,v
retrieving revision 1.85.2.2
diff -r1.85.2.2 WorkspaceImpl.java
657a658
>                 modeArray[i].setCloseOnlyInMemory(true);
658a660
>                 modeArray[i].setCloseOnlyInMemory(false);

Comment 7 mslama 2001-12-07 12:44:17 UTC
Created attachment 3730 [details]
patch18365.jar
Comment 8 Lukas Hasik 2001-12-07 15:11:45 UTC
I've tryed briefly this patch and it looks good.

Modes are destroyed correctly and modes aren't propagated
between(among) projects.
WS even deleted unneccesary modes(created by user = hidden) which I
copyed from older userdir.

-I see only one remaining issue, if you undock FS tab from Explorer
then order of tabs is changed even in a new created project.
-I hope that I didn't miss something, this issue need longer testing...
Comment 9 Lukas Hasik 2001-12-07 15:26:17 UTC
Few notes to changing order of tabs in Explorer:
-undock filesystem, switch project(new), order changed
-after restart, order is OK
-switch to project with undocked FS tab and back, order is again
changed....



Comment 10 _ ttran 2001-12-07 18:30:38 UTC
Dafe, you forgot to mark this as FIXED in release33 branch
Comment 11 Jan Zajicek 2001-12-11 11:27:43 UTC
verified in release33 and after applying patch into release330 too
Comment 12 Quality Engineering 2003-07-01 16:36:50 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.