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.commands;

import java.util.*;
import org.netbeans.modules.javacvs.commands.ClientProvider;
import org.netbeans.modules.javacvs.commands.FileSystemCommand;
import org.netbeans.modules.javacvs.CvsCommand;

import org.netbeans.lib.cvsclient.command.checkout.*;
import org.netbeans.lib.cvsclient.command.*;
import org.netbeans.lib.cvsclient.event.FileInfoEvent;

import org.openide.util.NbBundle;


/**
 *
 * @author  mkleint
 * @version
 */
public class CvsCompleteModList extends FileSystemCommand {
    
    CheckoutCommand command;    
    private CheckoutCommand firstCommand;
    /** Creates new CvsCompleteModList */
    public CvsCompleteModList(ClientProvider fs) {
        super(fs);
    }

    /**
     * Called when file status information has been received
     */
    public void fileInfoGenerated(FileInfoEvent e) {
           super.fileInfoGenerated(e);
    }
    
    
    protected void initCommand(boolean commandIsRunning) {
        // here the the commands is initiated just right before running the command
        // first command - checkout -c
        // it doesn't care about defaults, since we got a fixed set of commands 
        // with fixed switches.
        command = new CheckoutCommand();
        firstCommand = command; // to recognize which command the event came from
        command.setShowModules(true);
        toDoCommands.addElement(command);
        // next command -checkout -s
        command = new CheckoutCommand();
        command.setShowModulesWithStatus(true);
        toDoCommands.addElement(command);
        super.initCommand(commandIsRunning);
    }
    
    public String getName() {
        return NbBundle.getBundle(CvsCompleteModList.class).getString("CvsCompleteModList.name"); // NOI18N
    }

    /**
     * return the library command that is considered main command.
     * that one is used for loading from
     */
    protected Class getMainCvsCommand() {
        return CheckoutCommand.class;
    }
    

}
... 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.