Bug 212755 - PDE import shows error dialog and logs error when app is running
Summary: PDE import shows error dialog and logs error when app is running
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: bartosz michalik CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-12-12 09:50 EST by Dani Megert CLA
Modified: 2008-01-09 15:34 EST (History)
1 user (show)

See Also:
baumanbr: review+


Attachments
fix proposal (953 bytes, patch)
2008-01-07 14:44 EST, bartosz michalik CLA
no flags Details | Diff
fix proposal (953 bytes, patch)
2008-01-07 14:45 EST, bartosz michalik CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2007-12-12 09:50:37 EST
I20071212-0010.

See bug 185502 for details.

The current approach seems not to work completely correct: after I got the dialog saying that an app is running (great!) I decided to import anyway. While importing I got two error dialogs saying that a resource can't be deleted and a .log entry (will post test case in next comment). This is unexpected as the first dialog said that locked plug-ins won't be imported.

Test Case see bug 185502 comment 25.
Comment 1 Dani Megert CLA 2007-12-12 09:56:32 EST
Below is the .log. It seems that the importer still goes ahead and tries to delete the plug-ins. That's OK for me but then the initial dialog should be a warning dialog and it should not say that locked plug-ins aren't imported but rather that they may get corrupted.

A better approach would be to simply not import the affected plug-ins (see also bug 212758).


!SESSION 2007-12-12 15:44:57.236 -----------------------------------------------
eclipse.buildId=I20071212-0010
java.version=1.6.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH
Framework arguments:  -keyring c:\eclipse\.keyring -showlocation -application org.eclipse.ui.ide.workbench -testPluginName -classname
Command-line arguments:  -debug -keyring c:\eclipse\.keyring -showlocation -application org.eclipse.ui.ide.workbench -testPluginName -classname -data c:\eclipse\workspaces\tmp

!ENTRY org.eclipse.core.resources 4 273 2007-12-12 15:49:47.663
!MESSAGE Problems encountered while deleting resources.
!SUBENTRY 1 org.eclipse.core.resources 4 273 2007-12-12 15:49:47.663
!MESSAGE Could not delete '/org.eclipse.core.filesystem.win32.x86/os'.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:225)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFolder(ResourceTree.java:350)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteProject(ResourceTree.java:385)
	at org.eclipse.core.internal.resources.ResourceTree.standardDeleteProject(ResourceTree.java:831)
	at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1695)
	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:699)
	at org.eclipse.core.internal.resources.Project.delete(Project.java:310)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importPlugin(PluginImportOperation.java:251)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.run(PluginImportOperation.java:153)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard$2.run(PluginImportWizard.java:162)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 2 org.eclipse.core.resources 4 273 2007-12-12 15:49:47.663
!MESSAGE Problems encountered while deleting resources.
!SUBENTRY 3 org.eclipse.core.filesystem 4 273 2007-12-12 15:49:47.663
!MESSAGE Problems encountered while deleting files.
!SUBENTRY 4 org.eclipse.core.filesystem 4 273 2007-12-12 15:49:47.663
!MESSAGE Could not delete: C:\eclipse\workspaces\tmp\org.eclipse.core.filesystem.win32.x86\os\win32\x86\localfile_1_0_0.dll.
!SUBENTRY 4 org.eclipse.core.filesystem 4 273 2007-12-12 15:49:47.663
!MESSAGE Could not delete: C:\eclipse\workspaces\tmp\org.eclipse.core.filesystem.win32.x86\os\win32\x86.
!SUBENTRY 4 org.eclipse.core.filesystem 4 273 2007-12-12 15:49:47.663
!MESSAGE Could not delete: C:\eclipse\workspaces\tmp\org.eclipse.core.filesystem.win32.x86\os\win32.
!SUBENTRY 4 org.eclipse.core.filesystem 4 273 2007-12-12 15:49:47.663
!MESSAGE Could not delete: C:\eclipse\workspaces\tmp\org.eclipse.core.filesystem.win32.x86\os.
!SUBENTRY 1 org.eclipse.core.resources 4 273 2007-12-12 15:49:47.663
!MESSAGE Could not delete 'C:\eclipse\workspaces\tmp\org.eclipse.core.filesystem.win32.x86'.

!ENTRY org.eclipse.core.resources 4 273 2007-12-12 15:50:34.130
!MESSAGE Problems encountered while deleting resources.
!SUBENTRY 1 org.eclipse.core.resources 4 273 2007-12-12 15:50:34.130
!MESSAGE Could not delete 'C:\eclipse\workspaces\tmp\org.eclipse.ui.workbench.compatibility\compatibility.jar'.
!STACK 1
org.eclipse.core.runtime.CoreException: Problems encountered while deleting files.
	at org.eclipse.core.internal.filesystem.local.LocalFile.delete(LocalFile.java:123)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFile(ResourceTree.java:302)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteProject(ResourceTree.java:382)
	at org.eclipse.core.internal.resources.ResourceTree.standardDeleteProject(ResourceTree.java:831)
	at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1695)
	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:699)
	at org.eclipse.core.internal.resources.Project.delete(Project.java:310)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importPlugin(PluginImportOperation.java:251)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.run(PluginImportOperation.java:153)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard$2.run(PluginImportWizard.java:162)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 2 org.eclipse.core.filesystem 4 273 2007-12-12 15:50:34.130
!MESSAGE Problems encountered while deleting files.
!SUBENTRY 3 org.eclipse.core.filesystem 4 273 2007-12-12 15:50:34.130
!MESSAGE Could not delete: C:\eclipse\workspaces\tmp\org.eclipse.ui.workbench.compatibility\compatibility.jar.
!SUBENTRY 1 org.eclipse.core.resources 4 273 2007-12-12 15:50:34.130
!MESSAGE Could not delete 'C:\eclipse\workspaces\tmp\org.eclipse.ui.workbench.compatibility'.
Comment 2 bartosz michalik CLA 2008-01-07 14:44:51 EST
Created attachment 86340 [details]
fix proposal

unfortunatelly I could find better solution. CoreException was thrown when in some plugin fragments. in that case jar's which generates exception are not listed form getPlugins() method so are ommited in safeCheck
Comment 3 bartosz michalik CLA 2008-01-07 14:45:04 EST
Created attachment 86341 [details]
fix proposal

unfortunatelly I could find better solution. CoreException was thrown when in some plugin fragments. in that case jar's which generates exception are not listed form getPlugins() method so are ommited in safeCheck
Comment 4 Dani Megert CLA 2008-01-08 03:01:42 EST
>unfortunatelly I could find better solution.
You mean "fortunately"?
Comment 5 bartosz michalik CLA 2008-01-08 03:25:32 EST
(In reply to comment #4)
> >unfortunatelly I could find better solution.
> You mean "fortunately"?
I mean "I couldn't" ;)
I couldn't find better solution than this proposed :)

Comment 6 Brian Bauman CLA 2008-01-09 15:34:55 EST
Simple and elegant, thanks a lot Bartosz!

It seems that this is just a different flavor of bug 185502 (where a dll is locked instead of the library jar).  In the future I would like to try to find a way that is supported by Platform to try to delete a project and if we run into errors then try to replace the files or to check to see if we can successfully delete a project.  I have an email into the platform-core-dev mailing list to see if there is anything that exists that we can leverage.