Skip to main content



      Home
Home » Modeling » Graphiti » Advanced Property Section(implementing standard properties view for all EMF objects )
Advanced Property Section [message #1693658] Mon, 27 April 2015 05:57 Go to next message
Eclipse UserFriend
Dear All,

I am newbie in Eclipse Modeling and RCP world.

I am trying to implement standard properties view (I am using AdvancedPropertySection) for my sample Graphiti application.

I have followed this article, and my properties view has default look, but there is no selected Pictogramelement (EMF object) properties shown.

What should I do, to make my object properties visible in the properties view ?

[Updated on: Mon, 27 April 2015 05:59] by Moderator

Re: Advanced Property Section [message #1693673 is a reply to message #1693658] Mon, 27 April 2015 07:41 Go to previous messageGo to next message
Eclipse UserFriend
Have you tried to implement the IPropertySourceProvider interface and set this to the PropertySheetPage propertySourceProvider? For example in the setInput method of the AdvancedPropertySection:
@Override
	public void setInput(IWorkbenchPart part, ISelection selection) {
		page.setPropertySourceProvider(new MyPropertySourceProvider());
		super.setInput(part, selection);
	}


I didn't try this.

Krisztian
Re: Advanced Property Section [message #1693789 is a reply to message #1693673] Tue, 28 April 2015 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Djordje,

in the Tutorial is an example implementation of property sheets (package
org.eclipse.graphiti.examples.tutorial.property). Have you seen that?

Michael
Re: Advanced Property Section [message #1693947 is a reply to message #1693789] Wed, 29 April 2015 08:30 Go to previous messageGo to next message
Eclipse UserFriend
Michael,

Yes, I have seen the Tutorial example, and here are my questions:

1.Do I have to implement PropertySource for every EMF object ?

2.Is there a way to use default properties view , where I can see all properties (primitive and complex) of the selected PictogramElement ?

3.Do I have to have PropertyDescriptors for all object properties?

private static final String NAME_ID = "name";
private static final PropertyDescriptor NAME_PROP_DESC = new PropertyDescriptor(NAME_ID, "Name");
private static final IPropertyDescriptor[] DESCRIPTORS = { NAME_PROP_DESC };
Re: Advanced Property Section [message #1693957 is a reply to message #1693947] Wed, 29 April 2015 09:35 Go to previous messageGo to next message
Eclipse UserFriend
Djordje,

1) yes, you need a property source for each object that should have a
property sheet
2) Not sure what you mean with default properties view ?
3) Yes, you need a property descriptor for each property, it describes how
the entry should look like.

Michael
Re: Advanced Property Section [message #1694070 is a reply to message #1693957] Thu, 30 April 2015 07:02 Go to previous messageGo to next message
Eclipse UserFriend
Michael,

Thanks for Your reply.

Well, when I select any object in ReflectiveEditor, all of its attributes are shown in the properties view, out of the box.
So, I would like to implement exactly the same behavior, when I click on any pictogram in DiagramEditor.

Is this possible, out of the box ?
Re: Advanced Property Section [message #1694079 is a reply to message #1694070] Thu, 30 April 2015 08:08 Go to previous messageGo to next message
Eclipse UserFriend
Djordje,

not sure, I havent tried this. But maybe it would be possible to hook in the
ReflectiveEditor property sheet and activate that on selection in the
diagram?

Graphiti itself does not provide generic support for property sheets, but
relies on existing property sheet implementations in Eclipse.

Michael
Re: Advanced Property Section [message #1694108 is a reply to message #1694079] Thu, 30 April 2015 10:41 Go to previous message
Eclipse UserFriend
Micheal,

Thanks for quick reply.

I have had that idea on my mind, but I have realized that there is one problem.

How can I access ReflectiveEditor, if it is hidden by default?
Previous Topic:Kieler-Show Layout View in Graphiti
Next Topic:Updating graphical model in MultiEditor
Goto Forum:
  


Current Time: Wed Jul 23 11:02:05 EDT 2025

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

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

Back to the top