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 229887 - Usage of reserved keyword in expression marked as error
Summary: Usage of reserved keyword in expression marked as error
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-16 19:12 UTC by Vladimir Riha
Modified: 2013-05-30 08:06 UTC (History)
2 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 Vladimir Riha 2013-05-16 19:12:44 UTC
I have following expression in HTML

 <h1>{{case.title}} <small> {{case.version}} Test Case</small></h1>

and it is marked as error "Expected an operand but found case"

As the {{case.title}} is "really" $scope.case.title, this keyword is I think correct and editor shouldn't mark it



Product Version: NetBeans IDE Dev (Build web-main-10531-on-20130516)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-41-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Marek Fukala 2013-05-20 09:49:58 UTC
Petre, can you take a loot at that please?
Comment 2 Petr Pisl 2013-05-29 11:56:28 UTC
The problem is that we don't know the controller from the snippet. The controller can be defined else where, so we don't find the $scope.case property -> is put as global. We need to find out way, how to get the controllers to the snippet, or at least to know that the file is a part of an angular application.
Comment 3 Petr Pisl 2013-05-29 12:17:55 UTC
The problem with the error is fixed with the change: http://hg.netbeans.org/web-main/rev/180641751c9b

Now the embedding is done only on lexical level. The semantic level(parser) is switch off by default and only embedding plugins can handle it.
Comment 4 Quality Engineering 2013-05-30 01:38:00 UTC
Integrated into 'main-golden', will be available in build *201305292301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/180641751c9b
User: Petr Pisl <ppisl@netbeans.org>
Log: #229605, #229887, #230223
Comment 5 Vladimir Riha 2013-05-30 08:06:05 UTC
Thanks, verified

Product Version: NetBeans IDE Dev (Build 201305292301)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-44-generic-pae running on i386; UTF-8; en_US (nb)