Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Customize History View for Resources(Restrict actions available in the History View for a resource)
Customize History View for Resources [message #1064204] Tue, 18 June 2013 05:01
Missing name Mising name is currently offline Missing name Mising name
Messages: 18
Registered: July 2009
Junior Member
Dear All,

I am using Eclipse target platform 3.6.2 along with org.eclipse.team.svn.ui in version 1.0.0.I20120601-1700.

I need to implement my own History view. This view will merely reduce the functionality available in the standard history view available through org.eclipse.team.svn.ui (org.eclipse.team.svn.ui.history.SVNHistoryPage). The goal is to show only a subset of the columns in the history view table, not to offer any of the right-click functionalities available in the history view table, and not contribute additional menu entries in the toolbar.

I have managed to register an Adapter factory through the org.eclipse.core.runtime.adapters extension point that adapts a custom type (say MyClass) to org.eclipse.team.ui.history.IHistoryPageSource.
This is done as follows:
<factory
adaptableType="MyClass"
class="MyClassToHistorySourceAdapterFactory">
<adapter
type="org.eclipse.team.ui.history.IHistoryPageSource">
</adapter>
</factory>

Through this mechanism, I then serve up my own History Page that displays only the required columns, does not contribute any menu items to the toolbar and does not offer any right-click functionality. This works fine for MyClass.

The problem I am having is when an IResource is selected and its history view is to be displayed. I am registering my Adapter factory as follows:

<extension point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.team.svn.core.history.SVNFileHistoryProvider"
class="MyCustomResourceToHistorySourceAdapterFactory">
<adapter
type="org.eclipse.team.ui.history.IHistoryPageSource">
</adapter>
</factory>
</extension>

I am unable to get this Adapter factory to be used for resources. It is always using the adapter factory defined in org.eclipse.team.svn.ui. As a result, for resources, it is showing the default history page offered by org.eclipse.team.svn.ui.history.SVNHistoryPage.

If I am not mistaken, one cannot register 2 adapter factories for the same set of input/output. Is there any way in which I could get my adapter factory to be used in preference to the one declared by org.eclipse.team.svn.ui? Alternatively, is there another way in which I could display a custom history page for a selected IResource with my own columns and only required toolbar menu and pop-up menu items?

Please let me know in case more information is needed.

Thanks in advance,

Best Regards,
Abhi.
Previous Topic:New Repository History Wizard
Next Topic:Eclipse Team Synchronizing view show commiter on incomming changes
Goto Forum:
  


Current Time: Tue Jul 22 07:31:32 EDT 2014

Powered by FUDForum. Page generated in 0.01553 seconds