How to Extend JDeveloper without writing code

JDeveloper has a great feature called External Tools, that allows a person to make the IDE interact with an external application.

image

A really good example of this was written a few years ago by Shay Shmeltzer to show how to connect to a Source Code Management (SCM) tool that JDeveloper didn't support natively at the time.  You can find that blog post here.

The External Tools feature has a built in function that tells the tool to go out and look on your computer for the following programs, if you click on the the "Find Tools" button.

 image

This may be enough for a lot of people, but let's go ahead and walk through the process of setting up the integration of one of your own applications.

Clicking on the "New" button will bring up the wizard below.  You can select between an external program or an Apache Ant build file that you would like to integrate with.

image

The Apache Ant integration allows you to provide an existing Ant build file as the target program, and then add arguments to be used when it's run.

We're going to focus on the External Program settings here, but the settings are the same for the Ant process.

On this page of the wizard you can select the executable file for the program that you want to integrate.

image

You will also set the arguments that you want to pass to the program.

This is really the heart of integrating the application into the IDE.  The arguments text field is kind of a free form entry field where you can enter anything that you like.  The "Insert" button will display a dialog that shows a large list of predefined macros for common arguments that you may need.

image

In the example shown in the two screenshots above, I used a simple application called Editplus that allows me to pass in an argument of " -d " to set the working Directory, and the argument of " -n " to load a new file into the application at startup.

I know, using an editor as an external application for an editor isn't practical, but it was something that used some command line arguments that were easy to show. :-)

 

image

Once you have the application selected and the arguments set you are given the option to set the name for the menu, set the ToolTip text if you like, and select an icon for the menu.

 

image

Next you decide where you want the menu items to show up in the IDE.

These options are all pretty self explanatory. The second to last option is nice if you are sending a file off to do some kind of analysis or something like that, then you would like the modified file to be reloaded back into the IDE with the updates, once the external application is done with it.

 

image

The final step in the wizard is to decided when you would like this external application to be shown in the IDE.

For most external applications, you will only want to show the menu or toolbar item when a file, that is part of your project, is selected or the file is already opened in the IDE's editor.

To be even more specific, you can select to only show the menu when the file is of a specific type. Like a .java or .xml file, etc.

image

 

That covers the basics of setting up an External Application. As usual, please feel free to post any questions or personal experiences in the comments.  It would be great to hear from others that have already integrated some external programs.  Tell us which ones you've worked with and how they've worked out.

Comments:

Dear all, I want to create a Clearcase Plugin for the following combination jDeveloper: 10.1.3.4.0 CC Server: 7.1.0.2 CC Client:: 7.1.1.1 Is that possible for this combination using the JDeveloper SDK? If, can you support us in creating such a plugin? Kind regards Josef Kreulich

Posted by Josef Kreulich on October 11, 2010 at 08:18 PM PDT #

Hi Josef, There is already an extension available for ClearCase in JDev 10g. You can find it in the Update Center under Help --> Check for Updates Is there an issue with that version not working in some way with the combination that you have listed? Please feel free to contact me directly via email at: john.brockoracle.com

Posted by John on October 11, 2010 at 11:27 PM PDT #

hi John 'JB' Brock Maybe you can answer my question in the forum thread "running bat files from JDeveloper" at http://forums.oracle.com/forums/thread.jspa?threadID=2230105 many thanks Jan Vervecken

Posted by guest on May 29, 2011 at 05:37 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

profile image
My name is John 'JB' Brock.
This Blog will focus on tips and tricks for working with the JDeveloper Extension SDK.
I hope to bring clarity to some of the mysteries around developing extensions for JDeveloper.


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today