ido
ido

Reputation:

Eclipse plugin editor

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.

Upvotes: 4

Views: 716

Answers (2)

ftl
ftl

Reputation: 3042

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.

Upvotes: 2

John Doe
John Doe

Reputation: 867

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.

Upvotes: 1

Related Questions