Author: rob.stryker(a)jboss.com
Date: 2011-08-22 07:02:45 -0400 (Mon, 22 Aug 2011)
New Revision: 34135
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/src/org/jboss/ide/eclipse/as/egit/internal/ui/commands/EGitUtilsCommitAndPushHandler.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/plugin.xml
Log:
JBIDE-9510 - removing test handler
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/plugin.xml 2011-08-22 09:44:03 UTC
(rev 34134)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/plugin.xml 2011-08-22 11:02:45 UTC
(rev 34135)
@@ -39,30 +39,6 @@
</and>
</activeWhen>
</handler>
- <handler
-
class="org.jboss.ide.eclipse.as.egit.internal.ui.commands.EGitUtilsCommitAndPushHandler"
-
commandId="org.jboss.ide.eclipse.as.egit.ui.commands.EGitUtilsCommitAndPushCommand">
- <activeWhen>
- <and>
- <count
- value="+">
- </count>
- <iterate>
- <or>
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- <adapt
-
type="org.eclipse.core.resources.mapping.ResourceMapping">
- </adapt>
- <adapt
- type="org.eclipse.ui.IContributorResourceAdapter">
- </adapt>
- </or>
- </iterate>
- </and>
- </activeWhen>
- </handler>
</extension>
<extension
point="org.eclipse.ui.menus">
@@ -94,34 +70,6 @@
</visibleWhen>
</command>
</menuContribution>
- <menuContribution
- allPopups="true"
- locationURI="popup:team.main?after=group1">
- <command
-
commandId="org.jboss.ide.eclipse.as.egit.ui.commands.EGitUtilsCommitAndPushCommand"
- label="EGit utils Commit and Push --- REMOVE ME ---"
- style="push"
- tooltip="EGit utils Commit And Push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <count
- value="1">
- </count>
- <iterate>
- <and>
- <adapt
- type="org.eclipse.core.resources.IProject">
- <test
- property="GitResource.isShared">
- </test>
- </adapt>
- </and>
- </iterate>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
Deleted:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/src/org/jboss/ide/eclipse/as/egit/internal/ui/commands/EGitUtilsCommitAndPushHandler.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/src/org/jboss/ide/eclipse/as/egit/internal/ui/commands/EGitUtilsCommitAndPushHandler.java 2011-08-22
09:44:03 UTC (rev 34134)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/src/org/jboss/ide/eclipse/as/egit/internal/ui/commands/EGitUtilsCommitAndPushHandler.java 2011-08-22
11:02:45 UTC (rev 34135)
@@ -1,39 +0,0 @@
-package org.jboss.ide.eclipse.as.egit.internal.ui.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.jboss.ide.eclipse.as.egit.core.EGitUtils;
-
-/**
- *
- * This is a test handler that should be removed in the finaly Milestone!
- *
- * @author André Dietisheim
- *
- */
-public class EGitUtilsCommitAndPushHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- Assert.isTrue(selection instanceof IStructuredSelection);
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- Object selectedElement = structuredSelection.getFirstElement();
- IProject project = (IProject) Platform.getAdapterManager().getAdapter(selectedElement,
IProject.class);
- try {
- EGitUtils.commit(project, null);
- EGitUtils.push(EGitUtils.getRepository(project), null);
- } catch (CoreException e) {
- throw new ExecutionException(e.getStatus().getMessage(),
e.getStatus().getException());
- }
- return null;
- }
-}
Show replies by date