|
What this is
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 org.netbeans.modules.javacvs.FsGlobalOptions; import org.netbeans.lib.cvsclient.command.GlobalOptions; import org.netbeans.lib.cvsclient.commandLine.GetOpt; import java.util.*; /** * * @author Milos Kleint */ public class FsGlobalOptionsImpl extends FsGlobalOptions { private GlobalOptions globalOptions; private int usedGzipLevel = 6; /** Creates new FsGlobalOptionsImpl */ public FsGlobalOptionsImpl(GlobalOptions underlyingOptions) { super(); globalOptions = underlyingOptions; } public FsGlobalOptionsImpl() { super(); globalOptions = new GlobalOptions(); } public GlobalOptions getLibraryGlobalOptions() { GlobalOptions gl = new GlobalOptions(); gl.setCVSRoot(getCVSRoot()); gl.setCheckedOutFilesReadOnly(isCheckedOutFilesReadOnly()); gl.setDoNoChanges(isDoNoChanges()); gl.setNoHistoryLogging(isNoHistoryLogging()); gl.setUseGzip(isUseGzip()); return gl; } public String getCVSArguments() { return globalOptions.getCVSCommand(); } public String getCvsrcEntry() { if (getCVSRoot() != null && !getCVSRoot().equals("")) { return "cvs " + globalOptions.getCVSCommand() + " -d " + getCVSRoot(); //NOI18N } return "cvs " + globalOptions.getCVSCommand(); //NOI18N } /** * Are checked out files read only * @return the answer */ public boolean isCheckedOutFilesReadOnly() { return globalOptions.isCheckedOutFilesReadOnly(); } /** * Set whether checked out files are read only. False is the default. * @param readOnly true for readonly, false for read/write (default) */ public void setCheckedOutFilesReadOnly(boolean readOnly) { globalOptions.setCheckedOutFilesReadOnly(readOnly); } /** * Get the CVS root * @return the CVS root value, e.g. :pserver:user@host@/usr/local/cvs */ public String getCVSRoot() { return globalOptions.getCVSRoot(); } /** * Set the CVS root * @return the value of CVS to use */ public void setCVSRoot(String root) { globalOptions.setCVSRoot(root); } /** * Set whether to use Gzip for file transmission/reception * @param useGzip true if gzip should be used, false otherwise */ public void setUseGzip(boolean useGzip) { globalOptions.setUseGzip(useGzip); } /** * Get whether to use Gzip * @return true if Gzip should be used, false otherwise */ public boolean isUseGzip() { return globalOptions.isUseGzip(); } protected void setUsedGzipLevel(int level) { usedGzipLevel = level; } protected int getUsedGzipLevel() { return usedGzipLevel; } /** Getter for property doNoChanges. * @return Value of property doNoChanges. */ public boolean isDoNoChanges() { return globalOptions.isDoNoChanges(); } /** Setter for property doNoChanges. * @param doNoChanges New value of property doNoChanges. */ public void setDoNoChanges(boolean doNoChanges) { globalOptions.setDoNoChanges(doNoChanges); } /** Getter for property noHistoryLogging. * @return Value of property noHistoryLogging. */ public boolean isNoHistoryLogging() { return globalOptions.isNoHistoryLogging(); } /** Setter for property noHistoryLogging. * @param noHistoryLogging New value of property noHistoryLogging. */ public void setNoHistoryLogging(boolean noHistoryLogging) { globalOptions.setNoHistoryLogging(noHistoryLogging); } /** Attempts to set it's properties by parsing the string parameter. * |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.