Hi,
Am 10.10.2011 15:30, schrieb Jörn Kottmann:
On 10/10/11 1:17 PM, Peter Klügl wrote:
normally I would argue for the preferences because in RCP application
that's the place for such stuff, I think.
We are speaking about different preferences here. In eclipse there are
preferences which are stored per plugin.
These cannot be used, because many preferences simply depend on the
type system. Therefore I introduced
preferences per type system.
However, this is counterproductive for many use cases. I don't think
that it is preferable to exchange the preference settings between
users that work on the same project. I would argue for a local file
per type system; Per type system since we cannot predict the usage of
project by the user (I also have many type systems per project). A
local file with the visualization settings can be shared with svn,
but also can be excluded.
Exactly. That is what the ide plugin does, it creates one preferences
file per type system. The user can now decide if he
wants to check in that file or not. But the IDE plugin is only one use
case, if the Cas Editor is integrated into an RCP application
this RCP application has to implement a document provider, which then
has to take care of to decide where to store these
type system preferences.
Do you save preferences about which annotations are visible in this
map file?
Nope, the settings are only type-sensitive. The file looks like:
<styleMap>
<rule>
<pattern>de.uniwue.tm.citie.Author</pattern>
<label>de.uniwue.tm.citie.Author</label>
<style>color:red;background:yellow;checked:false;hidden:false;</style>
</rule>
We currently use the style map format of UIMA and name the xml files
like the type system (MyTypeSystemStyleMap.xml). If a CAS is opened
with a type system, then the editor searches for a corresponding
style map xml and applies that. As I see it, the style information
there isn't enough for the cas editor, but the overall approach is
very suitable at least for my use cases.
So the Cas Editor approach, with a general preference store file per
type system is very similar.
Another thing is that TextMarker can create the visualization
settings in a rule-based fashion and since the CEV plugin will be
replaced by the cas editor sometime I'd really like to see a
compatible alternative: something local that can be replaced without
dependencies to the RCP application.
Well, this is just a "default" setting which Text Marker can create,
right?
Yes, the predefined colors for some types.
How do you decide which type system xml file to use in Text Marker
when a CAS file is opened?
The CEV plugin has an extension point for search strategies with
priorities like a dialog to select the type system. The most common
strategy is to take the type system of the script that was launched last
if it is in the same project as the CAS file. I'd really like to add
this functionality to the CAS Editor for TextMarker projects when it
replaces the CEV plugin.
Peter
--
---------------------------------------------------------------------
Dipl.-Inf. Peter Klügl
Universität Würzburg Tel.: +49-(0)931-31-86741
Am Hubland Fax.: +49-(0)931-31-86732
97074 Würzburg mail: [email protected]
http://www.is.informatik.uni-wuerzburg.de/en/staff/kluegl_peter/
---------------------------------------------------------------------