Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Databinding -> Eclipse version 3.2
EMF Databinding -> Eclipse version 3.2 [message #524536] Thu, 01 April 2010 10:17 Go to next message
Jan  is currently offline Jan Friend
Messages: 9
Registered: March 2010
Junior Member
Hi,

we have a application build up on a tree. Once you click on a node a special view opens as ContentView.
Now I have developed a prototype for EMF based Undo/Redo. In model it is alright, but we wants to "visualize" the Undo/Redo so that the user knows where the operation have been done. For example:

1. user clicks on node x -> ContentView x for node x opens
2. user make changes on ContentView x
3. user clicks to node y -> ContentView for Node y opens
4. user made undo -> node x should be activated ContentView for node x shuold be open, if tabs, he should go to the right tabs and mark the widget which links to the EMF attribute.

Sadly our tree nodes aren't EObjects. Our Tree-Nodes contains the corresponding EObject as Member. There we need a mapping between EObject and widget.
We thought we could use the EMF and Eclipse Databinding. The DataBindingContext would then collect all necessary informations.
The problem is, we use Eclipse 3.2 because we have to be compatible with an old Notes Client.
Eclipse Databinding seems to be available with Eclipse version 3.3 but the Plugins seems to be compatible with Eclipse 3.2.
To generate code we use EMF 2.3 but we could deliver the special EMF DataBinding Plugins from EMF 2.4.

I saw that EMF Databinding is available in EMF 2.4 and the Plugin org.eclipse.emf.databinding_1.0.0.v200806091234.jar has a dependency:
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)
",org.eclipse.emf.ecore;visibility:=reexport;bundle-version= "[2.4.0,3
.0.0)" ,org.eclipse.core.databinding;visibility:=reexport;bundle-ve rsi
on="[1.1.0,2.0.0)"

It seems that we have to use Eclipse 3.4 to use EMF DataBinding.
I tried to change the version-dependencies in the EMF Databinding plugin, but then I get Asserts.

Is it possible to use EMF and Eclipse DataBinding wit Eclipse 3.2?

Greetings
Jan
Re: EMF Databinding -> Eclipse version 3.2 [message #524593 is a reply to message #524536] Thu, 01 April 2010 14:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Jan,

I've not tried it with 2.3 so I have no idea whether or not it would
work. Note that Command's getAffectedObjects might provide what you need.


Jan wrote:
> Hi,
>
> we have a application build up on a tree. Once you click on a node a
> special view opens as ContentView.
> Now I have developed a prototype for EMF based Undo/Redo. In model it
> is alright, but we wants to "visualize" the Undo/Redo so that the user
> knows where the operation have been done. For example:
>
> 1. user clicks on node x -> ContentView x for node x opens
> 2. user make changes on ContentView x
> 3. user clicks to node y -> ContentView for Node y opens
> 4. user made undo -> node x should be activated ContentView for node x
> shuold be open, if tabs, he should go to the right tabs and mark the
> widget which links to the EMF attribute.
>
> Sadly our tree nodes aren't EObjects. Our Tree-Nodes contains the
> corresponding EObject as Member. There we need a mapping between
> EObject and widget. We thought we could use the EMF and Eclipse
> Databinding. The DataBindingContext would then collect all necessary
> informations.
> The problem is, we use Eclipse 3.2 because we have to be compatible
> with an old Notes Client. Eclipse Databinding seems to be available
> with Eclipse version 3.3 but the Plugins seems to be compatible with
> Eclipse 3.2. To generate code we use EMF 2.3 but we could deliver the
> special EMF DataBinding Plugins from EMF 2.4.
>
> I saw that EMF Databinding is available in EMF 2.4 and the Plugin
> org.eclipse.emf.databinding_1.0.0.v200806091234.jar has a dependency:
> Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)
> ",org.eclipse.emf.ecore;visibility:=reexport;bundle-version= "[2.4.0,3
> .0.0)" ,org.eclipse.core.databinding;visibility:=reexport;bundle-ve rsi
> on="[1.1.0,2.0.0)"
>
> It seems that we have to use Eclipse 3.4 to use EMF DataBinding.
> I tried to change the version-dependencies in the EMF Databinding
> plugin, but then I get Asserts.
>
> Is it possible to use EMF and Eclipse DataBinding wit Eclipse 3.2?
>
> Greetings
> Jan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Databinding -> Eclipse version 3.2 [message #524609 is a reply to message #524593] Thu, 01 April 2010 15:15 Go to previous message
Jan  is currently offline Jan Friend
Messages: 9
Registered: March 2010
Junior Member
Hi Ed,

yes I have seen it in the Editor, here getAffectedObjects will be used. But we don't have a connection between the SWT widget and the model. I have the objects with the changed attributes but I don't know in which widget the values were set.

What we have is a Frontend problem. We could manually made a mapping between SWT widget and model, but we hope that there is a better solution for this problem. With Databinding I have a connection between SWT widget and model. And I think I can ask the BindingContext which object element binds which SWT widget.

The problem is that the plugin org.eclipse.emf.databinding_1.0.0.v200806091234.jar needs Eclipse 3.4 (so it is in Manifest) but we have to work with Eclipse 3.2.

I have manually changed the version number of the Manifest and get following exception:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:160)


Greetings
Jan

[Updated on: Thu, 01 April 2010 15:24]

Report message to a moderator

Previous Topic:How to modify the model programmatically?
Next Topic:EMF for non-Java languages
Goto Forum:
  


Current Time: Fri Mar 29 06:56:06 GMT 2024

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

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

Back to the top