diff options
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java deleted file mode 100644 index 4de19a23b..000000000 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java +++ /dev/null @@ -1,71 +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.ccvs.core.client.listeners; - - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.team.internal.ccvs.core.ICVSFolder; -import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation; -import org.eclipse.team.internal.ccvs.core.client.CommandOutputListener; - -/* - * This class pares the output of the "cvs checkout -c" command which returns the list of modules - * defined in the CVSROOT/modules file. - */ -public class ModuleDefinitionsListener extends CommandOutputListener { - - // the last line read from the context (used to accumulate multi-line definitions) - private String lastLine = ""; //$NON-NLS-1$ - - private Map moduleMap; - - public ModuleDefinitionsListener() { - reset(); - } - - /* - * @see ICommandOutputListener#messageLine(String, ICVSFolder, IProgressMonitor) - */ - public IStatus messageLine( - String line, - ICVSRepositoryLocation location, - ICVSFolder commandRoot, - IProgressMonitor monitor) { - - // Lines that start with a space indicate a multi line entry - if( line.charAt(0) == ' ' ) { - lastLine += line; - line = lastLine; - } - else - lastLine = line; - - // Use the module name as the key so that multi-line modules will be recorded properly - int firstSpace = line.indexOf(" "); //$NON-NLS-1$ - if (firstSpace > -1) { - String module = line.substring(0, firstSpace); - moduleMap.put(module, line); - } - return OK; - } - - public String[] getModuleExpansions() { - return (String[])moduleMap.values().toArray(new String[moduleMap.size()]); - } - - public void reset() { - this.moduleMap = new HashMap(); - } -} |