diff options
4 files changed, 10 insertions, 59 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java index db65ff609..0c2906c32 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.action.IAction; +import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.team.core.Team; import org.eclipse.team.internal.ccvs.core.CVSException; import org.eclipse.team.internal.ccvs.core.CVSTeamProvider; @@ -31,11 +32,15 @@ public class EditAction extends WorkspaceAction { protected void execute(IAction action) throws InvocationTargetException, InterruptedException { // Get the editors final EditorsAction editors = new EditorsAction(); - run(new WorkspaceModifyOperation() { - public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + run(new IRunnableWithProgress() { + /* (non-Javadoc) + * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor) + */ + public void run(IProgressMonitor monitor) + throws InvocationTargetException, InterruptedException { executeProviderAction(editors,monitor); } - },true /* cancelable */, PROGRESS_DIALOG); + }, true /* cancelable */, PROGRESS_DIALOG); // If there are editors show them // and prompt the user to @@ -45,7 +50,7 @@ public class EditAction extends WorkspaceAction { } - run(new WorkspaceModifyOperation() { + run(new WorkspaceModifyOperation(null) { public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { executeProviderAction(new IProviderAction() { public IStatus execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException { diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java index 26d05dfaf..543fd5742 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java @@ -36,7 +36,7 @@ public class UneditAction extends WorkspaceAction { return; } - run(new WorkspaceModifyOperation() { + run(new WorkspaceModifyOperation(null) { public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { executeProviderAction(new IProviderAction() { public IStatus execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java deleted file mode 100644 index d30b66b22..000000000 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.team.internal.ui.actions; - - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.action.IAction; -import org.eclipse.team.core.RepositoryProvider; -import org.eclipse.team.internal.ui.Policy; -import org.eclipse.ui.actions.WorkspaceModifyOperation; - -/** - * Action for deconfiguring a project. Deconfiguring involves removing - * associated provider for the project. - */ -public class DeconfigureProjectAction extends TeamAction { - /* - * Method declared on IActionDelegate. - */ - public void run(IAction action) { - run(new WorkspaceModifyOperation() { - public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException { - try { - // should we use the id for the provider type and remove from the nature. Or would - // this operation be provider specific? - } catch (Exception e) { - throw new InvocationTargetException(e); - } - } - }, Policy.bind("DeconfigureProjectAction.deconfigureProject"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$ - } - /** - * @see TeamAction#isEnabled() - */ - protected boolean isEnabled() { - IProject[] selectedProjects = getSelectedProjects(); - if (selectedProjects.length != 1) return false; - if (RepositoryProvider.getProvider(selectedProjects[0]) != null) return false; - return true; - } -} diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties index d4c7bc17d..fc285bca3 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties @@ -34,8 +34,6 @@ ConfigureProjectWizardMainPage.selectRepository=Select a repository type: ConfigurationWizard.exceptionCreatingWizard=Exception creating wizard. -DeconfigureProjectAction.deconfigureProject=Deconfigure Project - IgnorePreferencePage.description=Use this page to specify a list of resource name patterns to exclude from version control. IgnorePreferencePage.add=&Add... IgnorePreferencePage.enterPatternLong=Please enter a pattern: |