Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 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 http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.team.internal.ccvs.ui.repo;
	public RemoveDateTagAction() {
	}
	public void run() {
		if (elements.length == 0) return;
		for(int i = 0; i < elements.lengthi++){
			CVSTag tag = elements[i].getTag();
			if(tag.getType() == .){
				mgr.removeDateTag(elements[i].getRoot(),tag);
			}				
		}
	}
	protected boolean updateSelection(IStructuredSelection selection) {
		this. = selection;
		boolean b = containsDataTag();
		return b;
	}
	private boolean containsDataTag(){
		if (elements.length > 0){ 		
			for(int i = 0; i < elements.lengthi++){
				CVSTag tag = elements[i].getTag();
				if(tag.getType() == .){
					return true;
				}				
			}
		}
		return false;
	}

Returns the selected CVS date tag elements
		ArrayList cvsTagElements = null;
		if (!=null && !.isEmpty()) {
			cvsTagElements = new ArrayList();
			Iterator elements = .iterator();
			while (elements.hasNext()) {
				Object next = TeamAction.getAdapter(elements.next(), CVSTagElement.class);
				if (next instanceof CVSTagElement) {
					cvsTagElements.add(next);
				}
			}
		}
		if (cvsTagElements != null && !cvsTagElements.isEmpty()) {
			CVSTagElement[] result = new CVSTagElement[cvsTagElements.size()];
			cvsTagElements.toArray(result);
			return result;
		}
		return new CVSTagElement[0];
	}
New to GrepCode? Check out our FAQ X