Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 310499 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java (-2 / +2 lines)
Lines 56-64 Link Here
56
	public static String FileImport_createVirtualFolders;
56
	public static String FileImport_createVirtualFolders;
57
	public static String FileImport_importElementsAs;
57
	public static String FileImport_importElementsAs;
58
	public static String FileImport_createVirtualFoldersTooltip;
58
	public static String FileImport_createVirtualFoldersTooltip;
59
	public static String FileImport_copyIntoWorkspace;
59
	public static String FileImport_createLinksInWorkspace;
60
	public static String FileImport_advanced;
60
	public static String FileImport_advanced;
61
	public static String FileImport_copyIntoWorkspaceTooltip;
61
	public static String FileImport_createLinksInWorkspaceTooltip;
62
	public static String FileImport_noneSelected;
62
	public static String FileImport_noneSelected;
63
	public static String FileImport_invalidSource;
63
	public static String FileImport_invalidSource;
64
	public static String FileImport_sourceEmpty;
64
	public static String FileImport_sourceEmpty;
(-)src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java (-19 / +19 lines)
Lines 86-92 Link Here
86
86
87
    protected Button createVirtualFoldersButton;
87
    protected Button createVirtualFoldersButton;
88
88
89
    protected Button copyIntoWorkspaceButton;
89
    protected Button createLinksInWorkspaceButton;
90
    
90
    
91
	protected Button advancedButton;
91
	protected Button advancedButton;
92
92
Lines 116-122 Link Here
116
116
117
    private final static String STORE_CREATE_VIRTUAL_FOLDERS_ID = "WizardFileSystemResourceImportPage1.STORE_CREATE_VIRTUAL_FOLDERS_ID";//$NON-NLS-1$
117
    private final static String STORE_CREATE_VIRTUAL_FOLDERS_ID = "WizardFileSystemResourceImportPage1.STORE_CREATE_VIRTUAL_FOLDERS_ID";//$NON-NLS-1$
118
118
119
    private final static String STORE_COPY_INTO_WORKSPACE_ID = "WizardFileSystemResourceImportPage1.STORE_COPY_INTO_WORKSPACE_ID";//$NON-NLS-1$
119
    private final static String STORE_CREATE_LINKS_IN_WORKSPACE_ID = "WizardFileSystemResourceImportPage1.STORE_CREATE_LINKS_IN_WORKSPACE_ID";//$NON-NLS-1$
120
120
121
    private final static String STORE_PATH_VARIABLE_SELECTED_ID = "WizardFileSystemResourceImportPage1.STORE_PATH_VARIABLE_SELECTED_ID";//$NON-NLS-1$
121
    private final static String STORE_PATH_VARIABLE_SELECTED_ID = "WizardFileSystemResourceImportPage1.STORE_PATH_VARIABLE_SELECTED_ID";//$NON-NLS-1$
122
122
Lines 336-348 Link Here
336
336
337
337
338
        // create linked resource check
338
        // create linked resource check
339
		copyIntoWorkspaceButton= new Button(linkedResourceComposite, SWT.CHECK);
339
		createLinksInWorkspaceButton= new Button(linkedResourceComposite, SWT.CHECK);
340
		copyIntoWorkspaceButton.setFont(parent.getFont());
340
		createLinksInWorkspaceButton.setFont(parent.getFont());
341
        copyIntoWorkspaceButton.setText(DataTransferMessages.FileImport_copyIntoWorkspace);
341
        createLinksInWorkspaceButton.setText(DataTransferMessages.FileImport_createLinksInWorkspace);
342
        copyIntoWorkspaceButton.setToolTipText(DataTransferMessages.FileImport_copyIntoWorkspaceTooltip);
342
        createLinksInWorkspaceButton.setToolTipText(DataTransferMessages.FileImport_createLinksInWorkspaceTooltip);
343
        copyIntoWorkspaceButton.setSelection(true);
343
        createLinksInWorkspaceButton.setSelection(false);
344
        
344
        
