Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] How to make an attribute hidden in Mylyn 3.0?

Dennis Rietmann wrote:
Hi,

How can attributes made hidden in Mylyn 3.0? In Mylyn 2 there was attributeFactory.isHidden which could be used to prevent an attribute from popping up in the attributes section (e.g. you don't want the description to show up in there). I couldn't find anyting similar in the TaskAttributeMapper and in the TaskAttributeMetaData class - can someone give me a hint there?

You set the hidden attribute with in your TaskAttributes enumerated class that your class that Extends TaskAttributeMapper calls. Take a look at the Trac TaskAttribute enum class for an example. In the Mantis Connector for Mylyn, our enum entry was setup like the following:

ADDITIONAL_INFO(Key.ADDITIONAL_INFO, "Additional Information:", TaskAttribute.TYPE_LONG_RICH_TEXT, true, false),

Which is the Mantis Ticket key for the attribute, the pretty name (editor display name), the type of it will use if displayed in the editor, whether it is hidden, and whether it is read only.

Then when you want to change the attributes of your task, you either the createMetaData or getMetaData for that attribute, and then can set your Read Only, and Hidden attributes if necessary. But the mapper will take care of most of this for you.




Back to the top