Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Implementing Ressources (IFile, IProject)
Implementing Ressources (IFile, IProject) [message #197807] Mon, 05 March 2007 10:56 Go to next message
Eclipse UserFriend
Originally posted by: Markus.Bon.qgrp.com

Hi,

I' need a project and members with some special qualities. Nevertheless,
I want to use the standard Navigator view for acceessing my ressources.
So what I'd like to do is to provide ressources of my own implementing
IProject and IFile. In a first try, I used a new constructor for my
project using the workspace as container.

IProject myProject = new
MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
(Workspace) ResourcesPlugin.getWorkspace());

This worked, but only while the navigator view is not started anew.
After restarting the view, my project is a standard Project-object...
How can I save the information for recreating my ressources
appropriately ???? Does anybody know, where I can find some
documentation about using new ressource types ????

Thanks
Markus
Re: Implementing Ressources (IFile, IProject) [message #197871 is a reply to message #197807] Mon, 05 March 2007 18:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------060806020905020900070001
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Markus,

These APIs clearly state:

This interface is not intended to be implemented by clients.

So you should not do this. Anything additional your project needs
should be stored as resources (hidden if necessary) within the project.


Markus Bon wrote:
> Hi,
>
> I' need a project and members with some special qualities. Nevertheless,
> I want to use the standard Navigator view for acceessing my ressources.
> So what I'd like to do is to provide ressources of my own implementing
> IProject and IFile. In a first try, I used a new constructor for my
> project using the workspace as container.
>
> IProject myProject = new
> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
> (Workspace) ResourcesPlugin.getWorkspace());
>
> This worked, but only while the navigator view is not started anew.
> After restarting the view, my project is a standard Project-object...
> How can I save the information for recreating my ressources
> appropriately ???? Does anybody know, where I can find some
> documentation about using new ressource types ????
>
> Thanks
> Markus
>


