diff options
author | Eike Stepper | 2012-06-27 10:25:35 +0000 |
---|---|---|
committer | Eike Stepper | 2012-06-27 10:25:35 +0000 |
commit | 938550ca6ac5f2acf6aa02bac3660f099814374a (patch) | |
tree | 458aa2bdff39ee2e9be868a052afc14627dece4f /plugins/org.eclipse.emf.cdo.releng.gitbash | |
parent | ede15a977a8018e2d2d912919faa36fcdf93dc16 (diff) | |
download | cdo-938550ca6ac5f2acf6aa02bac3660f099814374a.tar.gz cdo-938550ca6ac5f2acf6aa02bac3660f099814374a.tar.xz cdo-938550ca6ac5f2acf6aa02bac3660f099814374a.zip |
Add GitCleanAction
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.gitbash')
3 files changed, 44 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.gitbash/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.releng.gitbash/META-INF/MANIFEST.MF index 71ec73300d..ecf471dd76 100644 --- a/plugins/org.eclipse.emf.cdo.releng.gitbash/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.releng.gitbash/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.emf.cdo.releng.gitbash;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.0.100.qualifier Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -15,4 +15,4 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", org.eclipse.mylyn.tasks.ui;bundle-version="[3.3.0,4.0.0)";resolution:=optional Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ActivationPolicy: lazy -Export-Package: org.eclipse.emf.cdo.releng.gitbash;version="1.0.0";x-internal:=true +Export-Package: org.eclipse.emf.cdo.releng.gitbash;version="1.0.100";x-internal:=true diff --git a/plugins/org.eclipse.emf.cdo.releng.gitbash/plugin.xml b/plugins/org.eclipse.emf.cdo.releng.gitbash/plugin.xml index 7515e4c698..c1245cdbfd 100644 --- a/plugins/org.eclipse.emf.cdo.releng.gitbash/plugin.xml +++ b/plugins/org.eclipse.emf.cdo.releng.gitbash/plugin.xml @@ -20,6 +20,15 @@ id="org.eclipse.emf.cdo.releng.gitbash.contribution1" objectClass="org.eclipse.egit.ui.internal.repository.tree.RepositoryNode"> <action + class="org.eclipse.emf.cdo.releng.gitbash.GitCleanAction" + enablesFor="1" + id="org.eclipse.emf.cdo.releng.gitbash.GitCleanAction" + label="Git Clean" + menubarPath="additions" + state="true" + style="push" + tooltip="Execute git clean -f -d"/> + <action class="org.eclipse.emf.cdo.releng.gitbash.GitResetHardAction" enablesFor="1" id="org.eclipse.emf.cdo.releng.gitbash.GitResetHardAction" @@ -27,7 +36,7 @@ menubarPath="additions" state="true" style="push" - tooltip="Execute Git reset --hard"/> + tooltip="Execute git reset --hard"/> <action class="org.eclipse.emf.cdo.releng.gitbash.GitAddAllAction" enablesFor="1" @@ -36,7 +45,7 @@ menubarPath="additions" state="true" style="push" - tooltip="Execute Git add --all"/> + tooltip="Execute git add --all"/> <action class="org.eclipse.emf.cdo.releng.gitbash.GitBashAction" enablesFor="1" diff --git a/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitCleanAction.java b/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitCleanAction.java new file mode 100644 index 0000000000..e27411a744 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.gitbash/src/org/eclipse/emf/cdo/releng/gitbash/GitCleanAction.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.releng.gitbash; + +import org.eclipse.swt.widgets.Shell; + +import java.io.File; + +/** + * @author Eike Stepper + */ +public class GitCleanAction extends AbstractRepositoryAction +{ + public GitCleanAction() + { + } + + @Override + protected void run(Shell shell, File workTree) throws Exception + { + GitBash.executeCommand(shell, workTree, "git clean -f -d"); + } +} |