Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Can GenModel generate TreeNodeItemProvider?
Can GenModel generate TreeNodeItemProvider? [message #424905] Mon, 10 November 2008 12:53 Go to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009
Member
Hi,

Is it possible to customize EMF GenModel to generate a particular type of
ItemProvider?
Can I tell the EMF code generator to generate TreeNodeItemProvider for a
node?

Thank you,

Asha R.
Re: Can GenModel generate TreeNodeItemProvider? [message #424908 is a reply to message #424905] Mon, 10 November 2008 13:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030300010102040206000302
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Asha,

The GenModel's Root Provider Extends Class property can be used to
specify a subclass of ItemProviderAdapter to be used instead of
ItemProviderAdapter. But note that you should *not *be using a
generated item provider corresponding to some other class. I.e.,
TreeNodeItemProvider is not appropriate if your class doesn't extend
TreeNode (and if it did, it would extend this already).


Asha R wrote:
> Hi,
>
> Is it possible to customize EMF GenModel to generate a particular type
> of ItemProvider?
> Can I tell the EMF code generator to generate TreeNodeItemProvider for
> a node?
>
> Thank you,
> Asha R.
>

--------------030300010102040206000302
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">
Asha,<br>
<br>
The GenModel's Root Provider Extends Class property can be used to
specify a subclass of ItemProviderAdapter to be used instead of
ItemProviderAdapter.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can GenModel generate TreeNodeItemProvider? [message #424910 is a reply to message #424908] Mon, 10 November 2008 13:34 Go to previous messageGo to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009
Member
Hey...!!!

This is what I was going to try.
So, I think my class should extend TreeNode.
I was thinking whether it's right or wrong.

Thanks Ed!

Hope it works.

Thank you,

Asha R.


Ed Merks wrote:

> Asha,

> The GenModel's Root Provider Extends Class property can be used to
> specify a subclass of ItemProviderAdapter to be used instead of
> ItemProviderAdapter. But note that you should *not *be using a
> generated item provider corresponding to some other class. I.e.,
> TreeNodeItemProvider is not appropriate if your class doesn't extend
> TreeNode (and if it did, it would extend this already).


> Asha R wrote:
>> Hi,
>>
>> Is it possible to customize EMF GenModel to generate a particular type
>> of ItemProvider?
>> Can I tell the EMF code generator to generate TreeNodeItemProvider for
>> a node?
>>
>> Thank you,
>> Asha R.
>>
Re: Can GenModel generate TreeNodeItemProvider? [message #424912 is a reply to message #424910] Mon, 10 November 2008 13:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Asha,

I don't think your class should extend TreeNode. I think you should
just look at TreeNodeItemProvider as an example.


Asha R wrote:
> Hey...!!!
>
> This is what I was going to try.
> So, I think my class should extend TreeNode.
> I was thinking whether it's right or wrong.
>
> Thanks Ed!
>
> Hope it works.
>
> Thank you,
>
> Asha R.
>
>
> Ed Merks wrote:
>
>> Asha,
>
>> The GenModel's Root Provider Extends Class property can be used to
>> specify a subclass of ItemProviderAdapter to be used instead of
>> ItemProviderAdapter. But note that you should *not *be using a
>> generated item provider corresponding to some other class. I.e.,
>> TreeNodeItemProvider is not appropriate if your class doesn't extend
>> TreeNode (and if it did, it would extend this already).
>
>
>> Asha R wrote:
>>> Hi,
>>>
>>> Is it possible to customize EMF GenModel to generate a particular
>>> type of ItemProvider?
>>> Can I tell the EMF code generator to generate TreeNodeItemProvider
>>> for a node?
>>>
>>> Thank you,
>>> Asha R.
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can GenModel generate TreeNodeItemProvider? [message #424913 is a reply to message #424912] Mon, 10 November 2008 13:42 Go to previous messageGo to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009
Member
Hi Ed,

Please see the comments below.


Ed Merks wrote:

> Asha,

> I don't think your class should extend TreeNode. I think you should
> just look at TreeNodeItemProvider as an example.

Do you mean my model class Device should not extend TreeNode. I am not
telling my DeviceItemProvider will extend TreeNode. I have not tried it
earlier.
Then what you said below, I did not get?

> Asha R wrote:
>> Hey...!!!
>>
>> This is what I was going to try.
>> So, I think my class should extend TreeNode.
>> I was thinking whether it's right or wrong.
>>
>> Thanks Ed!
>>
>> Hope it works.
>>
>> Thank you,
>>
>> Asha R.
>>
>>
>> Ed Merks wrote:
>>
>>> Asha,
>>
>>> The GenModel's Root Provider Extends Class property can be used to
>>> specify a subclass of ItemProviderAdapter to be used instead of
>>> ItemProviderAdapter. But note that you should *not *be using a
>>> generated item provider corresponding to some other class. I.e.,
>>> TreeNodeItemProvider is not appropriate if your class doesn't extend
>>> TreeNode (and if it did, it would extend this already).
You, say TreeNodeItemProvider is not appropriate if your class doesn't
extend TreeNode, but again you say, and if it did, it would extend this
already. So, I did not get?
>>
>>
>>> Asha R wrote:
>>>> Hi,
>>>>
>>>> Is it possible to customize EMF GenModel to generate a particular
>>>> type of ItemProvider?
>>>> Can I tell the EMF code generator to generate TreeNodeItemProvider
>>>> for a node?
>>>>
>>>> Thank you,
>>>> Asha R.
>>>>
>>
Re: Can GenModel generate TreeNodeItemProvider? [message #424914 is a reply to message #424913] Mon, 10 November 2008 13:59 Go to previous messageGo to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009
Member
Hi Ed,

I got your point.
You mean if my class extends TreeNode I will by defalut get the
TreeNodeItemProvider.
Just now I tried I got it working to some extent.
I mean I am able to get a browse button for properties but when I browse
there is no items to select. :-(!

Thank you,

Asha R.

Asha R wrote:

> Hi Ed,

> Please see the comments below.


> Ed Merks wrote:

>> Asha,

>> I don't think your class should extend TreeNode. I think you should
>> just look at TreeNodeItemProvider as an example.

> Do you mean my model class Device should not extend TreeNode. I am not
> telling my DeviceItemProvider will extend TreeNode. I have not tried it
> earlier.
> Then what you said below, I did not get?

>> Asha R wrote:
>>> Hey...!!!
>>>
>>> This is what I was going to try.
>>> So, I think my class should extend TreeNode.
>>> I was thinking whether it's right or wrong.
>>>
>>> Thanks Ed!
>>>
>>> Hope it works.
>>>
>>> Thank you,
>>>
>>> Asha R.
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Asha,
>>>
>>>> The GenModel's Root Provider Extends Class property can be used to
>>>> specify a subclass of ItemProviderAdapter to be used instead of
>>>> ItemProviderAdapter. But note that you should *not *be using a
>>>> generated item provider corresponding to some other class. I.e.,
>>>> TreeNodeItemProvider is not appropriate if your class doesn't extend
>>>> TreeNode (and if it did, it would extend this already).
> You, say TreeNodeItemProvider is not appropriate if your class doesn't
> extend TreeNode, but again you say, and if it did, it would extend this
> already. So, I did not get?
>>>
>>>
>>>> Asha R wrote:
>>>>> Hi,
>>>>>
>>>>> Is it possible to customize EMF GenModel to generate a particular
>>>>> type of ItemProvider?
>>>>> Can I tell the EMF code generator to generate TreeNodeItemProvider
>>>>> for a node?
>>>>>
>>>>> Thank you,
>>>>> Asha R.
>>>>>
>>>
Re: Can GenModel generate TreeNodeItemProvider? [message #424917 is a reply to message #424913] Mon, 10 November 2008 14:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Asha,

Comments below.

Asha R wrote:
> Hi Ed,
>
> Please see the comments below.
>
>
> Ed Merks wrote:
>
>> Asha,
>
>> I don't think your class should extend TreeNode. I think you should
>> just look at TreeNodeItemProvider as an example.
>
> Do you mean my model class Device should not extend TreeNode.
Yes. I don't think that makes sense. Device isn't a TreeNode so don't
make it be one.
> I am not telling my DeviceItemProvider will extend TreeNode. I have
> not tried it earlier.
> Then what you said below, I did not get?
>
>> Asha R wrote:
>>> Hey...!!!
>>>
>>> This is what I was going to try.
>>> So, I think my class should extend TreeNode.
>>> I was thinking whether it's right or wrong.
>>>
>>> Thanks Ed!
>>>
>>> Hope it works.
>>>
>>> Thank you,
>>>
>>> Asha R.
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Asha,
>>>
>>>> The GenModel's Root Provider Extends Class property can be used to
>>>> specify a subclass of ItemProviderAdapter to be used instead of
>>>> ItemProviderAdapter. But note that you should *not *be using a
>>>> generated item provider corresponding to some other class. I.e.,
>>>> TreeNodeItemProvider is not appropriate if your class doesn't
>>>> extend TreeNode (and if it did, it would extend this already).
> You, say TreeNodeItemProvider is not appropriate if your class doesn't
> extend TreeNode, but again you say, and if it did, it would extend
> this already. So, I did not get?
It doesn't make sense to have AbcItemProvider extend DefItemProvider if
Abc doesn't extend Def. And of course, converses, Abc extends Def the
item provider it would make sense and in fact that's how the generator
would generate it.
>>>
>>>
>>>> Asha R wrote:
>>>>> Hi,
>>>>>
>>>>> Is it possible to customize EMF GenModel to generate a particular
>>>>> type of ItemProvider?
>>>>> Can I tell the EMF code generator to generate TreeNodeItemProvider
>>>>> for a node?
>>>>>
>>>>> Thank you,
>>>>> Asha R.
>>>>>
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:emf.edit question (AdapterFactoryContentProvider)
Next Topic:[Validation] How to debug a activation of a constraint
Goto Forum:
  


Current Time: Thu Mar 28 18:00:17 GMT 2024

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

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

Back to the top