Interface IFilePropChangeListener<T>

All Known Implementing Classes:
EditorTextTable

public interface IFilePropChangeListener<T>
Interface used by data containers in FilePropCnr's that need to listen to changes in file contents. Typically this is called if a file is updated outside of Eclipse and refreshed or through a versioning system (e.g. SVN or GIT).

When a file is updated, the data container property is refreshed as follows:

  • Call to interface method {link #onFileAboutToChange}.
  • All properties are removed.
  • All properties from the loaded data container property are cloned and added into this data container.
  • Call to interface method {link #onFileChangesCompleted}.
Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    Called prior to changes enabling data container to save what has changed.
    void
    onFileChangesCompleted(T beforeChanges)
    Called when all the data container's properties have been removed and new ones added back into the data container.
  • Method Details

    • onFileAboutToChange

      T onFileAboutToChange()
      Called prior to changes enabling data container to save what has changed.
      Returns:
      An Object that is passed into the onFileChangesCompleted(Object), null for none.
    • onFileChangesCompleted

      void onFileChangesCompleted(T beforeChanges)
      Called when all the data container's properties have been removed and new ones added back into the data container.

      It is guaranteed that this method is called after changes, even if severe failures occurred.

      Parameters:
      beforeChanges - The Object that was returned from the call to onFileAboutToChange(), null for none.