Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Simple way to convert a java application which uses JDT to a java plugin? (How do I convert my java application which uses JDT and COFOJA in eclipse3.6.1 to a java plugin? any easy way to do it? )
Simple way to convert a java application which uses JDT to a java plugin? [message #717498] Sun, 21 August 2011 03:24 Go to next message
sagar  is currently offline sagar Friend
Messages: 12
Registered: August 2011
Junior Member
Hi,
I am creating a java application using JDT and COFOJA in eclipse 3.6.1. It creates the code for the empty method from method contracts. How can convert my java application to the java eclipse plugin?
1) Execution of java application starts from static void main() method. What about execution starting point in plugin?
2) Do I need to change my application code which is already ready to convert it to the plugin? and all my output I am displaying in console using System's println, so whether the system.out.println code written will display it as plugin output?

3) What about the different jar files that I added to the build path and the class path which is set already. How do I take care about this in eclipse? Will it require significant changes?

Kindly have a look at the attached files.

Thanks and regards

ContractToCode.java : main file with public static void main
Heuristic.java: methods from this being called from main file.
MyVisitor.java: visitor pattern file to parse methods, annotations (contracts)
InputFacto.java : input file to main file for processing contracts and adding body to method.

Re: Simple way to convert a java application which uses JDT to a java plugin? [message #717685 is a reply to message #717498] Mon, 22 August 2011 04:32 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
To convert a java project into eclipse plugin, right click on the project and select Configure->Convert to plugin-projects. Obviously this will not be good enough for you. You should read about Eclipse plugin Architecture. Eventually, you might have to create an Eclipse RCP application or an headless application, depending upon your need of UI(workbench, editors, views) or not. They are many articles out there for you to look at. There is a cheat sheet to help you create an RCP application Help->Cheat sheets->Plug-in development->Creating a Rich Client Application.
Re: Simple way to convert a java application which uses JDT to a java plugin? [message #717816 is a reply to message #717685] Mon, 22 August 2011 13:01 Go to previous messageGo to next message
sagar  is currently offline sagar Friend
Messages: 12
Registered: August 2011
Junior Member
Hi satyam,
I am reading an input java file, parsing file using JDT and abstract syntax tree and then I parse the method contracts in it. Using heuristics I create code based on the contract. In the end, I want to write this code inside the method. Using java application its not allowed to overwrite the file. So, which is best choice RCP / eclipse plugin ?
Re: Simple way to convert a java application which uses JDT to a java plugin? [message #718053 is a reply to message #717816] Tue, 23 August 2011 06:31 Go to previous message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
RCP or Eclipse plugin will depend on how you want your tool to be used. Hence, it is better to understand Eclipse platform as a whole.
Previous Topic:Triggering loading of nested jars in a plug-in project
Next Topic:Proposal Computer: Additional Info formatting (still open)
Goto Forum:
  


Current Time: Wed Apr 24 23:52:31 GMT 2024

Powered by FUDForum. Page generated in 0.03191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top