Home » Modeling » EMF » DAWN Codegen tutorial
|
Re: DAWN Codegen tutorial [message #782088 is a reply to message #781864] |
Mon, 23 January 2012 05:43 |
|
What happens if you start from scratch (new IDE, new workspace, empty target platform), import the p2 bookmarks from
http://download.eclipse.org/modeling/emf/cdo/drops/M20120120-0413/bookmarks.xml and install CDO/Dawn from
http://download.eclipse.org/modeling/emf/cdo/drops/M20120120-0413 ?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 22.01.2012 15:50, schrieb UmaShankarSubramani Mising name:
> I was following the DAWN Codegen Tutorial. I faced problem in installing GMFTooling. When I tried to install it, I
> got the following Details, I could not move further.
> Can anyone help me?
>
>
> Your original request has been modified.
> "Third-Party Components for GMF Runtime" will be ignored because a newer version is already installed. Cannot
> complete the install because of a conflicting dependency.
> Software being installed: Graphical Modeling Framework (Experimental) Tests 1.0.0.v20100421-2359-7A4Eo8s73533B5C179DL
> (org.eclipse.gmf.tests.experimental.feature.group 1.0.0.v20100421-2359-7A4Eo8s73533B5C179DL)
> Software currently installed: Graphical Modeling Framework (GMF) Runtime SDK
> 1.5.0.v20110607-1200-67N09E9QnChoWswz-3wf_rz0kQ8Y (org.eclipse.gmf.runtime.sdk.feature.group
> 1.5.0.v20110607-1200-67N09E9QnChoWswz-3wf_rz0kQ8Y)
> Only one of the following can be installed at once: Third-Party Components for GMF Runtime
> 1.5.0.v20110607-1200-7P8W6FHV2CYnrDgDtz-JNaw31221 (org.eclipse.gmf.runtime.thirdparty.feature.jar
> 1.5.0.v20110607-1200-7P8W6FHV2CYnrDgDtz-JNaw31221)
> Third-Party Components for GMF Runtime 1.5.0.v20101215-1202-7P8W6FHV2CYms9gAtyKPaw311A16
> (org.eclipse.gmf.runtime.thirdparty.feature.jar 1.5.0.v20101215-1202-7P8W6FHV2CYms9gAtyKPaw311A16)
> Cannot satisfy dependency:
> From: Graphical Modeling Framework (GMF) Runtime 1.5.0.v20110607-1200-7d9Q7HFYnmMEynz0X0qrbsDiK281
> (org.eclipse.gmf.feature.group 1.5.0.v20110607-1200-7d9Q7HFYnmMEynz0X0qrbsDiK281)
> To: org.eclipse.gmf.runtime.thirdparty.feature.group Cannot satisfy dependency:
> From: Graphical Modeling Framework (GMF) Runtime SDK 1.5.0.v20110607-1200-67N09E9QnChoWswz-3wf_rz0kQ8Y
> (org.eclipse.gmf.runtime.sdk.feature.group 1.5.0.v20110607-1200-67N09E9QnChoWswz-3wf_rz0kQ8Y)
> To: org.eclipse.gmf.feature.group Cannot satisfy dependency:
> From: Third-Party Components for GMF Runtime 1.5.0.v20101215-1202-7P8W6FHV2CYms9gAtyKPaw311A16
> (org.eclipse.gmf.runtime.thirdparty.feature.group 1.5.0.v20101215-1202-7P8W6FHV2CYms9gAtyKPaw311A16)
> To: org.eclipse.gmf.runtime.thirdparty.feature.jar Cannot satisfy dependency:
> From: Third-Party Components for GMF Runtime 1.5.0.v20110607-1200-7P8W6FHV2CYnrDgDtz-JNaw31221
> (org.eclipse.gmf.runtime.thirdparty.feature.group 1.5.0.v20110607-1200-7P8W6FHV2CYnrDgDtz-JNaw31221)
> To: org.eclipse.gmf.runtime.thirdparty.feature.jar Cannot satisfy dependency:
> From: GMF Experimental SDK 1.1.1.v20100421-2359-7A78EpF7RZHMqKpQtAYujy08Q9X7
> (org.eclipse.gmf.sdk.experimental.feature.group 1.1.1.v20100421-2359-7A78EpF7RZHMqKpQtAYujy08Q9X7)
> To: org.eclipse.gmf.runtime.thirdparty.feature.group [1.5.0.v20101215-1202-7P8W6FHV2CYms9gAtyKPaw311A16]
> Cannot satisfy dependency:
> From: Graphical Modeling Framework (Experimental) Tests 1.0.0.v20100421-2359-7A4Eo8s73533B5C179DL
> (org.eclipse.gmf.tests.experimental.feature.group 1.0.0.v20100421-2359-7A4Eo8s73533B5C179DL)
> To: org.eclipse.gmf.sdk.experimental.feature.group [1.0.0.qualifier,2.0.0)
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: DAWN Codegen tutorial [message #782384 is a reply to message #782284] |
Mon, 23 January 2012 16:28 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
I could not create any of the Dawn Editors. Even the wizards for editor creation cannot be opened:
This is from the runtime instance:
The selected wizard could not be started.
Plug-in "EMFProject.editor" was unable to instantiate class "EMFProject.presentation.DawnCollegeModelWizard".
java.lang.ArrayIndexOutOfBoundsException: 127
This is from the original instance:
org.eclipse.net4j.signal.RemoteException: java.lang.ArrayIndexOutOfBoundsException: 127
at org.eclipse.net4j.signal.RequestWithConfirmation.getRemoteException(RequestWithConfirmation.java:139)
at org.eclipse.net4j.signal.RequestWithConfirmation.setRemoteException(RequestWithConfirmation.java:128)
at org.eclipse.net4j.signal.SignalProtocol.handleRemoteException(SignalProtocol.java:446)
at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:63)
at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:55)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
at org.eclipse.net4j.signal.Indication.execute(Indication.java:49)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 127
at org.eclipse.net4j.util.io.ExtendedIOUtil.readEnum(ExtendedIOUtil.java:240)
at org.eclipse.net4j.util.io.ExtendedDataInputStream.readEnum(ExtendedDataInputStream.java:49)
at org.eclipse.net4j.util.io.ExtendedDataInput$Delegating.readEnum(ExtendedDataInput.java:143)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.OpenSessionIndication.indicating(OpenSessionIndication.java:84)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:84)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:90)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:63)
at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:63)
... 5 more
[Updated on: Mon, 23 January 2012 16:30] Report message to a moderator
|
|
| | |
Re: DAWN Codegen tutorial [message #782496 is a reply to message #782488] |
Mon, 23 January 2012 20:33 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Eike and Martin,
I would like to end this argument on problem with Ecore model, since it works for Acore model. If you find a solution to this in the future, please kindly let me know.
Now I am gonna work(or atleast give a try) to add additional fuctionality to this Acore editor. I would like to try to implement the locking and un-locking functionality by working on the generated org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn fragment. Because it is the mandatory feature in my thesis work. Could you please give me a small hint, how to start doing this?
Also an optional requirement is to synchronize every single changes(i.e To make all the client editors updated all the time). Is it possible with dawn? I guess, this piece is related to doing such task. But it doesn't!!!
dawnEditorSupport.getView().options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
I am sorry for troubling you both, everyday. But I have no one to question about CDO and DAWN. But I thank you both for your nice response.
[Updated on: Mon, 23 January 2012 21:14] Report message to a moderator
|
|
| |
Re: DAWN Codegen tutorial [message #782743 is a reply to message #782719] |
Tue, 24 January 2012 10:40 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Martin,
Thanks for your support. It is good to hear that there in an API which exists already. My thesis title is "Concurrent Modeling Support in Eclipse using CDO". For that, I have to atleast implement some plugins myself for supporting Concurrent modeling. But you have developed everything and I have no work to do. Even though I spent more than three months in learning CDO and DAWN, I have not written any code myself. So, I need to develop some functionalities myself, in order to get my thesis approved. Could you please tell how can I enhance DAWN by writing my own code??
About Synchronization: Consider two client DAWN editors A and B sharing a same model. In order to make the changes made in A reflected in B, we should save A right? Otherwise, B will not reflect the changes made in A. So, B should be updated automatically whithout a need to save A. How can I do it in DAWN?
Okay, you developed an API for LockObject, but I cannot see that action in the DAWNEditor. The action is not made visible yet?
[Updated on: Tue, 24 January 2012 10:41] Report message to a moderator
|
|
|
Re: DAWN Codegen tutorial [message #782936 is a reply to message #782743] |
Tue, 24 January 2012 19:08 |
Martin Fluegge Messages: 141 Registered: July 2009 |
Senior Member |
|
|
Am 24.01.2012 11:40, schrieb UmaShankarSubramani Mising name:
> Hi Martin,
> Thanks for your support. It is good to hear that there in an API
> which exists already. My thesis title is "Concurrent Modeling Support
> in Eclipse using CDO". For that, I have to atleast implement some
> plugins myself for supporting Concurrent modeling. But you have
> developed everything and I have no work to do.
I am really sorry ;)
> Even though I spent more
> than three months in learning DO and DAWN, I have not written any code
> myself. So, I need to develop some functionalities myself, in order to
> get my thesis approved. Could you please tell how can I enhance DAWN by
> writing my own code??
Well, although the API is there, it does not mean that everything works
fine. You can lock/unlock element, but currently the UI does not prevent
local modification. E.g. you can change the attributes of an locked
object. But you cannot commit this change.
You could try implementing some functionality which prevents local
changes on locked objects. But that is not trivial.
>
> About Synchronization: Consider two client DAWN editors A and B
> sharing a same model. In order to make the changes made in A reflected
> in B, we should save A right? Otherwise, B will not reflect the changes
> made in A. So, B should be updated automatically whithout a need to
> save A. How can I do it in DAWN?
CDO has listeners to trigger modifications. Currently only an event is
fired when an object is changed. What you want is to reacted after an
object has changed. Have a look at DawnGMFHandler.modifyingObject() how
it is solved there. If you can react on these events you perform a
commit on the resource and changes should be reflected on every change.
This is one way, but not the best as e.g moving a node performs several
changes.
I think it is better to listen to the command stack of the editing
domain and perform a commit on certain commands.
Which way the better is certainly depends on your use case.
>
> Okay, you developed an API for LockObject, but I cannot see that
> action in the DAWNEditor. The action is not made visible yet?
Is should be there, if you are using Dawn 2.0. Check the context menu in
the editor pane. It is close to the locking sub-menu.
|
|
| | |
Re: DAWN Codegen tutorial [message #783652 is a reply to message #782743] |
Thu, 26 January 2012 07:12 |
|
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Am 24.01.2012 11:40, schrieb UmaShankarSubramani Mising name:
<blockquote cite="mid:jfm1r8$4k9$1@news.eclipse.org" type="cite">Hi
Martin,
<br>
Thanks for your support. It is good to hear that there in an
API which exists already. My thesis title is "Concurrent Modeling
Support in Eclipse using CDO". For that, I have to atleast
implement some plugins myself for supporting Concurrent modeling.
But you have developed everything and I have no work to do. </blockquote>
We take that as a compliment ;-)<br>
<br>
<blockquote cite="mid:jfm1r8$4k9$1@news.eclipse.org" type="cite">Even
though I spent more than three months in learning DO and DAWN, </blockquote>
That's surprising. Most people I've talked to had their first
repository and application up and running after one day.<br>
<br>
Maybe you should write a public tutorial in a way that you find
suitable so that it can help the next visitors.<br>
<br>
<blockquote cite="mid:jfm1r8$4k9$1@news.eclipse.org" type="cite">I
have not written any code myself. So, I need to develop some
functionalities myself, in order to get my thesis approved. Could
you please tell how can I enhance DAWN by writing my own code??
<br>
</blockquote>
As you've found out CDO already covers a lot of what's needed for
collaborative modeling. There are lots of open feature requests,
though:<br>
<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&product=EMF&component=cdo.core&component=cdo.dawn&component=cdo.db&component=cdo.docs&component=cdo.hibernate&component=cdo.net4j&component=cdo.net4j.db&component=cdo.net4j.ui&component=cdo.objy&component=cdo.releng&component=cdo.ui&version=4.1&long_desc_type=allwordssubstr&long_desc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_severity=enhancement&ref_platform=All&order=Importance">https://bugs.eclipse.org/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&product=EMF&component=cdo.core&component=cdo.dawn&component=cdo.db&component=cdo.docs&component=cdo.hibernate&component=cdo.net4j&component=cdo.net4j.db&component=cdo.net4j.ui&component=cdo.objy&component=cdo.releng&
amp;component=cdo.ui&version=4.1&long_desc_type=allwordssubstr&long_desc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_severity=enhancement&ref_platform=All&order=Importance</a><br>
<br>
<blockquote cite="mid:jfm1r8$4k9$1@news.eclipse.org" type="cite">
<br>
About Synchronization: Consider two client DAWN editors A and
B sharing a same model. In order to make the changes made in A
reflected in B, we should save A right? Otherwise, B will not
reflect the changes made in A. So, B should be updated
automatically whithout a need to save A. How can I do it in DAWN?
<br>
</blockquote>
That's not a declared intent of CDO. Collaboration happens *on* the
persisted state, so committing local changes is a natural and
accepted precondition for them to appear elsewhere. You could
simulate your workflow by automatically saving smaller changes. With
the CDOPostEventTransactionHandler that I've just committed to CDO
4.1 it becomes as easy as this:<br>
<br>
<title></title>
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = -->
<!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3"
cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code>
<font color="#ffffff"> </font><font color="#000000">transaction.addTransactionHandler</font><font
color="#000000">(</font><font color="#7f0055"><b>new </b></font><font
color="#000000">CDOPostEventTransactionHandler.Default</font><font
color="#000000">()</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font color="#646464">@Override</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>public </b></font><font
color="#7f0055"><b>void </b></font><font
color="#000000">modifiedObject</font><font
color="#000000">(</font><font color="#000000">CDOTransaction transaction, CDOObject object, Notification msg</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>try</b></font><br>
<font color="#ffffff"> </font><font
color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#000000">transaction.commit</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font
color="#000000">}</font><br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>catch </b></font><font
color="#000000">(</font><font color="#000000">CommitException ex</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font
color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#000000">ex.printStackTrace</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font
color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">})</font><font
color="#000000">;</font></code> </td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== -->
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<br>
See also bug 312186: Support post event handling for
CDOTransactionHandler<br>
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312186">https://bugs.eclipse.org/bugs/show_bug.cgi?id=312186</a><br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
</body>
</html>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: DAWN Codegen tutorial [message #783771 is a reply to message #782936] |
Thu, 26 January 2012 12:31 |
|
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Am 24.01.2012 20:08, schrieb Martin Flügge:
<blockquote cite="mid:jfmvjg$oi$1@news.eclipse.org" type="cite">
You could try implementing some functionality which prevents local
changes on locked objects. But that is not trivial.
</blockquote>
Well, it's not complicated, either:<br>
<br>
<title></title>
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = -->
<!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3"
cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code>
<font color="#ffffff"> </font><font color="#000000">transaction.addTransactionHandler</font><font
color="#000000">(</font><font color="#7f0055"><b>new </b></font><font
color="#000000">CDODefaultTransactionHandler1</font><font
color="#000000">()</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font color="#646464">@Override</font><br>
<font color="#ffffff"> </font><font color="#7f0055"><b>public </b></font><font
color="#7f0055"><b>void </b></font><font
color="#000000">modifyingObject</font><font
color="#000000">(</font><font color="#000000">CDOTransaction transaction, CDOObject object, CDOFeatureDelta featureChange</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>try</b></font><br>
<font color="#ffffff"> </font><font
color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#000000">object.cdoWriteLock</font><font
color="#000000">()</font><font color="#000000">.lock</font><font
color="#000000">(</font><font color="#990000">100L</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font
color="#000000">}</font><br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>catch </b></font><font
color="#000000">(</font><font color="#000000">Exception ex</font><font
color="#000000">)</font><br>
<font color="#ffffff"> </font><font
color="#000000">{</font><br>
<font color="#ffffff"> </font><font
color="#000000">MessageBox messageBox = </font><font
color="#7f0055"><b>new </b></font><font
color="#000000">MessageBox</font><font color="#000000">(</font><font
color="#000000">getShell</font><font color="#000000">())</font><font
color="#000000">;</font><br>
<font color="#ffffff"> </font><font
color="#000000">messageBox.setMessage</font><font
color="#000000">(</font><font color="#2a00ff">"Could not lock " </font><font
color="#000000">+ object</font><font color="#000000">)</font><font
color="#000000">;</font><br>
<font color="#ffffff"> </font><font
color="#000000">messageBox.open</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<br>
<font color="#ffffff"> </font><font
color="#7f0055"><b>throw </b></font><font
color="#000000">WrappedException.wrap</font><font
color="#000000">(</font><font color="#000000">ex</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"> </font><font
color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">}</font><br>
<font color="#ffffff"> </font><font color="#000000">})</font><font
color="#000000">;</font></code> </td>
<!-- end source code --> </tr>
</tbody>
</table>
</div>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== --> <br>
<blockquote cite="mid:jfmvjg$oi$1@news.eclipse.org" type="cite">
<pre wrap="">CDO has listeners to trigger modifications. Currently only an event is
fired when an object is changed. What you want is to reacted after an
object has changed. </pre>
</blockquote>
Martin, I've finally committed our CDOPostEventTransactionHandler
implementation.<br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
</body>
</html>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: DAWN Codegen tutorial [message #783902 is a reply to message #783898] |
Thu, 26 January 2012 17:35 |
|
Am 26.01.2012 18:22, schrieb Martin Flügge:
> Am 26.01.2012 13:31, schrieb Eike Stepper:
>> Am 24.01.2012 20:08, schrieb Martin Flügge:
>>> You could try implementing some functionality which prevents local changes on
>>> locked objects. But that is not trivial.
>> Well, it's not complicated, either:
>>
>> |transaction.addTransactionHandler(*new *CDODefaultTransactionHandler1()
>> {
>> @Override
>> *public **void
>> *modifyingObject(CDOTransaction transaction, CDOObject object, CDOFeatureDelta featureChange)
>> {
>> *try*
>> {
>> object.cdoWriteLock().lock(100L);
>> }
>> *catch *(Exception ex)
>> {
>> MessageBox messageBox = *new *MessageBox(getShell());
>> messageBox.setMessage("Could not lock " + object);
>> messageBox.open();
>>
>> *throw *WrappedException.wrap(ex);
>> }
>> }
>> });|
>
> Nice idea, but I do not think that this will work with legacy objects as
> all CDO handling is done after the objects has changed. E.g. for the GMF
> notational objects this results in nodes that can be moved or similar.
You're right. That we'd need this zilla for:
247130: Provide vetoable notification for read and write access
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247130
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | |
Re: DAWN Codegen tutorial [message #788459 is a reply to message #787522] |
Wed, 01 February 2012 21:05 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
HI Eike and Martin,
I have created the CDO workspace successfully. But, I don't know how to work with this created CDO Workspace. I have not worked with Buckminster before.
Could you please give me some tips regarding how to work with this? I could see the Component Explorer View, where
all the Workspace Components and Target Platform Components are Displayed. But, I could not see the source code of
these components. I also see that the runtime-instance does not have CDO/DAWN. If I want to see how DAWN 2.0 works,
How can I do it? Could you please help?
[Updated on: Wed, 01 February 2012 21:08] Report message to a moderator
|
|
| |
Re: DAWN Codegen tutorial [message #790484 is a reply to message #789265] |
Sat, 04 February 2012 10:04 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Martin,
Yes. It happend when I was trying to materialize the workspace. But I can launch the workspace without any problem. I just need to know,how to use this workspace. If I want to use CDO/DAW from this workspace, how can I do it. I see that this workspace does not have CDO/DAWN support.
Could you please help?
[Updated on: Sat, 04 February 2012 10:12] Report message to a moderator
|
|
| |
Re: DAWN Codegen tutorial [message #791551 is a reply to message #791062] |
Mon, 06 February 2012 01:03 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Martin,
>The screenshot you attached some posts before showed an empty workspace.
>This means that you do not have the source correctly materialized. So
>you do not have the sources.
Okay. But I could see some sources in the Component Explorer view. What are they?
>If materializing fails you actually should not be able to start a
>runtime instance as it is likely that your target platform is not
>installed properly and the CDO/Dawn source will not compile. Did you set
>the target platform correctly? May you forgot this step.
I set the target platform as mentioned in the tutorial.
During Installation, in Eclipse 3.8 the detail of the installation error is given below:
Plug-in "org.eclipse.buckminster.pde" was unable to instantiate class "org.eclipse.buckminster.pde.internal.PDETargetPlatform".
org/eclipse/pde/internal/core/target/provisional/ITargetHandle
and there is not components shown in the Component Explorer View "No Components Found"
In Eclipse 3.7 I got some error related to "Heap Space" but there are components displayed in the Component Explorer View
[Updated on: Mon, 06 February 2012 15:57] Report message to a moderator
|
|
| | |
Re: DAWN Codegen tutorial [message #935887 is a reply to message #900316] |
Sun, 07 October 2012 12:29 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Eike and Martin,
I made the DawnAcoreEditor synchronous(which is discussed in this post). What I did is, I just modified the DawnAcoreEditor class.
So that, the method "setInputWithNotify" now looks like the following:
@Override
protected void setInputWithNotify(IEditorInput input)
{
super.setInput(input);
if (input instanceof DawnEditorInput)
{
CDOResource resource = ((DawnEditorInput)input).getResource();
URI uri = URI.createURI(((DawnEditorInput)input).getURI().toString());
if (resource == null || resource.cdoView() == null)
{
ResourceSet resourceSet = getEditingDomain().getResourceSet();
final CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet,
uri.toString());
resource = (CDOResource)resourceSet.getResource(uri, true);
if (resource == null || resource.cdoView() == null)
{
resource = transaction.getOrCreateResource(uri.toString());
}
transaction.options().setStaleReferencePolicy(CDOStaleReferencePolicy.PROXY);
transaction.options().setInvalidationPolicy(CDOInvalidationPolicy.RELAXED);
transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
transaction.addTransactionHandler(new CDOPostEventTransactionHandler.Default()
{
@Override
protected void modifiedObject(CDOTransaction tx, CDOObject object, Notification msg)
{
try
{
transaction.commit();
}
catch (Exception e)
{
System.out.println("Commit problem. Conflicts: " + transaction.getConflicts()); //$NON-NLS-1$
transaction.rollback();
}
}
});
}
((DawnEditorInput)input).setResource(resource);
dawnEditorSupport.setView(((DawnEditorInput)input).getView());
dawnEditorSupport.registerListeners();
// dawnEditorSupport.refresh();
}
}
It works fine as expected. But I need to do the same for "DawnAcoreDiagramEditor".
But, in this Editor, the metod "setInputWithNotify" does not exist. So I created
a new method with the same name. But it does not work synchronous now. How do I
do it?
|
|
|
Goto Forum:
Current Time: Fri Apr 19 14:54:44 GMT 2024
Powered by FUDForum. Page generated in 0.03843 seconds
|