Extending the default java editor [message #927020] |
Sat, 29 September 2012 07:03 |
Sebastien Jahan Messages: 4 Registered: September 2012 |
Junior Member |
|
|
Hi everyone,
I'm quite a newbie on developing Eclipse's plugin and so, i'd like to start with best practices and good advice!
I'd like to create a plugin that enhance the Eclipse's default java editor with some new features of mine.
Basically, i'd like to be able to switch the editor to read-only mode, and when it is read-only mode, to display it properly to the user: let's say, i'd like to get the border of the editor in red instead of grey (or any default color).
First of all, is this possible?
And next, which is the best way to get it working? I found out there is ClassFileEditor class in org.eclipse.jdt.internal.ui.javaeditor: is extending it the proper way to do what i want to do?
Thank you by advance and have a very good day
SJ.
[Updated on: Sat, 29 September 2012 07:15] Report message to a moderator
|
|
|
|
|
Re: Extending the default java editor [message #929051 is a reply to message #928289] |
Mon, 01 October 2012 07:11 |
Sebastien Jahan Messages: 4 Registered: September 2012 |
Junior Member |
|
|
Let me refine my question.
I successfully set an editor to read-only mode through accessing its IFile object and setting it to read-only.
So i remain with two questions:
* One problem remains with read-only mode. When i set a file and its editor to read-only mode, if i try to type something in it, Eclipse is asking me if i want to make the file writable. I wish my plugin keeps the entire control on my files, do you know if there is a way to prevent this popup?
* As far as i searched, i didn't find a way to edit the look of the editor component. According to if the editor is read-only or not, i'd like to change the look. If the editor is read-write, i'd like to keep it the usual way. If read-only, i'd like to make it visible, like getting a red border, or a pink/light red background. I have to do that for any editor that opens in Eclipse, so i have to edit each editor on the fly. Do you think it's possible?
Thank you by advance,
SJ.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03349 seconds