Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-11-03 19:56:51 +0000
committerDarin Wright2006-11-03 19:56:51 +0000
commit638a8c89b06b1bf3e0c1fee2ba0447534d50dee1 (patch)
treecd188f1f5d4b3ed71b819c0602b4582f1cfcf617
parent5ea0c1948466c006d83db26d5030e2287530dea5 (diff)
downloadeclipse.platform.debug-638a8c89b06b1bf3e0c1fee2ba0447534d50dee1.tar.gz
eclipse.platform.debug-638a8c89b06b1bf3e0c1fee2ba0447534d50dee1.tar.xz
eclipse.platform.debug-638a8c89b06b1bf3e0c1fee2ba0447534d50dee1.zip
expand launch when process/target added
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
index 10dbd2766..13d971d82 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
@@ -108,17 +108,18 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
*/
protected void installModelProxies(ILaunch[] launches) {
boolean changes = false;
- ModelDelta root = new ModelDelta(fLaunchManager, IModelDelta.NO_CHANGE);
+ ILaunch[] allLaunches = fLaunchManager.getLaunches();
+ ModelDelta root = new ModelDelta(fLaunchManager, 0, IModelDelta.NO_CHANGE, allLaunches.length);
for (int i = 0; i < launches.length; i++) {
ILaunch launch = launches[i];
- ModelDelta launchDelta = root.addNode(launch, IModelDelta.NO_CHANGE);
Object[] children = launch.getChildren();
+ ModelDelta launchDelta = root.addNode(launch, indexOf(launch, allLaunches), IModelDelta.EXPAND | IModelDelta.NO_CHANGE, children.length);
Set set = (Set) fPrevChildren.get(launch);
for (int j = 0; j < children.length; j++) {
Object child = children[j];
if (set.add(child)) {
changes = true;
- launchDelta.addNode(child, IModelDelta.INSTALL);
+ launchDelta.addNode(child, indexOf(child, children), IModelDelta.INSTALL, -1);
}
}
}
@@ -127,6 +128,15 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
}
}
+ protected int indexOf(Object element, Object[] list) {
+ for (int i = 0; i < list.length; i++) {
+ if (element == list[i]) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
protected void fireDelta(ILaunch[] launches, int launchFlags) {
ModelDelta delta = new ModelDelta(fLaunchManager, IModelDelta.NO_CHANGE);
for (int i = 0; i < launches.length; i++) {

Back to the top