Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] How to programmatically display a View?
[EEF] How to programmatically display a View? [message #735025] Mon, 10 October 2011 16:56 Go to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
Hello,

I have a GMF/Obeo designer modeler and I use EEF for my property sheet.
I would like to implement a listener on an EditPart of my diagram which will show an EEF view of my choice.

I know how to catch the event on my diagram, but I can't figure out how to active the EEF view.

Do you have any idea?

Regards,

Xavier
Re: [EEF] How to programmatically display a View? [message #735189 is a reply to message #735025] Tue, 11 October 2011 07:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Xavier,

Here's how we open the properties view for double click in the Sample
Ecore Editor.

public void mouseDoubleClick(MouseEvent event)
{
if (event.button == 1)
{
try
{

getEditorSite().getPage().showView("org.eclipse.ui.views.PropertySheet");
}
catch (PartInitException exception)
{
EcoreEditorPlugin.INSTANCE.log(exception);
}
}
}
});

On 10/10/2011 6:56 PM, Xavier Seignard wrote:
> Hello,
>
> I have a GMF/Obeo designer modeler and I use EEF for my property sheet.
> I would like to implement a listener on an EditPart of my diagram
> which will show an EEF view of my choice.
>
> I know how to catch the event on my diagram, but I can't figure out
> how to active the EEF view.
>
> Do you have any idea?
>
> Regards,
>
> Xavier
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EEF] How to programmatically display a View? [message #735219 is a reply to message #735189] Tue, 11 October 2011 09:35 Go to previous messageGo to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
Hello,
Thanks Ed, but in my case the property view is actually opened.

My problem is that when I click on an edit part of my diagram which is actually binded to nothing of the semantic model, but if someone click on that edit part I would like to display a particular EEF view (i.e the property sheet of a given model element) so that (s)he can edit it seamlessly.

Anyway, thanks for your advice it helped me to understand some useful stuff.

Regards,

Xavier
Re: [EEF] How to programmatically display a View? [message #735281 is a reply to message #735219] Tue, 11 October 2011 12:03 Go to previous messageGo to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
I tried to override the PropertiesEditionSection.resolveSemanticObject(Object object) as described here : http://eclipsercpdev.blogspot.com/2011/10/use-eclipse-eef-as-property-sheet-for.html in order to return the desired EObject when I click on my EditPart of the diagram.
But the view is not updated accordingly. Only the title is updated.

Any idea?

Regards,

Xavier
Re: [EEF] How to programmatically display a View? [message #735282 is a reply to message #735281] Tue, 11 October 2011 12:18 Go to previous messageGo to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
Sorry, my bad, it's the opposite : But the title of the view is not updated accordingly. Only the view is updated.
Re: [EEF] How to programmatically display a View? [message #736106 is a reply to message #735282] Thu, 13 October 2011 15:32 Go to previous messageGo to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
Hello?
Is the solution I implemented is the best way to do it?
I'm not sure because I had to code it with introspection in order not to introduce cyclic dependencies between edit plugin and diagramming one.

Any idea people?

Regards,

Xavier
Re: [EEF] How to programmatically display a View? [message #739254 is a reply to message #736106] Mon, 17 October 2011 09:03 Go to previous message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Hi Xavier,

It's a good way to do that. I don't understand why this cause a cyclic
dependency with your diagram plugin ?

--
Goulwen

Le 13/10/2011 17:32, Xavier Seignard a écrit :
> Hello?
> Is the solution I implemented is the best way to do it?
> I'm not sure because I had to code it with introspection in order not to
> introduce cyclic dependencies between edit plugin and diagramming one.
>
> Any idea people?
>
> Regards,
>
> Xavier
Previous Topic:[EEF] Use EEF to generate property sheet editor for Graphiti
Next Topic:Howto use xsd2Ecore so that the xmi-files can be validated with xsd?
Goto Forum:
  


Current Time: Tue Apr 23 10:26:49 GMT 2024

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

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

Back to the top