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 129209 - Stylebuilder flicks when adding new rule via UI
Summary: Stylebuilder flicks when adding new rule via UI
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords: RANDOM
: 129210 129212 129214 129215 129216 129217 129220 129221 129222 129223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-05 03:09 UTC by _ krystyna
Modified: 2008-09-26 10:03 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shot "No CSS Rule Selected" (139.45 KB, image/png)
2008-03-14 20:01 UTC, _ krystyna
Details
messageslog-with-switch (49.56 KB, text/plain)
2008-03-19 23:06 UTC, _ krystyna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2008-03-05 03:09:04 UTC
NetBeans IDE Dev (Build 20080304154948)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1

No stylebuilder after adding a rule.

--Create a web project, and add a new stylesheet, and open.
--Using rule icon (toolbar left corner), add a new rule e.g. new HTML element <body>, 
above or below the default root rule
>Style Builder says "No CSS Rule Selected"

Now click in rule to activate cursor
>Style Builder says "No Css Rule Selected" Still not activated.. 

Click in root rule and Style Builder is activated.
Click back in body rule, still not activated.
Tab switching does not help.
Comment 1 Marek Fukala 2008-03-05 10:27:32 UTC
*** Issue 129223 has been marked as a duplicate of this issue. ***
Comment 2 Marek Fukala 2008-03-05 10:27:44 UTC
*** Issue 129222 has been marked as a duplicate of this issue. ***
Comment 3 Marek Fukala 2008-03-05 10:27:55 UTC
*** Issue 129221 has been marked as a duplicate of this issue. ***
Comment 4 Marek Fukala 2008-03-05 10:28:07 UTC
*** Issue 129220 has been marked as a duplicate of this issue. ***
Comment 5 Marek Fukala 2008-03-05 10:28:42 UTC
*** Issue 129216 has been marked as a duplicate of this issue. ***
Comment 6 Marek Fukala 2008-03-05 10:28:47 UTC
*** Issue 129217 has been marked as a duplicate of this issue. ***
Comment 7 Marek Fukala 2008-03-05 10:28:57 UTC
*** Issue 129215 has been marked as a duplicate of this issue. ***
Comment 8 Marek Fukala 2008-03-05 10:29:09 UTC
*** Issue 129214 has been marked as a duplicate of this issue. ***
Comment 9 Marek Fukala 2008-03-05 10:29:19 UTC
*** Issue 129212 has been marked as a duplicate of this issue. ***
Comment 10 Marek Fukala 2008-03-05 10:29:26 UTC
*** Issue 129210 has been marked as a duplicate of this issue. ***
Comment 11 Marek Fukala 2008-03-05 11:29:54 UTC
It looks like the editor doesn't listen or doesn't get events from the css parser from some reason. Does the same
problem happen if you add the rule manually?

Can you please confirm the problem is reproducible? If so, does editing the code manually help? If it is random, reopen
and add proper keyword.

I am also kindly asking our QE to verify the behaviour.

I am closing the issue as works for me for now. If you can reporduce, please reopen.
Comment 12 _ krystyna 2008-03-10 23:56:19 UTC
I am seeing this with today's installer build:
NetBeans IDE Dev (Build 200803101203) Java: 1.6.0_04; Java HotSpot(TM)
both on Windows and Solaris Sparc.  perhaps because I am working predominantly with
VW projects? 

My process is to start with a fresh userdir.
Today with two or three VW projects
in multiviewer, at least one had been deployed,
--I first open the stylesheet.css from  resources node, 
--try adding a rule via icon, e.g. html body 
--see the cursor is in the new rule, but No CSS Rule Selected
appears in Style Builder. 
--adding manually a class such as .zzz {} manually placing the cursor there, I see no CSS Rule
Selected.

If I next create a regular web project , and add my own stylesheet, I see 
the same "No Css Rule Selected".

If I close all the projects, then restart IDE and create a regular web project, I still 
see it. Today it is not random but I previously did see it fail then somehow begin to work
again. The projects I create are all by default non-shared.

