summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathias Kinzler2010-03-31 16:57:06 (EDT)
committer Chris Aniszczyk2010-04-01 13:15:40 (EDT)
commitac8c7b0306088e73ec85b7f3376cd9479d471422 (patch)
tree32c205f5dd13ee7bf707e6776b35f6d167582175
parentc3a03ab557517bc1bc3c40797565ba56de0d8aca (diff)
downloadegit-ac8c7b0306088e73ec85b7f3376cd9479d471422.zip
egit-ac8c7b0306088e73ec85b7f3376cd9479d471422.tar.gz
egit-ac8c7b0306088e73ec85b7f3376cd9479d471422.tar.bz2
Add a "Git Repository Exploring" perspectiverefs/changes/05/505/2
Just a minimal perspective resembling the corresopnding CVS perspective. Show the Git Repositories View on the left side and the Properties View at the bottom. Bug: 301168 Change-Id: I0bb66c897cb997105270c35d63df6ad0dcb18a5b Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.egit.ui/icons/obj16/gitrepository.gifbin0 -> 968 bytes
-rw-r--r--org.eclipse.egit.ui/plugin.properties5
-rw-r--r--org.eclipse.egit.ui/plugin.xml15
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/GitRepositoriesPerspectiveFactory.java44
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java1
5 files changed, 61 insertions, 4 deletions
diff --git a/org.eclipse.egit.ui/icons/obj16/gitrepository.gif b/org.eclipse.egit.ui/icons/obj16/gitrepository.gif
new file mode 100644
index 0000000..5a75ec3
--- /dev/null
+++ b/org.eclipse.egit.ui/icons/obj16/gitrepository.gif
Binary files differ
diff --git a/org.eclipse.egit.ui/plugin.properties b/org.eclipse.egit.ui/plugin.properties
index f456561..88d29fb 100644
--- a/org.eclipse.egit.ui/plugin.properties
+++ b/org.eclipse.egit.ui/plugin.properties
@@ -108,3 +108,8 @@ Hard_Reset_tooltip = Resets HEAD and index, and working directory (changes in tr
Set_As_Quickdiff_Baseline_label = Set as quickdiff baseline
Reset_Quickdiff_Baseline_To_HEAD_label = Reset quickdiff baseline to HEAD
Reset_Quickdiff_Baseline_To_First_Parent_label = Reset quickdiff baseline to first parent of HEAD
+
+ShareProjectCommandParameter_name = Project
+GitRepositoriesView_name = Git Repositories
+GitCategory_name = Git
+GitRepositoryPerspective_name = Git Repository Exploring \ No newline at end of file
diff --git a/org.eclipse.egit.ui/plugin.xml b/org.eclipse.egit.ui/plugin.xml
index 08c5885..936488d 100644
--- a/org.eclipse.egit.ui/plugin.xml
+++ b/org.eclipse.egit.ui/plugin.xml
@@ -450,7 +450,7 @@
name="%ShareProjectCommand_name">
<commandParameter
id="org.eclipse.egit.ui.command.projectNameParameter"
- name="Project"
+ name="%ShareProjectCommandParameter_name"
optional="false"
values="org.eclipse.egit.ui.internal.commands.ProjectNameParameterValues">
</commandParameter>
@@ -463,12 +463,21 @@
class="org.eclipse.egit.ui.internal.repository.RepositoriesView"
icon="icons/eview16/repo_rep.gif"
id="org.eclipse.egit.ui.RepositoriesView"
- name="Git Repositories"
+ name="%GitRepositoriesView_name"
restorable="true">
</view>
<category
id="org.eclipse.egit.ui.GitCategory"
- name="Git">
+ name="%GitCategory_name">
</category>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.eclipse.egit.ui.GitRepositoriesPerspectiveFactory"
+ icon="icons/obj16/gitrepository.gif"
+ id="org.eclipse.egit.ui.GitRepositoryExploring"
+ name="%GitRepositoryPerspective_name">
+ </perspective>
+ </extension>
</plugin>
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/GitRepositoriesPerspectiveFactory.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/GitRepositoriesPerspectiveFactory.java
new file mode 100644
index 0000000..a4c6791
--- /dev/null
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/GitRepositoriesPerspectiveFactory.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2010 SAP AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mathias Kinzler (SAP AG) - initial implementation
+ *******************************************************************************/
+package org.eclipse.egit.ui;
+
+import org.eclipse.egit.ui.internal.repository.RepositoriesView;
+import org.eclipse.team.ui.history.IHistoryView;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ *
+ */
+public class GitRepositoriesPerspectiveFactory implements IPerspectiveFactory {
+
+ public void createInitialLayout(IPageLayout layout) {
+
+ // repositories on the left hand
+ layout.addView(RepositoriesView.VIEW_ID, IPageLayout.LEFT, (float) 0.5, layout.getEditorArea());
+
+ // Properties under editor area
+ layout.addView(IPageLayout.ID_PROP_SHEET, IPageLayout.BOTTOM, (float) 0.5, layout
+ .getEditorArea());
+
+ // place holder for Package Explorer under repositories
+ layout.addPlaceholder("org.eclipse.jdt.ui.PackageExplorer", IPageLayout.BOTTOM, (float) 0.7, RepositoriesView.VIEW_ID);
+
+ // shortcut to Package Explorer
+ layout.addShowViewShortcut("org.eclipse.jdt.ui.PackageExplorer");
+ // shortcut to History view
+ layout.addShowViewShortcut(IHistoryView.VIEW_ID);
+
+
+
+ }
+
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
index 214acfb..38667d3 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
@@ -115,7 +115,6 @@ public class RepositoriesView extends ViewPart implements ISelectionProvider {
/** The view ID */
public static final String VIEW_ID = "org.eclipse.egit.ui.RepositoriesView"; //$NON-NLS-1$
-
// TODO central constants? RemoteConfig ones are private
static final String REMOTE = "remote"; //$NON-NLS-1$