Home » Eclipse Projects » Rich Client Platform (RCP) » Using IResource in RCp
Using IResource in RCp [message #434683] |
Fri, 05 August 2005 00:52 |
Charles H Martin Messages: 79 Registered: July 2009 |
Member |
|
|
I have some basic questions about general RCP design
and the use of the Workspace and Resource notification
facilities in Eclipse
Please forgive me if this is the wrong forumn to ask these questions...
One can imagine a resource editor, such as an XML
editor, where the XML is presented in a Tree on the
left hand side, and as text on the right hand side.
More generally, one can imagine viewing and editing
any kind of data structure which has a natural (or almost)
natural view as a tree, and represent them in the
Eclipse framework as a tree in some kind of choose.
So I have few questions about some basic design issues.
(1) The Eclipse Resource framework seems to want to work
with general tree-like data structures, as opposed to,
say a Directed Acyclic Graph (DAG). Are there cases
where Eclipse is bring used to edit DAGs?
(2) Suppose one has a data structure to work with, maybe
an XML file, maybe some generic or specific composition of
objects, but these objects do not necessarily map to resources
like IFile, IFolder, or IProject
Is the general approach to associate your data structures with the
IProject/IFolder/IFile types? Or is it more accepted to use the
IContainer as a handle, and use the Resource notification mechanism
(3) Or is it just more common to ignore IResource, IResourceDelta,
etc, and simply use your own specific Events and your own EventListenerList
mechanism (like Swing uses?) . That is, create your own application
"Context" with some EventListenerList, and your own mechanism
for managing EventChanged, EventChangedDelta, etc?
Does anyone have any detailed examples and/or ideas on this?
I am, in particular, interested in examples that are outside
the scope of what are considered traditional IDE applications,
such as a News Reader (i.e: how do you think you would implement
RSSOwl, BitTorrent, or some other familiar applications as a Eclipse
3.1 RCP Plugin, using the RCP framework )
|
|
|
Re: Using IResource in RCp [message #434800 is a reply to message #434683] |
Fri, 05 August 2005 09:03 |
Neil Greenwood Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Charles Martin wrote:
> I have some basic questions about general RCP design
> and the use of the Workspace and Resource notification facilities in
> Eclipse
>
> Please forgive me if this is the wrong forumn to ask these questions...
>
> One can imagine a resource editor, such as an XML
> editor, where the XML is presented in a Tree on the
> left hand side, and as text on the right hand side.
>
> More generally, one can imagine viewing and editing any kind of data
> structure which has a natural (or almost)
> natural view as a tree, and represent them in the
> Eclipse framework as a tree in some kind of choose.
>
> So I have few questions about some basic design issues.
>
> (1) The Eclipse Resource framework seems to want to work
> with general tree-like data structures, as opposed to,
> say a Directed Acyclic Graph (DAG). Are there cases where Eclipse is
> bring used to edit DAGs?
>
> (2) Suppose one has a data structure to work with, maybe
> an XML file, maybe some generic or specific composition of
> objects, but these objects do not necessarily map to resources
> like IFile, IFolder, or IProject
>
> Is the general approach to associate your data structures with the
> IProject/IFolder/IFile types? Or is it more accepted to use the
> IContainer as a handle, and use the Resource notification mechanism
>
> (3) Or is it just more common to ignore IResource, IResourceDelta,
> etc, and simply use your own specific Events and your own EventListenerList
> mechanism (like Swing uses?) . That is, create your own application
> "Context" with some EventListenerList, and your own mechanism
> for managing EventChanged, EventChangedDelta, etc?
>
> Does anyone have any detailed examples and/or ideas on this?
> I am, in particular, interested in examples that are outside
> the scope of what are considered traditional IDE applications, such as a
> News Reader (i.e: how do you think you would implement RSSOwl,
> BitTorrent, or some other familiar applications as a Eclipse
> 3.1 RCP Plugin, using the RCP framework )
>
I think you'll find that both RSSOwl and Azureus (a
BitTorrent client) are RCP applications. Have a look at
their source code...
Cheers,
Neil.
neil.greenwood.lists AT gmail DOT com
|
|
|
Re: Using IResource in RCp [message #434801 is a reply to message #434683] |
Fri, 05 August 2005 09:37 |
Stefan Langer Messages: 236 Registered: July 2009 |
Senior Member |
|
|
Charles Martin wrote:
> I have some basic questions about general RCP design
> and the use of the Workspace and Resource notification facilities in
> Eclipse
>
> Please forgive me if this is the wrong forumn to ask these questions...
>
> One can imagine a resource editor, such as an XML
> editor, where the XML is presented in a Tree on the
> left hand side, and as text on the right hand side.
>
> More generally, one can imagine viewing and editing any kind of data
> structure which has a natural (or almost)
> natural view as a tree, and represent them in the
> Eclipse framework as a tree in some kind of choose.
>
> So I have few questions about some basic design issues.
>
> (1) The Eclipse Resource framework seems to want to work
> with general tree-like data structures, as opposed to,
> say a Directed Acyclic Graph (DAG). Are there cases where Eclipse is
> bring used to edit DAGs?
>
> (2) Suppose one has a data structure to work with, maybe
> an XML file, maybe some generic or specific composition of
> objects, but these objects do not necessarily map to resources
> like IFile, IFolder, or IProject
>
> Is the general approach to associate your data structures with the
> IProject/IFolder/IFile types? Or is it more accepted to use the
> IContainer as a handle, and use the Resource notification mechanism
>
> (3) Or is it just more common to ignore IResource, IResourceDelta,
> etc, and simply use your own specific Events and your own EventListenerList
> mechanism (like Swing uses?) . That is, create your own application
> "Context" with some EventListenerList, and your own mechanism
> for managing EventChanged, EventChangedDelta, etc?
>
> Does anyone have any detailed examples and/or ideas on this?
> I am, in particular, interested in examples that are outside
> the scope of what are considered traditional IDE applications, such as a
> News Reader (i.e: how do you think you would implement RSSOwl,
> BitTorrent, or some other familiar applications as a Eclipse
> 3.1 RCP Plugin, using the RCP framework )
>
>
>
>
>
The navigator you are referring to is part of the JDT (Java Plugin to
RCP) and provides therefor a resource navigator that is most compliant
to resources on the filesystem. For your own RCP you would provide a
navigator which is most adapted to your data needs.
So it is up to you to use what ever you see fit!
Regards
Stefan
|
|
| |
Re: Using IResource in RCp [message #434823 is a reply to message #434801] |
Fri, 05 August 2005 22:03 |
Morten Moeller Messages: 4 Registered: July 2009 |
Junior Member |
|
|
> The navigator you are referring to is part of the JDT (Java Plugin to
> RCP) and provides therefor a resource navigator that is most compliant
> to resources on the filesystem. For your own RCP you would provide a
> navigator which is most adapted to your data needs.
> So it is up to you to use what ever you see fit!
>
> Regards
> Stefan
Actually resources are a part of Platform and not JDT (like the whole
org.eclipse.core.resource* are). You can use it in RCP applications without
including any Java IDE parts (or even use Eclipse platform as a base).
There are plans it seems in 3.2 to unmarry the Eclipse IResource from files,
which will enable you to do some of the things you mention (look at bug
37723 and 106176). This would make the eclipse platform resource framework
more usable for RCP applications.
Stefan Langer wrote:
> Charles Martin wrote:
>> I have some basic questions about general RCP design
>> and the use of the Workspace and Resource notification facilities in
>> Eclipse
>>
>> Please forgive me if this is the wrong forumn to ask these questions...
>>
>> One can imagine a resource editor, such as an XML
>> editor, where the XML is presented in a Tree on the
>> left hand side, and as text on the right hand side.
>>
>> More generally, one can imagine viewing and editing any kind of data
>> structure which has a natural (or almost)
>> natural view as a tree, and represent them in the
>> Eclipse framework as a tree in some kind of choose.
>>
>> So I have few questions about some basic design issues.
>>
>> (1) The Eclipse Resource framework seems to want to work
>> with general tree-like data structures, as opposed to,
>> say a Directed Acyclic Graph (DAG). Are there cases where Eclipse is
>> bring used to edit DAGs?
>>
>> (2) Suppose one has a data structure to work with, maybe
>> an XML file, maybe some generic or specific composition of
>> objects, but these objects do not necessarily map to resources
>> like IFile, IFolder, or IProject
>>
>> Is the general approach to associate your data structures with the
>> IProject/IFolder/IFile types? Or is it more accepted to use the
>> IContainer as a handle, and use the Resource notification mechanism
>>
>> (3) Or is it just more common to ignore IResource, IResourceDelta,
>> etc, and simply use your own specific Events and your own
>> EventListenerList
>> mechanism (like Swing uses?) . That is, create your own application
>> "Context" with some EventListenerList, and your own mechanism
>> for managing EventChanged, EventChangedDelta, etc?
>>
>> Does anyone have any detailed examples and/or ideas on this?
>> I am, in particular, interested in examples that are outside
>> the scope of what are considered traditional IDE applications, such as a
>> News Reader (i.e: how do you think you would implement RSSOwl,
>> BitTorrent, or some other familiar applications as a Eclipse
>> 3.1 RCP Plugin, using the RCP framework )
>>
>>
>>
>>
>>
|
|
|
Re: Using IResource in RCp [message #434825 is a reply to message #434823] |
Sat, 06 August 2005 00:06 |
Charles H Martin Messages: 79 Registered: July 2009 |
Member |
|
|
Stefan
Thanks for the reference.
Eclipse sells itself as a general purpose platform, and I am
trying to explore just how farthis paradigm holds
Some other questions, if you don't mind. Again, forgive me
for not really knowing yet how to navigate the full Eclipse
knowledge space and newsgroups.
(1) It seems to me that even if one has a true file, can one
associate items to the components of a file (such as the
components in the outline view) , and not just the lines.
Now one can associate a Bookmark or a Task in an IFile at a specific
line "location". Can one likewise describe an XML file
as having "locations" which are specific Tags, and not necessarily
only specific line numbers. That is, could I add a Bookmark to
an XML tag in an XML file. Or can we add a Bookmark to a specific method
declaration in a java file ? I am also asking because the Bookmark column
header says location, which suggests that any (path-like or other)
location will do.
(2) Is there any plan to associate a File Fragment with a Resource?
For example, one can imagine a file as consisting of a list
of strings, XML fragments, etc (such as SQL queries),
and the fragments ( queries ) themselves might represent Resources.
We might want to display these resources in a tree or list view,
drag and drop them, etc. My current RCP does something like
this, but I don't use any of the IResource components...I just
have my own specific events, listeners, notifications, etc.
Any pointers on where to go would also be appreciated.
Charles
|
|
| | | | |
Goto Forum:
Current Time: Sun Dec 08 22:08:11 GMT 2024
Powered by FUDForum. Page generated in 0.05293 seconds
|