Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Read-only PropertySheetPage in some Views
Read-only PropertySheetPage in some Views [message #422684] Fri, 12 September 2008 16:07 Go to next message
Eclipse UserFriend
Originally posted by: andreas-scharf.gmx.de

Hi,

I already searched the newsgroup for this topic and found "Read-only
Property Sheet Page" from 07-01-08. I'm also working with
TransactionalEditingDomains, so I'm just loading the resource once into
my ResourceSet and I don't have different EditingDomains for my editor
and my other view. What I need is the following: If the editor returns
the PropertySheetPage, all values are editable (which they are now). But
if I select my other view, and it is asked for a PropertySheetPage I
need the view to return a read-only PropertySheetPage.

I read about the resourceToReadOnly map but is that appropriate for me?
Since I only have one resource I would have to switch the read-only
state everytime I'm switching from my editor to the view to tune this
flag. Is that the only way or how would you sove this problem?

Cheers,
Andreas
Re: Read-only PropertySheetPage in some Views [message #422689 is a reply to message #422684] Fri, 12 September 2008 17:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30813
Registered: July 2009
Senior Member
Andreas,

I can't think of any other good ways. I've not looked to see if there's
anything in the property sheet page class itself that would help. It
seems unlikely. Generally such things are mostly private methods...


Andreas Scharf wrote:
> Hi,
>
> I already searched the newsgroup for this topic and found "Read-only
> Property Sheet Page" from 07-01-08. I'm also working with
> TransactionalEditingDomains, so I'm just loading the resource once
> into my ResourceSet and I don't have different EditingDomains for my
> editor and my other view. What I need is the following: If the editor
> returns the PropertySheetPage, all values are editable (which they are
> now). But if I select my other view, and it is asked for a
> PropertySheetPage I need the view to return a read-only
> PropertySheetPage.
>
> I read about the resourceToReadOnly map but is that appropriate for
> me? Since I only have one resource I would have to switch the
> read-only state everytime I'm switching from my editor to the view to
> tune this flag. Is that the only way or how would you sove this problem?
>
> Cheers,
> Andreas
Re: Read-only PropertySheetPage in some Views [message #422690 is a reply to message #422689] Fri, 12 September 2008 19:06 Go to previous message
Eclipse UserFriend
Originally posted by: andreas-scharf.gmx.de

Ed,

I (temporary) solved it by overwriting selectionChanged() in my
TabbedPropertySheetPage to distinguish which part is now active and to
change the resources read-only state. That seems to work...

Andreas

Ed Merks schrieb:
> Andreas,
>
> I can't think of any other good ways. I've not looked to see if there's
> anything in the property sheet page class itself that would help. It
> seems unlikely. Generally such things are mostly private methods...
>
>
> Andreas Scharf wrote:
>> Hi,
>>
>> I already searched the newsgroup for this topic and found "Read-only
>> Property Sheet Page" from 07-01-08. I'm also working with
>> TransactionalEditingDomains, so I'm just loading the resource once
>> into my ResourceSet and I don't have different EditingDomains for my
>> editor and my other view. What I need is the following: If the editor
>> returns the PropertySheetPage, all values are editable (which they are
>> now). But if I select my other view, and it is asked for a
>> PropertySheetPage I need the view to return a read-only
>> PropertySheetPage.
>>
>> I read about the resourceToReadOnly map but is that appropriate for
>> me? Since I only have one resource I would have to switch the
>> read-only state everytime I'm switching from my editor to the view to
>> tune this flag. Is that the only way or how would you sove this problem?
>>
>> Cheers,
>> Andreas
Previous Topic:Re: [emf-dev] Re: Problem loading editor with many ECore Model
Next Topic:Nested Objects to list Object..
Goto Forum:
  


Current Time: Sat Jan 25 14:19:09 GMT 2020

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

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

Back to the top