Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Resource doesn't exist
Resource doesn't exist [message #496394] Mon, 09 November 2009 20:57 Go to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Hello guys,
I'm working on a RCP app. Since a couple of days I come in trouble with
some exceptions saying that a resource doesn't exist. I want to open the
registered editor for a file on the disk and then the exception is
thrown. I imagine that it comes because of the architecture of my
workspace. The real physical files on disk always get a unique name by
generating a UUID. In the project explorer those cryptical names won't
be displayed but rather "readable" names for the physical files. When
one double-clicks on a name in the project explorer internally the
physical file will be figured out, the appropriate registered editor and
then IWorkbenchPage.openEditor(file, editorID) will be invoked. I see
the files on the disk but always the mentioned exception is thrown.
That's why I imagine that the files aren't really registered in the
workspace or something similar because while debugging I saw that in the
class Workspace and method getResourceInfo the check tree.includes(path)
returns false. I create the physical files with normal java method
File.createNewFile(). Is this my fault? Do I have to do this anyhow in
"Eclipse" way?
Re: Resource doesn't exist [message #496647 is a reply to message #496394] Tue, 10 November 2009 18:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Does anyone has an idea?
Re: Resource doesn't exist [message #496704 is a reply to message #496394] Wed, 11 November 2009 04:23 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
Gilbert Mirenque wrote:
> I create the physical files with normal java method
> File.createNewFile().

Eclipse doesn't know about the files you have created in the disk
directly. You can let it know the changes by the corresponding
folder.refresh()

> Is this my fault? Do I have to do this anyhow in
> "Eclipse" way?

Use Eclipse API to create the file: IFile.create()


- Prakash

Platform UI Team, IBM
http://blog.eclipse-tips.com
Re: Resource doesn't exist [message #497075 is a reply to message #496704] Thu, 12 November 2009 13:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Hi Prakash,
> Eclipse doesn't know about the files you have created in the disk
> directly. You can let it know the changes by the corresponding
> folder.refresh()
the method of which class is this?
Re: Resource doesn't exist [message #497178 is a reply to message #496704] Thu, 12 November 2009 18:36 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Thank you very much for that hint. Now I got it working. With that hint
I could especially search for more information and now I got it :)
Previous Topic:Binding a set of radio buttons to an int property
Next Topic:How to open identical views side by side ?
Goto Forum:
  


Current Time: Mon Nov 24 08:39:12 GMT 2014

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

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