uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: CAS Editor default annotation style
Date Fri, 10 Aug 2012 08:42:05 GMT
Yes, thats sounds good to me. The important thing here is that colors do
not change randomly if the type system changes. So after a color is 
the assigned color should be stored inside the configuration, instead of 
the process the next time the CAS is loaded. If the process is repeated 
and a change
occurs to the type system than the color assigning code might choose a 
different one.


On 08/10/2012 10:08 AM, Peter Klügl wrote:
>  Hi,
> I've taken a short look at the implementation and my attention was 
> drawn to two methods:
> DefaultColors.assignColors() assigns style background with somewhat 
> random but different bright colors to all types. This method is called 
> when is type system is not known yet.
> AnnotationStyle.getAnnotationStyleFromStore() tries to read to stored 
> style. If there is no information, then the style is set underlined red.
> The situation in my use case is the following: I create a script with 
> some type definitions resulting in a type system. I write some rules 
> and test the result by taking a look at the xmi with the CAS Editor. 
> Here, the first method is applied, because the type system is new. 
> Then I write additional rules and add some other types. If I now 
> review the result, the new types in the known types system are all set 
> to red/underlined, because if the second method. Thus, it's harder to 
> distinguish them.
> If it is okay for you, then I would open a feature request for 
> assigning a random bright background color as default in 
> AnnotationStyle.getAnnotationStyleFromStore()
> Best,
> Peter
> On 03.08.2012 16:44, Peter Klügl wrote:
>>  On 03.08.2012 16:30, Jörn Kottmann wrote:
>>> On 08/03/2012 04:20 PM, Peter Klügl wrote:
>>>>  Hi,
>>>> I observed that new types are often visualized with 
>>>> "underlined/red" (although I normally only use "background color") 
>>>> resulting in 50% of the types with the same annotation style.This 
>>>> probably happens when I open the same xmi with incrementally bigger 
>>>> type systems. I have not yet taken a look at the code and this is 
>>>> not a real issue, but a bit annoying.
>>>> Do you know anything about this behavior?
>>> Yes, that is the initial styling for a new TS. The Document Provider 
>>> is responsible to initialize the styling.
>>> Do you need code pointers?
>>> Lets have a look at the code, maybe we should change that a bit to 
>>> make it easier. If I remember correctly the ide
>>> plugin integration does not really take the case into account where 
>>> a TS is updated. In that case the user needs
>>> to assign the color manually.
>> No pointers needed. If the Document Provider does the initialization, 
>> then I know where to look.
>> I often have differing use cases compared to the normal usage of the 
>> CAS Editor. I personally would assign a random bright background 
>> color to types for which the user has not manually assigned a color. 
>> Isn't that also done for a completely new TS under some 
>> circumstances?  Thus, highlighted annotations of different types can 
>> be distinguished more easily.
>> However, this is just my first thought. I will take a look at the 
>> code next week.
>> Best,
>> Peter

View raw message