[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: Extending Folder resource
|
Hi Eric and Ed!
Thanks a lot for the prompt responses. From what I did read around, I felt
you cannot pretty much extend the internal classes but I wanted to reconfirm
from someone.. So thanks for that... Eric I am looking at basically holding
a custom object/handle associated with each folder falling under a certain
group of special folders I have defined under a project.. So for this, one
of the approach was to make my custom class extend the folder and then add
some of my own behaviorial methods to it.. This way I would be able to keep
it all under a single object, my stuff + folder representation..
Am not sure how I would be able to do something similar via extension
points... Any direction there would be great! But thanks a lot for the
replies anyway...
Thanks,
Rahul
"Eric Rizzo" <eclipse-news@xxxxxxxxxxxx> wrote in message
news:fpnpe1$hj5$3@xxxxxxxxxxxxxxxxxxxx
> Rahul Kamdar wrote:
>> Hi,
>>
>> I want to extend the org.eclipse.core.internal.resources.Folder to create
>> my own type of a Folder and add to the behavior and some of my own
>> manipulations. When I try to directly extend it, the constructor returns
>> a ClassCastException. Even if I try to cast a folder object to my own
>> custom folder, I get the same ClassCastException.
>>
>> We cannot extend classes defined under
>> org.eclipse.core.internal.resources, is it? Would you suggest on how to
>> try to the same! :-)
>
> As Ed already said, its futile to try to extend internal classes.
> What behavior, specifially, are you wanting to add? Many things can be
> done via extension points.
>
> Eric