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 201808 - Semantic highlighting doesn't appear
Summary: Semantic highlighting doesn't appear
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.1
Hardware: PC Solaris
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: REGRESSION
: 200131 (view as bug list)
Depends on: 201823
Blocks:
  Show dependency tree
 
Reported: 2011-09-08 11:19 UTC by soldatov
Modified: 2011-09-17 14:21 UTC (History)
4 users (show)

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 soldatov 2011-09-08 11:19:28 UTC
NetBeans 7.1

Semantic highlighting doesn't appear. I think this problem blocks inaccuracy tests.

Scenario:
- Create Fractal project
- Open fractal.cc file
==>
- Close file
- Open fractal.cc again
==> no semantic highlighting

Other scenario:
- Add invalid line into fractal.cc
==> red lines appears
- Close file
- Open fractal.cc again
==> no errors
Comment 1 Vladimir Voskresensky 2011-09-08 16:21:24 UTC
may be root cause is issue #201823
Comment 2 Vladimir Voskresensky 2011-09-09 10:16:40 UTC
Please, fix regression in EditorRegistry nofications. It blocks all our QA GUI tests

to see/debug problem:
run IDE with  -J-Dcnd.model.tasks.time=true -J-Dcnd.model.tasks.files=true
and observe trace about OpenedEditors.stateChanged()
EditorRegistry does not notify about new opened files, 
when notification about closed file is received EdtiorRegistry list of components is incorrect and holds already closed files as well
Comment 3 Vladimir Voskresensky 2011-09-12 10:32:41 UTC
backout done for 201823 didn't help to have correct events from EditorRegistry
so https://netbeans.org/bugzilla/show_bug.cgi?id=201823#c3 is valid
Please, fix ER events, our tests are failing
Comment 4 Miloslav Metelka 2011-09-12 13:31:43 UTC
EditorRegistry.notifyClose() is no longer effective since upon 

TopComponent.Registry.firePropertyChange(PROP_TC_CLOSED)

it's no longer true that closedTopComponent.isAncestorOf(quietEditorPane)
which is the mechanism that ER used to identify TC with closed editor pane.

Yardo, could you give me a hint how should I change the ER code to work again? Thanks.
Comment 5 Vladimir Voskresensky 2011-09-12 14:01:22 UTC
Both modes should work (MutliView TC and pure old Editor TC) when fix is done, right?
Comment 6 Jaroslav Tulach 2011-09-12 17:24:00 UTC
The most reliable contract I can think of is to make sure CloneableEditor (or Support) always set and unset putClientProperty("usedByCloneableEditor", Boolean.TRUE/FALSE).

This way you will have easier code to observe what is going on in editor and the manipulation with JEditorPanel's state will be done by its owner. Thus it will be more reliable.
Comment 7 Miloslav Metelka 2011-09-13 10:06:58 UTC
After talking to Standa A. I think that Yarda's "usedByCloneableEditor" will be the best solution of the problem.
Comment 8 Miloslav Metelka 2011-09-13 16:06:52 UTC
http://hg.netbeans.org/jet-main/rev/108b9b214479
Comment 9 Quality Engineering 2011-09-14 18:26:10 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/108b9b214479
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #201808 - Semantic highlighting doesn't appear.
Comment 10 Miloslav Metelka 2011-09-14 20:15:40 UTC
*** Bug 200131 has been marked as a duplicate of this bug. ***
Comment 11 Quality Engineering 2011-09-17 14:21:15 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/2481d6041232
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix for #201808: Semantic highlighting doesn't appear