Answering my own question: after extending o.e.ui.viewActions and o.e.mylyn.context.ui.startup I have water flowing through the pipes. My view responds to the active task.
Thanks again, -Gary -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Gary Horen Sent: Wednesday, December 09, 2009 2:37 PM To: 'Mylyn Integrators list' Subject: RE: [mylyn-integrators] sample code? Thanks Shawn. I'm having trouble following your answer about context because I don't have much "context" for it :) most of the integrator reference is about creating connectors, not filtering viewers. Looking at org.eclipse.mylyn.ide.ui I'm not seeing clearly what the big picture is: how does a View participate in filtering? It looks like Mylyn just adds a ViewerFilter to the viewer in question when a task is activated, right? What are the pieces involved in setting this up? 1. I assume I need to create a plugin that extends org.eclipse.ui.viewActions that targets my View. 2. I need to implement IContextUiStartup in that plugin's Activator. After that I'm not sure what else... Thanks -Gary -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Shawn Minto Sent: Tuesday, December 08, 2009 9:15 PM To: Mylyn Integrators list Subject: Re: [mylyn-integrators] sample code? Hi Gary, Have a look at the integrators reference (http://wiki.eclipse.org/Mylyn_Integrator_Reference) for some information on the Context (and other Mylyn) APIs. It would be great if you could create a Mylyn bug to address any integration/doc shortcomings that you find while working on your integration. Here is a quick snippet of code that will get you a IResource given an IInteractionElement which you can get from the context. You can make this code a smarter and a bit more complicated by using the content type and its appropriate bridge. AbstractContextStructureBridge bridge = ContextCore.getStructureBridge(ResourceStructureBridge.CONTENT_TYPE); Object o = bridge.getObjectForHandle(node.getHandleIdentifier()); IResource r = null; if(o instanceof IResource){ r = (IResource)o; } if(r != null){ // we have a resource of some sort, do something } Shawn -- Shawn Minto [email protected] ---------------------------------------- Sent from Vancouver, BC, Canada On Tue, Dec 8, 2009 at 5:01 PM, Gary Horen <[email protected]> wrote: > I'm trying to create a very simple Mylyn integration in which a View > presents a flat list of files, filtered based on the task context when a > given task is active. I'm not finding a lot of details in the Mylyn docs. > Are there code samples that someone can point me to? > > > > Thanks > > -Gary > > _______________________________________________ > 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 _______________________________________________ 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
