Setting Editor to read-only [message #203557] |
Thu, 05 April 2007 18:00 |
Eclipse User |
|
|
|
Originally posted by: sgannon200.hotmail.com
Hi all
I've developed a plugin for Eclipse 3.2 that has a custom editor.
This editor has an associated button which when pressed, among other
things, sets the editor to read-only.
The code in my class, which extends TextEditor, is as follows:
public boolean isEditable()
{
return !InformationContainer.isObserver();
}
public boolean isEditorInputReadOnly()
{
return InformationContainer.isObserver();
}
public boolean isEditorInputModifiable()
{
return !InformationContainer.isObserver();
}
This works and it sets the editor to read-only.
The only problem is that it does not do this straight away.
For instance, if I have been typing in the editor and then press the
"read-only" button, and type some more it will be displayed in the editor.
When I click onto a side view, or something else, and then return to the
editor it is set to read-only.
Is there any way to get the editor to be set to read-only straight away?
Thanks for any help in advance.
PS: This problem has been with me for quite sometime now and a solution
would be really appreciated.
|
|
|
Powered by
FUDForum. Page generated in 0.11647 seconds