views:

194

answers:

2

Hi, I want to create an editor in eclipse (as eclipse plug-in), for a java class that implement some interfaces i created. The editor will let the user edit some information (using a form) that will be put into the java class. - very much like in EJB editor. I want java files that implement this interface to open the editor.

  1. How can I replace the values in the class without the need to re-generate it (because the user might have edited some of the source code in the class)?
  2. How can I link the editor to open just some java files?

Thank you.

+1  A: 

1) I suggest that you read Eclipse documentation in details as I don't think that it will be trivial. 2) I suppose that Eclipse has some mime-type associations API, so you'd just use that.

John Doe
A: 

Use the JDT to get access to the java class and change parts of its contents using the AST of the java class.

Maybe this article will help you.

ftl