Eclipse - playframework, angularjs and coffeescript - java

I have started a new project, where as a backend is playframework 2 and as a frontend is angularjs with coffeescript.
For everyday I am using Eclipse and I was looking for plugins which are help writing code in these frameworks.
I found http://marketplace.eclipse.org/content/angularjs-eclipse#.U9VZpXWSxCU, but It does not work with coffeescript (or maybe I do not know how to configure it).
When I open .coffee file in angular editor I can see only plain text without any highlights and content assist.
How to configure eclipse to work with these frameworks? Or maybe is another IDE for angularjs, coffeescript in playframework structure?
Thanks for replies and sorry for my english.

For me, I use Sublime Text 2, which you can download from here..
You can then add some plugin to support those framework..
Coffescript: https://github.com/Xavura/CoffeeScript-Sublime-Plugin
AngularJS: https://github.com/angular-ui/AngularJS-sublime-package
Play: https://github.com/guillaumebort/play2-sublimetext2
Hope it helps..

I tried to Sublime Text 2, when I installed all plugins and then I tried add "Recommended Settings", Sublime showed me popup "Buy license".
Finally I removed .coffee files and I wrote the controllers in pure js.
When the controllers are written in pure js, everything is ok.
I installed this plug of https://github.com/angelozerr/angularjs-eclipse, then I configured it.
After configuration I added in properties project path to folder where I have js files (right click on the project -> Properties -> Tern -> Script paths)
Result:
js content assist http://s30.postimg.org/cqftgkpmp/image.png
html content assist http://s12.postimg.org/l586ejryl/html.png

AngularJS Eclipse is based on tern.js which is an inference JavaScript engine. So it works today only with JavaScript. Some people have started to support CoffeScript with tern, but it seems that it's not perfect. See this issue
For CoffeScript editor, I suggest you to install http://www.nodeclipse.org/coffeescript/
If one day tern.js supports well CoffeScript, I think it should be a good idea to :
integrates tern-coffescript to tern.java (AngularJS Eclipse is based on tern.java).
integrates tern.java to http://www.nodeclipse.org/coffeescript/ to benefit with CoffeScript completion managed by tern.js

I use Eclipse 4.4.0 with Aptana Studio 3 Plugin. Use the following URL as location: http://download.aptana.com/studio3/plugin/update/
It supports syntax coloring and some kind of shortcuts ("Commands") but no content assist.

Related

Configuring angularjs with eclipse IDE

I want to start using AngularJs and Java Spring for development purpose.I am using Eclipse as IDE . I want to configure my Eclipse to have these frameworks working seamlessly.
I know I may be asking too much,but trust me I have done much research on my part and you guys are my last resort.Any help would be much appreciated.
You'd first wanna make sure you have the JSDT installed.
Next thing is to install some dedicated tools for the job, so check out AngularJS Eclipse Tools. The AngularJS Eclipse Templates might be of help, too, and here's a visual guide written for it to get you started.
Also see the AngularJS Eclipse getting started page.
Since this answer had been posted, the AngularJS Eclipse plugin was released, as other answers stated. You might wanna check it out first.
Install JavaScript Development Tools (JSDT) and AngularJS Eclipse plug-in in eclipse from Eclipse Marketplace or Update site angularjs-eclipse-0.5.0,
Right Click on your project --> Configure --> Convert to Angularjs Project (as shown below)
Now you can see the Angularjs tags available as shown below.
.
Make sure the project is extracted on your hard disk.
In Eclipse go to the menu: File->New->Project.
Select "General->Project" and click on the next button.
Enter the project name in the "Project name:" field
Disable "Use default location" Click on the "Browse ..." button and select the folder that contains the project (the one from step 1)
Click on the "Finish" button
Right-click with the mouse on you're new project and click "Configure->Convert to AngularJS Project.."
Enable you're project goodies and click on the "OK" button.
Netbeans 8.0 (beta at the time of this post) has Angular support as well as HTML5 support.
Check out this Oracle article: https://blogs.oracle.com/geertjan/entry/integrated_angularjs_development
Since these previous answers above, there is now a release of an Eclipse Plugin to assist with development using AngularJS:
https://marketplace.eclipse.org/content/angularjs-eclipse
https://github.com/angelozerr/angularjs-eclipse/wiki/Installation---Update-Site (take a look around the other Wiki pages for information on features)
The release at the time of the answer is 0.1.0.
Please also checkout JSDT (http://www.eclipse.org/webtools/jsdt/) and also Eclipse VJET (http://eclipse.org/vjet/). The VJET project appears to be an attempt to provide better feature sets to the editor without being encumbered by the JSDT project (open source politics at play I guess).
Download angular js from this link and add as new software in eclipse
http://oss.opensagres.fr/angularjs-eclipse/0.6.0/
Configuration worked with Eclipse Mars 4.5 version.
1) Install Eclipse Mars 4.5 from
https://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars2
This comes with Tern and embedded Node.js server
2) Install AngularJS Eclipse plugin from Eclipse Marketplace
3) Configure node.js server to the embedded nodejs server within Eclipse (found in the eclipse plugins folder) at Windows-> Preferences -> JavaScript -> Tern -> Server -> node.js. No extra configurations are required.
4) Test configuration in a html or javascript file.
https://github.com/angelozerr/angularjs-eclipse
With current Angular 4 and 5 versions, there is an IDE for that.
Go to eclipse market place any search for 'Angular'. You will see the IDE and install it.
After that restart eclipse and follow the welcome messages to choose preferences.
How to start using eclipse with angular projects?
Considering you already have angular project and you want to import it into eclipse.
go to file > import > choose Angular Project
and It would be better to have your projects in a separate working set so that you will not confuse it with other kind of (like java)projects.
With Angular IDE You will have a terminal window too.
To open this type terminal in eclipse search box(quick access) on the top right corner.
Hi Guys if u are using angular plugin in eclipse that time is plugin is limited periods after that if u want to used this plugin then u pay it so i suggest to you used webstrome and visual code ide that are very easy and comfort to used so take care if u start and developed a angular app using eclipse

