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 175576 - Semantic Highlighting and Mark Occurrence are broken if user reopens file
Summary: Semantic Highlighting and Mark Occurrence are broken if user reopens file
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-10-28 09:57 UTC by soldatov
Modified: 2009-11-01 10:50 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 2009-10-28 09:57:58 UTC
Scenario:
- Create Quote sample
- Open quote.cc file
- Wait file is parsed (green square in corner)
- Close file
- Open file again
==>
File is not reparsed. Semantic highlighting is broken. Mark Occurrence is broken.
Comment 1 Vladimir Voskresensky 2009-10-28 12:11:00 UTC
the issue is that after closing the editor EditorRegistry.componentList() still contains editor => we do not detach.
In fact the situation is even worse.
When file is opened the second time =>  EditorRegistry.componentList() has two entries about the same file
close file/open file =>  EditorRegistry.componentList() has three entries 
and so on.

Looks like EditorRegistry.notifyClose(c) is not closed when needed.
At least I do not see such events when turn on logging 
-J-Dorg.netbeans.api.editor.EditorRegistry.level=FINEST
Comment 2 Vladimir Voskresensky 2009-10-28 17:20:52 UTC
FYI, issue is not reproducible in Beta and in trunk from 21 Oct
We didn't have any code changes in our affected components.
Comment 3 rmartins 2009-10-28 21:40:08 UTC
Hi,
I think I might maybe a similar problem.

I had ACE library project open, alongside my custom
project, when I tried to resolve a method from ACE API, in this case
activate() from ACE_Task_Base.cpp, the parser wouldn't parse file. As
I close the ACE project, everything was ok.
The problem is that I have the ACE library installed in my system + I
had the ACE project open in the workspace, I don't know if this
helps...

Thanks,
Rolando
Comment 4 Vitezslav Stejskal 2009-10-29 16:04:43 UTC
I'm investigating...
Comment 5 Vitezslav Stejskal 2009-10-29 18:22:32 UTC
<rant>
Caused by #481670dcdf35, which was caused by #b4dd900f3229, which itself was backed out and reapplied at least once and
was a fix for 'Slowness detected' sort of a problem. It's a pity that fixing one 'Slowness detected' can lead to several
P1 regressions. Maybe it's time to start fixing real problems reported by real people.
</rant>

Anyway, as long as openide.text is under JET's supervision I'm going to backout any change in this code that is not done
by mslama or myself and is not a fix for P1 regression/showstopper. For those tempted, it's QA's call what is or is not
a showstopper.

http://hg.netbeans.org/jet-main/rev/6365cb5ab7d0
Comment 6 Vladimir Voskresensky 2009-10-30 11:07:54 UTC
Thanks, now it works
Comment 7 Marian Mirilovic 2009-10-30 13:21:24 UTC
> Anyway, as long as openide.text is under JET's supervision I'm going to backout any change in this code that is not done
> by mslama or myself and is not a fix for P1 regression/showstopper. For those tempted, it's QA's call what is or is not
> a showstopper.

Agreed with Vita. Looks like previous changeset caused a lot of regressions, so be careful - at least for NB 6.8 .
Comment 8 Quality Engineering 2009-10-30 22:42:51 UTC
Integrated into 'main-golden', will be available in build *200910301401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6365cb5ab7d0
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #175576: remove TopComponent's children later so that EditorRegistry can find its JEditorPane
Comment 9 Quality Engineering 2009-11-01 10:50:02 UTC
Integrated into 'main-golden', will be available in build *200910310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4e102577737e
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: investigating IZ#175576: Semantic Highlighting and Mark Occurrence are broken are broken if user reopens file