Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 77207
Collapse All | Expand All

(-)src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java (-3 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 22-31 Link Here
22
22
23
public class CopyRepositoryNameAction extends CVSAction {
23
public class CopyRepositoryNameAction extends CVSAction {
24
	public boolean isEnabled() {
24
	public boolean isEnabled() {
25
		return true;
25
		return getSelectedRepositories().length > 0;
26
	}
26
	}
27
	public void execute(IAction action) {
27
	public void execute(IAction action) {
28
		ICVSRepositoryLocation[] locations = getSelectedRepositories();
28
		ICVSRepositoryLocation[] locations = getSelectedRepositories();
29
		if (locations.length == 0)
30
			return;
31
29
		StringBuffer buffer = new StringBuffer();
32
		StringBuffer buffer = new StringBuffer();
30
		for (int i = 0; i < locations.length; i++) {
33
		for (int i = 0; i < locations.length; i++) {
31
			buffer.append(locations[i].getLocation(true));
34
			buffer.append(locations[i].getLocation(true));
Lines 56-62 Link Here
56
	}
59
	}
57
	private void copyToClipbard(Display display, String str) {
60
	private void copyToClipbard(Display display, String str) {
58
		Clipboard clipboard = new Clipboard(display);
61
		Clipboard clipboard = new Clipboard(display);
59
		clipboard.setContents(new String[] { str },	new Transfer[] { TextTransfer.getInstance()});			
62
		clipboard.setContents(new String[] { str },	new Transfer[] { TextTransfer.getInstance()});
60
		clipboard.dispose();
63
		clipboard.dispose();
61
	}
64
	}
62
}
65
}
(-)plugin.xml (+1 lines)
Lines 685-690 Link Here
685
               tooltip="%CopyRepositoryNameAction.tooltip"
685
               tooltip="%CopyRepositoryNameAction.tooltip"
686
               class="org.eclipse.team.internal.ccvs.ui.repo.CopyRepositoryNameAction"
686
               class="org.eclipse.team.internal.ccvs.ui.repo.CopyRepositoryNameAction"
687
               menubarPath="miscGroup"
687
               menubarPath="miscGroup"
688
               definitionId="org.eclipse.ui.edit.copy"
688
               id="org.eclipse.team.ccvs.ui.copyNames">
689
               id="org.eclipse.team.ccvs.ui.copyNames">
689
         </action>
690
         </action>
690
         <action
691
         <action

Return to bug 77207