Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.IElementStateListener


        } catch (IOException e) {
            throw new PartInitException("Error reading editor input.", e);
        }

        // Ensure the field values are updated if the file content is replaced
        docProvider.addElementStateListener(new IElementStateListener() {
            public void elementMoved(Object originalElement, Object movedElement) {}

            public void elementDirtyStateChanged(Object element, boolean isDirty) {}

            public void elementDeleted(Object element) {}
View Full Code Here


        } catch (IOException e) {
            throw new PartInitException("Error reading editor input.", e);
        }

        // Ensure the field values are updated if the file content is replaced
        docProvider.addElementStateListener(new IElementStateListener() {

            String savedString = null;

            public void elementMoved(Object originalElement, Object movedElement) {}
View Full Code Here

  private final CasDocumentProvider documentProvider;
 
  public TextDocumentProvider(CasDocumentProvider documentProvider) {
    this.documentProvider = documentProvider;
   
    this.documentProvider.addElementStateListener(new IElementStateListener() {
     
      public void elementMoved(Object originalElement, Object movedElement) {
        fireElementMoved(originalElement, movedElement);
      }
     
View Full Code Here

     */
    public void bufferContentAboutToBeReplaced(IFileBuffer file) {
      List list= new ArrayList(fElementStateListeners);
      Iterator e= list.iterator();
      while (e.hasNext()) {
        IElementStateListener l= (IElementStateListener) e.next();
        Iterator i= getElements(file);
        while (i.hasNext())
          l.elementContentAboutToBeReplaced(i.next());
      }
    }
View Full Code Here

     */
    public void bufferContentReplaced(IFileBuffer file) {
      List list= new ArrayList(fElementStateListeners);
      Iterator e= list.iterator();
      while (e.hasNext()) {
        IElementStateListener l= (IElementStateListener) e.next();
        Iterator i= getElements(file);
        while (i.hasNext())
          l.elementContentReplaced(i.next());
      }
    }
View Full Code Here

     */
    public void dirtyStateChanged(IFileBuffer file, boolean isDirty) {
      List list= new ArrayList(fElementStateListeners);
      Iterator e= list.iterator();
      while (e.hasNext()) {
        IElementStateListener l= (IElementStateListener) e.next();
        Iterator i= getElements(file);
        while (i.hasNext())
          l.elementDirtyStateChanged(i.next(), isDirty);
      }
    }
View Full Code Here

      IFile newFile= workspace.getRoot().getFile(newLocation);
      IEditorInput input= newFile == null ? null : new FileEditorInput(newFile);
      List list= new ArrayList(fElementStateListeners);
      Iterator e= list.iterator();
      while (e.hasNext()) {
        IElementStateListener l= (IElementStateListener) e.next();
        Iterator i= getElements(file);
        while (i.hasNext())
          l.elementMoved(i.next(), input);
      }
    }
View Full Code Here

     */
    public void underlyingFileDeleted(IFileBuffer file) {
      List list= new ArrayList(fElementStateListeners);
      Iterator e= list.iterator();
      while (e.hasNext()) {
        IElementStateListener l= (IElementStateListener) e.next();
        Iterator i= getElements(file);
        while (i.hasNext())
          l.elementDeleted(i.next());
      }
    }
View Full Code Here

            // Create and install the file synchronizer.
            synchronizer = new FileSynchronizer((IFile) context.getPolicyResource());
            synchronizer.install();

            // Create and add the element state listener to the synchronizer.
            listener = new IElementStateListener() {
                public void elementDirtyStateChanged(Object element, boolean isDirty) {
                }

                public void elementContentAboutToBeReplaced(Object element) {
                }
View Full Code Here

            synchronizer = new FileSynchronizer((IFile) context.
                    getPolicyResource());
            synchronizer.install();

            // Create and add the element state listener to the synchronizer.
            listener = new IElementStateListener() {
                public void elementDirtyStateChanged(Object element,
                                                     boolean isDirty) {
                }

                public void elementContentAboutToBeReplaced(Object element) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.texteditor.IElementStateListener

Copyright © 2018 www.massapicom. 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.