[EGIT PATCH 2/6] Using the page site selection turned out to be cumbersome.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So we use the view site instead. I'm not sure that is the proper
way though.

Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
---
 org.spearce.egit.ui/plugin.xml                     |   23 ++++++++++++++++++++
 .../egit/ui/internal/history/GitHistoryPage.java   |    3 +-
 2 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index 611829a..924c6e5 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -97,6 +97,29 @@
                menubarPath="team.main/group1"
                tooltip="%CommitAction_tooltip"/>
 	  </objectContribution>
+      <objectContribution
+            id="org.spearce.egit.ui.revobjectContributions"
+            adaptable="true"
+            objectClass="org.spearce.jgit.revwalk.RevObject">
+         <action
+               class="org.spearce.egit.ui.internal.actions.BranchAction"
+               id="org.spearce.egit.ui.action1"
+               label="Kolla"
+               enablesFor="*"
+               menubarPath="additions">
+         </action>
+      </objectContribution>
+      <viewerContribution
+            id="org.spearce.egit.ui.viewerContribution1"
+            targetID="org.spearce.egit.ui.historyPageContributions">
+         <action
+               class="org.spearce.egit.ui.internal.actions.ResetAction"
+               id="org.spearce.egit.ui.action1"
+               label="Titta"
+               enablesFor="*"
+               menubarPath="additions">
+         </action>
+      </viewerContribution>
    </extension>
 
    <extension
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
index 6eaa6e4..d8777ef 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/GitHistoryPage.java
@@ -235,7 +235,8 @@ public class GitHistoryPage extends HistoryPage {
 		popupMgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
 		getSite().registerContextMenu(POPUP_ID, popupMgr,
 				revObjectSelectionProvider);
-		getSite().setSelectionProvider(revObjectSelectionProvider);
+		getHistoryPageSite().getPart().getSite().setSelectionProvider(
+				revObjectSelectionProvider);
 	}
 
 	private void attachContextMenu(final Control c) {
-- 
1.5.6.2.220.g44701

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux