Define a project specific external tools in intellij IDEA - intellij-idea

I'm working on more than one project. I needed to define External-Tool to do some batch processing in one of the project. and did this as descibed here: https://stackoverflow.com/a/25970200/1726419
After I opened a different project I saw that the External tool of the first project is still defined in the IDE.
how can I defind a project related external tools set?

Related

how to add gradle (ideally using kotlin-dsl) to existing intellij python project

There are some quite useful previous questions (especially this one but it is out of date and not a direct answer.
We have several python projects but are not moving into the world of kotlin. I am looking to unify tools somewhat by introducing gradle to automate tasks within python projects.
I have added a working sample kotlin-dsl gradle script that automates the tasks successfully when launched from a shell, but where I am blocked is adding support for this to the intellij IDE.
The first challenge is simply configuring a python project to add gradle (currently gradle does not even appear on the tool windows menu. I am thinking the python module can have python support allowing the overall project to have the jvm as this will be needed by gradle. But what to do switch intellij to recognise the allready working build.gradle.kts file in the project root folder so tasks can be launced through the IDE and not just the shell?
Note: python dependancy support is not required at this time (as per the linked in).
Assistance appreciated.

Create File Templates in IntelliJ Plugin

How do I create file templates in an IntelliJ plugin?
Main purpose is the concurrent usage of multiple plugins for batch processing in an project wizard.
Is there any simple example or a small example project where I can look how to do this stuff? Unfortunatelly almost any link beloning this topic is broken in the Jetbrains forums.
I already found Idea-Android but I'm not really sure how they create the (for example) Manifest.xml file.

Change IBM Worklight project path

I need to create a Hybrid Worklight project but it needs to be physically inside another project.
The reason is that we are using an API that generates a project using grunt and the guide I got (company standards, practices, etc) says: Once the project is in Eclipse, create a wl folder and create the Worklight project inside of it.
When I create a new Worklight project in Eclipse it always goes to Eclipse's Workspace folder. How can I change this?
Thanks
You cannot (at least, not in a standard/supported/known working way); a Worklight project contains Worklight applications but cannot contain other Worklight projects. Worklight projects are always contained directly within an Eclipse workspace (unless working with the CLI tools).
Based upon your clarifying comment, it seems that your containing "(general) project" is just another directory that contains a wl directory - not a real Eclipse project - that in turn contains your Worklight project. It seems you are creating the whole thing using the CLI tools.
In order to work with this project within Eclipse, you'll need to create a new Eclipse workspace elsewhere (the Eclipse workspace itself isn't particularly important and doesn't necessarily need to saved in source control). You can then use File->Import->Existing Projects into Workspace to import the Worklight project from the wl directory. You can either "Copy projects into workspace" (in which case you will end up with two copies), or leave that unticked, in which case your Eclipse workspace directory will just contain a reference to the original directory (I suspect you want the latter).
As a word of advice, generally you should try not to work with both Eclipse and the CLI tools at the same time. Although it may work, you will get conflicts with (for example) the embedded test server, and long term, you'll just cause confusion.
Edit: looks like Andrew says pretty much the same.
Using Eclipse, since what you see in the Project Explorer view is the workspace Eclipse uses, it makes sense to me that when you create a Worklight project in Eclipse, it will be located - in the filesystem - inside the workspace.
If you want to create your Worklight project elsewhere, you'll probably need to use the Worklight CLI tool. From a terminal, navigate to the location of the Grunt project and then, using the CLI commands, generate a Worklight project in that location.

How do you link an eclipse project to an eclipse plug-in project?

I am building an eclipse plug-in project that acts as a front end. I also have a separate eclipse project that runs as a backend. Right now I can run each of them separately and they communicate just fine using sockets.
I would like the plug-in to create the major components of the back end when it starts but also keep the two projects separate so that I can use other editors to communicate with the back end. So, I added the back end eclipse project to the build properties of the plug-in project and I added some code from the back end driver to the plug-in activator's start(). However, when I run the plug-in project I am getting class not found exceptions for all back end references. It appears to compile fine, but I can't run it. I do not do anything to the MANIFEST.MF file in the plug-in project.
How does one add a second java project to an eclipse plug-in project?
There are several ways you can do this, going from best and most difficult to worst and easiest:
(1) Use a build tool (such as the built-in ANT, or tycho, or (as I'm sure there are) some other). This is by far the best solution, but is quite a bit more involved than the next 2.
(2) Convert your non-plugin project to a plugin project and add it as a plugin dependency in your plugin settings file's dependencies tab
(3) Export your non-plugin to a new .jar in your plugin project directory (e.g. $project_loc/lib/something.jar); go into plugin settings (plugin.xml) and include it in: The Build tab under binary build, and the Runtime tab under Classpath. (Or edit the corresponding entries in manifest.mf and build.properties)
For most cases I'd recommend approach (1); look up a few tutorials online, there are plenty. (3) is the quick-and-dirty non-flexible workaround to your particular situation, good for nothing other than seeing if it actually can run. (2) is somewhere in between -- obviously not ideal, but not as bad as 3.

How to ensure eclipse plugin has required bundles available?

I'm just starting to develop a new eclipse plugin where I want a web application server running in Eclipse. I found a nice blog, OSGi as a Web Application Server, that describes how to do this. The author suggests creating a target environment for my bundle requirements, and some of those bundles get pulled in from the Equinox Project SDK (now called Equinox Target Components in Juno). I notice that the tutorial project runs fine when my target platform is the platform I created in the tutorial, but fails to start when it is the default platform. So, now for my question...
If I need bundles that are not part of the default, how will my plugin project get access to those bundles? Will I need to deploy them along with my plugin? How would I know if the user's eclipse does or does not already have those required bundles?
You was not much clear about what kind of application you are developing. Running a web server in an Eclipse IDE as a plugin don't make any sense to me. This kind of server application is best just running on top of Equinox.
Anyway, the right path is to create a "Product Configuration" file and add categories that contains the needed bundles (go to File/Plug-in Development/Product Configuration).
With this file you can run an instance of the product (inside the IDE) and can export it (create a zip containing all needed bundles)
And if you want to able your user to install plugin inside his IDE you must create a P2 repository (using a Target Definition File) and expose the exported directory within a Http server. You could research about Tycho to build this kind of components in a maven style.
Well, I'm not sure if re-inventing the wheel again is really sufficient.
You might take a look at Pax-Web for inspiration on how to do it, or take a look Apache Karaf as a OSGi-Container (using Pax-Web). Or even better start contributing to one of the two :-)