Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How can i make my editor read-only?
How can i make my editor read-only? [message #171248] Thu, 10 March 2005 19:28 Go to next message
Sapna George is currently offline Sapna GeorgeFriend
Messages: 76
Registered: July 2009
Member
I am building a graphical editor similar to the Shapes editor, but as a
multi-page editor. The editor has palettes and and user can add graphical
components and manipulate them.

My question is: If the file resource that the user is "editing" is set to
Read Only, how i can prevent the user from editing the contents? Is there
a way to control this at the editor level rather than having to
programatically prevent every single "edit" operation supported by my
editor. Or do i have to control the canExecute method of every Command and
Action!

thanks in advance
Sapna
Re: How can i make my editor read-only? [message #171307 is a reply to message #171248] Fri, 11 March 2005 05:04 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Maybe you can create a READ_ONLY mode on your EditPart and not install any
edit policies (except maybe selection) if that mode is set.

"Sapna George" <sgeorge@vt.edu> wrote in message
news:d0q75r$f8t$1@www.eclipse.org...
> I am building a graphical editor similar to the Shapes editor, but as a
> multi-page editor. The editor has palettes and and user can add graphical
> components and manipulate them.
>
> My question is: If the file resource that the user is "editing" is set to
> Read Only, how i can prevent the user from editing the contents? Is there
> a way to control this at the editor level rather than having to
> programatically prevent every single "edit" operation supported by my
> editor. Or do i have to control the canExecute method of every Command and
> Action!
>
> thanks in advance
> Sapna
>
>
Previous Topic:hit-test support for overlapping shapes
Next Topic:Trouble launching TextEditor from GEF
Goto Forum:
  


Current Time: Tue Sep 17 06:12:32 GMT 2024

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

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

Back to the top