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 103296 - CSS editor breaks winsys (Was: Palette and Outline does not refresh after restart with opened Designer)
Summary: CSS editor breaks winsys (Was: Palette and Outline does not refresh after res...
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-04 08:02 UTC by Peter Zavadsky
Modified: 2008-04-28 13:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zavadsky 2007-05-04 08:02:44 UTC
1) Create vw project
2) Let Designer be selected
3) Restart the IDE
4) the Designer gets loaded
5) But neither the outline nor palette get refreshed.
Comment 1 Peter Zavadsky 2007-05-04 08:11:09 UTC
This seems to be reproducible when there is at least one other document
(providing activated nodes) open.

Also there seems to be a problem that during loading there are no activated
nodes for the designer, and it remains the same after the loading is finished.
You can observe that watching the properties window.
Comment 2 Peter Zavadsky 2007-05-04 08:16:06 UTC
Workaround:
Switch to other window and then back to the original.
Comment 3 Peter Zavadsky 2007-05-04 09:36:17 UTC
This is a refinement only. The real issue is somewhere else (I describe it in
the next comment).
This refines the lookup refreshing (see also issue #103300). Then also provides
initial non-null array for activated nodes (so the component can be activated).
Also it fixes possible illegal call of window system API from non-AWT thread
(occurred during sanity test).

Checking in
visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/JsfForm.java;
/cvs/visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/JsfForm.java,v
 <--  JsfForm.java
new revision: 1.77; previous revision: 1.76
done
Checking in
visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/ui/JsfTopComponent.java;
/cvs/visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/ui/JsfTopComponent.java,v
 <--  JsfTopComponent.java
new revision: 1.35; previous revision: 1.34
done
Comment 4 Peter Zavadsky 2007-05-04 09:54:13 UTC
The real issue is CSS editor component.
This issue occurs only when it is opened and after restarting its window seems
to be active even it is not selected by the window system, and even it was not
selected before exit.
With any other type of editors opened everything works fine. It seem CSS editor
breaks the window system somehow.

So the reproducible case:
1) Create vw project
2) Let open style sheet and also page
3) Select the page multiview with designer selected
4) Restart IDE
5) The page with designer shows to be selected, but in fact win sys claims the
active window is CSS editor (you can observe that by looking at the content of
the navigator).

The above occurs only when the CSS editor window gets opened, when any other
(java etc.) is opened everything works fine, so it seems the CSS editor must be
doing something wrong at exit (serialization) or restart (deserialization).

See also at the message in console when exiting (in this case):
WARNING [org.openide.util.io.NbObjectOutputStream]: Serializable class
org.netbeans.modules.css.editor.CssEditorSupport$CssEnvironment does not declare
serialVersionUID field. Encountered while storing:
[org.openide.windows.TopComponent$Replacer, java.lang.Short, java.lang.Number,
org.openide.windows.CloneableOpenSupport$Listener,
org.openide.windows.CloneableTopComponent$Ref] See also
http://www.netbeans.org/issues/show_bug.cgi?id=19915 [may have been writing
Windows2Local/Components/stylesheet_2.settings]


Passing to the owner.
Comment 5 Peter Zavadsky 2007-05-04 10:17:48 UTC
Searching for the correct component/subcomponent category.
Comment 6 Peter Zavadsky 2007-05-04 10:26:17 UTC
Did more debugging. Confirming it is problem of the Css Editor during startup.
Partially it is also fault of window system.

This problem occurs also when there is no designer opened but different page.

Problem is during window system startup:
The CssEditor requests to be activated (see the CssEditorSupport line 162) which
is wrong. That is 'partially' granted by winsys the way activate window event is
fired (i.e. the global context is changed), but winsys doesn't provide the
switch of the tab to the CssEditor (which is its partial fault).
Comment 7 Marek Fukala 2007-08-21 12:47:09 UTC
alredy fixed by complete reimplementation of the stylebuilder & related stuff.