Creating Plugin for Eclipse. Insufficient functionality of extension points in comparison with Team Explorer for VisualStudio2010.

Answered Creating Plugin for Eclipse. Insufficient functionality of extension points in comparison with Team Explorer for VisualStudio2010.

  • vendredi 18 février 2011 10:16
     
     

    Hi!

    Prelude:

    Our company migrated C++, Java code from CVS to TFS with history and 150 branches of trunk.

     It was hard task, but we did it.

    I am almost happy with TEE SP1, but still try "dont go to linux department without necessity".

    Now: We are going to run Code Review practice for all departments. We found that it's easy to make button in VisualStudio->Pending Changes (Popum menu & toolbar).

    The action should create shelveset, codereview work item and connect them by reference. And button for Reviewer to take change in temp Workspace (automatically created).

    In visual studio we have all stuff that we need. It is nice with C#.

    Then I go to eclipse. Here some troubles with extension points. I can't get Pending changes. Selected item in Source Explorer.

    For example: I want to make commands Dos2Unix and Unix2Dos and inject them to Popup menu of Source Control Explorer.

    I did it for VisualStudio but can't do it for Eclipse. Probably I don't know how.

    Let's look at TEE 2010 Plugin for Eclipse Extension points:

    com.microsoft.tfs.client.common.ui.serverItemBrowser - An internal (not for public use) extension point to provide UI to browse to a server item.Primary is use is for version control explorer to handle folder browse events.

    com.microsoft.tfs.client.common.ui.teamExplorer - Contributes information to the Team Explorer view, primarily as tree nodes. See the schema's allowed elements for how and where contributions will appear in the view.

    And other, not useful stuff...

    (via TeamExplorer I can get connection to TFSServer, Project it s OK, but I want more...)

    Question: How do I get pending changes (opened Workspace, Selected items). it was perfect if I could insert my actions 

    into popup menu of Source Control Explorer with access to item properties (Folder or File).

    Thank You!

Toutes les réponses

  • lundi 21 février 2011 09:55
    Propriétaire
     
     Traitée A du code

    In Eclipse to add items to the pop-up menus what you want to do here is an objectContribution, i.e:

     

    <objectContribution adaptable="true" <br/> id="com.foobar.actions.MyAdditions" <br/> objectClass="com.microsoft.tfs.client.common.ui.vc.tfsitem.TFSItem">
      <action class="com.foobar.actions.MyActionDelegate" <br/>      id="com.foobar.actions.MyActionDelegate" <br/>      label="My Label" <br/>      menubarPath="additions"/>
    </objectContribution>
    

     

     

    or if you just want the action on a folder you can do:

     

    <objectContribution adaptable="true" <br/> id="com.foobar.actions.MyFolderAdditions" <br/> objectClass="com.microsoft.tfs.client.common.ui.vc.tfsitem.TFSFolder">
      <action class="com.foobar.actions.MyActionDelegate" <br/>      id="com.foobar.actions.MyActionDelegate" <br/>      label="My Label" <br/>      menubarPath="additions"/>
    </objectContribution>
    

     

     

     

    This is a standard objectContribution (i.e. it is an ActionDelegate).

    Let me know if that helps.

    Martin.


    http://www.woodwardweb.com
  • vendredi 20 avril 2012 18:48
     
     
    Is it possible to get a reference to TFS items (files or folders) during a build or validation sweep?  I'm looking to do checks across an entire project's codebase, not to an individual item in a popup menu.