Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Strange behaviour overiding use of tabbedPropertyView in graphical GMF-Editor
Strange behaviour overiding use of tabbedPropertyView in graphical GMF-Editor [message #60653] Wed, 11 October 2006 12:00 Go to next message
Alexander Haag is currently offline Alexander HaagFriend
Messages: 119
Registered: July 2009
Senior Member
Hi,

I tried to replace the tabbedPropertyView used by a
GMF-generated-graphical-Editor with the 'normal' tablePropertiesView
(Name-Value-Table).
As described in former posts I overrode the getAdapter(y)-method in
xxxxDiagramEditor to return null if y was instanceof IPropertySheetPage.
--> that should disable the use of tabbedPropertiesView and it did so!

After the overriding no properties where shown at all, so I undid the
overriding and tried again and that's where I observed some strange
behaviour:

While running the application in debugmode I started the diagrameditor
with tabbedProperties and closed it just to look if it is alright. Then
I overrode the getAdapter()-method to return null as described above and
started the diagrameditor again. Now it showed some properties (the
properties that are shown in advanced Tab).

Now I wonder if there is some kind of initialisation that is done while
starting the tabbedProperties? Maybe I need to do this initialisation
before I can use 'normal' propertiesview?

Does anyone ever had some similar problems?


Thanks in advance for any help!!
Alex Haag
Re: Strange behaviour overiding use of tabbedPropertyView in graphical GMF-Editor [message #61138 is a reply to message #60653] Wed, 11 October 2006 23:52 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Alex,

Sounds like you are missing a call to setPropertySourceProvider().

If you look at the AdvancedPropertySection, you can see the call to
setPropertySourceProvider().

There is a similar call in the EMF generated editor that creates an
ExtendedPropertySheetPage and initializes the 'normal' tablePropertiesView
when you use the EMF editor.

Cheers...
Anthony

"Alex Haag" <Alexander.Haag@esg.de> wrote in message
news:egimdr$unc$1@utils.eclipse.org...
> Hi,
>
> I tried to replace the tabbedPropertyView used by a
> GMF-generated-graphical-Editor with the 'normal' tablePropertiesView
> (Name-Value-Table).
> As described in former posts I overrode the getAdapter(y)-method in
> xxxxDiagramEditor to return null if y was instanceof
> IPropertySheetPage. --> that should disable the use of
> tabbedPropertiesView and it did so!
>
> After the overriding no properties where shown at all, so I undid the
> overriding and tried again and that's where I observed some strange
> behaviour:
>
> While running the application in debugmode I started the diagrameditor
> with tabbedProperties and closed it just to look if it is alright. Then I
> overrode the getAdapter()-method to return null as described above and
> started the diagrameditor again. Now it showed some properties (the
> properties that are shown in advanced Tab).
>
> Now I wonder if there is some kind of initialisation that is done while
> starting the tabbedProperties? Maybe I need to do this initialisation
> before I can use 'normal' propertiesview?
>
> Does anyone ever had some similar problems?
>
>
> Thanks in advance for any help!!
> Alex Haag
Re: Strange behaviour overiding use of tabbedPropertyView in graphical GMF-Editor [message #61985 is a reply to message #61138] Fri, 13 October 2006 08:32 Go to previous messageGo to next message
Alexander Haag is currently offline Alexander HaagFriend
Messages: 119
Registered: July 2009
Senior Member
Hi Anthony,

thanks for your answer. Your proposal sounds correct, but I'm not sure
where to call this method?
I return 'null' in getAdapter(Class key) when the argument key ==
IPropertySheetPage.class.
If I don't have the Page (because returning null), where should I add
the SourceProvider to?

I tried to create my own PropertySheetPage (as shown in EMF Editor) but
If I use it, there are no entries shown at all

Could you provide further help then??
thanks Alex

Anthony Hunter wrote:
> Hi Alex,
>
> Sounds like you are missing a call to setPropertySourceProvider().
>
> If you look at the AdvancedPropertySection, you can see the call to
> setPropertySourceProvider().
>
> There is a similar call in the EMF generated editor that creates an
> ExtendedPropertySheetPage and initializes the 'normal' tablePropertiesView
> when you use the EMF editor.
>
> Cheers...
> Anthony
>
> "Alex Haag" <Alexander.Haag@esg.de> wrote in message
> news:egimdr$unc$1@utils.eclipse.org...
>> Hi,
>>
>> I tried to replace the tabbedPropertyView used by a
>> GMF-generated-graphical-Editor with the 'normal' tablePropertiesView
>> (Name-Value-Table).
>> As described in former posts I overrode the getAdapter(y)-method in
>> xxxxDiagramEditor to return null if y was instanceof
>> IPropertySheetPage. --> that should disable the use of
>> tabbedPropertiesView and it did so!
>>
>> After the overriding no properties where shown at all, so I undid the
>> overriding and tried again and that's where I observed some strange
>> behaviour:
>>
>> While running the application in debugmode I started the diagrameditor
>> with tabbedProperties and closed it just to look if it is alright. Then I
>> overrode the getAdapter()-method to return null as described above and
>> started the diagrameditor again. Now it showed some properties (the
>> properties that are shown in advanced Tab).
>>
>> Now I wonder if there is some kind of initialisation that is done while
>> starting the tabbedProperties? Maybe I need to do this initialisation
>> before I can use 'normal' propertiesview?
>>
>> Does anyone ever had some similar problems?
>>
>>
>> Thanks in advance for any help!!
>> Alex Haag
>
>
Re: Strange behaviour overiding use of tabbedPropertyView in graphical GMF-Editor [message #63371 is a reply to message #61985] Mon, 16 October 2006 12:41 Go to previous message
Artem Tikhomirov is currently offline Artem TikhomirovFriend
Messages: 222
Registered: July 2009
Senior Member
How about trying 2.0 M2, with newly added extended handling of property
sheet (check
http://wiki.eclipse.org/index.php/GMF_GenModel_Hints#Tuning_ property_sheet).
Even if it doesn not fit your needs, you'll get the code that does most of
the initialization stuff for you.

Artem

"Alex Haag" <Alexander.Haag@esg.de> wrote in message
news:egniu1$b13$1@utils.eclipse.org...
> Hi Anthony,
>
> thanks for your answer. Your proposal sounds correct, but I'm not sure
> where to call this method?
> I return 'null' in getAdapter(Class key) when the argument key ==
> IPropertySheetPage.class.
> If I don't have the Page (because returning null), where should I add the
> SourceProvider to?
>
> I tried to create my own PropertySheetPage (as shown in EMF Editor) but If
> I use it, there are no entries shown at all
>
> Could you provide further help then??
> thanks Alex
>
> Anthony Hunter wrote:
>> Hi Alex,
>>
>> Sounds like you are missing a call to setPropertySourceProvider().
>>
>> If you look at the AdvancedPropertySection, you can see the call to
>> setPropertySourceProvider().
>>
>> There is a similar call in the EMF generated editor that creates an
>> ExtendedPropertySheetPage and initializes the 'normal'
>> tablePropertiesView when you use the EMF editor.
>>
>> Cheers...
>> Anthony
>>
>> "Alex Haag" <Alexander.Haag@esg.de> wrote in message
>> news:egimdr$unc$1@utils.eclipse.org...
>>> Hi,
>>>
>>> I tried to replace the tabbedPropertyView used by a
>>> GMF-generated-graphical-Editor with the 'normal' tablePropertiesView
>>> (Name-Value-Table).
>>> As described in former posts I overrode the getAdapter(y)-method in
>>> xxxxDiagramEditor to return null if y was instanceof
>>> IPropertySheetPage. --> that should disable the use of
>>> tabbedPropertiesView and it did so!
>>>
>>> After the overriding no properties where shown at all, so I undid the
>>> overriding and tried again and that's where I observed some strange
>>> behaviour:
>>>
>>> While running the application in debugmode I started the diagrameditor
>>> with tabbedProperties and closed it just to look if it is alright. Then
>>> I overrode the getAdapter()-method to return null as described above and
>>> started the diagrameditor again. Now it showed some properties (the
>>> properties that are shown in advanced Tab).
>>>
>>> Now I wonder if there is some kind of initialisation that is done while
>>> starting the tabbedProperties? Maybe I need to do this initialisation
>>> before I can use 'normal' propertiesview?
>>>
>>> Does anyone ever had some similar problems?
>>>
>>>
>>> Thanks in advance for any help!!
>>> Alex Haag
>>
Previous Topic:How to create Connection Figure like ...
Next Topic:Problems setting size of figures below 40
Goto Forum:
  


Current Time: Fri Nov 08 22:18:55 GMT 2024

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

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

Back to the top