Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Build errors in master - ITreeModelContentProviderTarget

Would the attached patch1 work? The patch uses the TreeModelViewer to find the paths for the launch object and sets found if there are any tree paths found. The code was initially assuming there was a Tree control and it was looking at the items for launch. That code was changed as part of

-- Jeff J.

On 12/12/2011 01:08 PM, Schaefer, Doug wrote:
Hey gang,

I’ve attempted our first build of CDT and TCF masters against Eclipse
4.2 and found a number of build errors.
ITreeModelContentProviderTargetappears to be gone (or did it move?). I
see lots of references on the cdt.tests.dsf plug-in. I also see it being
used in the tcf.debug.ui plugin which is a bit more concerning. And
either way, this was an internal class we should never have been using
to begin with.

Does anyone have an idea on how to address this?



cdt-dev mailing list

diff --git a/plugins/ b/plugins/
index dcc5d37..ca81304 100644
--- a/plugins/
+++ b/plugins/
@@ -19,7 +19,6 @@ import java.util.Map;
 import java.util.Set;
 import org.eclipse.core.runtime.IStatus;
-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.provisional.IChildrenCountUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
@@ -427,7 +426,9 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy, Ru
                 asyncExec(new Runnable() {
                     boolean found;
                     public void run() {
-                        found = ((ITreeModelContentProviderTarget)getViewer()).findElementIndex(TreePath.EMPTY, launch) >= 0;
+                        TreePath[] paths = getTreeModelViewer().getElementPaths(launch);
+                        if (paths != null && paths.length > 0)
+                            found = true;
                         Protocol.invokeLater(new Runnable() {
                             public void run() {
                                 if (disposed) return;

Back to the top