Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 183373 Details for
Bug 330553
[Import/Export] Importing a project that exists in workspace location merges the contents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch v01
ImportOverwrite 01.txt (text/plain), 3.00 KB, created by
Prakash Rangaraj
on 2010-11-18 06:26:22 EST
(
hide
)
Description:
Patch v01
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2010-11-18 06:26:22 EST
Size:
3.00 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java,v >retrieving revision 1.58 >diff -u -r1.58 WizardProjectsImportPage.java >--- src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 9 Nov 2010 08:37:05 -0000 1.58 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 18 Nov 2010 11:24:52 -0000 >@@ -296,6 +296,8 @@ > private Button copyCheckbox; > > private boolean copyFiles = false; >+ >+ private boolean lastCopyFiles = false; > > private ProjectRecord[] selectedProjects = new ProjectRecord[0]; > >@@ -424,6 +426,7 @@ > copyCheckbox.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { > copyFiles = copyCheckbox.getSelection(); >+ updateProjectsList(directoryPathField.getText().trim()); > } > }); > } >@@ -850,7 +853,7 @@ > > final File directory = new File(path); > long modified = directory.lastModified(); >- if (path.equals(lastPath) && lastModified == modified) { >+ if (path.equals(lastPath) && lastModified == modified && lastCopyFiles == copyFiles) { > // since the file/folder was not modified and the path did not > // change, no refreshing is required > return; >@@ -858,6 +861,7 @@ > > lastPath = path; > lastModified = modified; >+ lastCopyFiles = copyFiles; > > // We can't access the radio button from the inner class so get the > // status beforehand >@@ -1503,7 +1507,8 @@ > public ProjectRecord[] getProjectRecords() { > List projectRecords = new ArrayList(); > for (int i = 0; i < selectedProjects.length; i++) { >- if (isProjectInWorkspace(selectedProjects[i].getProjectName())) { >+ if ( (isProjectInWorkspacePath(selectedProjects[i].getProjectName()) && copyFiles)|| >+ isProjectInWorkspace(selectedProjects[i].getProjectName())) { > selectedProjects[i].hasConflicts = true; > } > projectRecords.add(selectedProjects[i]); >@@ -1513,6 +1518,19 @@ > } > > /** >+ * Determine if there is a directory with the project name in the workspace path. >+ * >+ * @param projectName the name of the project >+ * @return true if there is a directory with the same name of the imported project >+ */ >+ private boolean isProjectInWorkspacePath(String projectName){ >+ final IWorkspace workspace = ResourcesPlugin.getWorkspace(); >+ IPath wsPath = workspace.getRoot().getLocation(); >+ IPath localProjectPath = wsPath.append(projectName); >+ return localProjectPath.toFile().exists(); >+ } >+ >+ /** > * Determine if the project with the given name is in the current workspace. > * > * @param projectName >@@ -1549,6 +1567,7 @@ > // checkbox > copyFiles = settings.getBoolean(STORE_COPY_PROJECT_ID); > copyCheckbox.setSelection(copyFiles); >+ lastCopyFiles = copyFiles; > } > > // Second, check to see if we don't have an initial path,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 330553
: 183373 |
185628