Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Delete Project Resource not working
Delete Project Resource not working [message #34163] Thu, 15 May 2003 16:00 Go to next message
Eclipse UserFriend
I have created my own view and added the resources which are IAdaptables.
When try to delete the project resource as soon as it is created I got the
following exception:

org.eclipse.core.internal.resources.ResourceException: Problems
encountered while deleting resources.
at org.eclipse.core.internal.resources.Resource.delete(Resource .java:467)
at org.eclipse.core.internal.resources.Project.delete(Project.j ava:290)

at com.ibm.btools.csm.ui.actions.DeleteAction.run(DeleteAction. java:146)

What will be cause for the above exception? How do I fix it?

DeleteAction is my own action which will be used to call delete operation
for the resource from my own view.
Re: Delete Project Resource not working [message #34432 is a reply to message #34163] Thu, 15 May 2003 16:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jed_anderson.us.ibm.com

Bala,

I have seen this on Windows. If I have a program which has a handle to
the file I am deleting or a handle to a file under the directory I am
deleting, then the deletion fails.

For example, often I have a command prompt open and I have cd'ed deep
into a directory tree. Then in Eclipse I try and delete the directory
tree, and it fails.

jkca


Bala Subramanian wrote:
> I have created my own view and added the resources which are IAdaptables.
> When try to delete the project resource as soon as it is created I got the
> following exception:
>
> org.eclipse.core.internal.resources.ResourceException: Problems
> encountered while deleting resources.
> at org.eclipse.core.internal.resources.Resource.delete(Resource .java:467)
> at org.eclipse.core.internal.resources.Project.delete(Project.j ava:290)
>
> at com.ibm.btools.csm.ui.actions.DeleteAction.run(DeleteAction. java:146)
>
> What will be cause for the above exception? How do I fix it?
>
> DeleteAction is my own action which will be used to call delete operation
> for the resource from my own view.
>
Re: Delete Project Resource not working [message #34499 is a reply to message #34163] Thu, 15 May 2003 16:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: knut_radloff.oti.com

IProject.delete states:
* @exception CoreException if this method fails. Reasons include:
* <ul>
* <li> This project could not be deleted.</li>
* <li> This project's contents could not be deleted.</li>
* <li> Resource changes are disallowed during certain types of resource change
* event notification. See <code>IResourceChangeEvent</code> for more details.</li>

In addition IResource.delete states:
* <li> This resource or one of its descendents is out of sync with the local file system
* and <code>force</code> is <code>false</code>.</li>

Is the project in sync with the file system? You could try a refreshLocal.

Knut
"Bala Subramanian" <balasubm@us.ibm.com> wrote in message news:ba0rke$tld$1@rogue.oti.com...
> I have created my own view and added the resources which are IAdaptables.
> When try to delete the project resource as soon as it is created I got the
> following exception:
>
> org.eclipse.core.internal.resources.ResourceException: Problems
> encountered while deleting resources.
> at org.eclipse.core.internal.resources.Resource.delete(Resource .java:467)
> at org.eclipse.core.internal.resources.Project.delete(Project.j ava:290)
>
> at com.ibm.btools.csm.ui.actions.DeleteAction.run(DeleteAction. java:146)
>
> What will be cause for the above exception? How do I fix it?
>
> DeleteAction is my own action which will be used to call delete operation
> for the resource from my own view.
>
Re: Delete Project Resource not working [message #35765 is a reply to message #34499] Fri, 16 May 2003 10:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Knut Radloff,

I have the project created in the view and called refreshLocal
programatically during the creation. Also before delete the project,
refreshLocal is called and try to delete the project. For me it is not
deleted the project first time (meaning as soon as I created) otherwise
delete was successful(my second attempt after some other
edit/modification).

Knut Radloff wrote:

> IProject.delete states:
> * @exception CoreException if this method fails. Reasons include:
> * <ul>
> * <li> This project could not be deleted.</li>
> * <li> This project's contents could not be deleted.</li>
> * <li> Resource changes are disallowed during certain types of resource
change
> * event notification. See <code>IResourceChangeEvent</code> for more
details.</li>

> In addition IResource.delete states:
> * <li> This resource or one of its descendents is out of sync with the local
file system
> * and <code>force</code> is <code>false</code>.</li>

> Is the project in sync with the file system? You could try a refreshLocal.

> Knut
> "Bala Subramanian" <balasubm@us.ibm.com> wrote in message
news:ba0rke$tld$1@rogue.oti.com...
> > I have created my own view and added the resources which are IAdaptables.
> > When try to delete the project resource as soon as it is created I got the
> > following exception:
> >
> > org.eclipse.core.internal.resources.ResourceException: Problems
> > encountered while deleting resources.
> > at org.eclipse.core.internal.resources.Resource.delete(Resource .java:467)
> > at org.eclipse.core.internal.resources.Project.delete(Project.j ava:290)
> >
> > at com.ibm.btools.csm.ui.actions.DeleteAction.run(DeleteAction. java:146)
> >
> > What will be cause for the above exception? How do I fix it?
> >
> > DeleteAction is my own action which will be used to call delete operation
> > for the resource from my own view.
> >
Re: Delete Project Resource not working [message #38170 is a reply to message #34432] Mon, 19 May 2003 12:18 Go to previous messageGo to next message
Eclipse UserFriend
I have also seen this under Linux when I try to delete an entire project
and there are symbolic links involved. If a real file gets deleted before
the symbolic link to it gets deleted, the delete process seems unable to
delete the symbolic link. I then have to go in manually and do the old
\"rm -rf *\" deal to get rid of the rest of the project. I have been
meaning to post a bugzilla report on this, but haven\'t yet.

Rick


Jed Anderson wrote:

> Bala,

> I have seen this on Windows. If I have a program which has a handle to
> the file I am deleting or a handle to a file under the directory I am
> deleting, then the deletion fails.

> For example, often I have a command prompt open and I have cd\'ed deep
> into a directory tree. Then in Eclipse I try and delete the directory
> tree, and it fails.

> jkca


> Bala Subramanian wrote:
> > I have created my own view and added the resources which are IAdaptables.
> > When try to delete the project resource as soon as it is created I got the
> > following exception:
> >
> > org.eclipse.core.internal.resources.ResourceException: Problems
> > encountered while deleting resources.
> > at org.eclipse.core.internal.resources.Resource.delete(Resource .java:467)
> > at org.eclipse.core.internal.resources.Project.delete(Project.j ava:290)
> >
> > at com.ibm.btools.csm.ui.actions.DeleteAction.run(DeleteAction. java:146)
> >
> > What will be cause for the above exception? How do I fix it?
> >
> > DeleteAction is my own action which will be used to call delete operation
> > for the resource from my own view.
> >
Re: Delete Project Resource not working [message #40354 is a reply to message #35765] Tue, 20 May 2003 11:37 Go to previous message
Eclipse UserFriend
Originally posted by: knut_radloff.oti.com

You should enter a bug against Platform Core. Include a test case that demonstrates the problem and they'll be able to either fix it
or tell you what's wrong with the code.

Knut
"Balasubramanian" <balasubm@us.ibm.com> wrote in message news:ba2tpa$jr9$1@rogue.oti.com...
> Hi Knut Radloff,
>
> I have the project created in the view and called refreshLocal
> programatically during the creation. Also before delete the project,
> refreshLocal is called and try to delete the project. For me it is not
> deleted the project first time (meaning as soon as I created) otherwise
> delete was successful(my second attempt after some other
> edit/modification).
>
> Knut Radloff wrote:
>
> > IProject.delete states:
> > * @exception CoreException if this method fails. Reasons include:
> > * <ul>
> > * <li> This project could not be deleted.</li>
> > * <li> This project's contents could not be deleted.</li>
> > * <li> Resource changes are disallowed during certain types of resource
> change
> > * event notification. See <code>IResourceChangeEvent</code> for more
> details.</li>
>
> > In addition IResource.delete states:
> > * <li> This resource or one of its descendents is out of sync with the local
> file system
> > * and <code>force</code> is <code>false</code>.</li>
>
> > Is the project in sync with the file system? You could try a refreshLocal.
>
> > Knut
> > "Bala Subramanian" <balasubm@us.ibm.com> wrote in message
> news:ba0rke$tld$1@rogue.oti.com...
> > > I have created my own view and added the resources which are IAdaptables.
> > > When try to delete the project resource as soon as it is created I got the
> > > following exception:
> > >
> > > org.eclipse.core.internal.resources.ResourceException: Problems
> > > encountered while deleting resources.
> > > at org.eclipse.core.internal.resources.Resource.delete(Resource .java:467)
> > > at org.eclipse.core.internal.resources.Project.delete(Project.j ava:290)
> > >
> > > at com.ibm.btools.csm.ui.actions.DeleteAction.run(DeleteAction. java:146)
> > >
> > > What will be cause for the above exception? How do I fix it?
> > >
> > > DeleteAction is my own action which will be used to call delete operation
> > > for the resource from my own view.
> > >
>
>
>
>
>
Previous Topic:no textarea for new folder
Next Topic:Contributing to Java Editor popup?
Goto Forum:
  


Current Time: Tue Jul 22 18:29:39 EDT 2025

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

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

Back to the top