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

Joern Kottmann commented on UIMA-2273:
--------------------------------------

I still don't have a good feeling about we implemented the content providers in 
the Cas Editor.

The JFace viewers expect an input element, often this is a UIMA Type, Feature 
Structure or Annotation. In this case the content provider actually also need 
to a reference to the ICasDocument to advertise changes made to an FS (most 
view can change things).

This leads to a content provider implementation where the inputChanged method 
is used to set the UIMA input element, and a second method is used to listen 
for editor input changes. This works for views which contains only one control 
which display a piece of the CAS. In other views, such as the Feature Structure 
Browser view it does not work since it has two controls and it should be 
initialized with values from the type system dependent session preference 
store. As soon as there are two listeners per view, it is unclear which one 
will be executed first.

In my opinion we should change the implementation of inputChanged and always 
register/remove the listeners on the ICasDocument. The ICasDocument instance 
should be retrieved every time from the the current ICasEditor.

What do you think Peter?
                
> 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