UIMA
  1. UIMA
  2. UIMA-1887

It should be possible to open a CAS file from a non Cas Editor project

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.1SDK
    • Component/s: CasEditor
    • Labels:
      None

      Description

      It should be possible to open a CAS files which are inside an eclipse java project (and not an eclipse CAS Editor project) with the CAS Editor.

      After spending more time on the issue the plan how to implement it changed again.
      The previous idea of having an additional plugin for this functionality is dropped and the change is directly
      integrated into the Cas Editor plugin.

      There are two changes which must be performed for this issue:

      1. The Document Provider is extended with a custom logic to open a CAS file from a non Cas Editor Project.
      Its assumed that the type system is placed in a certain location, if it cannot find in this location the
      user if prompted by a dialog to provide a valid type system for the CAS.
      This mechanism should be improved in the future to play nicely together with all other plugins wich also need
      access to a type system, like the description editors.

      2.
      The UI to configure the annotation styles must be moved to the editor and away from the Cas Editor Project
      handling code. To accomplish this the Document Provider should be responsible for accessing/modifying
      the styling information. A new view is added to the editor which can display the styling information and
      gives access to the annotation property dialog to modify the styling.
      The styling information is shared between all editors type system wide, if the style is changed in one editor
      its changed in all other editors which display a CAS with the same type system.

      The goal of this issue is to create an initial solution which can then be refined
      by input from users and other uima developers.

        Activity

        Hide
        Joern Kottmann added a comment -

        Please post your opinion about the proposed solution to resolve the type system which belongs to
        a chosen CAS file.

        Show
        Joern Kottmann added a comment - Please post your opinion about the proposed solution to resolve the type system which belongs to a chosen CAS file.
        Hide
        Marshall Schor added a comment -

        By "Debug Plugin" - do you mean the UIMA provided Eclipse plugin in the uimaj-ep-debug project?

        Show
        Marshall Schor added a comment - By "Debug Plugin" - do you mean the UIMA provided Eclipse plugin in the uimaj-ep-debug project?
        Hide
        Joern Kottmann added a comment -

        Yes, do you think thats the wrong place ?

        Show
        Joern Kottmann added a comment - Yes, do you think thats the wrong place ?
        Hide
        Joern Kottmann added a comment -

        There are also other features we need to make developing AEs simpler, like launch support for an AE in eclipse. Would you rather create a new plugin for such features ?

        Show
        Joern Kottmann added a comment - There are also other features we need to make developing AEs simpler, like launch support for an AE in eclipse. Would you rather create a new plugin for such features ?
        Hide
        Joern Kottmann added a comment -

        I once wrote a small plan about these features to the mailing list,
        here is the link:
        http://mail-archives.apache.org/mod_mbox/uima-dev/201005.mbox/%3C4BF28D45.2020602@gmail.com%3E

        Show
        Joern Kottmann added a comment - I once wrote a small plan about these features to the mailing list, here is the link: http://mail-archives.apache.org/mod_mbox/uima-dev/201005.mbox/%3C4BF28D45.2020602@gmail.com%3E
        Hide
        Marshall Schor added a comment -

        I think these would be better in a separate plugin. The debug plugin is pretty much confined to one simple explainable purpose - allowing the Eclipse debug "structured" inspection views to show things in terms of UIMA concepts. This extension seems outside of that purpose, to me.

        Show
        Marshall Schor added a comment - I think these would be better in a separate plugin. The debug plugin is pretty much confined to one simple explainable purpose - allowing the Eclipse debug "structured" inspection views to show things in terms of UIMA concepts. This extension seems outside of that purpose, to me.
        Hide
        Joern Kottmann added a comment -

        Ok, yes its clearly outside of that purpose.

        Should we create a new development plugin for this purpose which can later be extended with other development related features, like launch support ?

        Show
        Joern Kottmann added a comment - Ok, yes its clearly outside of that purpose. Should we create a new development plugin for this purpose which can later be extended with other development related features, like launch support ?
        Hide
        Marshall Schor added a comment -

        Sounds good to me

        Show
        Marshall Schor added a comment - Sounds good to me
        Hide
        Marshall Schor added a comment -

        I wonder about the name "uimaj-ep-dev" - the first 2 parts are fine, but "dev" sounds too general...

        Also, I wonder if this functionality could be part of the cas editor plugin, itself, rather than making a new plugin?

        Show
        Marshall Schor added a comment - I wonder about the name "uimaj-ep-dev" - the first 2 parts are fine, but "dev" sounds too general... Also, I wonder if this functionality could be part of the cas editor plugin, itself, rather than making a new plugin?
        Hide
        Joern Kottmann added a comment -

        Right now the Cas Editor defines an extension point which can be used to set the Document Provider.
        The Document Provider int he Cas Editor is responsible to find a type system and styling information for
        a CAS file which should be opened.

        My initial intention was just have to another plugin which extends the Cas Editor to define the Document Provider in order to embed it into an eclipse application. This approach has the disadvantage that there can only be one Document Provider per CAS Editor plugin instance,
        that might not work well anyway.

        To your question, yes it would be possible to have this functionally directly in the Cas Editor but then we
        have to change the way it looks up the type system and styling information for a CAS.

        Putting it directly into the Cas Editor plugin also has the advantage that the feature is
        directly available to all our users with the next release.

        Show
        Joern Kottmann added a comment - Right now the Cas Editor defines an extension point which can be used to set the Document Provider. The Document Provider int he Cas Editor is responsible to find a type system and styling information for a CAS file which should be opened. My initial intention was just have to another plugin which extends the Cas Editor to define the Document Provider in order to embed it into an eclipse application. This approach has the disadvantage that there can only be one Document Provider per CAS Editor plugin instance, that might not work well anyway. To your question, yes it would be possible to have this functionally directly in the Cas Editor but then we have to change the way it looks up the type system and styling information for a CAS. Putting it directly into the Cas Editor plugin also has the advantage that the feature is directly available to all our users with the next release.
        Hide
        Joern Kottmann added a comment -

        Where would you place the UI to edit the styling ?

        In the current version its done in a property page on a the Cas Editor project.
        The Cas Viewer used a view for this.
        Another option would be to have an editor for the style file which contains the
        styling information for a certain type system.

        Having a view might be the most useable option. Changes to the styling would then
        be synchronized with all open editors which depend on the same type system and styling.
        For example if the color for an org.apache.uima.Person annotation is changed in this
        view all editors are updated to show this annotation in the new color.

        Show
        Joern Kottmann added a comment - Where would you place the UI to edit the styling ? In the current version its done in a property page on a the Cas Editor project. The Cas Viewer used a view for this. Another option would be to have an editor for the style file which contains the styling information for a certain type system. Having a view might be the most useable option. Changes to the styling would then be synchronized with all open editors which depend on the same type system and styling. For example if the color for an org.apache.uima.Person annotation is changed in this view all editors are updated to show this annotation in the new color.
        Hide
        Joern Kottmann added a comment -

        After spending a little more time on the issue, I think the following could be work
        nicely.

        The current default document provider should be able to handle also non Cas Editor Projects
        in a way its done by the Cas Viewer. It expects that a type system file is placed in a certain
        location, if not a dialog asks the user to provide the location to a type system file.
        The styling information is written into a styling file for the type system and a view
        is used to edit the styling.

        Show
        Joern Kottmann added a comment - After spending a little more time on the issue, I think the following could be work nicely. The current default document provider should be able to handle also non Cas Editor Projects in a way its done by the Cas Viewer. It expects that a type system file is placed in a certain location, if not a dialog asks the user to provide the location to a type system file. The styling information is written into a styling file for the type system and a view is used to edit the styling.
        Hide
        Joern Kottmann added a comment -

        2. Is now done.

        1. Is half done, the dialog to choose a type system is still missing, and the error handling still needs to be improved in case the type system is invalid (e.g. invalid xml) or not compatible with the CAS.

        Show
        Joern Kottmann added a comment - 2. Is now done. 1. Is half done, the dialog to choose a type system is still missing, and the error handling still needs to be improved in case the type system is invalid (e.g. invalid xml) or not compatible with the CAS.
        Hide
        Joern Kottmann added a comment -

        All functionality is implemented now.

        Show
        Joern Kottmann added a comment - All functionality is implemented now.
        Hide
        Joern Kottmann added a comment -

        And now its also tested and can be closed.

        Show
        Joern Kottmann added a comment - And now its also tested and can be closed.

          People

          • Assignee:
            Joern Kottmann
            Reporter:
            Joern Kottmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development