Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.TreeViewer.reveal()


        final NewFolderDialog dialog = new NewFolderDialog(getShell(), fSelectedContainer);
        if (dialog.open() == Window.OK) {
            final TreeViewer treeViewer = getTreeViewer();
            treeViewer.refresh(fSelectedContainer);
            final Object createdFolder = dialog.getResult()[0];
            treeViewer.reveal(createdFolder);
            treeViewer.setSelection(new StructuredSelection(createdFolder));
        }
    }

    @Override
View Full Code Here


        if (event.getSelection() instanceof IStructuredSelection) {
          Object[] o = ((IStructuredSelection) event.getSelection()).toArray();
          contentTypeTreeViewer.setInput(o);
          contentTypeTreeViewer.expandAll();
          if (o.length > 0) {
            contentTypeTreeViewer.reveal(o[0]);
          }
        }
      }
    });
View Full Code Here

        if (event.getSelection() instanceof IStructuredSelection) {
          Object[] o = ((IStructuredSelection) event.getSelection()).toArray();
          contentTypeTreeViewer.setInput(o);
          contentTypeTreeViewer.expandAll();
          if (o.length > 0) {
            contentTypeTreeViewer.reveal(o[0]);
          }
        }
      }
    });
View Full Code Here

   */
  public void showElement(OutlineElement element){
    if(element == null)
      return;
    TreeViewer viewer = getTreeViewer();   
    viewer.reveal(element);       
    TreeItem[] treeItems=viewer.getTree().getItems();
   
    viewer.getControl().setRedraw(false);
    Object[] expandedElements=viewer.getExpandedElements();
    //force all the elements to be scanned in
View Full Code Here

   
    for(TreeItem item: treeItems){
      TreeItem target=findTreeItem(item, element);
      if(target!=null){
        viewer.getTree().setSelection(target);
        viewer.reveal(element);
        break;
      }
    }       
   
  }
View Full Code Here

                   
                    if( ! treeViewer.getSelection().equals( sel ) )
                    {
                        for( MasterDetailsContentNodePart node : selection )
                        {
                            treeViewer.reveal( node );
                        }
                       
                        treeViewer.setSelection( sel );
                    }
                }
View Full Code Here

      fSelectionFromEditor = true;
      tree.setSelection(new StructuredSelection(item), false);
      fSelectionFromEditor = false;
      //tree.refresh(item, false);
      tree.setExpandedState(item, true);
      tree.reveal(item);
      // reveal takes care of this. Doh!
      //expandParentItems(item);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.