Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Advanced Property Section(implementing standard properties view for all EMF objects )
Advanced Property Section [message #1693658] Mon, 27 April 2015 09:57 Go to next message
Djordje Stanojevic is currently offline Djordje StanojevicFriend
Messages: 14
Registered: February 2014
Junior Member
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 ?


Djordje Stanojevic

[Updated on: Mon, 27 April 2015 09:59]

Report message to a moderator

Re: Advanced Property Section [message #1693673 is a reply to message #1693658] Mon, 27 April 2015 11:41 Go to previous messageGo to next message
Krisztian Koncz is currently offline Krisztian KonczFriend
Messages: 31
Registered: September 2014
Location: Budapest
Member

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 11:30 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 12:30 Go to previous messageGo to next message
Djordje Stanojevic is currently offline Djordje StanojevicFriend
Messages: 14
Registered: February 2014
Junior Member
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 };


Djordje Stanojevic
Re: Advanced Property Section [message #1693957 is a reply to message #1693947] Wed, 29 April 2015 13:35 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 11:02 Go to previous messageGo to next message
Djordje Stanojevic is currently offline Djordje StanojevicFriend
Messages: 14
Registered: February 2014
Junior Member
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 ?


Djordje Stanojevic
Re: Advanced Property Section [message #1694079 is a reply to message #1694070] Thu, 30 April 2015 12:08 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 14:41 Go to previous message
Djordje Stanojevic is currently offline Djordje StanojevicFriend
Messages: 14
Registered: February 2014
Junior Member
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?


Djordje Stanojevic
Previous Topic:Kieler-Show Layout View in Graphiti
Next Topic:Updating graphical model in MultiEditor
Goto Forum:
  


Current Time: Tue Jul 17 09:41:49 GMT 2018

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

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

Back to the top