[jbosstools-issues] [JBoss JIRA] (JBIDE-17978) Need to turn on 'angular'-Tern Module automatically in case of AngularJS is detected on a project

Victor Rubezhny (JIRA) issues at jboss.org
Thu Aug 28 13:48:59 EDT 2014


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

Victor Rubezhny commented on JBIDE-17978:
-----------------------------------------

It looks like Alex is correct and we don't need this dialog.

The situation looks like the following:
When a project is started/imported there is no Tern/Angular associated project object is initialized. Tern/Angular assiciated project object is created on the first usage of that object (on validation or content assist usage or hiperlinking, for instance, but the validator in most cases does it earlier). So, when user don't use any javascript/html editing tools - there will be no Tern/Angular passotiated project initialized. Upon the first usage (either it wil be in JavaScript or HTML Editor is opened) the according configuration end object(-s) is(are) created:
- If this is JavaScript Editor - Tern accociated project is created and is saved into the file ".tern-project" (the only "ecma5" and "browser" libraries are included to this file/object)
- If this is HTML Editor (either the WTP or JBoss Tools one) - Tern associated project is created and is saved into the file ".tern-project" (exactly the same way as for JavaScript), then the Angular accociated project is created and ".tern-project" file is populated with "angularjs" plug-in.

It looks like the politics of angular is always use "angularjs" plug-in if angular is installed and the project is marked as an Angular JS Project (but we're always marking JavaScript projects (by an extension point) as the AngularJS ones, so it's true for all the projects with JavaScript nature). But the configuration process is starting only when requested (in simple words, the according editor is openned). 

> Need to turn on 'angular'-Tern Module automatically in case of AngularJS is detected on a project
> -------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-17978
>                 URL: https://issues.jboss.org/browse/JBIDE-17978
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: jsp/jsf/xml/html source editing
>    Affects Versions: 4.2.0.Beta3
>            Reporter: Victor Rubezhny
>            Assignee: Victor Rubezhny
>              Labels: new_and_noteworthy
>             Fix For: 4.3.x
>
>         Attachments: dialog.png
>
>
> At the moment, a user cannot use Content Assist for Angular.js by default, because the according Tern module isn't turned on by default.
> So, users have to do the following set up in order to use it:
> Add 'AngularJS module to Tern in order to make anguler-related stuff enabled on the project. In order to do that you should enable 'JBoss Experimental configuration' in Window -> Preferences -> General -> Capabilities first, then enable 'angilar' module in Project properties -> Tern -> Modules.
> We shall detect the angular usage on a project and turn that module on automatically.
> We should ask user to enable AngularJS support for the project when an html file with angularJS usage is opened with JBT HTML Editor (if not enabled yet):
> !dialog.png!



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jbosstools-issues mailing list