Comment 13 Marek Fukala 2008-03-13 12:11:59 UTC
Jindro or Martine, can you please try to reproduce it?
Comment 14 Martin Schovanek 2008-03-14 09:28:08 UTC
I cannot reproduce it, Krys what Nb bundle do you use, 'Web & Java EE' or 'All'? Can you attach a screenshot please?
Comment 15 _ krystyna 2008-03-14 20:00:00 UTC
I use the "Web & Java EE" bundle where I can still reproduce it today, but since you brought it up 
Martin, I am going to try the "All" bundle today as well to see if there's any difference. Attaching
a screenshot from today NetBeans IDE Dev (Build 200803141205) Java: 1.6.0_04.
Comment 16 _ krystyna 2008-03-14 20:01:54 UTC
Created attachment 58411 [details]
Screen shot "No CSS Rule Selected"
Comment 17 _ krystyna 2008-03-14 20:30:46 UTC
The All version of 200803141205 worked for me(!) so to reproduce it Martin, please try the Web and Java
EE version, clean userdir, create only VW projects. 

One observation, I noticed after creating the rule in the All version that there was no cursor inside
the rule. (?)
Comment 18 Marek Fukala 2008-03-19 16:27:44 UTC
Krys, since I am not able to reproduce, I have added debug messages to the responsible class to be able to find the
source of the problem. Please run netbeans build containing the changeset below with "issue_129209_debug=true" option
e.g. ./netbeans -J-Dissue_129209_debug=true

You will see mesaages like:
INFO [css.visual]: caret event; dot=299
INFO [css.visual]: caret event; dot=299
INFO [css.visual]: update selected rule stylesheet.css * to position 299
selected rule:CssRule[.ddd
]INFO [css.visual]: already selected rule selected, exiting
INFO [css.visual]: model updated
INFO [css.visual]: model updated from AWT
INFO [css.visual]: update selected rule stylesheet.css * to position 299
selected rule:CssRule[.ddd
]removed css style data listener from previous rule: CssRule[.ddd
]added property change listener to the new rule: CssRule[.ddd
]INFO [css.visual]: stylebuilder UI updated
INFO [css.visual]: updateselected rule exit


in the console.

Please run the ide with a clean userdir, try to reproduce the problem and once you reproduce, kill the IDE and send me
the log file - important thing is that after you reproduce you won't play with the css more so I am able to find the
corresponding part at the end of the log.


changeset:   74260:45ed52a58811
tag:         tip
user:        Marek Fukala <mfukala@netbeans.org>
date:        Wed Mar 19 16:22:47 2008 +0100
summary:     adding debug messages to be able to find source of issue #129209 (Stylebuilder not activated after adding
new rule)
Comment 19 _ krystyna 2008-03-19 23:05:05 UTC
Hi Marek, I'm now seeing different behavior with or without using your switch, such 
that now the "No CSS rule selected" merely flashes momentarily. Therefore reducing
priority. But I am attaching the messages log, because there you will see reflected
"no rule selected" even though a rule has been selected. Thanks for your efforts.
Comment 20 _ krystyna 2008-03-19 23:06:27 UTC
Created attachment 58710 [details]
messageslog-with-switch
Comment 21 Marek Fukala 2008-03-20 15:08:25 UTC
>now the "No CSS rule selected" merely flashes momentarily. 
I am little confused Krys...

The behaviour should be following:
1) open a css file
=> the file opens, 
   SB and Preview components open
   caret is put into the first rule in the file
   SB and Preview shows content of the rule

It might happen that the SB shows "No CSS Rule Selected" for a moment until the file gets parsed. This is not a bug. The
same may happen if you modify the source either manually or via the "new rule panel". A BUG is if you do the file
modification (or just open the file) set the caret into a rule and the SB doesn't show the content even after some time
(max a few seconds depending on the file size).

Can you please clarify again what is the behaviour you are facing? I am really sorry for asking the same things again,
but according to your latest comment it seems to me the issue is not a bug at all. Thanks!


Comment 22 _ krystyna 2008-03-20 19:32:11 UTC
Correct. The "No CSS Rule Selected" is no longer persistent as it was and that 
was the main problem. Somehow that got fixed.  I thought that as I am in the 
process of adding a rule (I use style editor), it would not flash at me, but it 
is only an annoyance. Close if you want. I want to point out when I load stylesheet.css 
from a  VW project, there is NO caret appearing. There is rule selection via the blue hightlight
and thus SB preview is loaded with those settings. I want to note that NO caret appears after 
adding a rule with the Style Rule editor.

Comment 23 Marek Fukala 2008-03-24 09:02:06 UTC
I think I can fix the described problem - flicking of the UI when adding the new rule using the UI.

As for the caret - can you file a separate issue please?
Comment 24 Jiri Prox 2008-04-11 01:13:35 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 25 Marek Fukala 2008-09-26 10:03:25 UTC
With respect to the issue 148460 and to the fact that the original issue has been fixed closing as fixed.