Skip to main content
summaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorPawel Piech2011-12-13 00:09:33 -0500
committerPawel Piech2011-12-13 00:11:43 -0500
commitcd080686aacab3ee56bf8a1f2c72aa2ebc1685cc (patch)
tree83050e942d55e6cb2c03e0b83969e2805da2deb7 /dsf
parent3586ae698fa3a941ebfc0fc41d9c50b2fad84ffa (diff)
downloadorg.eclipse.cdt-cd080686aacab3ee56bf8a1f2c72aa2ebc1685cc.tar.gz
org.eclipse.cdt-cd080686aacab3ee56bf8a1f2c72aa2ebc1685cc.tar.xz
org.eclipse.cdt-cd080686aacab3ee56bf8a1f2c72aa2ebc1685cc.zip
Bug 366446 - [test] DSF tests don't compile against platform 4.2M4
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java2
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/FormattedValueTests.java8
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerFormattedValueTests.java4
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerPerformanceTests.java4
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/PerformanceTests.java6
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java14
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModelUpdatesListener.java8
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/VirtualViewerPerformanceTests.java4
8 files changed, 24 insertions, 26 deletions
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java
index 33985c1d25..57cd986687 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java
@@ -22,7 +22,6 @@ import junit.framework.Assert;
import org.eclipse.cdt.dsf.ui.viewmodel.properties.IPropertiesUpdate;
import org.eclipse.cdt.dsf.ui.viewmodel.properties.IPropertiesUpdateListener;
import org.eclipse.debug.internal.ui.viewers.model.ILabelUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
@@ -31,6 +30,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedList
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
import org.eclipse.jface.viewers.TreePath;
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/FormattedValueTests.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/FormattedValueTests.java
index d6a473cc30..05ebab878f 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/FormattedValueTests.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/FormattedValueTests.java
@@ -41,10 +41,10 @@ import org.eclipse.cdt.tests.dsf.IViewerUpdatesListenerConstants;
import org.eclipse.cdt.tests.dsf.vm.TestModel.TestElement;
import org.eclipse.cdt.tests.dsf.vm.TestModel.TestElementValidator;
import org.eclipse.cdt.tests.dsf.vm.TestModel.TestEvent;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.ViewerLabel;
@@ -191,7 +191,7 @@ abstract public class FormattedValueTests extends TestCase implements IViewerUpd
initQuery.get();
}
- abstract protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell);
+ abstract protected IInternalTreeModelViewer createViewer(Display display, Shell shell);
/**
* @throws java.lang.Exception
@@ -618,7 +618,7 @@ abstract public class FormattedValueTests extends TestCase implements IViewerUpd
int levelStop, int levelIndex, HashMap<String, ElementFormatSetting> result) {
if (levelStop >= 0 && levelIndex >= levelStop)
return;
- ITreeModelContentProviderTarget viewer = (ITreeModelContentProviderTarget)_viewer;
+ IInternalTreeModelViewer viewer = (IInternalTreeModelViewer)_viewer;
int childCount = viewer.getChildCount(path);
if (childCount == 0)
return;
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerFormattedValueTests.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerFormattedValueTests.java
index c28a1b2d0b..89395446a2 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerFormattedValueTests.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerFormattedValueTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.vm;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
import org.eclipse.swt.SWT;
@@ -27,7 +27,7 @@ public class JFaceViewerFormattedValueTests extends FormattedValueTests {
}
@Override
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
+ protected IInternalTreeModelViewer createViewer(Display display, Shell shell) {
return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
}
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerPerformanceTests.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerPerformanceTests.java
index 2e77897d74..92c95149ac 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerPerformanceTests.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/JFaceViewerPerformanceTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.vm;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
import org.eclipse.swt.SWT;
@@ -27,7 +27,7 @@ public class JFaceViewerPerformanceTests extends PerformanceTests {
}
@Override
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
+ protected IInternalTreeModelViewer createViewer(Display display, Shell shell) {
return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
}
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/PerformanceTests.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/PerformanceTests.java
index 3438d076bc..f20b44ce97 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/PerformanceTests.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/PerformanceTests.java
@@ -17,9 +17,9 @@ import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.IViewerUpdatesListenerConstants;
import org.eclipse.cdt.tests.dsf.vm.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.layout.FillLayout;
@@ -73,7 +73,7 @@ abstract public class PerformanceTests extends TestCase implements IViewerUpdate
fShell.open ();
}
- abstract protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell);
+ abstract protected IInternalTreeModelViewer createViewer(Display display, Shell shell);
/**
* @throws java.lang.Exception
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java
index 286d334889..68abe9282e 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java
@@ -24,14 +24,13 @@ import org.eclipse.cdt.dsf.debug.service.IFormattedValues;
import org.eclipse.cdt.dsf.service.AbstractDsfService;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.DsfTestPlugin;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelCheckProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.jface.viewers.TreePath;
import org.osgi.framework.BundleContext;
@@ -297,7 +296,7 @@ public class TestModel extends AbstractDsfService implements IFormattedValues {
}
}
- public TestElement getElementFromViewer(ITreeModelContentProviderTarget viewer, TreePath parentPath, int index) {
+ public TestElement getElementFromViewer(IInternalTreeModelViewer viewer, TreePath parentPath, int index) {
Object element = viewer.getChildElement(parentPath, index);
if (element instanceof TestElementVMContext) {
return ((TestElementVMContext)element).getElement();
@@ -339,12 +338,11 @@ public class TestModel extends AbstractDsfService implements IFormattedValues {
public void validateData(ITreeModelViewer _viewer, TreePath path, TestElementValidator validator, boolean expandedElementsOnly) {
- ITreeModelContentProviderTarget viewer = (ITreeModelContentProviderTarget)_viewer;
+ IInternalTreeModelViewer viewer = (IInternalTreeModelViewer)_viewer;
TestElement element = getElement(path);
if ( Boolean.TRUE.equals(_viewer.getPresentationContext().getProperty(ICheckUpdate.PROP_CHECK)) ) {
- ITreeModelCheckProviderTarget checkTarget = (ITreeModelCheckProviderTarget)_viewer;
- Assert.assertEquals(element.getChecked(), checkTarget.getElementChecked(path));
- Assert.assertEquals(element.getGrayed(), checkTarget.getElementGrayed(path));
+ Assert.assertEquals(element.getChecked(), viewer.getElementChecked(path));
+ Assert.assertEquals(element.getGrayed(), viewer.getElementGrayed(path));
}
if (!expandedElementsOnly || path.getSegmentCount() == 0 || viewer.getExpandedState(path) ) {
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModelUpdatesListener.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModelUpdatesListener.java
index a98d0a4f97..24a67a9136 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModelUpdatesListener.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModelUpdatesListener.java
@@ -18,8 +18,8 @@ import java.util.TreeSet;
import org.eclipse.cdt.tests.dsf.ViewerUpdatesListener;
import org.eclipse.cdt.tests.dsf.vm.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.jface.viewers.TreePath;
/**
@@ -138,7 +138,7 @@ public class TestModelUpdatesListener extends ViewerUpdatesListener
addUpdates(path, element, levels, ALL_UPDATES_COMPLETE);
}
- public void addStateUpdates(ITreeModelContentProviderTarget viewer, TreePath path, TestElement element) {
+ public void addStateUpdates(IInternalTreeModelViewer viewer, TreePath path, TestElement element) {
addUpdates(viewer, path, element, -1, STATE_UPDATES);
}
@@ -146,7 +146,7 @@ public class TestModelUpdatesListener extends ViewerUpdatesListener
addUpdates(null, path, element, levels, flags);
}
- public void addUpdates(ITreeModelContentProviderTarget viewer, TreePath path, TestElement element, int levels, int flags) {
+ public void addUpdates(IInternalTreeModelViewer viewer, TreePath path, TestElement element, int levels, int flags) {
if (!path.equals(TreePath.EMPTY)) {
if ((flags & LABEL_UPDATES) != 0) {
addLabelUpdate(path);
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/VirtualViewerPerformanceTests.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/VirtualViewerPerformanceTests.java
index 91cca15673..a496bebb09 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/VirtualViewerPerformanceTests.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/VirtualViewerPerformanceTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.vm;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
+import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
import org.eclipse.swt.widgets.Display;
@@ -26,7 +26,7 @@ public class VirtualViewerPerformanceTests extends PerformanceTests {
}
@Override
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
+ protected IInternalTreeModelViewer createViewer(Display display, Shell shell) {
return new VirtualTreeModelViewer(fDisplay, 0, new PresentationContext("TestViewer"));
}

Back to the top