Integrating with TFS: Use of ExecuteDefaultAction  
Author Message
Daniel Pratt





PostPosted: Team Foundation Server - Work Item Tracking, Integrating with TFS: Use of ExecuteDefaultAction Top

We have an internal tool that we use to keep track of work items and a bunch of other stuff. For a lot of reasons, I would really like to start using TFS for what it can handle. In order to make this feasible, I'm going to need to integrate TFS with our existing tool.

I'm starting to get a picture of what I need to implement in order to integrate with TFS, but one aspect is still unclear: Suppose that I have a work item that is linked to an "incident" or a "customer" that exists in our internal tool. I would like to have a mechanism to open the incident or customer through our tool's interface from the work item. Is ExecuteDefaultAction the means to accomplish this If yes, how does it work

If there is a better forum for this kind of question, please let me know.

Thanks,

Daniel



Visual Studio Team System40  
 
 
Allen Clark MSFT





PostPosted: Team Foundation Server - Work Item Tracking, Integrating with TFS: Use of ExecuteDefaultAction Top

You're in the right place, and you're on the right track. ExecuteDefaultAction is used to traverse the link to open your UI from the work item. This is described in detail in Team Foundation Linking Service.doc in the Visual Studio 2005 SDK. You can get the SDK at http://msdn.microsoft.com/vstudio/extend.

 



 
 
Daniel Pratt





PostPosted: Team Foundation Server - Work Item Tracking, Integrating with TFS: Use of ExecuteDefaultAction Top

Thanks for the response, Allen. I have the SDK and I've located the document you referenced. I think the next piece of the puzzle is to figure out how to "register" my implementation of ExecuteDefaultAction with TFS on the client. Any insight here

Thanks,

Daniel


 
 
Naren Datha





PostPosted: Team Foundation Server - Work Item Tracking, Integrating with TFS: Use of ExecuteDefaultAction Top

Daniel,

Sorry that there was no reponse for such long time. Do you still need this done I can send you a sample on how to accomplish it.

Thanks



 
 
Daniel Pratt





PostPosted: Team Foundation Server - Work Item Tracking, Integrating with TFS: Use of ExecuteDefaultAction Top

Hi Naren,

Thanks for following up. I think a sample would be very helpful, yes. In the mean time, I've been poking around with Reflector (thanks Lutz!) and I managed to track down where ExecuteDefaultAction was being invoked. From that I think I've figured out the basic steps I need to implement ExecuteDefaultAction. Perhaps you (or someone) can tell me if this is the right idea:

  • Create a VS Plugin (as does PcwTESample)
  • Register a "package" (PluginHostPackage) under the "Team System Client Linking Plugins" category where the plugin name corresponds to the tool name from the link URI
  • Implement IClientLinking
  • Return an instance of the IClientLinking implementation via PluginHostPackage.OnCreateService

Does that sound right Am I missing anything

Thanks much,

Daniel


 
 
Naren Datha





PostPosted: Team Foundation Server - Work Item Tracking, Integrating with TFS: Use of ExecuteDefaultAction Top

Daniel,

Yes, you got it! It is amazing how much we can do with .net reflection to reverese engineer to figure out how to do some tasks. Below are few lines just to help with syntax. I could not get your email id, so if you can email me I can reply with the sample.

[ProvideService(typeof(CustomLinkClientLinking))]

[PluginRegistration(Catalogs.ClientLinking, "CustomLinking", typeof(CustomLinkClientLinking))]

public sealed class ClientLinkingPackage : PluginHostPackage

protected override object OnCreateService(IServiceContainer container, Type serviceType)

Thanks