Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » project existence checking
project existence checking [message #92959] Mon, 14 July 2003 06:57 Go to next message
Eclipse UserFriend
Problem: how to test if a project actually exists?

I create a project and then delete it from the Resource view. The project
folder is removed from the file system. Yet when using the following code I
find that the project still exists in the workspace's projectTable cache.
The example code returns true if the file exists. Upon further inspection
myWebProject.isOpen() returns false but I need to know if the project has
been removed from the workspace.

IProject myWebProject = myWorkspaceRoot.getProject("MyWeb");
// open if necessary
return myWebProject.exists();

Wayne
Re: project existence checking [message #93213 is a reply to message #92959] Mon, 14 July 2003 11:48 Go to previous message
Eclipse UserFriend
Originally posted by: dj_houghton.nospam.ca.ibm.com

Project existance is perspective/view independant. If you are using
IProject.delete() to delete the project from the workspace, then
IProject.exists() should return false when calling. (assuming that the
project deletion completed successfully)

If this is not the case then I would suggest opening a bug report against
Platform/Core. Include the build id that you are using, the VM that you are
running, the filesystem type you are using (FAT, NTFS, etc) and the exact
steps to reproduce your problem.

Thanks.

"Wayne Parrott" <wayne@genuitec.com> wrote in message
news:beu2h3$j9b$1@eclipse.org...
> Problem: how to test if a project actually exists?
>
> I create a project and then delete it from the Resource view. The project
> folder is removed from the file system. Yet when using the following code
I
> find that the project still exists in the workspace's projectTable cache.
> The example code returns true if the file exists. Upon further inspection
> myWebProject.isOpen() returns false but I need to know if the project has
> been removed from the workspace.
>
> IProject myWebProject = myWorkspaceRoot.getProject("MyWeb");
> // open if necessary
> return myWebProject.exists();
>
> Wayne
>
>
Previous Topic:Usability regression 2.0->2.1 - Shells disappear during ALT+TAB
Next Topic:About plugin!
Goto Forum:
  


Current Time: Sat May 10 01:13:09 EDT 2025

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

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

Back to the top