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 101528 - Parser based features doesn't work when file is opened
Summary: Parser based features doesn't work when file is opened
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: languages (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 102011 (view as bug list)
Depends on:
Blocks: 99509
  Show dependency tree
 
Reported: 2007-04-18 10:18 UTC by Lukasz Grela
Modified: 2007-04-27 14:21 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The patch (793 bytes, patch)
2007-04-26 17:25 UTC, Marek Fukala
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Grela 2007-04-18 10:18:55 UTC
for some certain jsp files the navigator shows no content, it occur random. to
reproduce there is a need to play with jsp files.
Comment 1 Marek Fukala 2007-04-18 12:14:55 UTC
This is IMHO a generic Schlimemann navigator problem, at least I saw it for
RHTML and HTML files AFAIK. Hanzi, can you please look at this issue?
Comment 2 Marek Fukala 2007-04-24 09:38:32 UTC
*** Issue 102011 has been marked as a duplicate of this issue. ***
Comment 3 Marek Fukala 2007-04-24 09:39:14 UTC
The bug is very visible => increasing priority to P2, should be fixed in M9 IMHO.
Comment 4 Martin Schovanek 2007-04-24 15:01:40 UTC
Agree with fixing for M9 => P1
Comment 5 Jindrich Sedek 2007-04-25 15:22:30 UTC
This issue is reproducible for CSS editor as well
Comment 6 Petr Jiricka 2007-04-26 13:38:15 UTC
Changing category to 'languages'.
Comment 7 Jan Jancura 2007-04-26 13:40:45 UTC
File is sometimes not parsed when new file is opened. Thats why nevigator is empty.
Simple workaround exists - start typing.
Comment 8 Marek Fukala 2007-04-26 16:24:13 UTC
There are more things which are affected by the missing AST:
1) parser based coloring (complete coloring in CSS)
2) navigator
3) error highlighting
4) code completion

I am not sure if the bug also affects the standalone schliemann editors -
javascript. If so, the also folding will be missing.

IMHO, the simple workaround is not so much nice for demos. I can help with the
fix if you are bussy.
Comment 9 Marek Fukala 2007-04-26 17:24:48 UTC
I have created and attached a simple patch for this issue. 

Hanzi and Dane, please review. 

Especially check if the change won't cause any unnecessary parsing. I have
checked it slightly with XML and java files, it seems to be OK, all the problems
described in this issue are gone.
Comment 10 Marek Fukala 2007-04-26 17:25:55 UTC
Created attachment 41754 [details]
The patch
Comment 11 Marek Fukala 2007-04-26 17:30:29 UTC
Adding Dan Prusa to cc, since the fix replaces his recent change in the file.
Comment 12 Jan Jancura 2007-04-27 09:45:48 UTC
Fix looks good. Thanks.
You can use LanguagesManager.getDefault().isSupported (mimeType) in place of
getLanguage ().

Comment 13 Marek Fukala 2007-04-27 14:20:58 UTC
fixed in trunk and release60-m9 branch

Checking in ParserManagerImpl.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/ParserManagerImpl.java,v
 <--  ParserManagerImpl.java
new revision: 1.31; previous revision: 1.30
done

Checking in ParserManagerImpl.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/ParserManagerImpl.java,v
 <--  ParserManagerImpl.java
new revision: 1.30.2.1; previous revision: 1.30
done