Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2006 IBM Corporation 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 Contributors: IBM Corporation - initial API and implementation /
import  org.eclipse.swt.widgets.Shell;
Action for creating a CVS Date tag.
public class NewDateTagAction extends CVSRepoViewAction {
	/* (non-Javadoc)
	 * @see
	protected void execute(IAction actionthrows InvocationTargetExceptionInterruptedException {
		if (locations.length != 1) return;
		CVSTag tag = getDateTag(getShell(), locations[0]);
		CVSUIPlugin.getPlugin().getRepositoryManager().addDateTag(locations[0], tag);
	public static CVSTag getDateTag(Shell shellICVSRepositoryLocation location) {
		DateTagDialog dialog = new DateTagDialog(shell);
		if ( == .) {
			Date date = dialog.getDate();		
			CVSTag tag = new CVSTag(date);			
			return tag;
		return null;
	/* (non-Javadoc)
	 * @see
	public boolean isEnabled() {
		if (locations.length != 1) return false;
		return true;
New to GrepCode? Check out our FAQ X