[jbosstools-issues] [JBoss JIRA] (JBIDE-17676) Angular Code Assist doesn't work for angular phonecat app

Victor Rubezhny (JIRA) issues at jboss.org
Fri Jul 18 12:10:31 EDT 2014


    [ https://issues.jboss.org/browse/JBIDE-17676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986353#comment-12986353 ] 

Victor Rubezhny commented on JBIDE-17676:
-----------------------------------------

> 1. Follow steps from JBIDE-16544 to import angular phonecat project
> 2. Open controllers.js in Java Script editor
> ERROR: There is no code assist for angular.| or phonecatControllers.|

The angular-phonecat project doesn't contain 'org.eclipse.wst.jsdt.core.jsNature' (JavaScript) Nature by default. We have configured Tern.java/AngularJS-eclipse to work with any projects that has JavaScript nature set up. So, no Tern/AngularJS proposals should appear right after you have used steps from JBIDE-16544 to import project.

Did you switched the project to step-12 in git prior to use content assist for phonecatControllers on this JavaScript? There is no such variable in some previous branches, but it exists for sure in branch step-12. After the switching into branch step-12 I see that variable in content assist even without having Tern working on the project.

After switching the project into git branch step-12 and converting it into the JavaScript one:

angular.| proposals:
!angular.jpg|thumbnail!

phonecatControllers.| proposals (after "Insert single proposals automatically" preference is switched off for JavaScript Editor):

angular.| proposals:
!phonecatControllers.jpg|thumbnail!

> 3. Open phone-detail.html
>ERROR: There is no code assist for | or phone.|
>
>Is it not supported scenario?

No. You should open it with AngularJS Editor (not by JBoss Tools HTML Editor) in order to get such proposals. But:

phone-detail.html is not a page that supports/uses AngularJS: there is no any clues on content type for that page (neither doctype, not ng-* attribute usage) - it looks like just a template that should be included into some other page.

If you'll look at phone-list.html page in AngularJS Editor, you'll find other syntax hight lighting there on {{...}} text regions. However I also cannot find any proposals there in Content Assist when invoking it for {{|}}  text regions. This could mean that AngularJS didn't found any valid proposals for the page.

For sure, the proposals for {{phone.|}} text region isn't something that should be shown - the 'phone' variable is declared in way that is not supported by AngularJS model. Probably this is a subject to change in future.


> Angular Code Assist doesn't work for angular phonecat app
> ---------------------------------------------------------
>
>                 Key: JBIDE-17676
>                 URL: https://issues.jboss.org/browse/JBIDE-17676
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml/html source editing
>    Affects Versions: 4.2.0.Beta2
>         Environment: JBT 4.2.0.Beta2, Linux, AngulaJS for Eclipse installed from JBoss Central Early access
>            Reporter: Vlado Pakan
>            Assignee: Victor Rubezhny
>             Fix For: 4.2.0.CR1
>
>         Attachments: angular.png, phonecatControllers.png
>
>
> 1. Follow steps from JBIDE-16544 to import angular phonecat project
> 2. Open controllers.js in Java Script editor
> ERROR: There is no code assist for angular.| or phonecatControllers.|
> 3. Open phone-detail.html
> ERROR: There is no code assist for {{|}} or {{phone.|}}
> Is it not supported scenario?



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jbosstools-issues mailing list