Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Pontesegger2016-11-10 18:32:27 +0000
committerGerrit Code Review @ Eclipse.org2016-11-10 18:32:27 +0000
commitef3b31b6c8712be17ba71f48d3d7d4dc37d3b8ce (patch)
treec41c37a90ddf48eff5296bb78d5bf9a65c4b065c
parentc69e0133b7a38730bf219b462c69b5a89ea33e39 (diff)
parent1ed2029dd714ad970e3b17ee3aa66d346dc66d81 (diff)
downloadorg.eclipse.ease.scripts-ease-0.4.x.tar.gz
org.eclipse.ease.scripts-ease-0.4.x.tar.xz
org.eclipse.ease.scripts-ease-0.4.x.zip
Merge "Bug 507360: Example Scripts for EGit integration"ease-0.4.x
-rw-r--r--JavaScript Snippets/Git/checkoutDevelop.js18
-rw-r--r--JavaScript Snippets/Git/createBranch.js18
-rw-r--r--JavaScript Snippets/Git/deleteBranch.js18
-rw-r--r--JavaScript Snippets/Git/handleUncommittedChanges.js18
-rw-r--r--JavaScript Snippets/Git/mergeDevelop.js18
-rw-r--r--JavaScript Snippets/Git/rebase.js19
-rw-r--r--JavaScript Snippets/Git/renameBranch.js18
-rw-r--r--JavaScript Snippets/Git/resetHard.js18
8 files changed, 145 insertions, 0 deletions
diff --git a/JavaScript Snippets/Git/checkoutDevelop.js b/JavaScript Snippets/Git/checkoutDevelop.js
new file mode 100644
index 0000000..a1ee709
--- /dev/null
+++ b/JavaScript Snippets/Git/checkoutDevelop.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Checkout develop
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+checkoutBranch(getRepository(getSelection()), "develop");
diff --git a/JavaScript Snippets/Git/createBranch.js b/JavaScript Snippets/Git/createBranch.js
new file mode 100644
index 0000000..7980876
--- /dev/null
+++ b/JavaScript Snippets/Git/createBranch.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Create new branch
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+createBranch(getRepository(getSelection()));
diff --git a/JavaScript Snippets/Git/deleteBranch.js b/JavaScript Snippets/Git/deleteBranch.js
new file mode 100644
index 0000000..ae38a59
--- /dev/null
+++ b/JavaScript Snippets/Git/deleteBranch.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Delete Branch
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+deleteBranch(getRepository(getSelection()));
diff --git a/JavaScript Snippets/Git/handleUncommittedChanges.js b/JavaScript Snippets/Git/handleUncommittedChanges.js
new file mode 100644
index 0000000..8a25e47
--- /dev/null
+++ b/JavaScript Snippets/Git/handleUncommittedChanges.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Handle uncommitted changes
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+handleUncommittedFiles(getRepository(getSelection()));
diff --git a/JavaScript Snippets/Git/mergeDevelop.js b/JavaScript Snippets/Git/mergeDevelop.js
new file mode 100644
index 0000000..78d68da
--- /dev/null
+++ b/JavaScript Snippets/Git/mergeDevelop.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Merge develop
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+mergeFrom(getRepository(getSelection()), "develop");
diff --git a/JavaScript Snippets/Git/rebase.js b/JavaScript Snippets/Git/rebase.js
new file mode 100644
index 0000000..49d92a5
--- /dev/null
+++ b/JavaScript Snippets/Git/rebase.js
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Rebase on develop
+// toolbar : Git Repositories
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+rebaseOn(getRepository(getSelection()), "develop");
diff --git a/JavaScript Snippets/Git/renameBranch.js b/JavaScript Snippets/Git/renameBranch.js
new file mode 100644
index 0000000..940b769
--- /dev/null
+++ b/JavaScript Snippets/Git/renameBranch.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Rename Branch
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+renameBranch(getRepository(getSelection()));
diff --git a/JavaScript Snippets/Git/resetHard.js b/JavaScript Snippets/Git/resetHard.js
new file mode 100644
index 0000000..0af079e
--- /dev/null
+++ b/JavaScript Snippets/Git/resetHard.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * 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
+ *******************************************************************************/
+
+// name : Reset to previous commit
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+resetToOriginHead(getRepository(getSelection()), 1);

Back to the top