New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make this plugin compatible with JSP Editor #2
Comments
I'm afraid that's it's not possible to give AngularJS support with JSP editor easily. AngularJS Eclipse override the HTML DOM to manage AngularJS feature (completion, validation, etc). More the lexer was rewritten to manage {{}} regions. If we want to support JSP, we need to do the same thing than HTML, but for the moment it's not in my scope because I would like to provide a stable version with HTML editor. I'm working on completion in HTML editor with modules, directives and models. |
What a pity! So, in Eclipse IDE, you have different editor implementations, and you could not "plug" additional language/technology support on them? Do you know why it is the case? Just as a side question: I hope that HTML / Javascript / CSS support is not duplicated in JSP and HTML editors too? Thanks anyway! |
AngularJS Eclipse uses WTP HTML Editor. It can be extended a lot (completion, hover, etc) that I have used. But if you wish to add your custom region (like angular with {{}}) you must rewrite the parser/lexer like I have done https://github.com/angelozerr/angularjs-eclipse/blob/master/org.eclipse.angularjs.core/Resource/parserTools/highlighting/AngularTokenizer.jflex The WTP XML/HTML editor uses her own parser/lexer. JSP has redefines her own parser/lexer to manage JSP expression, directive, etc I think it's possible to manage some angular features (like directive compltion like in your case) in JSP, HTML editor without rewritten the lexer. But we lost for instance the higlight capability of the {{}} expression. I will study how to we can support JSP Editor (without highlight) for AngularJS, but my first goal today is to manage completion in angular expression. |
Ok I have commited 4939313 You should have completion (on attr name for directive+ attr value for module, controller...), hyperlink, validator which works for JSP. Highlight doesn't work because as I have explained, the lexer of JSP should be rewritten (hard task). Tell me if it works. |
Hi Angelo, Thanks for this update, I am trying your changes right now and the only current thing I can notice is the autocompletion of the right brackets when I start writing an Angular expression. What did you mean exactly about "attr name for directive+ attr value for module, controller..." ? Thanks |
If you see https://github.com/angelozerr/angularjs-eclipse/wiki/HTML-Features, for JSP completion should work with those usecases :
I will try to fix the case with angular expression inside node text soon. |
I have fixed the problem with JSP with completion for angular expression node text. See my commit Tell me if completion works. |
Hi Angelo, After retrying I do have autocompletion for ng-* DOM tag attributes... but nothing more. Do I need to include the related Javascript files containing my modules as part of the page I want to have autocompletion to allow its modules/controllers/... to be detected, or is it just a global index which built from all detected Javascript files in the project? Thanks. |
For "HTML Templates" (declared in the router), it doesn't work for the moment but it will work soon with "Angular Explorer" view https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View If you have some problems, please attach your project (or gives me some github link), in order to I study your problem. More I think it should be more easy for us to discuss together if we have the same JSP project. |
I close this issue because JSP Editor works with AngularJS (even if they are not the whole feature like syntax coloring and hover). |
Hi,, all |
Please provide more information. In my case it work's. Do you have added AngularJS Nature in your project? |
Hi, I am pretty sure he has troubles because the script URL is computed in his page (or not even present, i.e. in a ng-view content), and hence, the AngularJs Eclipse plugin cannot guess what module is enabled (I do have the same issue ;). |
To load well JS, you must define script paths as folder. Please read https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View |
Thank you for this functionality. Is it possible to have it working on php files? |
I think PDT is based on WTP, so perhaps it's possible. Please create a new issue for that. Thank's |
OK I have created a new issue for PHP support at #90 I think this feature will be possible and I think I can implement it quicly. I plan this feature for 0.6.0 |
First, thanks for this great idea.
Second, unfortunately, I have troubles with your Eclipse plugin when I try opening a JSP file, either with the standard JSP Editor or with the AngularJs Editor: the ng- attributes are not recognized, while this is the case if I open an ".html" file extension.
I have tried opening either with the "Open With" feature or modifying the file association with editors, and, unfortunately, it does not change anything.
Any ideas?
Thanks.
HTML File
JSP File
JSP File (even with Open With)
By the way, the project has been converted to an AngularJs Project, as required.
Versions:
Eclipse Java EE IDE for Web Developers.
Version: Kepler Service Release 1
Build id: 20130919-0819
Eclipse Web Developer Tools
Version: 3.5.1.v201307171524-7O7QG2NEMkBS3C2az0gQwwALctEj3DZPgTEZceV4
Build id: 20110922230524
The text was updated successfully, but these errors were encountered: