[546792] Change TableTreeItem references to TreeItem and Item

Signed-off-by: Nitin Dahyabhai <nitind@us.ibm.com>
Change-Id: I135e09023cbe60d8b5cc43ad967e11398c987ed6
diff --git a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter.java b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter.java
index cfa9e95..1b05741 100644
--- a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter.java
+++ b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2019 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v2.0
  * which accompanies this distribution, and is available at
@@ -17,10 +17,10 @@
 import java.util.Collections;
 import java.util.Iterator;
 
+import org.eclipse.core.commands.Command;
 import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.custom.TableTreeItem;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTargetAdapter;
 import org.eclipse.swt.dnd.DropTargetEvent;
@@ -28,6 +28,7 @@
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Item;
 import org.eclipse.swt.widgets.ScrollBar;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
@@ -240,9 +241,9 @@
       // Get the data from the item, if there is one.
       //
       Object target = event.item == null ? null : event.item.getData();
-      if (target instanceof TableTreeItem)
+      if (target instanceof Item)
       {
-        target = ((TableTreeItem)target).getData();
+        target = ((Item)target).getData();
       }
 
       // Do the logic to determine the hover information.
diff --git a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java
index 75a674b..13abefc 100644
--- a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java
+++ b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java
@@ -11,14 +11,31 @@
  *******************************************************************************/
 package org.eclipse.wst.common.ui.internal.viewers;
 
-import org.eclipse.swt.events.*;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
 import org.eclipse.swt.custom.TableCursor;
-import org.eclipse.swt.custom.TableTreeItem;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.TreeItem;
 
 
   /**
@@ -60,8 +77,8 @@
 			super.widgetSelected(e);
 			     if (sViewer instanceof AbstractTreeViewer)
                  {
-                   TableTreeItem tableTreeItem = (TableTreeItem)getRow().getData(TABLETREEITEM_ID);
-                   StructuredSelection selection = new StructuredSelection(tableTreeItem.getData());
+                   Item item = (Item)getRow().getData(TABLETREEITEM_ID);
+                   StructuredSelection selection = new StructuredSelection(item.getData());
                    sViewer.setSelection(selection, true);
                  }
 		}
@@ -81,7 +98,7 @@
               {
                  if (sViewer instanceof AbstractTreeViewer)
                  {
-                   TableTreeItem tableTreeItem = (TableTreeItem)getRow().getData(TABLETREEITEM_ID);
+                   Item tableTreeItem = (Item)getRow().getData(TABLETREEITEM_ID);
                    StructuredSelection selection = new StructuredSelection(tableTreeItem.getData());
                    sViewer.setSelection(selection, true);
                  }
@@ -294,17 +311,17 @@
                
                //jvh - look for + or - key
                // column == 0
-               if (row.getData(TABLETREEITEM_ID) instanceof TableTreeItem)
+               if (row.getData(TABLETREEITEM_ID) instanceof Item)
                {
 	               if (column == 0 && e.character == '+') 
 	               {
-               	  	  TableTreeItem tableTreeItem = (TableTreeItem)row.getData(TABLETREEITEM_ID);	               	
+	               	  Item tableTreeItem = (Item)row.getData(TABLETREEITEM_ID);
 	               	  ((AbstractTreeViewer)structuredViewer).setExpandedState(tableTreeItem.getData(), true);                       
 	               	  refresh();
 	               }
 	               else if (column == 0 && e.character == '-') 
 	               {
-	               	  TableTreeItem tableTreeItem = (TableTreeItem)row.getData(TABLETREEITEM_ID);	               	
+	               	  Item tableTreeItem = (Item)row.getData(TABLETREEITEM_ID);
 	               	  ((AbstractTreeViewer)structuredViewer).setExpandedState(tableTreeItem.getData(), false);                       
                       refresh();
 	               }               
@@ -318,7 +335,7 @@
                	  }
                	  else if (structuredViewer instanceof AbstractTreeViewer)
                	  {  
-               	  	  TableTreeItem tableTreeItem = (TableTreeItem)row.getData(TABLETREEITEM_ID);
+	               	  Item tableTreeItem = (Item)row.getData(TABLETREEITEM_ID);
                	  	 ((AbstractTreeViewer)structuredViewer).editElement(tableTreeItem.getData(), column);   
                	  }
                }
@@ -353,17 +370,17 @@
                         }
                         else if (structuredViewer instanceof AbstractTreeViewer && column == 1)
                         {
-                                 TableTreeItem tableTreeItem = (TableTreeItem)row.getData(TABLETREEITEM_ID);
-                                ((AbstractTreeViewer)structuredViewer).editElement(tableTreeItem.getData(), column);   
+                                 TreeItem treeItem = (TreeItem)row.getData(TABLETREEITEM_ID);
+                                ((AbstractTreeViewer)structuredViewer).editElement(treeItem.getData(), column);
                         }                                               
                
-                 if (structuredViewer instanceof AbstractTreeViewer && row.getData(TABLETREEITEM_ID) instanceof TableTreeItem)
+                 if (structuredViewer instanceof AbstractTreeViewer && row.getData(TABLETREEITEM_ID) instanceof Item)
                  {              
                                    if (column == 0)
                                    {
-                                    TableTreeItem tableTreeItem = (TableTreeItem)row.getData(TABLETREEITEM_ID);                             
-                                          boolean expandState = tableTreeItem.getExpanded();
-                       ((AbstractTreeViewer)structuredViewer).setExpandedState(tableTreeItem.getData(), !expandState);
+                                          TreeItem treeItem = (TreeItem)row.getData(TABLETREEITEM_ID);
+                                          boolean expandState = treeItem.getExpanded();
+                       ((AbstractTreeViewer)structuredViewer).setExpandedState(treeItem.getData(), !expandState);
                        refresh();
                     }
                  }