Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2009-04-13 12:18:43 -0400
committerSusan Franklin2009-04-13 12:18:43 -0400
commit146570fa26f6878b5d83bd1b630a42eaa49de0a1 (patch)
tree57c477983a8b51a4677ab9278b9f0808cdd52c67 /bundles/org.eclipse.equinox.p2.tests.ui
parentaf60f18359bfb0e2976d78f97d947d4c1cbdff8b (diff)
downloadrt.equinox.p2-146570fa26f6878b5d83bd1b630a42eaa49de0a1.tar.gz
rt.equinox.p2-146570fa26f6878b5d83bd1b630a42eaa49de0a1.tar.xz
rt.equinox.p2-146570fa26f6878b5d83bd1b630a42eaa49de0a1.zip
Bug 271190 - [ui] ElementUtils removes composite child repos
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.ui')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
index 3b732170b..5b79f9b64 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
@@ -15,8 +15,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.*;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
@@ -26,6 +25,7 @@ import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager
import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
/**
@@ -119,7 +119,8 @@ public class ElementUtilsTest extends ProfileModificationActionTest {
}
public void scheduled(IJobChangeEvent event) {
- // TODO Auto-generated method stub
+ if (event.getJob().getName().equals(ProvUIMessages.ElementUtils_UpdateJobTitle))
+ event.getJob().setPriority(Job.INTERACTIVE);
}
@@ -130,9 +131,11 @@ public class ElementUtilsTest extends ProfileModificationActionTest {
});
- // spin until job is done
+ // spin event loop until job is done
+ Display display = PlatformUI.getWorkbench().getDisplay();
while (!done[0]) {
- // nothing to do
+ if (!display.readAndDispatch())
+ display.sleep();
}
URI[] enabled = ProvisioningUtil.getMetadataRepositories(IRepositoryManager.REPOSITORIES_ALL);

Back to the top