[CDO dadabinding] possible to observe eContainer? [message #523851] |
Mon, 29 March 2010 15:37 |
Eclipse User |
|
|
|
Originally posted by: Thomas.Kowatsch.ruag.com
Hi.
Is it possible to bind against the container of an object?
I have an CDOObject on which I want to get notified when the object's
container changes. The container can be of arbitrary type (well a
CDOObject at least).
Is it at all possible to observe the EObject.eContainer (or
CDOObject.eContainer)?
Cheers.
--Thomas
|
|
|
Re: [CDO dadabinding] possible to observe eContainer? [message #523863 is a reply to message #523851] |
Mon, 29 March 2010 16:07 |
|
This is a multi-part message in MIME format.
--------------080905080608060903080704
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Hi Thomas,
In pure EMF it is generally not possible because the eContainer is not a
regular EStructuralFeature. But in CDO we provide container deltas as:
|*public interface *CDOContainerFeatureDelta *extends *CDOFeatureDelta
{
*public static final *EStructuralFeature CONTAINER_FEATURE = *new
*org.eclipse.emf.cdo.internal.common.revision.delta.CDOConta inerFeatureDeltaImpl.ContainerFeature();
*public *CDOID getResourceID();
*public *Object getContainerID();
*public **int *getContainerFeatureID();
}|
You can access it via:
|*public interface *CDODeltaNotification *extends *CDONotification
{
*public **boolean *hasNext();
*public *CDORevisionDelta getRevisionDelta();
}|
If you only need it for local modifications as they happen, you can also
access them via:
org.eclipse.emf.cdo.transaction.CDOTransactionHandler.modify ingObject(CDOTransaction,
CDOObject, CDOFeatureDelta)
Does that help?
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 29.03.2010 17:37, schrieb Thomas Kowatsch:
> Hi.
> Is it possible to bind against the container of an object?
> I have an CDOObject on which I want to get notified when the object's
> container changes. The container can be of arbitrary type (well a
> CDOObject at least).
> Is it at all possible to observe the EObject.eContainer (or
> CDOObject.eContainer)?
> Cheers.
> --Thomas
--------------080905080608060903080704
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Thomas,<br>
<br>
In pure EMF it is generally not possible because the eContainer is not
a regular EStructuralFeature. But in CDO we provide container deltas as:<br>
<br>
<title></title>
<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=ISO-8859-15">
<!-- ======================================================== -->
<!-- = 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="#7f0055"><b>public
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO dadabinding] possible to observe eContainer? [message #523867 is a reply to message #523863] |
Mon, 29 March 2010 16:26 |
Eclipse User |
|
|
|
Originally posted by: Thomas.Kowatsch.ruag.com
Hi Eike.
That explains a bit how it's handled and the possibility to check for it
in CDO.
But unfortunatley doesn't help with my databinding problem as I would
need an EMF feature to observe, i.e. EMFProperties.value(theFeature).
Maybe it's a problem how it's modeled in the ECore model. I have to
think about that...
Cheers.
--Thomas
Eike Stepper schrieb:
> Hi Thomas,
>
> In pure EMF it is generally not possible because the eContainer is not a
> regular EStructuralFeature. But in CDO we provide container deltas as:
>
> |*public interface *CDOContainerFeatureDelta *extends *CDOFeatureDelta
> {
>
> *public static final *EStructuralFeature CONTAINER_FEATURE = *new *org.eclipse.emf.cdo.internal.common.revision.delta.CDOConta inerFeatureDeltaImpl.ContainerFeature();
>
> *public *CDOID getResourceID();
> *public *Object getContainerID();
> *public **int *getContainerFeatureID();
> }|
>
>
> You can access it via:
>
> |*public interface *CDODeltaNotification *extends *CDONotification
> {
> *public **boolean *hasNext();
> *public *CDORevisionDelta getRevisionDelta();
> }|
>
>
> If you only need it for local modifications as they happen, you can also
> access them via:
>
>
> org.eclipse.emf.cdo.transaction.CDOTransactionHandler.modify ingObject(CDOTransaction,
> CDOObject, CDOFeatureDelta)
>
> Does that help?
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
> Am 29.03.2010 17:37, schrieb Thomas Kowatsch:
>> Hi.
>> Is it possible to bind against the container of an object?
>> I have an CDOObject on which I want to get notified when the object's
>> container changes. The container can be of arbitrary type (well a
>> CDOObject at least).
>> Is it at all possible to observe the EObject.eContainer (or
>> CDOObject.eContainer)?
>> Cheers.
>> --Thomas
|
|
|
|
Powered by
FUDForum. Page generated in 0.04466 seconds