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 112995 - Embedded pieces of javascript or css are still not parsed together
Summary: Embedded pieces of javascript or css are still not parsed together
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: languages (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks: 100642 111546 115143
  Show dependency tree
 
Reported: 2007-08-16 13:45 UTC by Marek Fukala
Modified: 2007-10-10 17:17 UTC (History)
1 user (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 Marek Fukala 2007-08-16 13:45:42 UTC
I enabled the feature implemented in issue #99526, did some hotfixes in LLSyntaxAnalyzer, but ${subject] is still valid
:-|. 

The AST root of the jsp page now contains two separated AST root nodes:

root
 +---S(text/html)
 +---S(text/x-jsp)

both ASTs are processed, so their subnodes are correct. However if the JSP file contain embedded css or js split into
multiple pieces, these pieces are still parsed separately.

An example:

<html>
   <style>
     h1 { color: ${"red"}; }
   </style>
</html>

=> the S(text/html) node contains the style tag node, but then contains two text elements - before the EL and after the
EL. Both these text elements contains CSS embedding, but the css ASTs are separate, so the second one is errorneous.

It is possible that the problem is caused JUST by issue #87014, so once Mila fixes it the problem will disappear,
however just from looking into the sources it seems to me that it won't work that easy. 

I can do the same "hack" as for HTML so a separate css/js AST will be created under the root node, but in such case at
least navigator is broken.
Comment 1 Jan Jancura 2007-08-22 14:47:00 UTC
Marek,
can you try put following statement to JSP.nbs:

IMPORT:php: {
    mimeType:"text/html";
    start:( "" );
    end:( "" );
    continual:"true";
} 
Comment 2 Jan Jancura 2007-10-10 17:17:23 UTC
fixed in trunk:
IDE:-------------------------------------------------
IDE: [10/10/07 6:16 PM] Committing "src" started
Checking in Language.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/Language.java,v  <--  Language.java
new revision: 1.53; previous revision: 1.52
done
Checking in parser/LLSyntaxAnalyser.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/parser/LLSyntaxAnalyser.java,v  <--  LLSyntaxAnalyser.java
new revision: 1.47; previous revision: 1.46
done
IDE: [10/10/07 6:16 PM] Committing "src" finished