Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] attributes used for tasklist

Hi Steffen,

this was the missing piece ... thanks for your response and 


Fröhliche Weihnachten


MfG
Dominik Hirt
----------------------

Dipl.Inf. Dominik Hirt
http://www.eclipsereferencecard.net


On Mon, 22 Dec 2008 15:14:56 -0800, "Steffen Pingel"
<steffen.pingel@xxxxxxxxxxx> wrote:
> You need to implement
AbstractRepositoryConnector.updateTaskFromTaskData().
> If you are using the default attribute ids and types, a very simple
> implementation using the default task mapper should work:
> 
>  new TaskMapper(taskData).applyTo(task).
> 
> AbstractRepositoryConnector.hasTaskChanged() should be implemented
> accordingly:
> 
>  new TaskMapper(taskData).hasChanges(task).
> 
> If you have implemented both of these methods already, I would recommend
to
> start debugging there.
> 
> Steffen
> 
> 
> On Mon, Dec 22, 2008 at 4:43 AM, wp1123002-email
> <dominik.hirt@xxxxxxxxxx>wrote:
> 
>>
>> Hi,
>>
>> what attributes a task should have in order to show on the tasklist a
>> description like "12345 : This is a test issue" ?
>> Here 12345 is the ID of that task in the repository and 'This is a test
>> issue' a summary.
>> I create a task data object and create -beside others- two attributes
>> TaskAttribute.TASK_KEY and TaskAttribute.SUMMARY as follows:
>>
>> public enum MKSAttribute {
>>    ID("ID:", "id", TaskAttribute.TASK_KEY,
TaskAttribute.TYPE_LONG_TEXT),
>>    SUMMARY("Summary:", "summary", TaskAttribute.SUMMARY,
>> TaskAttribute.TYPE_LONG_TEXT)
>> ...
>> }
>>
>> createAttribute(data, MKSAttribute.ID, issue.getId() + ":" +
>> issue.getSummary());
>> createAttribute(data, MKSAttribute.SUMMARY, issue.getSummary());
>>
>> private void createAttribute(TaskData data, MKSAttribute attribute,
>> String
>> value)
>> {
>>        TaskAttribute attr =
>> data.getRoot().createAttribute(attribute.getMylynAttribute());
>>        TaskAttributeMetaData metaData = attr.getMetaData();
>>        metaData.defaults();
>>        metaData.setType(attribute.getType());
>>        metaData.setKind(TaskAttribute.KIND_DEFAULT);
>>        metaData.setLabel(attribute.getDescription());
>>        metaData.setReadOnly(false);
>>        metaData.putValue("mksKey", "mksKey");
>>        attr.addValue(value);
>> }
>>
>> I do not use -currently- any TaskMapper or AttributeMapper. I refer the
>> original Mylyn attributes.
>>
>> The result is always, that the tasklist contains my issues, but shows
>> only
>> the ID (the number), but the hover contains the attribute 'Summary' with
>> the correct value.
>> But I want to see this summary not only within the hover. Also every
>> single task list entry should contain a line line "12345 : this is a
test
>> issue".
>>
>> BTW: It seems that I've already solved this problem because I saw the
>> tasklist exactly as I want. But this was illusion and not based on my
>> current implementation. If the file
>> <WORKSPACE>\.metadata\.mylyn\tasks.xml.zip\tasklist.xml already contains
>> entries in the correct way, then a new query is not stored back to this
>> file. I detect this behaviour during tests of the plugin with a
different
>> Eclipse installation. The plugin produced task list entries withou the
>> summary. The same code, started by the PDE within a new Eclipse instance
>> and therefor with an exisiting tasklist.xml produces a correct tasklist
>> view...
>> Only by removing <WORKSPACE>\.metadata\.mylyn\tasks.xml.zip you can be
>> sure...
>>
>> Thanks in advance.
>> Kind regards
>>
>> Dominik Hirt
>> _______________________________________________
>> mylyn-integrators mailing list
>> mylyn-integrators@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
>>
> 


Back to the top