|
Lines 30-35
Link Here
|
| 30 |
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo; |
30 |
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo; |
| 31 |
import org.eclipse.team.internal.ccvs.ui.*; |
31 |
import org.eclipse.team.internal.ccvs.ui.*; |
| 32 |
import org.eclipse.team.internal.ccvs.ui.Policy; |
32 |
import org.eclipse.team.internal.ccvs.ui.Policy; |
|
|
33 |
import org.eclipse.team.internal.ui.wizards.WorkingSetsDialog; |
| 33 |
import org.eclipse.ui.*; |
34 |
import org.eclipse.ui.*; |
| 34 |
/** |
35 |
/** |
| 35 |
* This class acts as an abstract class for checkout operations. |
36 |
* This class acts as an abstract class for checkout operations. |
|
Lines 514-526
Link Here
|
| 514 |
IWorkingSet oldSet = manager.getWorkingSet(workingSetName); |
515 |
IWorkingSet oldSet = manager.getWorkingSet(workingSetName); |
| 515 |
if (oldSet == null) { |
516 |
if (oldSet == null) { |
| 516 |
IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects); |
517 |
IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects); |
|
|
518 |
newSet.setId(WorkingSetsDialog.resourceWorkingSetId); |
| 517 |
manager.addWorkingSet(newSet); |
519 |
manager.addWorkingSet(newSet); |
| 518 |
}else { |
520 |
} else { |
| 519 |
//don't overwrite the old elements |
521 |
//don't overwrite the old elements |
| 520 |
IAdaptable[] tempElements = oldSet.getElements(); |
522 |
IAdaptable[] tempElements = oldSet.getElements(); |
| 521 |
IAdaptable[] finalElementList = new IAdaptable[tempElements.length + projects.length]; |
523 |
IAdaptable[] finalElementList = new IAdaptable[tempElements.length + projects.length]; |
| 522 |
System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length); |
524 |
System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length); |
| 523 |
System.arraycopy(projects, 0,finalElementList, tempElements.length, projects.length); |
525 |
IAdaptable[] adaptedProjects = oldSet.adaptElements(projects); |
|
|
526 |
System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length); |
| 524 |
oldSet.setElements(finalElementList); |
527 |
oldSet.setElements(finalElementList); |
| 525 |
} |
528 |
} |
| 526 |
} |
529 |
} |