--------------060806020905020900070001
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">
Markus,<br>
<br>
These APIs clearly state:<br>
<blockquote>This interface is not intended to be implemented by clients.<br>
</blockquote>
So you should not do this.
Re: Implementing Ressources (IFile, IProject) [message #197985 is a reply to message #197871] Tue, 06 March 2007 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Markus.Bon.qgrp.com

Ed,

thanks for your answer. Unfortunately it's not sufficient to just store
information. If I find a selected IFile to have certain persistent
properties set, I have to gain control before opening it in the Editor.
Using a part listener works, but it's not very elegant. If I could use
my own IFILE implementation (extending
org.eclipse.core.internal.resources.File), this would solve many
problems I encountered without having to build too many workarounds...

Markus

Ed Merks schrieb:
> Markus,
>
> These APIs clearly state:
>
> This interface is not intended to be implemented by clients.
>
> So you should not do this. Anything additional your project needs
> should be stored as resources (hidden if necessary) within the project.
>
>
> Markus Bon wrote:
>> Hi,
>>
>> I' need a project and members with some special qualities. Nevertheless,
>> I want to use the standard Navigator view for acceessing my ressources.
>> So what I'd like to do is to provide ressources of my own implementing
>> IProject and IFile. In a first try, I used a new constructor for my
>> project using the workspace as container.
>>
>> IProject myProject = new
>> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
>> (Workspace) ResourcesPlugin.getWorkspace());
>>
>> This worked, but only while the navigator view is not started anew.
>> After restarting the view, my project is a standard Project-object...
>> How can I save the information for recreating my ressources
>> appropriately ???? Does anybody know, where I can find some
>> documentation about using new ressource types ????
>>
>> Thanks
>> Markus
>>
>
Re: Implementing Ressources (IFile, IProject) [message #198046 is a reply to message #197985] Tue, 06 March 2007 14:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Markus,

Given that a huge stack of project has been built on top of Eclipse
without needing what you say you absolutely need, you'll understand why
I'm skeptical of your assertion. The Eclipse file APIs are not meant to
be implemented directly by clients and any effort you put in this
direction will hit a brick wall. So best that you re-evaluate the
direction you are taking. How come something like
IResource.get/setPersistentProperty is not sufficient?


Markus Bon wrote:
> Ed,
>
> thanks for your answer. Unfortunately it's not sufficient to just store
> information. If I find a selected IFile to have certain persistent
> properties set, I have to gain control before opening it in the Editor.
> Using a part listener works, but it's not very elegant. If I could use
> my own IFILE implementation (extending
> org.eclipse.core.internal.resources.File), this would solve many
> problems I encountered without having to build too many workarounds...
>
> Markus
>
> Ed Merks schrieb:
>
>> Markus,
>>
>> These APIs clearly state:
>>
>> This interface is not intended to be implemented by clients.
>>
>> So you should not do this. Anything additional your project needs
>> should be stored as resources (hidden if necessary) within the project.
>>
>>
>> Markus Bon wrote:
>>
>>> Hi,
>>>
>>> I' need a project and members with some special qualities. Nevertheless,
>>> I want to use the standard Navigator view for acceessing my ressources.
>>> So what I'd like to do is to provide ressources of my own implementing
>>> IProject and IFile. In a first try, I used a new constructor for my
>>> project using the workspace as container.
>>>
>>> IProject myProject = new
>>> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
>>> (Workspace) ResourcesPlugin.getWorkspace());
>>>
>>> This worked, but only while the navigator view is not started anew.
>>> After restarting the view, my project is a standard Project-object...
>>> How can I save the information for recreating my ressources
>>> appropriately ???? Does anybody know, where I can find some
>>> documentation about using new ressource types ????
>>>
>>> Thanks
>>> Markus
>>>
>>>
Re: Implementing Ressources (IFile, IProject) [message #198054 is a reply to message #198046] Tue, 06 March 2007 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Markus.Bon.qgrp.com

Ed,

I really understand your concerns about using APIs in a way they are not
meant to be. IResource.get/setPersistentProperty is great, and
absolutely sufficient in most cases. The problem is: We are not using
Eclipse in its basic, but WDz. Therefore, we sometimes encounter
problems which are quite unusual for the use of a "normal" eclipse
environment, especially with regard to the resources we have to deal
with...
I just like my plugins to fit into the workbench as seemless as possible
without reinventing the wheel anew...

regards
Markus

Ed Merks schrieb:
> Markus,
>
> Given that a huge stack of project has been built on top of Eclipse
> without needing what you say you absolutely need, you'll understand why
> I'm skeptical of your assertion. The Eclipse file APIs are not meant to
> be implemented directly by clients and any effort you put in this
> direction will hit a brick wall. So best that you re-evaluate the
> direction you are taking. How come something like
> IResource.get/setPersistentProperty is not sufficient?
>
>
> Markus Bon wrote:
>> Ed,
>>
>> thanks for your answer. Unfortunately it's not sufficient to just store
>> information. If I find a selected IFile to have certain persistent
>> properties set, I have to gain control before opening it in the Editor.
>> Using a part listener works, but it's not very elegant. If I could use
>> my own IFILE implementation (extending
>> org.eclipse.core.internal.resources.File), this would solve many
>> problems I encountered without having to build too many workarounds...
>>
>> Markus
>>
>> Ed Merks schrieb:
>>
>>> Markus,
>>>
>>> These APIs clearly state:
>>>
>>> This interface is not intended to be implemented by clients.
>>>
>>> So you should not do this. Anything additional your project needs
>>> should be stored as resources (hidden if necessary) within the project.
>>>
>>>
>>> Markus Bon wrote:
>>>
>>>> Hi,
>>>>
>>>> I' need a project and members with some special qualities.
>>>> Nevertheless,
>>>> I want to use the standard Navigator view for acceessing my ressources.
>>>> So what I'd like to do is to provide ressources of my own implementing
>>>> IProject and IFile. In a first try, I used a new constructor for my
>>>> project using the workspace as container.
>>>>
>>>> IProject myProject = new
>>>> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
>>>>
>>>> (Workspace) ResourcesPlugin.getWorkspace());
>>>>
>>>> This worked, but only while the navigator view is not started anew.
>>>> After restarting the view, my project is a standard Project-object...
>>>> How can I save the information for recreating my ressources
>>>> appropriately ???? Does anybody know, where I can find some
>>>> documentation about using new ressource types ????
>>>>
>>>> Thanks
>>>> Markus
>>>>
Re: Implementing Ressources (IFile, IProject) [message #198135 is a reply to message #198054] Wed, 07 March 2007 01:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Markus,

I think the only good alternative is to implement your own Eclipse file
system, but I don't know much about that or where to find the
information. Try google.


Markus Bon wrote:
> Ed,
>
> I really understand your concerns about using APIs in a way they are not
> meant to be. IResource.get/setPersistentProperty is great, and
> absolutely sufficient in most cases. The problem is: We are not using
> Eclipse in its basic, but WDz. Therefore, we sometimes encounter
> problems which are quite unusual for the use of a "normal" eclipse
> environment, especially with regard to the resources we have to deal
> with...
> I just like my plugins to fit into the workbench as seemless as possible
> without reinventing the wheel anew...
>
> regards
> Markus
>
> Ed Merks schrieb:
>
>> Markus,
>>
>> Given that a huge stack of project has been built on top of Eclipse
>> without needing what you say you absolutely need, you'll understand why
>> I'm skeptical of your assertion. The Eclipse file APIs are not meant to
>> be implemented directly by clients and any effort you put in this
>> direction will hit a brick wall. So best that you re-evaluate the
>> direction you are taking. How come something like
>> IResource.get/setPersistentProperty is not sufficient?
>>
>>
>> Markus Bon wrote:
>>
>>> Ed,
>>>
>>> thanks for your answer. Unfortunately it's not sufficient to just store
>>> information. If I find a selected IFile to have certain persistent
>>> properties set, I have to gain control before opening it in the Editor.
>>> Using a part listener works, but it's not very elegant. If I could use
>>> my own IFILE implementation (extending
>>> org.eclipse.core.internal.resources.File), this would solve many
>>> problems I encountered without having to build too many workarounds...
>>>
>>> Markus
>>>
>>> Ed Merks schrieb:
>>>
>>>
>>>> Markus,
>>>>
>>>> These APIs clearly state:
>>>>
>>>> This interface is not intended to be implemented by clients.
>>>>
>>>> So you should not do this. Anything additional your project needs
>>>> should be stored as resources (hidden if necessary) within the project.
>>>>
>>>>
>>>> Markus Bon wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I' need a project and members with some special qualities.
>>>>> Nevertheless,
>>>>> I want to use the standard Navigator view for acceessing my ressources.
>>>>> So what I'd like to do is to provide ressources of my own implementing
>>>>> IProject and IFile. In a first try, I used a new constructor for my
>>>>> project using the workspace as container.
>>>>>
>>>>> IProject myProject = new
>>>>> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
>>>>>
>>>>> (Workspace) ResourcesPlugin.getWorkspace());
>>>>>
>>>>> This worked, but only while the navigator view is not started anew.
>>>>> After restarting the view, my project is a standard Project-object...
>>>>> How can I save the information for recreating my ressources
>>>>> appropriately ???? Does anybody know, where I can find some
>>>>> documentation about using new ressource types ????
>>>>>
>>>>> Thanks
>>>>> Markus
>>>>>
>>>>>
Re: Implementing Ressources (IFile, IProject) [message #198157 is a reply to message #198135] Wed, 07 March 2007 05:08 Go to previous messageGo to next message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
On 03/07/2007 02:23 AM, Ed Merks wrote:
> Markus,
>
> I think the only good alternative is to implement your own Eclipse file
> system, but I don't know much about that or where to find the
> information. Try google.

Here is some information:

http://wiki.eclipse.org/index.php/EFS

Cheers, Jörg

> Markus Bon wrote:
>> Ed,
>>
>> I really understand your concerns about using APIs in a way they are not
>> meant to be. IResource.get/setPersistentProperty is great, and
>> absolutely sufficient in most cases. The problem is: We are not using
>> Eclipse in its basic, but WDz. Therefore, we sometimes encounter
>> problems which are quite unusual for the use of a "normal" eclipse
>> environment, especially with regard to the resources we have to deal
>> with...
>> I just like my plugins to fit into the workbench as seemless as possible
>> without reinventing the wheel anew...
>>
>> regards
>> Markus
>>
>> Ed Merks schrieb:
>>
>>> Markus,
>>>
>>> Given that a huge stack of project has been built on top of Eclipse
>>> without needing what you say you absolutely need, you'll understand why
>>> I'm skeptical of your assertion. The Eclipse file APIs are not meant to
>>> be implemented directly by clients and any effort you put in this
>>> direction will hit a brick wall. So best that you re-evaluate the
>>> direction you are taking. How come something like
>>> IResource.get/setPersistentProperty is not sufficient?
>>>
>>>
>>> Markus Bon wrote:
>>>
>>>> Ed,
>>>>
>>>> thanks for your answer. Unfortunately it's not sufficient to just store
>>>> information. If I find a selected IFile to have certain persistent
>>>> properties set, I have to gain control before opening it in the Editor.
>>>> Using a part listener works, but it's not very elegant. If I could use
>>>> my own IFILE implementation (extending
>>>> org.eclipse.core.internal.resources.File), this would solve many
>>>> problems I encountered without having to build too many workarounds...
>>>>
>>>> Markus
>>>>
>>>> Ed Merks schrieb:
>>>>
>>>>
>>>>> Markus,
>>>>>
>>>>> These APIs clearly state:
>>>>>
>>>>> This interface is not intended to be implemented by clients.
>>>>>
>>>>> So you should not do this. Anything additional your project needs
>>>>> should be stored as resources (hidden if necessary) within the
>>>>> project.
>>>>>
>>>>>
>>>>> Markus Bon wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I' need a project and members with some special qualities.
>>>>>> Nevertheless,
>>>>>> I want to use the standard Navigator view for acceessing my
>>>>>> ressources.
>>>>>> So what I'd like to do is to provide ressources of my own
>>>>>> implementing
>>>>>> IProject and IFile. In a first try, I used a new constructor for my
>>>>>> project using the workspace as container.
>>>>>>
>>>>>> IProject myProject = new
>>>>>> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
>>>>>>
>>>>>>
>>>>>> (Workspace) ResourcesPlugin.getWorkspace());
>>>>>>
>>>>>> This worked, but only while the navigator view is not started anew.
>>>>>> After restarting the view, my project is a standard Project-object...
>>>>>> How can I save the information for recreating my ressources
>>>>>> appropriately ???? Does anybody know, where I can find some
>>>>>> documentation about using new ressource types ????
>>>>>>
>>>>>> Thanks
>>>>>> Markus
>>>>>>
Re: Implementing Ressources (IFile, IProject) [message #198188 is a reply to message #198157] Wed, 07 March 2007 09:26 Go to previous message
Eclipse UserFriend
Originally posted by: Markus.Bon.qgrp.com

That looks good!

Thanks,
Markus

Jörg Thönnes schrieb:
> On 03/07/2007 02:23 AM, Ed Merks wrote:
>> Markus,
>>
>> I think the only good alternative is to implement your own Eclipse
>> file system, but I don't know much about that or where to find the
>> information. Try google.
>
> Here is some information:
>
> http://wiki.eclipse.org/index.php/EFS
>
> Cheers, Jörg
>
>> Markus Bon wrote:
>>> Ed,
>>>
>>> I really understand your concerns about using APIs in a way they are not
>>> meant to be. IResource.get/setPersistentProperty is great, and
>>> absolutely sufficient in most cases. The problem is: We are not using
>>> Eclipse in its basic, but WDz. Therefore, we sometimes encounter
>>> problems which are quite unusual for the use of a "normal" eclipse
>>> environment, especially with regard to the resources we have to deal
>>> with...
>>> I just like my plugins to fit into the workbench as seemless as possible
>>> without reinventing the wheel anew...
>>>
>>> regards
>>> Markus
>>>
>>> Ed Merks schrieb:
>>>
>>>> Markus,
>>>>
>>>> Given that a huge stack of project has been built on top of Eclipse
>>>> without needing what you say you absolutely need, you'll understand why
>>>> I'm skeptical of your assertion. The Eclipse file APIs are not
>>>> meant to
>>>> be implemented directly by clients and any effort you put in this
>>>> direction will hit a brick wall. So best that you re-evaluate the
>>>> direction you are taking. How come something like
>>>> IResource.get/setPersistentProperty is not sufficient?
>>>>
>>>>
>>>> Markus Bon wrote:
>>>>
>>>>> Ed,
>>>>>
>>>>> thanks for your answer. Unfortunately it's not sufficient to just
>>>>> store
>>>>> information. If I find a selected IFile to have certain persistent
>>>>> properties set, I have to gain control before opening it in the
>>>>> Editor.
>>>>> Using a part listener works, but it's not very elegant. If I could use
>>>>> my own IFILE implementation (extending
>>>>> org.eclipse.core.internal.resources.File), this would solve many
>>>>> problems I encountered without having to build too many workarounds...
>>>>>
>>>>> Markus
>>>>>
>>>>> Ed Merks schrieb:
>>>>>
>>>>>
>>>>>> Markus,
>>>>>>
>>>>>> These APIs clearly state:
>>>>>>
>>>>>> This interface is not intended to be implemented by clients.
>>>>>>
>>>>>> So you should not do this. Anything additional your project needs
>>>>>> should be stored as resources (hidden if necessary) within the
>>>>>> project.
>>>>>>
>>>>>>
>>>>>> Markus Bon wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I' need a project and members with some special qualities.
>>>>>>> Nevertheless,
>>>>>>> I want to use the standard Navigator view for acceessing my
>>>>>>> ressources.
>>>>>>> So what I'd like to do is to provide ressources of my own
>>>>>>> implementing
>>>>>>> IProject and IFile. In a first try, I used a new constructor for my
>>>>>>> project using the workspace as container.
>>>>>>>
>>>>>>> IProject myProject = new
>>>>>>> MyProject(ResourcesPlugin.getWorkspace().getRoot().getFullPa th().append(projectName),
>>>>>>>
>>>>>>>
>>>>>>> (Workspace) ResourcesPlugin.getWorkspace());
>>>>>>>
>>>>>>> This worked, but only while the navigator view is not started anew.
>>>>>>> After restarting the view, my project is a standard
>>>>>>> Project-object...
>>>>>>> How can I save the information for recreating my ressources
>>>>>>> appropriately ???? Does anybody know, where I can find some
>>>>>>> documentation about using new ressource types ????
>>>>>>>
>>>>>>> Thanks
>>>>>>> Markus
>>>>>>>
Previous Topic:want to configure Tomcat web server
Next Topic:external configuration for bookmark or tasks
Goto Forum:
  


Current Time: Thu Apr 25 23:37:15 GMT 2024

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

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

Back to the top