Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Setting Editor to read-only
Setting Editor to read-only [message #203557] Thu, 05 April 2007 22:00
Eclipse UserFriend
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.
Previous Topic:Eclipse Guide
Next Topic:how to get another Plugin's static share object that the plugin class provides
Goto Forum:
  


Current Time: Thu Apr 25 04:53:03 GMT 2024

Powered by FUDForum. Page generated in 0.07821 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top