Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Client Platform] ViewModel adding children references
[EMF Client Platform] ViewModel adding children references [message #1177407] Sat, 09 November 2013 00:17 Go to next message
Eclipse UserFriend
With the ViewModel I would like to consolidate controls for an elements
children in the Editor for the parent element. I see this is possible
for 0..1 and 1..1 references and have experimented with it by adding
controls for children inside of layouts and groups.



Read the 'How to customize the editor layout' article but still have
many questions about how to use some of the models elements like the
Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add x..n
references?

thanks for any help,
John
Re: [EMF Client Platform] ViewModel adding children references [message #1180925 is a reply to message #1177407] Mon, 11 November 2013 08:46 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi John,
as it happens, I am currently working on a more detailed tutorial. I
hope I will be able to publish the first version of it today. I hope it
answers most of your questions. I will post a link as soon as it is
published.

Best Regards

Jonas

Am 09.11.2013 01:17, schrieb John E. Conlon:
> With the ViewModel I would like to consolidate controls for an elements
> children in the Editor for the parent element. I see this is possible
> for 0..1 and 1..1 references and have experimented with it by adding
> controls for children inside of layouts and groups.
>
>
>
> Read the 'How to customize the editor layout' article but still have
> many questions about how to use some of the models elements like the
> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add x..n
> references?
>
> thanks for any help,
> John
>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1181471 is a reply to message #1180925] Mon, 11 November 2013 16:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas,

Just what I was hoping for.

thanks for all your fine work,

John

On 11/11/2013 02:46 AM, Jonas Helming wrote:
> Hi John,
> as it happens, I am currently working on a more detailed tutorial. I
> hope I will be able to publish the first version of it today. I hope it
> answers most of your questions. I will post a link as soon as it is
> published.
>
> Best Regards
>
> Jonas
>
> Am 09.11.2013 01:17, schrieb John E. Conlon:
>> With the ViewModel I would like to consolidate controls for an elements
>> children in the Editor for the parent element. I see this is possible
>> for 0..1 and 1..1 references and have experimented with it by adding
>> controls for children inside of layouts and groups.
>>
>>
>>
>> Read the 'How to customize the editor layout' article but still have
>> many questions about how to use some of the models elements like the
>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add x..n
>> references?
>>
>> thanks for any help,
>> John
>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1181519 is a reply to message #1181471] Mon, 11 November 2013 16:57 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
While still writing on the tutorial, one question:
You mentioned x..n references, could you explain me a little bit more in
detail, what you want to do?

Best Regards

Jonas

Am 11.11.2013 17:21, schrieb John E. Conlon:
> Hi Jonas,
>
> Just what I was hoping for.
>
> thanks for all your fine work,
>
> John
>
> On 11/11/2013 02:46 AM, Jonas Helming wrote:
>> Hi John,
>> as it happens, I am currently working on a more detailed tutorial. I
>> hope I will be able to publish the first version of it today. I hope it
>> answers most of your questions. I will post a link as soon as it is
>> published.
>>
>> Best Regards
>>
>> Jonas
>>
>> Am 09.11.2013 01:17, schrieb John E. Conlon:
>>> With the ViewModel I would like to consolidate controls for an elements
>>> children in the Editor for the parent element. I see this is possible
>>> for 0..1 and 1..1 references and have experimented with it by adding
>>> controls for children inside of layouts and groups.
>>>
>>>
>>>
>>> Read the 'How to customize the editor layout' article but still have
>>> many questions about how to use some of the models elements like the
>>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add x..n
>>> references?
>>>
>>> thanks for any help,
>>> John
>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1181611 is a reply to message #1181519] Mon, 11 November 2013 18:17 Go to previous messageGo to next message
Eclipse UserFriend
As an example I have an EObject named Premises that has a couple of
attributes name and id. The premises contains an EReference named
Address (1..1) that has attributes and may contain (0..1) a GeoPoint
with lat/long attributes. The Premises contains one or more people
EReferences that may contain a phone number. The Premises may also
contain one or more Program Status (0..*).

When the Premises is selected I would like the editor to show all its
children references. Now I am not clear on how that will work in the
for the child portion of the UI if there are no children. (I suspect
this is where the logic 'ShowRule' comes in?) How are multiple children
modeled in the UI with the TableControl??

Also not clear if the Editor UI on its own can create or delete children
or does one explicitly have to use the Model Explorer for creation and
deletion?

Also the question comes up regarding modeling an EObject in a ModelView
and how the Editor reacts if that modeled EObject is a child of another
EObject that is modeled and referencing the first modeled EObject. In
other words if I create a ViewModel for an EObject do I have to recreate
the same modeled portion of that child EObject if I want to see it
contained in parent?

best regards,
John


On 11/11/2013 10:57 AM, Jonas Helming wrote:
> While still writing on the tutorial, one question:
> You mentioned x..n references, could you explain me a little bit more in
> detail, what you want to do?
>
> Best Regards
>
> Jonas
>
> Am 11.11.2013 17:21, schrieb John E. Conlon:
>> Hi Jonas,
>>
>> Just what I was hoping for.
>>
>> thanks for all your fine work,
>>
>> John
>>
>> On 11/11/2013 02:46 AM, Jonas Helming wrote:
>>> Hi John,
>>> as it happens, I am currently working on a more detailed tutorial. I
>>> hope I will be able to publish the first version of it today. I hope it
>>> answers most of your questions. I will post a link as soon as it is
>>> published.
>>>
>>> Best Regards
>>>
>>> Jonas
>>>
>>> Am 09.11.2013 01:17, schrieb John E. Conlon:
>>>> With the ViewModel I would like to consolidate controls for an elements
>>>> children in the Editor for the parent element. I see this is possible
>>>> for 0..1 and 1..1 references and have experimented with it by adding
>>>> controls for children inside of layouts and groups.
>>>>
>>>>
>>>>
>>>> Read the 'How to customize the editor layout' article but still have
>>>> many questions about how to use some of the models elements like the
>>>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add x..n
>>>> references?
>>>>
>>>> thanks for any help,
>>>> John
>>>>
>>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1182876 is a reply to message #1181611] Tue, 12 November 2013 13:27 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

from an ECP point of view, containment attributes are typically handled
differently depending on their multiplicity.

References with a mutliplicity of more then 1 are per default displayed
in a list of hyperlinks. Alternativly, you can specify a table control
to display the children "inline". I have documented this:

http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#tablecontrol

For 0..1 references, ECP currently assumes, that the attributes of the
referenced object logically belongs to the parent. The adress is a good
example. From the user point of view, you might want to hide, that
adress is an own object. The user probably expects to enter the adress
of a premise in the same form. This can be done by placing controls on
the view of the premise, which reference attributes of the object
adress. The view model editor allows to select attributes of child
elements, too. Of course you might want to group all attributes of a
child object in the UI.
If you reference a child object in the view model, ECP will create an
empty object, if you open a premise without an adress, the adress will
be created. Does this match your requirements? Or shall the user
explicitly create a child object, e.g. a GeoPoint?

Regards

Jonas



Am 11.11.2013 19:17, schrieb John E. Conlon:
> As an example I have an EObject named Premises that has a couple of
> attributes name and id. The premises contains an EReference named
> Address (1..1) that has attributes and may contain (0..1) a GeoPoint
> with lat/long attributes. The Premises contains one or more people
> EReferences that may contain a phone number. The Premises may also
> contain one or more Program Status (0..*).
>
> When the Premises is selected I would like the editor to show all its
> children references. Now I am not clear on how that will work in the
> for the child portion of the UI if there are no children. (I suspect
> this is where the logic 'ShowRule' comes in?) How are multiple children
> modeled in the UI with the TableControl??
>
> Also not clear if the Editor UI on its own can create or delete children
> or does one explicitly have to use the Model Explorer for creation and
> deletion?
>
> Also the question comes up regarding modeling an EObject in a ModelView
> and how the Editor reacts if that modeled EObject is a child of another
> EObject that is modeled and referencing the first modeled EObject. In
> other words if I create a ViewModel for an EObject do I have to recreate
> the same modeled portion of that child EObject if I want to see it
> contained in parent?
>
> best regards,
> John
>
>
> On 11/11/2013 10:57 AM, Jonas Helming wrote:
>> While still writing on the tutorial, one question:
>> You mentioned x..n references, could you explain me a little bit more in
>> detail, what you want to do?
>>
>> Best Regards
>>
>> Jonas
>>
>> Am 11.11.2013 17:21, schrieb John E. Conlon:
>>> Hi Jonas,
>>>
>>> Just what I was hoping for.
>>>
>>> thanks for all your fine work,
>>>
>>> John
>>>
>>> On 11/11/2013 02:46 AM, Jonas Helming wrote:
>>>> Hi John,
>>>> as it happens, I am currently working on a more detailed tutorial. I
>>>> hope I will be able to publish the first version of it today. I hope it
>>>> answers most of your questions. I will post a link as soon as it is
>>>> published.
>>>>
>>>> Best Regards
>>>>
>>>> Jonas
>>>>
>>>> Am 09.11.2013 01:17, schrieb John E. Conlon:
>>>>> With the ViewModel I would like to consolidate controls for an
>>>>> elements
>>>>> children in the Editor for the parent element. I see this is possible
>>>>> for 0..1 and 1..1 references and have experimented with it by adding
>>>>> controls for children inside of layouts and groups.
>>>>>
>>>>>
>>>>>
>>>>> Read the 'How to customize the editor layout' article but still have
>>>>> many questions about how to use some of the models elements like the
>>>>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add
>>>>> x..n
>>>>> references?
>>>>>
>>>>> thanks for any help,
>>>>> John
>>>>>
>>>>>
>>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1183136 is a reply to message #1182876] Tue, 12 November 2013 17:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas,

See in line comments...

thanks,

John

On 11/12/2013 07:27 AM, Jonas Helming wrote:
> Hi,
>
> from an ECP point of view, containment attributes are typically handled
> differently depending on their multiplicity.
>
> References with a mutliplicity of more then 1 are per default displayed
> in a list of hyperlinks. Alternativly, you can specify a table control
> to display the children "inline". I have documented this:
>
> http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#tablecontrol
That's very functioal.

>
> For 0..1 references, ECP currently assumes, that the attributes of the
> referenced object logically belongs to the parent. The adress is a good
> example. From the user point of view, you might want to hide, that
> adress is an own object.
Do you mean hide it in the the hierarchy of the Model Explorer?
How is this done? GenModel?

The user probably expects to enter the adress
> of a premise in the same form. This can be done by placing controls on
> the view of the premise, which reference attributes of the object
> adress. The view model editor allows to select attributes of child
> elements, too. Of course you might want to group all attributes of a
> child object in the UI.
Yes, I have done this and it works well.
> If you reference a child object in the view model, ECP will create an
> empty object, if you open a premise without an adress, the adress will
> be created. Does this match your requirements? Or shall the user
> explicitly create a child object, e.g. a GeoPoint?
Well the Premises must have an address, so if a Premises is created, and
the UI has been defined for the address it makes sense if the Address is
created, but an address may not have a GeoPoint, so the user should be
allowed to explicitly create or Not create it.

>
> Regards
>
> Jonas
>
>
>
> Am 11.11.2013 19:17, schrieb John E. Conlon:
>> As an example I have an EObject named Premises that has a couple of
>> attributes name and id. The premises contains an EReference named
>> Address (1..1) that has attributes and may contain (0..1) a GeoPoint
>> with lat/long attributes. The Premises contains one or more people
>> EReferences that may contain a phone number. The Premises may also
>> contain one or more Program Status (0..*).
>>
>> When the Premises is selected I would like the editor to show all its
>> children references. Now I am not clear on how that will work in the
>> for the child portion of the UI if there are no children. (I suspect
>> this is where the logic 'ShowRule' comes in?) How are multiple children
>> modeled in the UI with the TableControl??
>>
>> Also not clear if the Editor UI on its own can create or delete children
>> or does one explicitly have to use the Model Explorer for creation and
>> deletion?
>>
>> Also the question comes up regarding modeling an EObject in a ModelView
>> and how the Editor reacts if that modeled EObject is a child of another
>> EObject that is modeled and referencing the first modeled EObject. In
>> other words if I create a ViewModel for an EObject do I have to recreate
>> the same modeled portion of that child EObject if I want to see it
>> contained in parent?
>>
>> best regards,
>> John
>>
>>
>> On 11/11/2013 10:57 AM, Jonas Helming wrote:
>>> While still writing on the tutorial, one question:
>>> You mentioned x..n references, could you explain me a little bit more in
>>> detail, what you want to do?
>>>
>>> Best Regards
>>>
>>> Jonas
>>>
>>> Am 11.11.2013 17:21, schrieb John E. Conlon:
>>>> Hi Jonas,
>>>>
>>>> Just what I was hoping for.
>>>>
>>>> thanks for all your fine work,
>>>>
>>>> John
>>>>
>>>> On 11/11/2013 02:46 AM, Jonas Helming wrote:
>>>>> Hi John,
>>>>> as it happens, I am currently working on a more detailed tutorial. I
>>>>> hope I will be able to publish the first version of it today. I hope it
>>>>> answers most of your questions. I will post a link as soon as it is
>>>>> published.
>>>>>
>>>>> Best Regards
>>>>>
>>>>> Jonas
>>>>>
>>>>> Am 09.11.2013 01:17, schrieb John E. Conlon:
>>>>>> With the ViewModel I would like to consolidate controls for an
>>>>>> elements
>>>>>> children in the Editor for the parent element. I see this is possible
>>>>>> for 0..1 and 1..1 references and have experimented with it by adding
>>>>>> controls for children inside of layouts and groups.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Read the 'How to customize the editor layout' article but still have
>>>>>> many questions about how to use some of the models elements like the
>>>>>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add
>>>>>> x..n
>>>>>> references?
>>>>>>
>>>>>> thanks for any help,
>>>>>> John
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1183510 is a reply to message #1183136] Tue, 12 November 2013 22:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas,

I tried to create a tableControl, but have not had any luck with my
model or with the 'Task' model of your example. Here is what my
viewModel userGroup.view looks like:

<org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
name="UserGroup">
<rootEClass
href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
<children
xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
name="UserGroup" addRemoveDisabled="true">
<domainModelReference
xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
<domainModelEFeature xsi:type="ecore:EReference"
href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
</domainModelReference>
<columns>
<attribute
href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
</columns>
</children>
</org.eclipse.emf.ecp.view.model:View>

The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:

<extension
point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
<file
filePath="viewModel/taskView2.view">
</file>
<file
filePath="viewModel/userGroup.view">
</file>
</extension>

BTW - I am also getting parsing errors if I try to use the
viewModel/taskView.view viewModel from the example (right from git) so
I had to redefine it.

Any ideas what I am doing wrong?
thanks,

John
Re: [EMF Client Platform] ViewModel adding children references [message #1184314 is a reply to message #1183136] Wed, 13 November 2013 11:11 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
comments inline...

> Hi Jonas,
>
> See in line comments...
>
> thanks,
>
> John
>
> On 11/12/2013 07:27 AM, Jonas Helming wrote:
>> Hi,
>>
>> from an ECP point of view, containment attributes are typically handled
>> differently depending on their multiplicity.
>>
>> References with a mutliplicity of more then 1 are per default displayed
>> in a list of hyperlinks. Alternativly, you can specify a table control
>> to display the children "inline". I have documented this:
>>
>> http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#tablecontrol
>>
> That's very functioal.
>
>>
>> For 0..1 references, ECP currently assumes, that the attributes of the
>> referenced object logically belongs to the parent. The adress is a good
>> example. From the user point of view, you might want to hide, that
>> adress is an own object.
> Do you mean hide it in the the hierarchy of the Model Explorer?
> How is this done? GenModel?
>
> The user probably expects to enter the adress
>> of a premise in the same form. This can be done by placing controls on
>> the view of the premise, which reference attributes of the object
>> adress. The view model editor allows to select attributes of child
>> elements, too. Of course you might want to group all attributes of a
>> child object in the UI.
> Yes, I have done this and it works well.
>> If you reference a child object in the view model, ECP will create an
>> empty object, if you open a premise without an adress, the adress will
>> be created. Does this match your requirements? Or shall the user
>> explicitly create a child object, e.g. a GeoPoint?
> Well the Premises must have an address, so if a Premises is created, and
> the UI has been defined for the address it makes sense if the Address is
> created, but an address may not have a GeoPoint, so the user should be
> allowed to explicitly create or Not create it.
I see. We did not have this requirement before, so we would need to
develop a new control for a 0..1 reference. That means you could
consider a contribution or a sponsorship. Is one of these possibilities
an option for you?

Regards

Jonas

>
>>
>> Regards
>>
>> Jonas
>>
>>
>>
>> Am 11.11.2013 19:17, schrieb John E. Conlon:
>>> As an example I have an EObject named Premises that has a couple of
>>> attributes name and id. The premises contains an EReference named
>>> Address (1..1) that has attributes and may contain (0..1) a GeoPoint
>>> with lat/long attributes. The Premises contains one or more people
>>> EReferences that may contain a phone number. The Premises may also
>>> contain one or more Program Status (0..*).
>>>
>>> When the Premises is selected I would like the editor to show all its
>>> children references. Now I am not clear on how that will work in the
>>> for the child portion of the UI if there are no children. (I suspect
>>> this is where the logic 'ShowRule' comes in?) How are multiple children
>>> modeled in the UI with the TableControl??
>>>
>>> Also not clear if the Editor UI on its own can create or delete children
>>> or does one explicitly have to use the Model Explorer for creation and
>>> deletion?
>>>
>>> Also the question comes up regarding modeling an EObject in a ModelView
>>> and how the Editor reacts if that modeled EObject is a child of another
>>> EObject that is modeled and referencing the first modeled EObject. In
>>> other words if I create a ViewModel for an EObject do I have to recreate
>>> the same modeled portion of that child EObject if I want to see it
>>> contained in parent?
>>>
>>> best regards,
>>> John
>>>
>>>
>>> On 11/11/2013 10:57 AM, Jonas Helming wrote:
>>>> While still writing on the tutorial, one question:
>>>> You mentioned x..n references, could you explain me a little bit
>>>> more in
>>>> detail, what you want to do?
>>>>
>>>> Best Regards
>>>>
>>>> Jonas
>>>>
>>>> Am 11.11.2013 17:21, schrieb John E. Conlon:
>>>>> Hi Jonas,
>>>>>
>>>>> Just what I was hoping for.
>>>>>
>>>>> thanks for all your fine work,
>>>>>
>>>>> John
>>>>>
>>>>> On 11/11/2013 02:46 AM, Jonas Helming wrote:
>>>>>> Hi John,
>>>>>> as it happens, I am currently working on a more detailed tutorial. I
>>>>>> hope I will be able to publish the first version of it today. I
>>>>>> hope it
>>>>>> answers most of your questions. I will post a link as soon as it is
>>>>>> published.
>>>>>>
>>>>>> Best Regards
>>>>>>
>>>>>> Jonas
>>>>>>
>>>>>> Am 09.11.2013 01:17, schrieb John E. Conlon:
>>>>>>> With the ViewModel I would like to consolidate controls for an
>>>>>>> elements
>>>>>>> children in the Editor for the parent element. I see this is
>>>>>>> possible
>>>>>>> for 0..1 and 1..1 references and have experimented with it by adding
>>>>>>> controls for children inside of layouts and groups.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Read the 'How to customize the editor layout' article but still have
>>>>>>> many questions about how to use some of the models elements like the
>>>>>>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add
>>>>>>> x..n
>>>>>>> references?
>>>>>>>
>>>>>>> thanks for any help,
>>>>>>> John
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1184315 is a reply to message #1183510] Wed, 13 November 2013 11:13 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Which version of ECP is in your target?

Am 12.11.2013 23:46, schrieb John E. Conlon:
> Hi Jonas,
>
> I tried to create a tableControl, but have not had any luck with my
> model or with the 'Task' model of your example. Here is what my
> viewModel userGroup.view looks like:
>
> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
> name="UserGroup">
> <rootEClass
> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
> name="UserGroup" addRemoveDisabled="true">
> <domainModelReference
> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
> <domainModelEFeature xsi:type="ecore:EReference"
> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
> </domainModelReference>
> <columns>
> <attribute
> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
> </columns>
> </children>
> </org.eclipse.emf.ecp.view.model:View>
>
> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>
> <extension
> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
> <file
> filePath="viewModel/taskView2.view">
> </file>
> <file
> filePath="viewModel/userGroup.view">
> </file>
> </extension>
>
> BTW - I am also getting parsing errors if I try to use the
> viewModel/taskView.view viewModel from the example (right from git) so
> I had to redefine it.
>
> Any ideas what I am doing wrong?
> thanks,
>
> John
>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1184623 is a reply to message #1184315] Wed, 13 November 2013 15:25 Go to previous messageGo to next message
Eclipse UserFriend
1.1.0.20131030-0025

On 11/13/2013 05:13 AM, Jonas Helming wrote:
> Which version of ECP is in your target?
>
> Am 12.11.2013 23:46, schrieb John E. Conlon:
>> Hi Jonas,
>>
>> I tried to create a tableControl, but have not had any luck with my
>> model or with the 'Task' model of your example. Here is what my
>> viewModel userGroup.view looks like:
>>
>> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
>> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
>> name="UserGroup">
>> <rootEClass
>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
>> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
>> name="UserGroup" addRemoveDisabled="true">
>> <domainModelReference
>> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
>> <domainModelEFeature xsi:type="ecore:EReference"
>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
>> </domainModelReference>
>> <columns>
>> <attribute
>> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
>> </columns>
>> </children>
>> </org.eclipse.emf.ecp.view.model:View>
>>
>> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>>
>> <extension
>> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
>> <file
>> filePath="viewModel/taskView2.view">
>> </file>
>> <file
>> filePath="viewModel/userGroup.view">
>> </file>
>> </extension>
>>
>> BTW - I am also getting parsing errors if I try to use the
>> viewModel/taskView.view viewModel from the example (right from git) so
>> I had to redefine it.
>>
>> Any ideas what I am doing wrong?
>> thanks,
>>
>> John
>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1184624 is a reply to message #1184314] Wed, 13 November 2013 15:30 Go to previous messageGo to next message
Eclipse UserFriend
Yes, I would be happy to contribute, but of course will have to dig
deeper and learn the internals first, before I could be of any help.

John



On 11/13/2013 05:11 AM, Jonas Helming wrote:
> comments inline...
>
>> Hi Jonas,
>>
>> See in line comments...
>>
>> thanks,
>>
>> John
>>
>> On 11/12/2013 07:27 AM, Jonas Helming wrote:
>>> Hi,
>>>
>>> from an ECP point of view, containment attributes are typically handled
>>> differently depending on their multiplicity.
>>>
>>> References with a mutliplicity of more then 1 are per default displayed
>>> in a list of hyperlinks. Alternativly, you can specify a table control
>>> to display the children "inline". I have documented this:
>>>
>>> http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#tablecontrol
>>>
>> That's very functioal.
>>
>>>
>>> For 0..1 references, ECP currently assumes, that the attributes of the
>>> referenced object logically belongs to the parent. The adress is a good
>>> example. From the user point of view, you might want to hide, that
>>> adress is an own object.
>> Do you mean hide it in the the hierarchy of the Model Explorer?
>> How is this done? GenModel?
>>
>> The user probably expects to enter the adress
>>> of a premise in the same form. This can be done by placing controls on
>>> the view of the premise, which reference attributes of the object
>>> adress. The view model editor allows to select attributes of child
>>> elements, too. Of course you might want to group all attributes of a
>>> child object in the UI.
>> Yes, I have done this and it works well.
>>> If you reference a child object in the view model, ECP will create an
>>> empty object, if you open a premise without an adress, the adress will
>>> be created. Does this match your requirements? Or shall the user
>>> explicitly create a child object, e.g. a GeoPoint?
>> Well the Premises must have an address, so if a Premises is created, and
>> the UI has been defined for the address it makes sense if the Address is
>> created, but an address may not have a GeoPoint, so the user should be
>> allowed to explicitly create or Not create it.
> I see. We did not have this requirement before, so we would need to
> develop a new control for a 0..1 reference. That means you could
> consider a contribution or a sponsorship. Is one of these possibilities
> an option for you?
>
> Regards
>
> Jonas
>
>>
>>>
>>> Regards
>>>
>>> Jonas
>>>
>>>
>>>
>>> Am 11.11.2013 19:17, schrieb John E. Conlon:
>>>> As an example I have an EObject named Premises that has a couple of
>>>> attributes name and id. The premises contains an EReference named
>>>> Address (1..1) that has attributes and may contain (0..1) a GeoPoint
>>>> with lat/long attributes. The Premises contains one or more people
>>>> EReferences that may contain a phone number. The Premises may also
>>>> contain one or more Program Status (0..*).
>>>>
>>>> When the Premises is selected I would like the editor to show all its
>>>> children references. Now I am not clear on how that will work in the
>>>> for the child portion of the UI if there are no children. (I suspect
>>>> this is where the logic 'ShowRule' comes in?) How are multiple children
>>>> modeled in the UI with the TableControl??
>>>>
>>>> Also not clear if the Editor UI on its own can create or delete children
>>>> or does one explicitly have to use the Model Explorer for creation and
>>>> deletion?
>>>>
>>>> Also the question comes up regarding modeling an EObject in a ModelView
>>>> and how the Editor reacts if that modeled EObject is a child of another
>>>> EObject that is modeled and referencing the first modeled EObject. In
>>>> other words if I create a ViewModel for an EObject do I have to recreate
>>>> the same modeled portion of that child EObject if I want to see it
>>>> contained in parent?
>>>>
>>>> best regards,
>>>> John
>>>>
>>>>
>>>> On 11/11/2013 10:57 AM, Jonas Helming wrote:
>>>>> While still writing on the tutorial, one question:
>>>>> You mentioned x..n references, could you explain me a little bit
>>>>> more in
>>>>> detail, what you want to do?
>>>>>
>>>>> Best Regards
>>>>>
>>>>> Jonas
>>>>>
>>>>> Am 11.11.2013 17:21, schrieb John E. Conlon:
>>>>>> Hi Jonas,
>>>>>>
>>>>>> Just what I was hoping for.
>>>>>>
>>>>>> thanks for all your fine work,
>>>>>>
>>>>>> John
>>>>>>
>>>>>> On 11/11/2013 02:46 AM, Jonas Helming wrote:
>>>>>>> Hi John,
>>>>>>> as it happens, I am currently working on a more detailed tutorial. I
>>>>>>> hope I will be able to publish the first version of it today. I
>>>>>>> hope it
>>>>>>> answers most of your questions. I will post a link as soon as it is
>>>>>>> published.
>>>>>>>
>>>>>>> Best Regards
>>>>>>>
>>>>>>> Jonas
>>>>>>>
>>>>>>> Am 09.11.2013 01:17, schrieb John E. Conlon:
>>>>>>>> With the ViewModel I would like to consolidate controls for an
>>>>>>>> elements
>>>>>>>> children in the Editor for the parent element. I see this is
>>>>>>>> possible
>>>>>>>> for 0..1 and 1..1 references and have experimented with it by adding
>>>>>>>> controls for children inside of layouts and groups.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Read the 'How to customize the editor layout' article but still have
>>>>>>>> many questions about how to use some of the models elements like the
>>>>>>>> Span, GroupGrid, ShowRule, EnableRule, TableControl and How to add
>>>>>>>> x..n
>>>>>>>> references?
>>>>>>>>
>>>>>>>> thanks for any help,
>>>>>>>> John
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1185773 is a reply to message #1183510] Thu, 14 November 2013 08:58 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

we were able to reproduce the first issue, there is a minor bug in the
1.1.0 release, we will create a hotfix for this asap:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=421709

About the taskView.view: Where did you get this file from exactly? I
browsed the make it happen repository and I couldn't find it.

Thanks for the detailed report!

Kind regards

Jonas

Am 12.11.2013 23:46, schrieb John E. Conlon:
> Hi Jonas,
>
> I tried to create a tableControl, but have not had any luck with my
> model or with the 'Task' model of your example. Here is what my
> viewModel userGroup.view looks like:
>
> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
> name="UserGroup">
> <rootEClass
> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
> name="UserGroup" addRemoveDisabled="true">
> <domainModelReference
> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
> <domainModelEFeature xsi:type="ecore:EReference"
> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
> </domainModelReference>
> <columns>
> <attribute
> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
> </columns>
> </children>
> </org.eclipse.emf.ecp.view.model:View>
>
> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>
> <extension
> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
> <file
> filePath="viewModel/taskView2.view">
> </file>
> <file
> filePath="viewModel/userGroup.view">
> </file>
> </extension>
>
> BTW - I am also getting parsing errors if I try to use the
> viewModel/taskView.view viewModel from the example (right from git) so
> I had to redefine it.
>
> Any ideas what I am doing wrong?
> thanks,
>
> John
>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1186364 is a reply to message #1185773] Thu, 14 November 2013 17:05 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
fixed in 1.1.1, please check if it works for you:
http://eclipse.org/emfclient/download.html

Am 14.11.2013 09:58, schrieb Jonas Helming:
> Hi,
>
> we were able to reproduce the first issue, there is a minor bug in the
> 1.1.0 release, we will create a hotfix for this asap:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=421709
>
> About the taskView.view: Where did you get this file from exactly? I
> browsed the make it happen repository and I couldn't find it.
>
> Thanks for the detailed report!
>
> Kind regards
>
> Jonas
>
> Am 12.11.2013 23:46, schrieb John E. Conlon:
>> Hi Jonas,
>>
>> I tried to create a tableControl, but have not had any luck with my
>> model or with the 'Task' model of your example. Here is what my
>> viewModel userGroup.view looks like:
>>
>> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
>> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
>> name="UserGroup">
>> <rootEClass
>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
>> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
>> name="UserGroup" addRemoveDisabled="true">
>> <domainModelReference
>> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
>> <domainModelEFeature xsi:type="ecore:EReference"
>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
>> </domainModelReference>
>> <columns>
>> <attribute
>> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
>> </columns>
>> </children>
>> </org.eclipse.emf.ecp.view.model:View>
>>
>> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>>
>> <extension
>> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
>> <file
>> filePath="viewModel/taskView2.view">
>> </file>
>> <file
>> filePath="viewModel/userGroup.view">
>> </file>
>> </extension>
>>
>> BTW - I am also getting parsing errors if I try to use the
>> viewModel/taskView.view viewModel from the example (right from git) so
>> I had to redefine it.
>>
>> Any ideas what I am doing wrong?
>> thanks,
>>
>> John
>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1186555 is a reply to message #1185773] Thu, 14 November 2013 19:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas,

Good to here you could reproduce this problem.

The file is in the ui plugin. Here is the link to the file:
https://raw.github.com/eclipsesource/makeithappen/master/com.eclipsesource.makeithappen.ui/viewModel/taskView.view


thanks,
John

On 11/14/2013 02:58 AM, Jonas Helming wrote:
> Hi,
>
> we were able to reproduce the first issue, there is a minor bug in the
> 1.1.0 release, we will create a hotfix for this asap:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=421709
>
> About the taskView.view: Where did you get this file from exactly? I
> browsed the make it happen repository and I couldn't find it.
>
> Thanks for the detailed report!
>
> Kind regards
>
> Jonas
>
> Am 12.11.2013 23:46, schrieb John E. Conlon:
>> Hi Jonas,
>>
>> I tried to create a tableControl, but have not had any luck with my
>> model or with the 'Task' model of your example. Here is what my
>> viewModel userGroup.view looks like:
>>
>> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
>> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
>> name="UserGroup">
>> <rootEClass
>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
>> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
>> name="UserGroup" addRemoveDisabled="true">
>> <domainModelReference
>> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
>> <domainModelEFeature xsi:type="ecore:EReference"
>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
>> </domainModelReference>
>> <columns>
>> <attribute
>> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
>> </columns>
>> </children>
>> </org.eclipse.emf.ecp.view.model:View>
>>
>> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>>
>> <extension
>> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
>> <file
>> filePath="viewModel/taskView2.view">
>> </file>
>> <file
>> filePath="viewModel/userGroup.view">
>> </file>
>> </extension>
>>
>> BTW - I am also getting parsing errors if I try to use the
>> viewModel/taskView.view viewModel from the example (right from git) so
>> I had to redefine it.
>>
>> Any ideas what I am doing wrong?
>> thanks,
>>
>> John
>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1188954 is a reply to message #1186364] Fri, 15 November 2013 22:25 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas,

1.1.1 is working for me. I was able to create table controls for
children of parent EObjects. Did notice a couple of limitations:

1. If the children have attributes that are enumerations the
TableControl column only shows a text type control vs a drop down menu.
Is this a current limitation or can I configure something to get a drop
down with all the enumerations? Of course for now I can just use the
model explorer to configure these values.


2. A child displayed in the TableControl may also be a parent of
optional objects, Will the table control eventually be able to handle
children of its own in columns?

What may be a simple solution for these more complicated types inside a
tableControl is to allow the tableView modeler to display links to these
objects, which would then visualize in their own editor showing either a
customized view or a default one.

thanks again for all your work,
John



On 11/14/2013 11:05 AM, Jonas Helming wrote:
> fixed in 1.1.1, please check if it works for you:
> http://eclipse.org/emfclient/download.html
>
> Am 14.11.2013 09:58, schrieb Jonas Helming:
>> Hi,
>>
>> we were able to reproduce the first issue, there is a minor bug in the
>> 1.1.0 release, we will create a hotfix for this asap:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=421709
>>
>> About the taskView.view: Where did you get this file from exactly? I
>> browsed the make it happen repository and I couldn't find it.
>>
>> Thanks for the detailed report!
>>
>> Kind regards
>>
>> Jonas
>>
>> Am 12.11.2013 23:46, schrieb John E. Conlon:
>>> Hi Jonas,
>>>
>>> I tried to create a tableControl, but have not had any luck with my
>>> model or with the 'Task' model of your example. Here is what my
>>> viewModel userGroup.view looks like:
>>>
>>> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
>>> xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>>> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
>>> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
>>> name="UserGroup">
>>> <rootEClass
>>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
>>> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
>>> name="UserGroup" addRemoveDisabled="true">
>>> <domainModelReference
>>> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
>>> <domainModelEFeature xsi:type="ecore:EReference"
>>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
>>> </domainModelReference>
>>> <columns>
>>> <attribute
>>> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
>>> </columns>
>>> </children>
>>> </org.eclipse.emf.ecp.view.model:View>
>>>
>>> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>>>
>>> <extension
>>> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
>>> <file
>>> filePath="viewModel/taskView2.view">
>>> </file>
>>> <file
>>> filePath="viewModel/userGroup.view">
>>> </file>
>>> </extension>
>>>
>>> BTW - I am also getting parsing errors if I try to use the
>>> viewModel/taskView.view viewModel from the example (right from git) so
>>> I had to redefine it.
>>>
>>> Any ideas what I am doing wrong?
>>> thanks,
>>>
>>> John
>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1194916 is a reply to message #1188954] Mon, 18 November 2013 19:19 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi John,
sorry for the late answer, I have overseen this second post, the thread
is pretty long right now :-)
comments inline...

Am 15.11.2013 23:25, schrieb John E. Conlon:
> Hi Jonas,
>
> 1.1.1 is working for me. I was able to create table controls for
> children of parent EObjects. Did notice a couple of limitations:
>
> 1. If the children have attributes that are enumerations the
> TableControl column only shows a text type control vs a drop down menu.
> Is this a current limitation or can I configure something to get a drop
> down with all the enumerations? Of course for now I can just use the
> model explorer to configure these values.

There is currently no drop down, could you please file a feature request
in Bugzilla?

>
>
> 2. A child displayed in the TableControl may also be a parent of
> optional objects, Will the table control eventually be able to handle
> children of its own in columns?

The question is how this should look like. Would you espect to unfold
the entry then? If so, we would probably need to use a more powerful
table, e.g. NATtable

>
> What may be a simple solution for these more complicated types inside a
> tableControl is to allow the tableView modeler to display links to these
> objects, which would then visualize in their own editor showing either a
> customized view or a default one.
You should be able to double click an element in the table to open it up
in a new editor. Is this what you meant?

Best Regards

Jonas

>
> thanks again for all your work,
> John
>
>
>
> On 11/14/2013 11:05 AM, Jonas Helming wrote:
>> fixed in 1.1.1, please check if it works for you:
>> http://eclipse.org/emfclient/download.html
>>
>> Am 14.11.2013 09:58, schrieb Jonas Helming:
>>> Hi,
>>>
>>> we were able to reproduce the first issue, there is a minor bug in the
>>> 1.1.0 release, we will create a hotfix for this asap:
>>>
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=421709
>>>
>>> About the taskView.view: Where did you get this file from exactly? I
>>> browsed the make it happen repository and I couldn't find it.
>>>
>>> Thanks for the detailed report!
>>>
>>> Kind regards
>>>
>>> Jonas
>>>
>>> Am 12.11.2013 23:46, schrieb John E. Conlon:
>>>> Hi Jonas,
>>>>
>>>> I tried to create a tableControl, but have not had any luck with my
>>>> model or with the 'Task' model of your example. Here is what my
>>>> viewModel userGroup.view looks like:
>>>>
>>>> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0"
>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>>>> xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model"
>>>>
>>>> xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model"
>>>>
>>>> name="UserGroup">
>>>> <rootEClass
>>>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup"/>
>>>> <children
>>>> xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl"
>>>> name="UserGroup" addRemoveDisabled="true">
>>>> <domainModelReference
>>>> xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference">
>>>>
>>>> <domainModelEFeature xsi:type="ecore:EReference"
>>>> href="http://eclipsesource.com/makeithappen/model/task#//UserGroup/users"/>
>>>>
>>>> </domainModelReference>
>>>> <columns>
>>>> <attribute
>>>> href="http://eclipsesource.com/makeithappen/model/task#//User/firstName"/>
>>>>
>>>> </columns>
>>>> </children>
>>>> </org.eclipse.emf.ecp.view.model:View>
>>>>
>>>> The plugin.xml of the com.eclipsesource.makeithappen.ui looks like:
>>>>
>>>> <extension
>>>> point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
>>>> <file
>>>> filePath="viewModel/taskView2.view">
>>>> </file>
>>>> <file
>>>> filePath="viewModel/userGroup.view">
>>>> </file>
>>>> </extension>
>>>>
>>>> BTW - I am also getting parsing errors if I try to use the
>>>> viewModel/taskView.view viewModel from the example (right from git) so
>>>> I had to redefine it.
>>>>
>>>> Any ideas what I am doing wrong?
>>>> thanks,
>>>>
>>>> John
>>>>
>>>>
>>>
>>
>
Re: [EMF Client Platform] ViewModel adding children references [message #1210105 is a reply to message #1194916] Mon, 25 November 2013 21:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas,

Now I am sorry for the late response... see in line:


On 11/18/2013 01:19 PM, Jonas Helming wrote:
>> 1. If the children have attributes that are enumerations the
>> >TableControl column only shows a text type control vs a drop down menu.
>> >Is this a current limitation or can I configure something to get a drop
>> >down with all the enumerations? Of course for now I can just use the
>> >model explorer to configure these values.
> There is currently no drop down, could you please file a feature request
> in Bugzilla?
>
Filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=422522

>>
>>
>> 2. A child displayed in the TableControl may also be a parent of
>> optional objects, Will the table control eventually be able to handle
>> children of its own in columns?
>
> The question is how this should look like. Would you espect to unfold
> the entry then? If so, we would probably need to use a more powerful
> table, e.g. NATtable
>
I think that this might be overkill here and the approach is to do just
show a link as I mention below...
>>
>> What may be a simple solution for these more complicated types inside a
>> tableControl is to allow the tableView modeler to display links to these
>> objects, which would then visualize in their own editor showing either a
>> customized view or a default one.
> You should be able to double click an element in the table to open it up
> in a new editor. Is this what you meant?
Yes, just a link. I see these are used in the default editor.

best regards,
John
Re: [EMF Client Platform] ViewModel adding children references [message #1211839 is a reply to message #1210105] Tue, 26 November 2013 16:46 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Did you check, whether the double click already works for you?

Am 25.11.2013 22:33, schrieb John E. Conlon:
> Hi Jonas,
>
> Now I am sorry for the late response... see in line:
>
>
> On 11/18/2013 01:19 PM, Jonas Helming wrote:
>>> 1. If the children have attributes that are enumerations the
>>> >TableControl column only shows a text type control vs a drop down menu.
>>> >Is this a current limitation or can I configure something to get a drop
>>> >down with all the enumerations? Of course for now I can just use the
>>> >model explorer to configure these values.
>> There is currently no drop down, could you please file a feature request
>> in Bugzilla?
>>
> Filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=422522
>
>>>
>>>
>>> 2. A child displayed in the TableControl may also be a parent of
>>> optional objects, Will the table control eventually be able to handle
>>> children of its own in columns?
>>
>> The question is how this should look like. Would you espect to unfold
>> the entry then? If so, we would probably need to use a more powerful
>> table, e.g. NATtable
>>
> I think that this might be overkill here and the approach is to do just
> show a link as I mention below...
>>>
>>> What may be a simple solution for these more complicated types inside a
>>> tableControl is to allow the tableView modeler to display links to these
>>> objects, which would then visualize in their own editor showing either a
>>> customized view or a default one.
>> You should be able to double click an element in the table to open it up
>> in a new editor. Is this what you meant?
> Yes, just a link. I see these are used in the default editor.
>
> best regards,
> John
>
Previous Topic:EcoreUtil.copy() for bidirectional references
Next Topic:emf.ecore.resource.ResourceSet.getResource takes more time in VIRGO
Goto Forum:
  


Current Time: Thu Apr 18 10:41:16 GMT 2024

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

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

Back to the top