Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-05-11 13:54:33 -0400
committerSusan Franklin2010-05-11 13:54:33 -0400
commit7fab4f41a75b97849e11dcf804d139a00f2cde03 (patch)
tree893761f3fa6f703a26131ae649321721a038b50c /bundles/org.eclipse.equinox.p2.tests.ui
parent1237ef41dfe4f61c3c0bc9999b18d2c7dd3f1cc9 (diff)
downloadrt.equinox.p2-7fab4f41a75b97849e11dcf804d139a00f2cde03.tar.gz
rt.equinox.p2-7fab4f41a75b97849e11dcf804d139a00f2cde03.tar.xz
rt.equinox.p2-7fab4f41a75b97849e11dcf804d139a00f2cde03.zip
Bug 310507 - [ui] Work with combo intermittently misses changes made in pref dialog
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.java50
1 files changed, 0 insertions, 50 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 4a0f0f772..b3022ff2d 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,16 +15,11 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-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;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
/**
@@ -90,54 +85,9 @@ public class ElementUtilsTest extends ProfileModificationActionTest {
// We expect known2 to get added because it was in the elements
// We expect uri3 to get removed (as if it had been removed from a pref page)
// System repos shouldn't be touched
- // All this happens asynchronously so we have to install a listener to know
- // that it has completed.
- // The repo update happens in a job, so we need to ensure it finished
- final boolean[] done = new boolean[1];
- done[0] = false;
-
- Platform.getJobManager().addJobChangeListener(new IJobChangeListener() {
-
- public void aboutToRun(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void awake(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void done(IJobChangeEvent event) {
- if (event.getJob().getName().equals(ProvUIMessages.ElementUtils_UpdateJobTitle))
- done[0] = true;
-
- }
-
- public void running(IJobChangeEvent event) {
- // TODO Auto-generated method stub
- }
-
- public void scheduled(IJobChangeEvent event) {
- // TODO Auto-generated method stub
- }
-
- public void sleeping(IJobChangeEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- });
ElementUtils.updateRepositoryUsingElements(elements, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- // spin event loop until job is done
- Display display = PlatformUI.getWorkbench().getDisplay();
- while (!done[0]) {
- if (!display.readAndDispatch())
- display.sleep();
- }
-
URI[] enabled = getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
URI[] disabled = getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED);

Back to the top