alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 *
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 *
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.modules.javacvs;

import java.io.File;
import org.netbeans.lib.cvsclient.command.Command;
import org.netbeans.modules.javacvs.commands.*;
import java.lang.reflect.Method;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileSystem;
import org.openide.util.NbBundle;
import org.netbeans.modules.javacvs.events.CommandDisplayerListener;
import java.beans.*;
import org.netbeans.lib.cvsclient.commandLine.GetOpt;
import java.util.*;


/**
 * A general class that acts as wrapper around the library Commands.
 * Each fileSystemCommand is capable of executing 1 or more library commands in sequential order.
 * 
The correct working scheme with the FileSystem comamnd is following. *
1. create an instance. *
2.a setClientProvider and files(fileObjects) that the command will use. *
2.b set cvs switches for the command. *
2.c add CommandDisplayerListeners that will display the command's results and handle UI of error handling. *
3. start the command vi the startCommand() method. * * * @author mkleint */ public class CvsCommand implements Cloneable { private FsGlobalOptions globalOptions; /** Creates new CvsCommand */ public CvsCommand() { } /** Clones the instance of the command. * @return Returns the cloned object. * @throws CloneNotSupportedException if clone is not supported by subclasses, it throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { CvsCommand com = (CvsCommand)super.clone(); return com; } /** * Sets the fileobject array that the command will act upon. */ public void setFileObjects(FileObject[] fileObjects) { } /** Starts the thread with the command - executes the run() method. */ public void startCommand() { //create thread } /** Add a CommandErrorListener to the CvsCommand. * * @param commErrListener The listener to add. * */ public void addCommandErrorListener(org.netbeans.modules.javacvs.events.CommandErrorListener commErrListener) { } /** Remove a CommandErrorListener to the CvsCommand. * * @param commErrListener The listener to remove. * */ public void removeCommandErrorListener(org.netbeans.modules.javacvs.events.CommandErrorListener commErrListener) { } /** Add a CommandDisplayerListener to the CvsCommand. *
All UI communication and display of output should be handled via the CommandDisplayerListeners. * * @param listener The listener to add. * */ public synchronized void addDisplayerListener(CommandDisplayerListener listener) { } /** Removes a CommandDisplayerListener from the CvsCommand. * All the listeners are removed once the command ends. * * @param listener the listener to remove */ public synchronized void removeDisplayerListener(CommandDisplayerListener listener) { } /** * Gets the global options for the command. */ public FsGlobalOptions getGlobalOptions() { return globalOptions; } protected void setGlobalOptions(FsGlobalOptions options) { globalOptions = options; } }
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.