Community
Participate
Working Groups
Build Identifier: When importing external folder to project, import wizard does not inform page views about new selection. So package explorer dont show new container or resource. Reproducible: Always
Created attachment 207519 [details] java source Proposed path
I check that workbench window should be instantiated in constructor. Now is instantiated in selection method. Here activeWorkbench returns null. Sorry for that.
(In reply to comment #1) > Created attachment 207519 [details] > java source > > Proposed path Could you attach the file as a diff? http://wiki.eclipse.org/Platform_UI/How_to_Contribute
In new wizards, org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard calls org.eclipse.ui.wizards.newresource.BasicNewResourceWizard.selectAndReveal(IResource) as part of its performFinish() operation. That seems to imply you want a similar pattern implemented on org.eclipse.ui.wizards.datatransfer.FileSystemImportWizard, not in the operations. As Remy mentioned, you should follow http://wiki.eclipse.org/Platform_UI/How_to_Contribute and provide your changes as a patch. PW
Created attachment 207572 [details] Proposed patch In attachment is a proposed patch. Thanks for introduction :) I'm very happy for this opportunity. In case of this bug we have two options: Select root container or first imported resource (folder or file) I'm implemented both solutions (second is commented) Source code quality is not so good. I hope that patch can be useful. There is no option to select whole structure. Operation returns only boolean, so we must find first element using root visitor. (In reply to comment #4) > That seems to imply you want a similar pattern implemented on > org.eclipse.ui.wizards.datatransfer.FileSystemImportWizard, not in the > operations. > Operations should deal with resources. This pattern should be invokend in operationPerformed hook or in performFinish. I use second solution.
This is done on purpose, see bug 2336.
(In reply to comment #6) > This is done on purpose, see bug 2336. Dani, I thought this was about selecting in the package explorer (and others) after the import was done, similar to the call in org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish() PW
(In reply to comment #7) > (In reply to comment #6) > > This is done on purpose, see bug 2336. > > Dani, I thought this was about selecting in the package explorer (and others) > after the import was done, similar to the call in > org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish() Yes, but in the case of the new wizard there is just one new resource. In case of import you might end up with many many selections, hence this was not implemented on purpose when importing.
(In reply to comment #8) > > Yes, but in the case of the new wizard there is just one new resource. In case > of import you might end up with many many selections, hence this was not > implemented on purpose when importing. Is it acceptable to either 1) pick the first resource during the import or 2) select the containier? I have no preference but if it's useful to the users, I'm OK with it. PW
(In reply to comment #9) > (In reply to comment #8) > > > > Yes, but in the case of the new wizard there is just one new resource. In case > > of import you might end up with many many selections, hence this was not > > implemented on purpose when importing. > > Is it acceptable to either 1) pick the first resource during the import or 2) > select the containier? I have no preference but if it's useful to the users, > I'm OK with it. > > PW I think this would be random. I'd prefer not to touch the selection. Somewhat import is similar to copy/paste, where we also don't change the view selection.
> Somewhat import is similar to copy/paste, where we also don't change the view > selection. And same applies when using Drag&Drop.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.