Skip to main content



      Home
Home » Eclipse Projects » Sirius » Is it possible to use Sirius-EEF propertiesview from simple TreeView Editor
Is it possible to use Sirius-EEF propertiesview from simple TreeView Editor [message #1747088] Wed, 09 November 2016 05:09 Go to next message
Eclipse UserFriend
Hello

In my project I use old EEF property view (1.5) when browsing with "classical" treeview editor.

Now with Sirius in the project , I want to be able to open new-EEF property View (1.7) managed by Sirius (4.1.1) from this "classical" treeview editor (not generated with Sirius)

Is it possible ?

It seems to be necessary to get an IEEFTabbedPropertySheetPageContributor from Sirius part , but I don't known how to get it ?

Re: Is it possible to use Sirius-EEF propertiesview from simple TreeView Editor [message #1747151 is a reply to message #1747088] Thu, 10 November 2016 04:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi.

If by "classical treeview editor" you mean a non-Sirius Eclipse editor, you can use the EEF 1.7 runtime directly, but by definition Sirius will not be involved anywhere, as there would be no Sirius session, no VSM to look for properties definitions, associated to that editor etc.

Sirius does have support for tree editor, so if you already use Sirius in your project, and depending on the features of your tree editor, the simplest may be to replace your custom editor with an equivalent Sirius-based tree editor. In that case, the new properties views would work directly.

If you want to use EEF 1.7-based properties views in your own non-Sirius editor, you'll have to reimplement the same kind of logic as Sirius does, i.e. implement a org.eclipse.eef.properties.ui.api.IEEFTabDescriptorProvider (among others). Basically, given an element selected in your editor, you have to provide EEF with a model of the property sheets you want it to display, and callback defining how to change the model when the user interacts with the widgets. Sirius does it by interpreting what the specifier declared in the Sirius VSM (or the default embedded rules, which are just an implicit VSM). It's possible to do something equivalent by yourself (we've already done it on client projects), but you will not be able to rely on anything from Sirius.

Regards,
Pierre-Charles David

--
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is it possible to use Sirius-EEF propertiesview from simple TreeView Editor [message #1747167 is a reply to message #1747151] Thu, 10 November 2016 07:32 Go to previous messageGo to next message
Eclipse UserFriend
To be sure I understand, I will explain what I do :

In my plugins in eclipse today : if I click on an object, it opens an EEF 1.5 property view. This is right If the object is in a classical tree editor or in a Sirius diagram or Sirius tree view.... (for Sirius I think we have force the usage of EEF 1.5).

=> It's coherent for user

So I can't reproduce this coherence simply with EEF 1.7


Re: Is it possible to use Sirius-EEF propertiesview from simple TreeView Editor [message #1747409 is a reply to message #1747167] Mon, 14 November 2016 06:18 Go to previous message
Eclipse UserFriend
It's possible to achieve, but not "simply".

I'll try to explain how the different pieces work together to answer your question. Sorry if you already know most of this, but it'll probably be quicker to be complete once and avoid back-and-forths.

EEF 1.5 and EEF 1.7 are completely different beasts, with different codebases. They can actually be installed and used together (they don't share the same namespace).

EEF 1.5 uses a static code generation approach, and produces property sheets which integrate with the org.eclipse.ui.views.properties.tabbed plug-in/framework.

EEF 1.7 provides several things:
* an alternative to org.eclipse.ui.views.properties.tabbed which supports much more dynamic use cases (where property sheets are not necessarily declared statically in plugin.xml files);
* a compatibility mode which understands property sheets designed for org.eclipse.ui.views.properties.tabbed and integrates them transparently (these could be generated by EEF 1.5, or not);
* a metamodel to describe dynamic property sheets and their widgets. There is no UI to configure this, it is purely Java API.

EEF 1.7 does not depend on Sirius, but Sirius provides a UI (via its .odesign file editors) to author property sheets configurations and the runtime code to associate these to Sirius editors (i.e. feed the EEF 1.7 runtime with the corresponding property sheets configuration model).

Each editor is responsible for the actual implementation used for its property sheets. If your editor uses org.eclipse.ui.views.properties.tabbed directly (which is probably the case), it can only use statically defined property sheets which target that framework (including EEF 1.5 ones). You can modify your editor to use EEF 1.7 as its implementation, and it will still show the statically defined sheets (thanks to the compatibility mode). It will also now be able to support more dynamic ones too. However you will have to explicitly provide the EEF 1.7 runtime with a description of theses (an instance of the EEF 1.7 configuration metamodel) programatically. But there is no magic, if your editor is not a Sirius editor, the property sheets configurations defined in Sirius .odesign files will not be taken into account. In that case (a non-Sirius editor), no Sirius code at all is involved when your editor displays its property sheets.

Regards,
Pierre-Charles David

--
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:bundle 'org.eclipse.sirius.sample.basicfamily' cannot be resolved
Next Topic:Validate diagram and retrieve validation result
Goto Forum:
  


Current Time: Sat Nov 08 22:30:00 EST 2025

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

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

Back to the top