|
|
|
Re: EMF Forms notification in e4 [message #1705015 is a reply to message #1705003] |
Tue, 11 August 2015 12:43 |
Alexander Zavodnikov Messages: 14 Registered: August 2015 |
Junior Member |
|
|
Many thanks for pointing, Jonas!
Are you talking about ECPObservers?
I downloaded the latest Eclipse Modeling Package. It includes EMF Forms which is based on ECP (or it is not?) and there are no ECPObserver classes. So I tought it is deprecated stuff...
What bundle does provide the classes?
Or do you mean something different?
Anyway, please provide a line of code demonstrating how to subscribe for those events.
Best regards
Alexander
[Updated on: Tue, 11 August 2015 12:46] Report message to a moderator
|
|
|
Re: EMF Forms notification in e4 [message #1705027 is a reply to message #1705015] |
Tue, 11 August 2015 13:55 |
Alexander Zavodnikov Messages: 14 Registered: August 2015 |
Junior Member |
|
|
I found the bundle and added following code at the bottom of ModelEditor.init(IEditorSite, IEditorInput):
ECPUtil.getECPObserverBus().register(new ECPProjectContentChangedObserver() {
@Override
public Collection<Object> objectsChanged(ECPProject project, Collection<Object> objects) {
return null;
}
});
The registering works, the observer goes into the map of ECPObserverBus.
But the callback method gets never called if I change the model .
No errors or warnings... do I miss something?
[Updated on: Tue, 11 August 2015 16:19] Report message to a moderator
|
|
|
|
|
|
Re: EMF Forms notification in e4 [message #1708931 is a reply to message #1705242] |
Tue, 22 September 2015 14:29 |
Alexander Zavodnikov Messages: 14 Registered: August 2015 |
Junior Member |
|
|
You suggest to use some undocumented things (maybe they're experimental and disappear in next minor release). I don't think developers having to deliver reliable solutions go this way.
...anyway, setting adapter on each and every object is sappy for large object graphs, which are not uncommon for industry-level applications.
Anybody another suggestion?
[Updated on: Tue, 22 September 2015 18:58] Report message to a moderator
|
|
|
Re: EMF Forms notification in e4 [message #1709015 is a reply to message #1708931] |
Wed, 23 September 2015 10:14 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi Alexander,
You had a question about EMF notifications initially and about a good
way of dealing with them. So if you want to listen to all changes in a
model instance, you can use a EContentAdapter (provided by EMF). An
alternative would be the ChangeBroker I mentioned. The broker uses the
EContentAdapter to retrieve notifications internally anyways, so it is
basically just another more comfortable API to do the same thing. As an
example, it allows for filtering the event you want to be notified about
already during the registration.
As I also mentioned, the Changebroker is not yet part of the EMF Client
Platform SDK, so we do not consider this to be a core feature yet. That
is why we did not blog about it yet. As I also mentioned, I will
probably blog about it soon as part of introducing the 1.7.0 release,
but I do not have a defined date for that blog post, yet.
You answer sounds pretty angry. Insulting people, who work on a
framework that you might use completely for free and being angry at
people who try to help you in a support forum without charging for that
does usually not help you getting better support. Sorry to say that so
clear.
If you need guaranteed support with defined response times, you need to
get professional support. If you need a new feature to be available in a
certain release, you should consider sponsored development. We and most
other companies active in this forum offer this as a service.
As you might have noticed, you also get help, if you do not pay for
that, as for example all questions in this forum are usually answered
within a single day. Also most committer teams fix critical bugs without
charging for that and even develop new features. However, that is really
on a voluntary basis.
I hope I could help.
Best regards
Jonas
Am 22.09.2015 um 16:29 schrieb Alexander Zavodnikov:
> ..nothing - no blog and no other docs.. are you dammin serious?
> What is your hope regarding user acceptance for EMF Forms? You suggest
> to use some undocumented, maybe experimental things, which may
> disappear in next minor release...
> Do you really think that developers, which have do deliver reliable
> solutions go this way? ...laughable
--
--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Re: EMF Forms notification in e4 [message #1709020 is a reply to message #1709015] |
Wed, 23 September 2015 11:16 |
Alexander Zavodnikov Messages: 14 Registered: August 2015 |
Junior Member |
|
|
...thanks for answering
I noticed well, that it's all for free... but there are other frameworks for free, too. And somehow they do most things better. Again, it's only my opinion. Please don't take my negativity into account, It's my own problem... and for the record: up to now i donated 30€ to Eclipse, so I am not that kind of people...
...the solution is simple:
private AdapterImpl changeListener = new AdapterImpl() {
@Override
public void notifyChanged(final Notification msg) {
// react on changes
}
};
private void addChangeListener(EObject eObj) {
eObj.eAdapters().add(changeListener);
for (EObject e : eObj.eContents()) {
addChangeListener(e);
}
}
then you can do:
[Updated on: Sat, 26 September 2015 16:06] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04872 seconds