Package org.eclipse.jface.viewers

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


            return;
        Runnable object = new Runnable(){
          public void run() {
            if (viewer instanceof TreeViewer) {
            TreeViewer treeViewer = (TreeViewer) viewer;
            treeViewer.refresh(resolve, true);
          }else{
              viewer.refresh();
          }
          }
        };
View Full Code Here


                final ODOMElement contextRootElement = context.getRootElement();
                if (rootElement == null && contextRootElement != null ||
                    rootElement != null && !rootElement.equals(contextRootElement)) {
                    updateRootElement();
                } else if (event.getChangeQualifier() == ChangeQualifier.HIERARCHY) {
                    treeViewer.refresh();
                } else {
                    // If the source is an attribute then it is the parent
                    // element that we want to update. Otherwise just
                    // use the source as the element to update.
                    Object source = event.getSource();
View Full Code Here

                    treeViewer.getControl().getDisplay().asyncExec(new Runnable() {
                        public void run() {
                            // ensure that the widget still exists when this
                            // runnable is run
                            if (!treeViewer.getControl().isDisposed()) {
                                treeViewer.refresh();
                            }
                        }
                    });
                }
            }
View Full Code Here

      }
    }
   
    TreeViewer viewer = getTreeViewer();
    if(viewer!=null){
      viewer.refresh();
    }
  }
 
  /** The root node of this outline page. */
  private class DTDRootNode {
View Full Code Here

 
  public void update(){
    this.doc = new FuzzyXMLParser(isHTML()).parse(editor.getHTMLSource());
    TreeViewer viewer = getTreeViewer();
    if(viewer!=null){
      viewer.refresh();
    }
  }
 
  protected Image getNodeImage(FuzzyXMLNode element){
    if(element instanceof FuzzyXMLElement){
View Full Code Here

            PreviewWizardPage pvp = ((PreviewWizardPage) pages[pages.length-1]);
            Field treeViewerField = pvp.getClass().getDeclaredField("fTreeViewer");
            treeViewerField.setAccessible(true);
            TreeViewer treeViewer = (TreeViewer) treeViewerField.get(pvp);
            treeViewer.setLabelProvider(new ChangeElementLabelProvider());
            treeViewer.refresh(true);
        } catch (Exception e) {
            DesignerLogger.logErrorWithoutDialog("refactoring internals error", e);
        }
    }
   
View Full Code Here

          }
        }
      }

      public void keyReleased(KeyEvent e) {
        typeTree.refresh(false);
      }
    });

    typeTree.setContentProvider(new ITreeContentProvider() {
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

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.