Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Tanasenko2014-09-25 21:20:42 +0000
committerAnton Tanasenko2014-09-25 21:20:42 +0000
commitd55ab0369c7ce7fdcf63b8eb30f22e0fc4c8cae5 (patch)
tree64825785c1981c4f24ecf5383b4e71b5cf12c55a /org.eclipse.m2e.core.ui
parent60273587f04e572e3a909ab9edcf1a5d18226e6d (diff)
downloadm2e-core-d55ab0369c7ce7fdcf63b8eb30f22e0fc4c8cae5.tar.gz
m2e-core-d55ab0369c7ce7fdcf63b8eb30f22e0fc4c8cae5.tar.xz
m2e-core-d55ab0369c7ce7fdcf63b8eb30f22e0fc4c8cae5.zip
445142 Adapt imported projects to types as expected by working sets
Change-Id: Idd9e5e6281d36687fe41d1a7c6710d6cedf2d411 Signed-off-by: Anton Tanasenko <atg.sleepless@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.core.ui')
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/WorkingSets.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/WorkingSets.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/WorkingSets.java
index 6d76743e..4900c898 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/WorkingSets.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/WorkingSets.java
@@ -89,10 +89,11 @@ public class WorkingSets {
if(projects != null && projects.length > 0 && workingSets != null && !workingSets.isEmpty()) {
for(IWorkingSet workingSet : workingSets) {
if(workingSet != null) {
+ IAdaptable[] adaptedProjects = workingSet.adaptElements(projects);
IAdaptable[] oldElements = workingSet.getElements();
- IAdaptable[] newElements = new IAdaptable[oldElements.length + projects.length];
+ IAdaptable[] newElements = new IAdaptable[oldElements.length + adaptedProjects.length];
System.arraycopy(oldElements, 0, newElements, 0, oldElements.length);
- System.arraycopy(projects, 0, newElements, oldElements.length, projects.length);
+ System.arraycopy(adaptedProjects, 0, newElements, oldElements.length, adaptedProjects.length);
workingSet.setElements(newElements);
}
}

Back to the top