Angular Js in Eclipse

I want to use angular.js in my project. I currently use JSF as a framework in my project.
I use Eclipse as IDE.
While trying to use angular.js in my project, I found an error of Invalidformalparameter
in angular.js. I also found many syntactical errors in jquery.js, jquery.min.js and angular.js.
Please help me.
Attachments:
Screenshot of IDE showing errors
Don't take care of raported possible errors in public well-tested scripts. Just link it with script in your HTML.
Eventually turn of eclipse notification for this specific file.
angularjs-eclipse by Angello https://github.com/angelozerr/angularjs-eclipse addreses many issues or working with AngularJS in Eclipse.
I am co-author of Nodeclipse and Enide Studio, and we are working with Angelo (author of angularjs-eclipse) on including that plugin into Enide Studio. Also guys from JBoss expressed desire to include this plugin into JBoss Developer Studio, ref #28

Java and JavaScript nature simultaneously

I have a larger maven multi-module project where multiple languages are involved. Now with Eclipse JDT and JSDT installed the code coloring works fine but code completion in JavaScript does not work very well which makes it hard to be productive. Eclipse does not seem to find JavaScript classes in my project so i am also not able to jump around JavaScript methods very easily. Mapping JavaScript classes seems also not possible since this is a Java project and i see no way to mix up project natures.
Is there a way to improve this behavior? Or are there any other JavaScript Plugins which are able to do so and work simultaneously with JDT?
You can definitely mix Java and JavaScript development in Eclipse. The Dynamic Web Project creates such a configuration by default.
To add JavaScript support to any Java project, do the following...
Project Properties -> Project Facets
Click on "Convert to faceted form" link
Check JavaScript and hit ok to close the dialog.
Make sure that you are in a perspective that has "Project Explorer" view as opposed to "Package Explorer", which is standard in Java perspective or open that view yourself. Unlike the Java-specific Package Explorer, the Project Explorer view accommodates different technology extensions, such as JavaScript.
Enjoy. Facets are somewhat like natures, but unlike natures the can be user-manipulated without hacking metadata files. New Eclipse tooling, like JSDT has been moving to providing facets to make enablement easier.
Does it work for you if you open up your .project file and add a new <nature> into the <natures> element? I've done that to apply the java nature to non-java projects which had other natures.

How can I get code assist for jQuery within a JSPX file in eclipse?

I'm trying to edit and add some jQuery functionality to a jspx page and could really use a little code assist for playing with jQuery. I've installed the aptana plugin and have tried switching to the aptana web perspective but I'm not getting any ctrl+space popups (I've enabled jQuery 1.3 and 1.4 in the eclipse -> aptana -> javascript -> code assist preference). Is there a way to get aptana to kick in on a jspx file? Is there another plugin I should try?
You could try to open your jspx file in the Aptana Html Editor.
Right click the file -> Open with -> Others... -> Aptana Html Editor.
Then the code assist should work for your javascript.
I ended up following instructions on this website:
http://www.langtags.com/jquerywtp/?page_id=4#comment-59
Which guides you through "patching" one of the wtp jar files...doesn't seem like the best solution, however, it does work.

first servlet/jsp application, just need some clarifications

I first tried the spring mvc tutorial using eclipse, but got a bit frustration and just did the first few steps using netbeans.
Netbeans, using a java web template, creates folders like:
/webpages
/webpages/meta-inf/
/webpages/web-inf/
/webpages/*.jsp
/source packages
/source packages/xxxx/xxx.java
/test packages/
/libraries
/configuration files
/configuration files/manifest.mf, context.xml, web.xml
The spring tutorial suggests to create:
/appname/
/appname/src
/appname/war (jsp's go here)
/appname/war/web.xml
/appname/build.xml
/appname/build.properties
/appname/war/WEB-INF/appname-servlet.xml
/appname/src/appname/web/HelloController.java
Now my question is, if I modified my netbeans project to mirror this structure, will it break the automatic build that netbeans gives me?
I downloaded the full version of netbeans, so I'm not sure if Ant comes with it or not?
When using the IDE's build/run, I guess I am using the IDE's build engine, can I force it to use Ant somehow or its better just to use Ant at the command line?
Here's the Spring tutorial reworked for NetBeans.
One option, becaue you have Netbeans, is to do this using Maven. Maven is an external build system (and much more) that netbeans can use. Create a new project and select a Maven project. Then create a simple Java web application (or a spring application if you want to dive right in). The directory structure that is set up will be correct.
As an Eclipse user, I'm not really good with NetBeans. But I do know that the "internal build system" is based on Ant and a pretty elaborate project framework Ant file.
You could dig your way through the maze of files and targets and fix the problem manually, but my suggestion would be to adapt the Spring tutorial's names to the directory structure NetBeans gave you.

Categories