4

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.

2
  • when you say just some java files, do you mean a subset of java files? If so how do you identify the subset? Commented Jul 9, 2009 at 12:18
  • 1
    If you read the rest of the question: It's files that contain a class that implements some interface. Commented Dec 3, 2009 at 21:06

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.