Hi Steffen
Thank you for your answer. I want to develop an Eclipse plug-in (to monitor
activity within the IDE). In the end, my plug-in should be able to count all
tasks whose status changed during the day for a specific developer (at the
moment I am only interested in any status change: e.g.: NEW: 12,
RESOLVED/CLOSED: 1, EDITED/COMMENTED: 2, DELETED: 0).
I am now trying to describe the different ways I tried to solve my problem and
I hope to clarify my wish and you may help me....:
Way 1:
I thought I'd get all notifications and count it this way. I managed to add a
ChangeListener to the tasklist and get notified from every change in the
tasklist. In the changeListener (handler) I get a TaskContainerDelta-Set where
I only was able to get the summary (text) and kind of the change, but
unfortunately not the status. Can I get the tasks id and get some details (i.e.
status) this way?
Way 2:
Another thought was to make a Mylyn query which shows me all tasks whose status
changed within 1day (for a specified user). I created a query which returned
me the tasks I wanted (from the user and changed today). Now I tried to access
the task (ITask). I could get the owner, ModificationDate, TaskId, etc. - but
not what ahd changed and what the old and new state is. How can I get all these
details from a ITask object?
If this is the right way to solve my problem, I also have two additional
questions: This query obviously has to be made available within Mylyn and
synchronized with the repository. I tried to add a new query to the taskList in
the form of: taskList.addQuery(new
RepositoryQuery("https://api-dev.bugzilla.mozilla.org/latest/bug?changed_after=1h&chfield=bug_status&include_fields=_default,history",
"test-query")); - but wasn't successful. I found no other way or examples in
the documentation... Could you please give me a hint? At the moment I am
testing my efforts with the mozilla-bugzilla-project I am "listening" to. Does
the very same query also work, if I use for example Mantis as a bug tracker?
As already mentioned, I have difficulties in finding documentation or working
examples. Therefore, I also tried to read code from existing projects to solve
my needs. For example, I included the Mylyn-Mantis code and also tried to
include the mantis-git-repository to my eclipse IDE (as described in the
contributor reference,
http://wiki.eclipse.org/Mylyn_Contributor_Reference#Checkout). Unfortunately,
there are/were very few files (and almost no java) files... not the source code
I searched for. What am I doing wrong?
I am aware of the fact, that this is a hard way for a student to do something
like this (accessing data from own Eclipse plug-in from another plug-in via
API). Luckily, I made a couple of (small) progresses towards my goal... When I
first started this post, I was unable to access any Mylyn-Data. Now I am able
to get changed tasks and some details ;) ... I really hope and I am really
thankful if you could further help me!
Best regards,
André
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Steffen Pingel
Gesendet: Freitag, 10. August 2012 15:48
An: Mylyn Integrators list
Betreff: Re: [mylyn-integrators] Listen for changes when task data is updated
Hi,
the answer depends on how you are intending to integrate with Mylyn.
If you are developing a standalone application that uses Mylyn as a library to
access Bugzilla or other repositories you would need to run queries to obtain
the tasks you are interested in.
If you want to monitor activity within the IDE you would need to deploy your
application as a bundle into the IDE and register with the running Mylyn
instance through the classes Shawn mentioned on stack overflow.
Steffen
On Mon, Aug 6, 2012 at 1:58 PM, Andre Meyer <[email protected]> wrote:
> Hi at all
>
>
>
> I am a student at the University of Zurich and working for my bachelor
> thesis where (as a first step) I measure different metrics from a
> developers work in Eclipse (IDE-stuff (clicks, time in which view,
> etc.), Subversion-Stuff (commits, loC added/removed, etc.), Work
> Item-Stuff (new/solved/edited work item of a developer, etc.) and
> more). For the work item data I want to access the data saved by the
> Mylyn plugin because I have the advantage of being able to use
> multiple bug- and work-item-trackers (bugzilla, etc.).
>
>
>
> Unfortunately I have only very few experience with own plugins or
> accessing data from plugins (with Java & Eclipse) - the things I want
> to do now ;) (Of course, I do have some programming experience (Apps,
> Webprojects, etc.)).
>
>
>
> On Stackoverflow Shwan Minto gave me a hint of how to start
> (http://stackoverflow.com/questions/11774054/how-to-get-change-events-through-mylyn-programatically).
> He described me some APIs which should help me to do exactly what I
> want. So I searched the required jars, included them in my
> test-project and started with one of the (very few) samples of the API-usage
> I found (e.g.
> http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.mylyn.incubator/org.eclipse.mylyn.examples.bugzilla/src/org/eclipse/mylyn/internal/examples/bugzilla/Main.java?root=Mylyn_Project&view=markup).
> Unfortunately, I was not able to receive any information from Mylyn.
> (Usually I miss information to be able to run the code or I get
> errors, I was unable to solve with web searches.) I also found the
> Integrator Reference
> (http://wiki.eclipse.org/index.php/Mylyn/Integrator_Reference)
> which gave me some insight into the topic but I am still trying to
> access the data without success.
>
>
>
> Is there a (step-by-step) tutorial or an example project available
> anywhere where I see the usage of the API or can you (please) give me some
> hints?
>
>
>
> Any help would be very much appreciated. I can imagine that my
> questions might be dump or that there may be basic things I don't know
> or didn't try, but at this point, I am stuck and found no other way to
> solve this problem on my own. Thanks again!
>
>
> André Meyer
>
>
> _______________________________________________
> mylyn-integrators mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
>
--
Steffen Pingel
Principal Software Engineer, Eclipse Mylyn Mylyn Tasks Lead http://tasktop.com
_______________________________________________
mylyn-integrators mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
_______________________________________________
mylyn-integrators mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators