[ 
https://issues.apache.org/jira/browse/UIMA-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143958#comment-13143958
 ] 

Peter Klügl commented on UIMA-2273:
-----------------------------------

I wonder a bit about two methods:

FeatureStructureTreeContentProvider (fsview)

public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

      if (oldInput != null) {
        mDocument.removeChangeListener(this);
      }

      if (newInput == null) {

        mCurrentType = null;
        return;
      }

      mCurrentType = (Type) newInput;

      mDocument.addChangeListener(this);

      Display.getDefault().syncExec(new Runnable() {
        public void run() {
          mFSList.refresh();
        }
      });
    }

and

FeatureStructureContentProvider (editview)

public void inputChanged(final Viewer viewer, Object oldInput, Object newInput) 
{
    this.viewer = viewer;

    if (newInput != null) {
      Display.getDefault().syncExec(new Runnable() {
        public void run() {
          viewer.refresh();
        }
      });
    }
  }

Both methods do not contain any logic for exchanging the listener and do not 
use the the document as input (needs to be set). So I guess I implement the 
logic in the new casDocumentChanged method?
                
> Let CAS Editor implement IResourceChangeListener
> ------------------------------------------------
>
>                 Key: UIMA-2273
>                 URL: https://issues.apache.org/jira/browse/UIMA-2273
>             Project: UIMA
>          Issue Type: New Feature
>          Components: CasEditor
>    Affects Versions: 2.4.0SDK
>            Reporter: Peter Klügl
>            Assignee: Peter Klügl
>            Priority: Minor
>             Fix For: 2.4.0SDK
>
>
> Some functionality to automatically update a opened CAS in the CAS editor if 
> the file was changed would be really nice. I don't know for sure, if this 
> functionality is missing or I simply didn't find it in the code and in 
> Eclipse. In any case, I haven't found a IResourceChangeListener 
> implementation and that is how I would have done it.
> The general communication shouldn't be a problem to implement, but - in my 
> experience - updating all necessary elements can be tricky. The interface for 
> changing a view can maybe be used and has probably to be extended.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to