Eclipse Editor monitor file changes from out of Eclipse - eclipse-plugin

I am developing a Plugin for eclipse, and notice that when user changes file from out of IDE, e.g., do a git pull using shell, my editor does not pick up the change. I try to use IResourceChangeListener but realize it only monitors changes happening in the workspace.
I have seen eclipse TextEditor can monitor external file change, but failed to find how it implements this from code. My editor is not a text editor so I cannot extend from TextEditor to get this for free.
Can anyone give me a hint how to properly implement this feature for eclipse? Thanks!

According to Eclipse FAQ you need to monitor non Eclipse file changes in separate thread.
Fortunately Java have file change notification API which can be used to implement this.

Related

Save Actions plug-in for JetBrains PhpStorm

There is a plug-in called "Save Actions" available for IntelliJ IDEA. Now I want to know if there is a plugin with the same functionality for PhpStorm? I want to add the this, final and PHPDoc declarations at the save Action.
There is an open request to make Save Actions plug-in available for all IntelliJ platform based IDEs.
Developer has shared an experimental version that should work with PhpStorm:
save-actions.zip
You can install it manually from zip.

How to run ant file in JetBrains WebStorm IDE?

I want to migrate from Eclipse to WebStorm for front end programming. I have done a setup for WebStorm but I couldn't find the way to do:
Ant view - I couldn't find Ant view to run Ant files
File synchronizer - to synchronize the code from Eclipse editor to actual working domain folder, I used to use file synchronizer. For WebStorm - I have found remote file synchronizer plugin but either I am not able to use it or it is meant for something else.
Any help on these would be highly appreciated!!
Also, I used to work on multiple projects simultaneously. Is there any way in WebStorm to use multiple projects in same view (without opening different windows)? If it is not feasible to do these things in WebStorm please guide me to choose good IDE for frontend programming.

How to properly import a Play 2+ project in IntelliJ 14+ with all integrated features (run, debug, test)?

I work on a Java based Play! project for severals months now and I'd like to import it completely in IntelliJ, meaning being able to run, compile, test and debug from IntelliJ, without the need to use the command line.
According to this post from Jetbrain, it seems to be possible, if I quote the article it says clearly : "Now you don’t need to switch between IntelliJ IDEA and Play console anymore. Everything is available right from your favorite IDE.", but I can't figure out a way to achieve this for now, even if I follow the tutorial provided by Jetbrains.
Here are the steps I've been throught :
Open my fav IDE IntelliJ ;)
Go to the project list window.
Import project
Import from external model and choose SBT as suggested in Jetbrains tutorial.
option "Use auto import" checked, option "create directories for empty content roots automatically" checked. Project SDK Java 1.7
Global sbt settings : JVM From project JDK.
Finish
By now, if I try to make the project and launch it from IntelliJ, I'll get scala compiling errors related to routes object. Thanks to this post, we can understand that this happens because scala routes are located to specific folders that needs to be included in IntelliJ sources settings for this project. So next step was :
File -> Project Structure -> Modules
Add target/scala-2.10/classes:target/scala-2.10/resources_managed:target/scala-2.10/src_managed as sources folders.
But my problem remains the same, routes object being unrecognized.
Notes : I have no scala facets in my project structure configuration nor can add one.
IntelliJ provides integrated support for the Play Framework for Scala and Java. Support is currently only available in IntelliJ Ultimate Edition (see the Frameworks and Technology section).
Assuming Ultimate Edition, the setup for Play is incredibly easy. Simply create a new project by importing build.sbt, then choose Add Framework Support and choose Play 2.
Once complete, you can start and stop Play using the Play 2 Run/Debug configuration. No command line necessary.
Here is a more in depth look at IntelliJ's Play project configuration.
You could try the command play idea if you are using play or activator idea if you are using activator. That will do the magic.

IntelliJ change lists without source control

We are being forced to work with Rational Team Concert [RTC] source control, which has very weak integration with IntelliJ (There is an IntelliJ plugin, but it's just buggy and extremely painful to work with).
So I plan to manage the source control outside IntelliJ using the windows shell extension or the eclipse plugin console.
Is it possible to manage IntelliJ change lists manually without connecting with any source control?
The only solution that I could think of so far, is having a mock SVN server to connect IntelliJ to, but this has many downsides to it...
Please help, I don't want to move to Eclipse :\
What I usually see is the use of an intermediate SCM tool which can interface with IntelliJ without disrupting the target SCM used (here RTC, through a local workspace or sandbox)
For instance, you can use git, as in "In git, what is a changelist?".
Once you are ready to commit, you can refresh your pending changes view in IntelliJ IDEA (if you are using the "JazzConnect-IntelliJ")

How to write an IntelliJ IDEA Plugin?

IDEA has many plugins to use. I.e. IDEtalk is one of them which I use. How can I code a simple plugin that just connects to Internet and shows a web page? (no need for an address bar but it is not a problem to be). I want my plugin's shortcut's button locate at my IDE as like IDEtalk, Commander, Maven Projects etc.
Any ideas?
Check the documentation and the source code of the other plug-ins available in the public git repository of the Community Edition.
There is a Creating Your First Plugin guide on JetBrains web site. It covers all the needed steps from plugin creation to deployment to the plugin repository.
You might also want take a look in the source code of a simple plugin like Twitter Integration Plugin which I recently implemented. Or check a more complex one like this one.