Home » Modeling » EMF » Can GenModel generate TreeNodeItemProvider?
| | | |
Re: Can GenModel generate TreeNodeItemProvider? [message #424913 is a reply to message #424912] |
Mon, 10 November 2008 13:42 |
Asha Ramegowda 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 |
Asha Ramegowda 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 |
Ed Merks Messages: 33146 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/
|
|
|
Goto Forum:
Current Time: Thu May 09 22:43:38 GMT 2024
Powered by FUDForum. Page generated in 0.03561 seconds
|