6

I was wondering if there was a simple way to extend the features of the Java Editor in Eclipse for some custom project.

Example : When I write in eclipse :

@Deprecated
public void foo();

foo will be automatically crossed-out and thus easy to notice. In some projects I would like to do the same with custom annotations like @Untested or @Verified to have a better dev environment (but of course, there are plenty of examples like this (special class colours, etc...).

I wanted to create a simple eclipse bundle that extend this kinds of rules but I am unable to find an adequate extension point for this. Do I have to create a new text editor from scratch ?

Thanks for any help or comments,

1
  • Given that you wouldn't want to have to manually open all files looking for these, you're also going to write annotation processors (Oracle has a tutorial, I think) to find them all. Although, I believe that Eclipse comes with a plugin that can give you code/test coverage (for some values of @Untested). Commented Jul 20, 2012 at 15:44

1 Answer 1

1

You will likely need to subclass and modify the JDT editor. Have a look at the JDT source (org.eclipse.jdt.ui.* packages). You can easily work in these with the classic Eclipse SDK as the JDT sources are provided. Use the Plugins view to pull these projects into your workspace so that you can edit them. I don't think there is much documentation on working on the JDT source. Do have a look at the parts of the Eclipse Help related to JDT though.

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

1 Comment

Thanks for your answer. I am trying to check this direction.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.