Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.doc/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.egit.doc/build.properties4
-rw-r--r--org.eclipse.egit.doc/cheatsheets/clone.xml41
-rw-r--r--org.eclipse.egit.doc/contexts.xml10
-rw-r--r--org.eclipse.egit.doc/plugin.properties3
-rw-r--r--org.eclipse.egit.doc/plugin.xml21
-rw-r--r--org.eclipse.egit.ui/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java18
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java18
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java18
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CloneCommand.java2
13 files changed, 143 insertions, 5 deletions
diff --git a/org.eclipse.egit.doc/META-INF/MANIFEST.MF b/org.eclipse.egit.doc/META-INF/MANIFEST.MF
index 18fe3588a8..87f67b29f6 100644
--- a/org.eclipse.egit.doc/META-INF/MANIFEST.MF
+++ b/org.eclipse.egit.doc/META-INF/MANIFEST.MF
@@ -6,4 +6,5 @@ Bundle-Version: 0.11.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Require-Bundle: org.eclipse.mylyn.wikitext.core;bundle-version="[1.3.0,2.0.0)";resolution:=optional,
- org.eclipse.mylyn.wikitext.mediawiki.core;bundle-version="[1.3.0,2.0.0)";resolution:=optional
+ org.eclipse.mylyn.wikitext.mediawiki.core;bundle-version="[1.3.0,2.0.0)";resolution:=optional,
+ org.eclipse.ui.cheatsheets;bundle-version="[3.3.0,4.0.0)"
diff --git a/org.eclipse.egit.doc/build.properties b/org.eclipse.egit.doc/build.properties
index e7cb16e70b..25b040dc47 100644
--- a/org.eclipse.egit.doc/build.properties
+++ b/org.eclipse.egit.doc/build.properties
@@ -5,4 +5,6 @@ bin.includes = META-INF/,\
plugin.properties,\
plugin.xml,\
images/,\
- intro/
+ intro/,\
+ cheatsheets/,\
+ contexts.xml
diff --git a/org.eclipse.egit.doc/cheatsheets/clone.xml b/org.eclipse.egit.doc/cheatsheets/clone.xml
new file mode 100644
index 0000000000..3e8480ac1b
--- /dev/null
+++ b/org.eclipse.egit.doc/cheatsheets/clone.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cheatsheet title="Cloning a Git Repository">
+ <intro>
+ <description>
+ With the Git Clone Wizard you can clone repositories using different transport protocols.
+ </description>
+ </intro>
+ <item title="Start Clone Wizard" dialog="true">
+ <description>
+ The clone wizard can be started by clicking &quot;Click to perform&quot; below.<br /><br />
+ Alternatively you can launch this wizard from the &quot;Import Projects from Git&quot; wizard using &quot;Import... &gt; Git &gt; Projects from Git &gt; Next &gt; Clone...&quot; or from the &quot;Git Repositories View&quot; using the &quot;Clone a Git Repository&quot; toolbar button.<br /><br />
+ <b>To start this cheat sheet from a separately opened wizard, click the help icon and then select &quot;Cloning a Git Repository&quot;.</b>
+ </description>
+ <command required="false" serialization="org.eclipse.egit.ui.RepositoriesViewClone" />
+ </item>
+ <item
+ href="/org.eclipse.egit.doc/help/EGit/User_Guide/Working-with-remote-Repositories.html#Repository_Selection"
+ title="Repository Selection" dialog="true">
+ <description>
+ <b>Enter the repository location.</b><br /><br />
+ If you already have a <b>repository URI</b> in your clipboard, i.e. copied from a gitweb, github, wiki or any other page, it will be automatically entered into the URI field. The other fields (i.e. Host, Repository path, Protocol, Port) will then be automatically filled.<br /><br />
+ In case cloning requires <b>authentication</b> (which is not the case for many repositories), enter your credentials into the User and Password fields.<br /><br />
+ For a complete description of all fields as well as the supported protocols, see the referenced <b>documentation.</b>
+ </description>
+ </item>
+ <item title="Branch Selection" dialog="true">
+ <description>
+ <b>Choose branches to be cloned from the repository.</b><br /><br />
+ By default all available branches are checked.
+ </description>
+ </item>
+ <item title="Local Destination" dialog="true">
+ <description>
+ <b>Define local storage settings.</b><br /><br />
+ Specify the <b>destination directory</b> of the cloned repository. If this directory does not yet exist, it will be created by the wizard.<br /><br />
+ Optionally, you can change the <b>initial branch</b> that will be created and checked out locally. The default <b>remote name</b> is &apos;origin&apos;. This can also be changed if necessary.<br /><br />
+ <b>Click Finish to end the wizard.</b>
+ </description>
+ <onCompletion>You have now successfully cloned a Git repository.</onCompletion>
+ </item>
+</cheatsheet>
diff --git a/org.eclipse.egit.doc/contexts.xml b/org.eclipse.egit.doc/contexts.xml
new file mode 100644
index 0000000000..d3c3ad8d7a
--- /dev/null
+++ b/org.eclipse.egit.doc/contexts.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<contexts>
+ <context id="GitCloneWizard" title="Clone Git Repository">
+ <description>To be guided through this wizard start the cheat sheet 'Cloning a Git Repository' below.</description>
+ <command
+ serialization="org.eclipse.ui.cheatsheets.openCheatSheet(cheatSheetId=org.eclipse.egit.cheatsheets.clone)"
+ label="Cloning a Git Repository" />
+ </context>
+</contexts>
diff --git a/org.eclipse.egit.doc/plugin.properties b/org.eclipse.egit.doc/plugin.properties
index 264f93a93d..dc37ee3071 100644
--- a/org.eclipse.egit.doc/plugin.properties
+++ b/org.eclipse.egit.doc/plugin.properties
@@ -7,3 +7,6 @@
###############################################################################
Bundle-Vendor = Eclipse EGit
Bundle-Name = Git Team Provider Documentation (Incubation)
+cheatsheet.category = Team/Git
+cheatsheet.clone.name = Cloning a Git Repository
+cheatsheet.clone.desc = With the Git Clone Wizard you can clone repositories using different transport protocols.
diff --git a/org.eclipse.egit.doc/plugin.xml b/org.eclipse.egit.doc/plugin.xml
index fb23022507..01d0d4bc2d 100644
--- a/org.eclipse.egit.doc/plugin.xml
+++ b/org.eclipse.egit.doc/plugin.xml
@@ -24,5 +24,26 @@
content="$nl$/intro/tutorialsExtensionContent.xml">
</configExtension>
</extension>
+ <extension
+ point="org.eclipse.ui.cheatsheets.cheatSheetContent">
+ <category
+ name="%cheatsheet.category"
+ id="org.eclipse.egit.cheatsheets">
+ </category>
+ <cheatsheet
+ name="%cheatsheet.clone.name"
+ id="org.eclipse.egit.cheatsheets.clone"
+ category="org.eclipse.egit.cheatsheets"
+ contentFile="$nl$/cheatsheets/clone.xml">
+ <description>%cheatsheet.clone.desc</description>
+ </cheatsheet>
+ </extension>
+ <extension
+ point="org.eclipse.help.contexts">
+ <contexts
+ file="contexts.xml"
+ plugin="org.eclipse.egit.ui">
+ </contexts>
+ </extension>
</plugin>
diff --git a/org.eclipse.egit.ui/META-INF/MANIFEST.MF b/org.eclipse.egit.ui/META-INF/MANIFEST.MF
index 3e07ea1dba..b7228bbf1a 100644
--- a/org.eclipse.egit.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.egit.ui/META-INF/MANIFEST.MF
@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.help;bundle-version="[3.4.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.eclipse.egit.core;version="[0.11.0,0.12.0)",
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
index 91623517bb..29425f509d 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
@@ -44,6 +44,7 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
/**
* Wizard page that allows the user entering the location of a repository to be
@@ -65,6 +66,8 @@ class CloneDestinationPage extends WizardPage {
private Text remoteText;
+ private String helpContext = null;
+
CloneDestinationPage() {
super(CloneDestinationPage.class.getName());
setTitle(UIText.CloneDestinationPage_title);
@@ -231,6 +234,21 @@ class CloneDestinationPage extends WizardPage {
}
/**
+ * Set the ID for context sensitive help
+ *
+ * @param id
+ * help context
+ */
+ public void setHelpContext(String id) {
+ helpContext = id;
+ }
+
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(helpContext);
+ }
+
+ /**
* Check internal state for page completion status.
*/
private void checkPage() {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java
index dd6bb7bff0..226bd74970 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java
@@ -53,6 +53,8 @@ public class GitCloneWizard extends Wizard {
*/
public static final Object CLONE_JOB_FAMILY = new Object();
+ private static final String HELP_CONTEXT = "org.eclipse.egit.ui.GitCloneWizard"; //$NON-NLS-1$
+
private RepositorySelectionPage cloneSource;
private SourceBranchPage validSource;
@@ -73,6 +75,7 @@ public class GitCloneWizard extends Wizard {
setDefaultPageImageDescriptor(UIIcons.WIZBAN_IMPORT_REPO);
setNeedsProgressMonitor(true);
cloneSource = new RepositorySelectionPage(true, null);
+ cloneSource.setHelpContext(HELP_CONTEXT);
validSource = new SourceBranchPage() {
@Override
@@ -84,6 +87,7 @@ public class GitCloneWizard extends Wizard {
super.setVisible(visible);
}
};
+ validSource.setHelpContext(HELP_CONTEXT);
cloneDestination = new CloneDestinationPage() {
@Override
public void setVisible(boolean visible) {
@@ -94,6 +98,7 @@ public class GitCloneWizard extends Wizard {
super.setVisible(visible);
}
};
+ cloneDestination.setHelpContext(HELP_CONTEXT);
}
/**
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java
index f976b14334..d2d92df731 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitSelectRepositoryPage.java
@@ -114,7 +114,7 @@ public class GitSelectRepositoryPage extends WizardPage {
GitCloneWizard cloneWizard = new GitCloneWizard();
cloneWizard.setCallerRunsCloneOperation(true);
WizardDialog dlg = new WizardDialog(getShell(), cloneWizard);
- dlg.setHelpAvailable(false);
+ dlg.setHelpAvailable(true);
if (dlg.open() == Window.OK)
cloneWizard.runCloneOperation(getContainer());
checkPage();
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
index a0ac1417af..c6b5ff2eee 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
@@ -59,6 +59,7 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.PlatformUI;
class SourceBranchPage extends WizardPage {
@@ -80,6 +81,8 @@ class SourceBranchPage extends WizardPage {
private UserPasswordCredentials credentials;
+ private String helpContext = null;
+
SourceBranchPage() {
super(SourceBranchPage.class.getName());
setTitle(UIText.SourceBranchPage_title);
@@ -175,6 +178,21 @@ class SourceBranchPage extends WizardPage {
}
/**
+ * Set the ID for context sensitive help
+ *
+ * @param id
+ * help context
+ */
+ public void setHelpContext(String id) {
+ helpContext = id;
+ }
+
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(helpContext);
+ }
+
+ /**
* Check internal state for page completion status. This method should be
* called only when all necessary data from previous form is available.
*/
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java
index 871b46f14d..ff3af7e913 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java
@@ -57,6 +57,7 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
/**
* Wizard page that allows the user entering the location of a remote repository
@@ -118,6 +119,8 @@ public class RepositorySelectionPage extends WizardPage {
private boolean storeInSecureStore = true;
+ private String helpContext = null;
+
/**
* Transport protocol abstraction
*
@@ -912,6 +915,21 @@ public class RepositorySelectionPage extends WizardPage {
return this.storeInSecureStore;
}
+ /**
+ * Set the ID for context sensitive help
+ *
+ * @param id
+ * help context
+ */
+ public void setHelpContext(String id) {
+ helpContext = id;
+ }
+
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(helpContext);
+ }
+
private void setEnabledRecursively(final Control control,
final boolean enable) {
control.setEnabled(enable);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CloneCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CloneCommand.java
index dfd71e2f87..9726010e75 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CloneCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CloneCommand.java
@@ -24,7 +24,7 @@ public class CloneCommand extends
public Object execute(ExecutionEvent event) throws ExecutionException {
WizardDialog dlg = new WizardDialog(getShell(event),
new GitCloneWizard());
- dlg.setHelpAvailable(false);
+ dlg.setHelpAvailable(true);
dlg.open();
return null;
}

Back to the top