Refresh Eclipse project on file save in Atom - java

I am using Eclipse (Version: Luna Service Release 2 (4.4.2)) because I have to (my team uses it for SVN purposes) and I am editing the CSS and .jsp files in Atom (the Github's text editor). Whenever I change and save a file in Atom I have to go and manually refresh the project in Eclipse for changes to appear. This is very time-consuming and I am not sure if I can fix this.
I have tried both refresh on access and refresh via native hooks ...
Any Ideas?

I'm using the latest Atom with Eclipse Mars (4.5.1) and Tomcat as the web container. Setting both
General -> Workspace -> Refresh using native hooks or pooling
and
General -> Workspace -> Refresh on access
works for me. It is described at Can Eclipse refresh resources automatically?.

Related

Eclipse Instantly detect external file change

I am using eclipse bndtools plugin to develop OSGi based web application.
I am using Eclipse IDE (because of bndtools) and Jetbrain Webstorm IDE to edit the html/css/js files.
When I change files in eclipse, the bndtools refresh the bundle and I can see the changes immediately, but when I edit files using Webstorm I need to refresh the project in eclipse in order to see the result.
NOTE: I have enabled the Eclipse workspace setting Windows > Preferences > General > Workspace > Refresh using native hooks or polling and Refresh on access
. But this will only enable eclipse to detect changes when I access the files in eclipse.
To speed up my development, I don't want to refresh the project using eclipse on every changes I make in Webstorm. I am asking if there is a way to avoid it.
Thanks
The option "Refresh using native hooks or polling and Refresh on access" just do what you are asking for.
The option "Refresh on access" only refresh the file when you access it (when opening the file, or if the file is open in an editor).
Tested in Eclipse Photon.

Automatically reload Java AppEngine Maven project after making changes

Is it possible to automatically reload a Java AppEngine project (which uses Maven) after making changes to the code? I.e. after making a change to the code (such as a JSP) I'd like to see those changes straight away in a web browser without having to re-run the project. Is this possible?
I have done the following:
Created a Maven project using the Google's tutorial
Imported it into Eclipse using Google's instructions.
Enabled the "Build Automatically" setting on my project in Eclipse (which this article suggests is required).
Run the dev server inside the ear project (mvm appengine:devserver)
However, changes to JSPs aren't automatically reflected when I view the page in a web browser. I can only see the changes by installing (mvn clean install) and then re-running the dev server.
Projects created using the Google Eclipse plugin reload automatically however, I'd prefer to use Maven as it'll make it easier to install other software (such as the Spring Framework).
I think I've got to the bottom of this:
Import only the web Maven project (not the main project) into Eclipse (as suggested in the Eclipse Web Tools documentation)
Create a server as per Google's documentation. The web site should automatically reload 15 seconds after you make a change to the code. To change this...
Open the "servers" tab, right-click on your server and select "open".
Expand the "Publishing" section and decrease the value for "Automatically public after a build event.
Note: the "auto scan for resources change setting" doesn't seem to make any difference.

How to Open and edit file outside eclipse workspace, while having the file in sync with Eclipse?

I am opening and editing a file (in my Eclipse plugin), in the filesystem by using java.io.File. But everytime i edit it, the Eclipse is out of sync with that resource! So after my code edits it, if user tries to operate on it in the UI, Eclipse says resource out of sync! I know refreshing the file in UI will work but everytime doing that will be annoying!
Is there any way to open the resource in such a way that eclipse is in sync with the file?
refreshLocal API is not useful for me!!
Try Preferences > General > Workspace and select the Refresh using native hooks or polling check box.
The Filesync plugin worked fine for me. It is configurable. No manual refreshing needed.

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

Play Framework 2.1 Java/Eclipse: Auto-Reload not working

The Problem/s:
Views are being compiled but hitting refresh in a browser won't show the changes without restarting the server manually.
Changes to controllers compile automatically using ~run but only a manual server restart will update the content on the server.
Changes to routes under conf are only shown after manually restarting the server.
Background:
running on OSX 10.8.3
using Eclipse Juno 4.2.2
Server is launched using play ~run
Only restarting the server will show changes to views, controllers, routes
To be able to make changes without having to restart the server each time I tried (without success):
in the console: clean -> eclipse -> ~run
in the console: clean -> compile -> ~run
shutdown/restart the computer
Tick Refresh using native hooks or polling -> remove classes_managed from Referenced Libraries and add it manually
Questions:
How can the Auto-Reload functionality be restored?
How can this problem be solved on IDEs besides Eclipse?
Further information:
Playframework reload not working Mac OSX
Auto-reloading with Play framework on a network filesystem
Both of them point to JNotify as the cause for auto-reloading not to work. One of the answers (not enough rep to write a comment) mentions how one could "hack Play framework's sbt plugin to make the PlayReloader trait behave as if JNotify wasn't available." How could one achieve this?
The following got Play's auto-reload to working with Eclipse:
In Eclipse Preferences go to General → Workspace. Uncheck Build automatically.
Restart OS X.
For whatever reason, I had to restart OS X to get akim's suggestion to take hold.
I got around this problem by changing the project configuration in Eclipse. I unchecked the "Allow output folders for source folders" option, which means that Eclipse will compile classes to the "bin" folder. This prevents the Eclipse compilation from interfering with the Play compilation. The only downside is that you have to remember to redo it if you ever do play eclipse again.
Following akim's suggestion, disabling Build automatically under General\Workspace in the Eclipse Preferences solves the problem and re-enables Play!'s auto-reload functionality in all of the above problem cases.

Categories