diff options
author | james | 2002-05-14 16:35:51 +0000 |
---|---|---|
committer | james | 2002-05-14 16:35:51 +0000 |
commit | a011964f9821321b30ca68e705adc612db86d757 (patch) | |
tree | 24522d0728e22357e6f7d58557153840bcafa357 | |
parent | 99da372fbe98709694ec2d6b689b1efc72dfda69 (diff) | |
download | eclipse.platform.team-a011964f9821321b30ca68e705adc612db86d757.tar.gz eclipse.platform.team-a011964f9821321b30ca68e705adc612db86d757.tar.xz eclipse.platform.team-a011964f9821321b30ca68e705adc612db86d757.zip |
15245: DCR: Please add New Repository tool to the Repo Explorer perspective
3 files changed, 82 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties index 1c0ff538e..f9eac75a3 100644 --- a/bundles/org.eclipse.team.cvs.ui/plugin.properties +++ b/bundles/org.eclipse.team.cvs.ui/plugin.properties @@ -133,4 +133,9 @@ HistoryFilter.tooltip=Filter History HistoryView.name=CVS Resource History UnmanageFolder.label=&Disconnect... -UnmanageFolder.tooltip=Disconnect from the CVS repository.
\ No newline at end of file +UnmanageFolder.tooltip=Disconnect from the CVS repository. + +CVSActionSet.description=Actions that apply when working with CVS repositories +CVSActionSet.newLabel=New CVS Repository Location +CVSActionSet.newTooltip=Create a new CVS Repository Location + diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml index b8cb91ec7..8ec311973 100644 --- a/bundles/org.eclipse.team.cvs.ui/plugin.xml +++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml @@ -585,6 +585,10 @@ visible="false" relationship="stack"/> </perspectiveExtension> + <perspectiveExtension + targetID="org.eclipse.team.cvs.ui.cvsPerspective"> + <actionSet id="org.eclipse.team.cvs.ui.CVSActionSet"/> + </perspectiveExtension> </extension> <!-- ************** Project Sets **************** --> @@ -609,4 +613,22 @@ </action> </editorContribution> </extension> + + <!-- ********** Action Sets ************** --> + <extension point="org.eclipse.ui.actionSets"> + <actionSet + label="%CVS" + visible="false" + id="org.eclipse.team.cvs.ui.CVSActionSet" + description="%CVSActionSet.description"> + <action + toolbarPath="Normal/CVS" + label="%CVSActionSet.newLabel" + tooltip="%CVSActionSet.newTooltip" + icon="icons/full/ctool16/checkout.gif" + class="org.eclipse.team.internal.ccvs.ui.actions.NewRepositoryAction" + id="org.eclipse.team.cvs.ui.actions.NewRepositoryAction"> + </action> + </actionSet> + </extension> </plugin> diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java new file mode 100644 index 000000000..08deba206 --- /dev/null +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2002 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM - Initial implementation + ******************************************************************************/ +package org.eclipse.team.internal.ccvs.ui.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; +import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkbenchWindowActionDelegate; + +public class NewRepositoryAction implements IWorkbenchWindowActionDelegate { + Shell shell; + + /** + * @see IWorkbenchWindowActionDelegate#dispose() + */ + public void dispose() { + } + + /** + * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow) + */ + public void init(IWorkbenchWindow window) { + this.shell = window.getShell(); + } + + /** + * @see IActionDelegate#run(IAction) + */ + public void run(IAction action) { + NewLocationWizard wizard = new NewLocationWizard(); + WizardDialog dialog = new WizardDialog(shell, wizard); + dialog.open(); + } + + /** + * @see IActionDelegate#selectionChanged(IAction, ISelection) + */ + public void selectionChanged(IAction action, ISelection selection) { + } + +} |