Bug 161044 [Import/Export] Error: Destination directory conflicts with location of workspace root
Steps to reproduce: 1)Create a new simple project called Proj1 2)Create a new simple project called Proj2 3)Create a new file called testFile in Proj1 4)Try to export the testFile as a zip file and put that zip file inside C:\<yourWorkspace>\Proj2 You get error "Destination directory conflicts with location of workspace root" The code causing this is in UI. The class is called org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceExportPage1and the method is #validateDestinationGroup. - Why is this considered an error? Products built upon Eclipse allow you to export to a directory in the workspace so obviously this is not a rule but more of a policy used by Eclipse export wizard. This introduces inconsistent behaviour with downstream products. - Can the export be made less restrictive? For example, permit the above example but prevent exports that would damage or corrupt the workspace.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceExportPage1.java
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
                IDataTransferHelpContextIds.FILE_SYSTEM_EXPORT_WIZARD_PAGE);
    }
    /**
     *	Create the export destination specification widgets
     *
     *	@param parent org.eclipse.swt.widgets.Composite
     */
    protected void createDestinationGroup(Composite parent) {
        Font font = parent.getFont();
        
        Composite destinationSelectionGroup = new Composite(parent, SWT.NONE);
        GridLayout layout = new GridLayout();
        layout.numColumns = 3;
        destinationSelectionGroup.setLayout(layout);
        destinationSelectionGroup.setLayoutData(new GridData(
                GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
        destinationSelectionGroup.setFont(font);
        Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE);
        destinationLabel.setText(getDestinationLabel());
        destinationLabel.setFont(font);
        
        destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE
                | SWT.BORDER);
        destinationNameField.addListener(SWT.Modify, this);
        destinationNameField.addListener(SWT.Selection, this);
        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
                | GridData.GRAB_HORIZONTAL);
        data.widthHint = SIZING_TEXT_FIELD_WIDTH;
        destinationNameField.setLayoutData(data);