Package org.eclipse.jface.viewers

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


  }

  protected void refreshRelationshipsForEntity(EOEntity entity) {
    TreeViewer treeViewer = getTreeViewer();
    if (treeViewer != null) {
      treeViewer.refresh(entity, true);
      Object[] expandedElements = treeViewer.getExpandedElements();
      for (int expandedElementNum = 0; expandedElementNum < expandedElements.length; expandedElementNum++) {
        if (expandedElements[expandedElementNum] instanceof EORelationshipPath) {
          EORelationshipPath relationshipPath = (EORelationshipPath) expandedElements[expandedElementNum];
          if (relationshipPath.getChildRelationship().getEntity().equals(entity)) {
View Full Code Here


      Object[] expandedElements = treeViewer.getExpandedElements();
      for (int expandedElementNum = 0; expandedElementNum < expandedElements.length; expandedElementNum++) {
        if (expandedElements[expandedElementNum] instanceof EORelationshipPath) {
          EORelationshipPath relationshipPath = (EORelationshipPath) expandedElements[expandedElementNum];
          if (relationshipPath.getChildRelationship().getEntity().equals(entity)) {
            treeViewer.refresh(relationshipPath, true);
          }
        }
      }
    }
  }
View Full Code Here

  }
 
  protected void refresh() {
    if (_shouldRefresh) {
      TreeViewer treeViewer = getTreeViewer();
      treeViewer.refresh(true);
    }
  }

  protected class ModelPropertyChangeListener implements PropertyChangeListener {
    public void propertyChange(PropertyChangeEvent event) {
View Full Code Here

        if (viewer != null) {
            Control control = viewer.getControl();
            if (control != null && !control.isDisposed()) {
                initRules();
                populatePackageTreeNode();
                viewer.refresh();
                control.setRedraw(false);
                viewer.expandToLevel(2);
                control.setRedraw(true);
            }
        }
View Full Code Here

                {
                    @Override
                    public void handle( final Event event )
                    {
                        filter.change( fileExtensionsService.extensions() );
                        treeViewer.refresh();
                    }
                };
               
                fileExtensionsService.attach( listener );
               
View Full Code Here

    public void refresh( Object element )
    {
        final TreeViewer treeViewer = getTreeViewer();
        if ( treeViewer != null && treeViewer.getTree() != null && !treeViewer.getTree().isDisposed() )
        {
            treeViewer.refresh( element );
        }
    }


    /**
 
View Full Code Here

                        treeViewer.expandToLevel( 2 );
                    }
                }
            }

            treeViewer.refresh();

            // treeViewer.setSelection(selection);
            // treeViewer.setExpandedElements(expandedElements);
        }
    }
View Full Code Here

    public void refresh( Object element )
    {
        final TreeViewer treeViewer = getTreeViewer();
        if ( treeViewer != null && treeViewer.getTree() != null && !treeViewer.getTree().isDisposed() )
        {
            treeViewer.refresh( element );
        }
    }


    /**
 
View Full Code Here

                {
                    treeViewer.setInput( ldifEditor.getLdifModel() );
                }
            }

            treeViewer.refresh();

            // treeViewer.setSelection(selection);
            // treeViewer.setExpandedElements(expandedElements);
        }
    }
View Full Code Here

            tree.setRedraw(false);
            tree.getParent().setRedraw(false);
            try {
                if (monitor.isCanceled())
                    return;
                treeViewer.refresh();
                if (monitor.isCanceled())
                    return;
                treeViewer.expandAll();
            } finally {
                tree.setRedraw(true);
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.