Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » disable editor editing
disable editor editing [message #228571] Wed, 27 December 2006 16:40
Eclipse User
Originally posted by: aleksandr_kravets.iwaysoftware.com

Hello,

I am trying to make my editor non editable and it works:

protected void doSetInput(IEditorInput input) throws CoreException {
super.doSetInput(input);
ResourceAttributes resource = new ResourceAttributes();
resource.setReadOnly(true);
((IFileEditorInput)input).getFile().setResourceAttributes(re source);
}

However, what I have is editor which is MultiPageEditorPart, one page is
graphical representation of the XML file, another is XML file itself.

What happens is that when you manipulate file graphically the source
updates and you can see changes on the second page (when selection of
pages changes file is saved). But, since I implement doSetInput in my
editor I cannot save the changes made in graphical editor to be seen in
XML editor.

How can not make the resource read-only, but only prevent user from
performing changes in XML editor?

thanks,
Alex
Previous Topic:ISelectionProvider error at runtime
Next Topic:zooming layer problem
Goto Forum:
  


Current Time: Fri Oct 24 11:35:09 GMT 2014

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

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