345
        copyIntoWorkspaceButton.addSelectionListener(new SelectionAdapter() {
345
        createLinksInWorkspaceButton.addSelectionListener(new SelectionAdapter() {
346
        	public void widgetSelected(SelectionEvent e) {
346
        	public void widgetSelected(SelectionEvent e) {
347
        		updateWidgetEnablements();
347
        		updateWidgetEnablements();
348
        	}
348
        	}
Lines 425-431 Link Here
425
		if (linkedResourceComposite != null) {
425
		if (linkedResourceComposite != null) {
426
			linkedResourceComposite.dispose();
426
			linkedResourceComposite.dispose();
427
			linkedResourceComposite= null;
427
			linkedResourceComposite= null;
428
			copyIntoWorkspaceButton = null;
428
			createLinksInWorkspaceButton = null;
429
			createVirtualFoldersButton = null;
429
			createVirtualFoldersButton = null;
430
			relativePathVariableGroup = null;
430
			relativePathVariableGroup = null;
431
			composite.layout();
431
			composite.layout();
Lines 831-837 Link Here
831
        
831
        
832
        boolean shouldImportTopLevelFoldersRecursively = allItemsAreChecked() &&
832
        boolean shouldImportTopLevelFoldersRecursively = allItemsAreChecked() &&
833
        											createOnlySelectedButton.getSelection() &&
833
        											createOnlySelectedButton.getSelection() &&
834
        											(copyIntoWorkspaceButton != null && copyIntoWorkspaceButton.getSelection() == false) &&
834
        											(createLinksInWorkspaceButton != null && createLinksInWorkspaceButton.getSelection()) &&
835
        											(createVirtualFoldersButton != null && createVirtualFoldersButton.getSelection() == false);
835
        											(createVirtualFoldersButton != null && createVirtualFoldersButton.getSelection() == false);
836
		
836
		
837
        if (shouldImportTopLevelFoldersRecursively)
837
        if (shouldImportTopLevelFoldersRecursively)
Lines 871-877 Link Here
871
                .getSelection());
871
                .getSelection());
872
        op.setOverwriteResources(overwriteExistingResourcesCheckbox
872
        op.setOverwriteResources(overwriteExistingResourcesCheckbox
873
                .getSelection());
873
                .getSelection());
874
        if (copyIntoWorkspaceButton != null && copyIntoWorkspaceButton.getSelection() == false) {
874
        if (createLinksInWorkspaceButton != null && createLinksInWorkspaceButton.getSelection()) {
875
        	op.setCreateLinks(true);
875
        	op.setCreateLinks(true);
876
	        op.setVirtualFolders(createVirtualFoldersButton
876
	        op.setVirtualFolders(createVirtualFoldersButton
877
	                .getSelection());
877
	                .getSelection());
Lines 958-965 Link Here
958
	            createVirtualFoldersButton.setSelection(createVirtualFolders);
958
	            createVirtualFoldersButton.setSelection(createVirtualFolders);
959
	
959
	
960
	            boolean createLinkedResources = settings
960
	            boolean createLinkedResources = settings
961
	    				.getBoolean(STORE_COPY_INTO_WORKSPACE_ID);
961
	    				.getBoolean(STORE_CREATE_LINKS_IN_WORKSPACE_ID);
962
	            copyIntoWorkspaceButton.setSelection(createLinkedResources);
962
	            createLinksInWorkspaceButton.setSelection(createLinkedResources);
963
	
963
	
964
	            boolean pathVariableSelected = settings
964
	            boolean pathVariableSelected = settings
965
						.getBoolean(STORE_PATH_VARIABLE_SELECTED_ID);
965
						.getBoolean(STORE_PATH_VARIABLE_SELECTED_ID);
Lines 1000-1007 Link Here
1000
	            settings.put(STORE_CREATE_VIRTUAL_FOLDERS_ID,
1000
	            settings.put(STORE_CREATE_VIRTUAL_FOLDERS_ID,
1001
	            		createVirtualFoldersButton.getSelection());
1001
	            		createVirtualFoldersButton.getSelection());
1002
	
1002
	
1003
	            settings.put(STORE_COPY_INTO_WORKSPACE_ID,
1003
	            settings.put(STORE_CREATE_LINKS_IN_WORKSPACE_ID,
1004
	            		copyIntoWorkspaceButton.getSelection());
1004
	            		createLinksInWorkspaceButton.getSelection());
1005
	
1005
	
1006
	            settings.put(STORE_PATH_VARIABLE_SELECTED_ID,
1006
	            settings.put(STORE_PATH_VARIABLE_SELECTED_ID,
1007
	            		relativePathVariableGroup.getSelection());
1007
	            		relativePathVariableGroup.getSelection());
Lines 1186-1202 Link Here
1186
        super.updateWidgetEnablements();
1186
        super.updateWidgetEnablements();
1187
        enableButtonGroup(ensureSourceIsValid());
1187
        enableButtonGroup(ensureSourceIsValid());
1188
1188
1189
    	if (copyIntoWorkspaceButton != null) {
1189
    	if (createLinksInWorkspaceButton != null) {
1190
			IPath path = getContainerFullPath();
1190
			IPath path = getContainerFullPath();
1191
	    	if (path != null && relativePathVariableGroup != null) {
1191
	    	if (path != null && relativePathVariableGroup != null) {
1192
				IResource target = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
1192
				IResource target = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
1193
				if (target != null && target.isVirtual()) {
1193
				if (target != null && target.isVirtual()) {
1194
					copyIntoWorkspaceButton.setSelection(false);
1194
					createLinksInWorkspaceButton.setSelection(true);
1195
					createVirtualFoldersButton.setSelection(true);
1195
					createVirtualFoldersButton.setSelection(true);
1196
				}
1196
				}
1197
	    	}
1197
	    	}
1198
			relativePathVariableGroup.setEnabled(!copyIntoWorkspaceButton.getSelection());
1198
			relativePathVariableGroup.setEnabled(createLinksInWorkspaceButton.getSelection());
1199
			createVirtualFoldersButton.setEnabled(!copyIntoWorkspaceButton.getSelection());
1199
			createVirtualFoldersButton.setEnabled(createLinksInWorkspaceButton.getSelection());
1200
	
1200
	
1201
			if ((!selectionGroup.getAllCheckedListItems().isEmpty() && !allItemsAreChecked()) ||
1201
			if ((!selectionGroup.getAllCheckedListItems().isEmpty() && !allItemsAreChecked()) ||
1202
				(createOnlySelectedButton.getSelection() == false)) {
1202
				(createOnlySelectedButton.getSelection() == false)) {
(-)src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties (-2 / +2 lines)
Lines 54-62 Link Here
54
FileImport_createVirtualFolders = Create &virtual folders
54
FileImport_createVirtualFolders = Create &virtual folders
55
FileImport_importElementsAs=Create l&ink locations relative to:
55
FileImport_importElementsAs=Create l&ink locations relative to:
56
FileImport_createVirtualFoldersTooltip = This option needs to be set when a partial hierarchy is selected.
56
FileImport_createVirtualFoldersTooltip = This option needs to be set when a partial hierarchy is selected.
57
FileImport_copyIntoWorkspace= Copy into wor&kspace
57
FileImport_createLinksInWorkspace= Create links in wor&kspace
58
FileImport_advanced=Advance&d
58
FileImport_advanced=Advance&d
59
FileImport_copyIntoWorkspaceTooltip= If this option is not set, link files and folders will be created
59
FileImport_createLinksInWorkspaceTooltip= If this option is set, link files and folders will be created
60
FileImport_noneSelected = There are no resources currently selected for import.
60
FileImport_noneSelected = There are no resources currently selected for import.
61
FileImport_invalidSource = Source directory is not valid or has not been specified.
61
FileImport_invalidSource = Source directory is not valid or has not been specified.
62
FileImport_sourceEmpty = Source must not be empty.
62
FileImport_sourceEmpty = Source must not be empty.

Return to bug 310499