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.
Summary: | wrong layout of Hierarchy window | ||
---|---|---|---|
Product: | platform | Reporter: | Alexander Simon <alexvsimon> |
Component: | Filesystems | Assignee: | Jiri Skrivanek <jskrivanek> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | issues, jtulach, mslama, saubrecht |
Priority: | P2 | Keywords: | ERGONOMICS, REGRESSION |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 158025 | ||
Bug Blocks: | |||
Attachments: |
hierarchy view in Netbeans 6.5
hierarchy view in Netbeans 7.0 Log from ModuleChangeHandler |
Description
Alexander Simon
2009-01-11 13:48:48 UTC
it's up to component owner to define where it appears. Reassigning to C++ modules Guys from Window System. C++ support is just a client of your services, so, please, explain, why after moving to ergonomic mode (or other change?) behavior of 6.5 is regressed? Nothing was done on C++ side in the affected module from 6.5 till now. What should be done on C++ side to restore 6.5 behavior? Thanks, Vladimir. vladimir, please run the ide with a clean user dir, open your active hierarchy window, drag and drop this window into its proper location, close ide and compare files in <nb user dir>/Windows2Local with your XML layer definitions for that window. if there's nothing to fix in your xml layer files, please reopen this issue and attach netbeans and jdk versions to reproduce this issue. thanks Current development build of NB does not allow drag and drop this window to right sliding area and store expanded mode as right view. Compare component behavior for NB 6.5 and Current development build of NB. Java: Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_17-b04 Created attachment 75711 [details]
hierarchy view in Netbeans 6.5
Created attachment 75712 [details]
hierarchy view in Netbeans 7.0
I do not see error on cnd side More investigation. Bug appears if user start IDE from fresh user dir. Steps to reproduce: - start IDE from fresh user dir - open C/C++ project - open hierarchy window See wrong layout. Bug is not reproduced if user restart IDE: - start IDE from fresh user dir - open C/C++ project - restart IDE - open hierarchy window See right layout. It seems bug is related with ergonomic behavior. My guess: When C/C++ modules is activated, the virtual file system in the folder userdir/config/Windows2Local/Modes/ has wrong content. confirmed, the issue isn't reproducible when you don't have ergonomics cluster who should be blamed? WS or ergonomics? topcomponent may appear in editor area for two reasons: - the mode it was supposed to dock cannot be found - that's unlikely in this case as the hierarchy window should appear in right sliding bar whose definition is part of core.windows module - there is no mode defined to the topcomponent - this seems to be the case. due to 'ergonomics' changes the window system part of xml layer for hierarchy window isn't loaded/parsed at the right time so the window system cannot find appropriate mode for that window and defaults to editor area instead Everything just worked for me in my build from 090127. I'll try more times and let you know. Did not worked the second or 3rd time, through. I am afraid this problem can be simulated without any ergonomics features: 1. Get full build 2. Start, open Tools/Plugins, select C/C++ disable and restart 3. Go to Tools/Plugins, select C/C++ and activate it 4. Open an existing C/C++ project 5. Choose Window/Navigating/Hierarchy The component is opened in editor mode. Which indicates a problem in window system loading code. Guys, please help me. I will look at this. Here is the log from the failure: [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@1f7efb7 [Windows2/Components/NavigatorTopComponent.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:NavigatorTopComponent.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@1f7efb7 [Windows2/Components/NavigatorTopComponent.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@8f6d20 [Windows2/Components/CallGraphTopComponent.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:CallGraphTopComponent.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@8f6d20 [Windows2/Components/CallGraphTopComponent.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@1c591e1 [Windows2/Components/MemoryViewTopComponent.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:MemoryViewTopComponent.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@1c591e1 [Windows2/Components/MemoryViewTopComponent.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@dd5368 [Windows2/Components/RegistersTopComponent.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:RegistersTopComponent.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@dd5368 [Windows2/Components/RegistersTopComponent.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@10508c5 [Windows2/Components/classview.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:classview.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@10508c5 [Windows2/Components/classview.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@aa71b[Windows2/Components/MacroExpansionTopComponent.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:MacroExpansionTopComponent.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@aa71b[Windows2/Components/MacroExpansionTopComponent.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ COMPONENT ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@186dfef[Windows2/Components/HierarchyTopComponent.settings] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process COMPONENT ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addComponent settingsName:HierarchyTopComponent.settings [org.netbeans.core.windows.persistence.PersistenceManager]: copySettingsFile fo:MultiFileObject@186dfef[Windows2/Components/HierarchyTopComponent.settings] [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ tcRef ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@1cf59f5 [Windows2/Modes/explorer/classview.wstcref] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process tcRef ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addTCRef modeName:explorer tcRefName:classview [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef ENTER mo:explorer tcRef:classview [org.netbeans.core.windows.persistence.ModeParser]: addTCRef ENTER mo:explorer tcRef:classview [org.netbeans.core.windows.persistence.TCRefParser]: load ENTER tcRef:classview [org.netbeans.core.windows.persistence.TCRefParser]: load LEAVE tcRef:classview [org.netbeans.core.windows.persistence.ModeParser]: addTCRef LEAVE mo:explorer tcRef:classview [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef LEAVE 2 mo:explorer tcRef:classview [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ tcRef ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@f4817d[Windows2/Modes/navigator/NavigatorTopComponent.wstcref] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process tcRef ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addTCRef modeName:navigator tcRefName:NavigatorTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef ENTER mo:navigator tcRef:NavigatorTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef ENTER mo:navigator tcRef:NavigatorTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load ENTER tcRef:NavigatorTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load LEAVE tcRef:NavigatorTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef LEAVE mo:navigator tcRef:NavigatorTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef LEAVE 2 mo:navigator tcRef:NavigatorTopComponent [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ tcRef ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@1ca76fe[Windows2/Modes/output/MacroExpansionTopComponent.wstcref] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process tcRef ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addTCRef modeName:output tcRefName:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef ENTER mo:output tcRef:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef ENTER mo:output tcRef:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load ENTER tcRef:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load LEAVE tcRef:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef LEAVE mo:output tcRef:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef LEAVE 2 mo:output tcRef:MacroExpansionTopComponent [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ tcRef ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@7d1d29 [Windows2/Modes/output/RegistersTopComponent.wstcref] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process tcRef ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addTCRef modeName:output tcRefName:RegistersTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef ENTER mo:output tcRef:RegistersTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef ENTER mo:output tcRef:RegistersTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load ENTER tcRef:RegistersTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load LEAVE tcRef:RegistersTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef LEAVE mo:output tcRef:RegistersTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef LEAVE 2 mo:output tcRef:RegistersTopComponent [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ tcRef ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@1bfdbc9 [Windows2/Modes/output/MemoryViewTopComponent.wstcref] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process tcRef ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addTCRef modeName:output tcRefName:MemoryViewTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef ENTER mo:output tcRef:MemoryViewTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef ENTER mo:output tcRef:MemoryViewTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load ENTER tcRef:MemoryViewTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load LEAVE tcRef:MemoryViewTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef LEAVE mo:output tcRef:MemoryViewTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef LEAVE 2 mo:output tcRef:MemoryViewTopComponent [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ tcRef ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: -- fileDataCreated fo: MultiFileObject@492903 [Windows2/Modes/output/CallGraphTopComponent.wstcref] isFolder:false ACCEPTED th:Default RequestProcessor [org.netbeans.core.windows.persistence.ModuleChangeHandler]: ++ process tcRef ADD ++ [org.netbeans.core.windows.persistence.ModuleChangeHandler]: addTCRef modeName:output tcRefName:CallGraphTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef ENTER mo:output tcRef:CallGraphTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef ENTER mo:output tcRef:CallGraphTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load ENTER tcRef:CallGraphTopComponent [org.netbeans.core.windows.persistence.TCRefParser]: load LEAVE tcRef:CallGraphTopComponent [org.netbeans.core.windows.persistence.ModeParser]: addTCRef LEAVE mo:output tcRef:CallGraphTopComponent [org.netbeans.core.windows.persistence.WindowManagerParser]: WMParser.addTCRef LEAVE 2 mo:output tcRef:CallGraphTopComponent It seems to me that the window system reacts to FileChangeEvents one by one and often the ModeParser runs later than the top component parser. Maybe the simplest solution is the provide a "fallback" mode - when a mode is not found, rescan all the existing files in the Modes folder - the files will already be there, just the events are pending... I checked events from filesystem: ModuleChangeListener does not receive fileDataCreated for HierarchyTopComponent.wstcref which is defined in cnd.navigation module layer. I checked and I do not see any problem with layer declaration. Though listener receives fileDataCreated for HierarchyTopComponent.settings and also for other wstcref files. Listener is in module core.windows org.netbeans.core.windows.persistence.ModuleChangeHandler. I will attach log. Passing to filesystems for evaluation. cnd.navigation defines: <folder name="rightSlidingSide"> <file name="HierarchyTopComponent.wstcref" url="HierarchyTopComponentWstcref.xml"> <attr name="position" intvalue="1100"/> </file> </folder> Mode rightSlidingSide should be defined so only HierarchyTopComponent.wstcref file should be created. Created attachment 76304 [details]
Log from ModuleChangeHandler
To reproduce this problem: 1.Start IDE with empty user dir. 2.Deactivate C/C++ in Tools->Plugins. It will suggest IDE restart so restart it. 3.Activate C/C++ in Tools->Plugins. It should generate fs events including fileDataCreated event for HierarchyTopComponent.wstcref but it does not at least for me. Jarda gave me hint that it could be caused by missing fo for given folder ie. I must keep references for all present mode/group folders to be able to listen to changes in these folders. I tried quick fix and it looks like it works. I will test it more to make sure it is reliable. If it will be ok I will fix this in winsys. core-main #2e33e7102bc2 Keep FileObjects for mode/groups folders so it is possible to track changes in these folders. Integrated into 'main-golden', will be available in build *200901310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/2e33e7102bc2 User: Marek Slama <mslama@netbeans.org> Log: #156573: Keep FileObjects for mode/groups folders so it is possible to track changes in these folders. Bug still reproduced on Windows. Please tell me what build you used. I just tested with build (latest from smetiste): Product Version: NetBeans IDE Dev (Build 200902050256) Java: 1.6.0_10; Java HotSpot(TM) Server VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) and it works as expected. Hierarchy component is displayed in right sliding window. I used fresh dir, deactivated C++ plugin, restarted, activated plugin, created C++ project and opened Hierarchy component. I found one problem: After reactivation previousMode is not set for Hierarchy component so unsliding moves component to explorer mode instead of to palette mode but it is separate issue. I filed new issue #158025. IMHO issue #158025 is another use case of regression of "wrong layout of Hierarchy window". ok, i retest once more: my use case is: 1. hg fetch 2. ant clean build-nozip 3. ant tryme 3. two answers: "Agree", "No import". 4. create c/c++ sample Welcome (all defaults) 5. open hierarchy view I see "editor" layout. It is a beginning of log: [exec] ------------------------------------------------------------------------------- [exec] >Log Session: Thursday, February 5, 2009 8:55:42 PM MSK [exec] >System Info: [exec] Product Version = NetBeans IDE Dev (Build 090205) [exec] Operating System = Windows XP version 5.1 running on x86 [exec] Java; VM; Vendor = 1.5.0_16; Java HotSpot(TM) Server VM 1.5.0_16-b02; Sun Microsystems Inc. [exec] Runtime = Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_16-b02 [exec] Java Home = D:\Program Files\Java\jdk1.5.0_16\jre [exec] System Locale; Encoding = ru_RU (nb); Cp1251 [exec] Home Directory = C:\Documents and Settings\Alex [exec] Current Directory = D:\Program Files\Java\jdk1.5.0_16\jre\bin [exec] User Directory = D:\tec\main\nbbuild\testuserdir [exec] Installation = D:\tec\main\nbbuild\netbeans\nb7.0 i also try: netbeans-trunk-nightly-200902050256-windows the result is same "wrong layout". log:
-------------------------------------------------------------------------------
>Log Session: Thursday, February 5, 2009 9:35:59 PM MSK
>System Info:
Product Version = NetBeans IDE Dev (Build 200902050256)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.5.0_16; Java HotSpot(TM) Server VM 1.5.0_16-b02; Sun Microsystems Inc.
Runtime = Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_16-b02
Java Home = D:\Program Files\Java\jdk1.5.0_16\jre
System Locale; Encoding = ru_RU (nb); Cp1251
Home Directory = C:\Documents and Settings\Alex
Current Directory = D:\Program Files\Java\jdk1.5.0_16\jre\bin
User Directory = C:\Documents and Settings\Alex\.netbeans\dev
Installation = D:\Program Files\NetBeans Dev 200902050256\nb7.0
This time it is caused by ergonomics. I filed separate issue #158061. I prefer separate issue to keep things simple in IZ. I do not understand why you close unresolved issue? Original use case do not fixed, the issue is regression, priority is P2. So keep issue opened until "depends on" are opened. Or make "depends on" issues P2. It is because I used use case provided by Jarda with reactivating C++ plugin. When description is so long it is difficult to orientate in it. I checked and again the same problem as before. Sometimes (not always) winsys does not get event for Windows2/Modes/rightSlidingSide/HierarchyTopComponent.wstcref when C++ plugin is activated during C++ sample project opening. (It is enough to open sample C++ project ie. no need to create new project -> less clicks to reproduce.) This time I checked winsys listener keeps fileobjects for all mode folders including Windows2/Modes/rightSlidingSide where HierarchyTopComponent.wstcref should appear. Folder Windows2/Modes/rightSlidingSide is defined from IDE start. Passing to filesystems for further evaluation. Steps to reproduce are at beginning of description and be aware it is random so it might not happen always. *** Issue 158061 has been marked as a duplicate of this issue. *** folder.getChildren() is necessary to get events about children. http://hg.netbeans.org/core-main/rev/3b0fa6b6d485 Integrated into 'main-golden', will be available in build *200902110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3b0fa6b6d485 User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #156573 - folder.getChildren() is necessaryTo get events about children. Seems to be fixed properly, changing the state of the issue to VERIFIED. |