AnsweredAssumed Answered

Couldn't delete Temp dirs after running Creating Artifact

Question asked by littletaffer on Jun 5, 2012
Latest reply on Jun 13, 2012 by littletaffer
Hi there,

While debugging the create artifact function, I noticed that two of these lines appeared in DeploymentMenu version 5.9:

tempbarFolder.delete(true, null);
tempclassesFolder.delete(true, null);

These two lines are not in 5.8 - as it is used as the base for our work on customizing the RCP.

I added that two lines above below the "deployment.refreshLocal". It causes a ResourceException error like:

org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
   at org.eclipse.core.internal.resources.Resource.delete(Resource.java:793)
   at org.eclipse.core.internal.resources.Resource.delete(Resource.java:746)
   at workfloweditor.common.DeploymentMenu$1.run(DeploymentMenu.java:139)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Contains: Could not delete '/test34/tempbar'.
org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
   at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:352)
   at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFolder(ResourceTree.java:352)
   at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFolder(ResourceTree.java:798)
   at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1941)
   at org.eclipse.core.internal.resources.Resource.delete(Resource.java:780)
   at org.eclipse.core.internal.resources.Resource.delete(Resource.java:746)
   at workfloweditor.common.DeploymentMenu$1.run(DeploymentMenu.java:139)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Contains: Problems encountered while deleting files.
Contains: Could not delete: C:\runtime-workfloweditor.product\test34\tempbar\workflow1.bpmn20.xml.
Contains: Could not delete: C:\runtime-workfloweditor.product\test34\tempbar.
Interestingly, this problem doesn't occur when running in the Apple OS platform.

I remembered reading a past post that the two lines added above was based on a suggestion to clean off temp folders. In Windows presently we can't remove those. Could it be due to different resource handling or it might be an unexpected bug?

Did I miss out something in the designer code related to this func or do I have to turn off some setting at the machine / OS level?

Outcomes