Problem with properties [message #1136] |
Mon, 31 July 2006 15:59 |
Eclipse User |
|
|
|
Originally posted by: bob2.msn.com
Hi,
I've spent ages trying to implement my own properites for my generated
diagrams but I'm not getting anywhere. I've read the "Take control of your
properties" and "The Eclipse Tabbed Properties View" articles but I still
cant get even a simple property box to work with the message "Properties are
not available".
I've based most of what I've done on the HockeyLeague example and am just
trying to get the name of a node in my diagram to be displayed in the
property box.
I've added the propertyContributor, propertyTabs and propertySections to my
plugin.xml and have copied AbstractStringPropertySection,
AbstractTextPropertySection, HockeyleaguePropertySheetPage and
NamePropertySection, AbstractHockeyleaguePropertySection classes. I've
changed the following to conform with my own diagram:
NamePropertySection's getFeature method uses my own package instead of
HockeyleaguePackage.
In my editor file, it now implements ITabbedPropertySheetPageContributor and
I've added the methods getContibutorId() and getAdapter(Class) as the
article says.
I've only got one property section which uses the class NamePropertySection.
The input to the section has been set to a class in my model which extends
EObject and just has get and set methods for a name.
In the propertySheetPage, it has a method to get the AdapterFactory of the
editor. My editor doesent have an adapterfactory method. Im not entirely
sure what this actually does and if its got any relevance to the properties
not appearing.
Has anyone had any similar problems and know what to do to fix this?
Thanks in advance
Bob
|
|
|
Re: Problem with properties [message #1190 is a reply to message #1136] |
Mon, 31 July 2006 19:24 |
Anthony Hunter Messages: 446 Registered: July 2009 |
Senior Member |
|
|
Hi
The message "Properties are not available" indicates that no
propertySections match your selection.
I am guessing that you are selecting objects on the diagram, which are
EditParts, yet the <input> in the propertySections specify semantic objects.
I would debug TabbedPropertySheetPage.setInput() to make sure the selection
is as you expect.
You can then look at the typeMapper used in the logic example which
translates between the diagram and the semantic objects.
Cheers...
Anthony
"bob" <bob2@msn.com> wrote in message news:eal995$t9e$1@utils.eclipse.org...
> Hi,
>
> I've spent ages trying to implement my own properites for my generated
> diagrams but I'm not getting anywhere. I've read the "Take control of
> your
> properties" and "The Eclipse Tabbed Properties View" articles but I still
> cant get even a simple property box to work with the message "Properties
> are
> not available".
>
> I've based most of what I've done on the HockeyLeague example and am just
> trying to get the name of a node in my diagram to be displayed in the
> property box.
>
> I've added the propertyContributor, propertyTabs and propertySections to
> my
> plugin.xml and have copied AbstractStringPropertySection,
> AbstractTextPropertySection, HockeyleaguePropertySheetPage and
> NamePropertySection, AbstractHockeyleaguePropertySection classes. I've
> changed the following to conform with my own diagram:
>
> NamePropertySection's getFeature method uses my own package instead of
> HockeyleaguePackage.
> In my editor file, it now implements ITabbedPropertySheetPageContributor
> and
> I've added the methods getContibutorId() and getAdapter(Class) as the
> article says.
> I've only got one property section which uses the class
> NamePropertySection.
> The input to the section has been set to a class in my model which extends
> EObject and just has get and set methods for a name.
>
> In the propertySheetPage, it has a method to get the AdapterFactory of the
> editor. My editor doesent have an adapterfactory method. Im not entirely
> sure what this actually does and if its got any relevance to the
> properties
> not appearing.
>
> Has anyone had any similar problems and know what to do to fix this?
>
> Thanks in advance
> Bob
>
>
>
|
|
|
|
Re: Problem with properties [message #4353 is a reply to message #2674] |
Thu, 03 August 2006 10:18 |
Eclipse User |
|
|
|
Originally posted by: netsrujana.rediffmail.com
Hi Bob,
I have been struggling with the properties for a while now, with the GMF
generated code. Could you let me know how you managed to make it work
regards,
Phani Kumar K.
"bob" <bob2@msn.com> wrote in message news:eaql87$vko$1@utils.eclipse.org...
> Thanks for your help. I've managed to get it working now
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04432 seconds