ThR37
ThR37

Reputation: 4085

Customize Java editor in Eclipse

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,

Upvotes: 6

Views: 789

Answers (1)

Francis Upton IV
Francis Upton IV

Reputation: 19443

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.

Upvotes: 1

Related Questions