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
|
|
|
Powered by
FUDForum. Page generated in 0.02976 seconds