|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.tool.Tool
com.sun.electric.tool.Listener
com.sun.electric.tool.cvspm.CVS
public class CVS
The CVS Module
Field Summary |
---|
Fields inherited from class com.sun.electric.tool.Tool |
---|
prefs |
Method Summary | |
---|---|
static int |
askForChoice(java.lang.String message,
java.lang.String title,
java.util.List<Library> badLibs,
java.util.List<Cell> badCells,
java.lang.String[] choices,
java.lang.String defaultChoice)
|
static boolean |
assertInCVS(Cell cell,
java.lang.String cmd,
boolean dialog)
Returns true if the Cell is in CVS, otherwise generates an error message. |
static boolean |
assertInCVS(Library lib,
java.lang.String cmd,
boolean dialog)
Returns true if the library is in CVS, otherwise generates an error message. |
static boolean |
assertNotModified(Cell cell,
java.lang.String cmd,
boolean dialog)
Used by commands that require the library to be in sync with the disk. |
static void |
checkoutFromRepository()
|
void |
endBatch(Snapshot oldSnapshot,
Snapshot newSnapshot,
boolean undoRedo)
Handles database changes of a Job. |
static void |
fixStaleCellReferences(Library reloadedLib)
Reloading libraries has the side affect that any EditWindows containing cells that were reloaded now point to old, unlinked cells instead of the new ones. |
static void |
fixStaleCellReferences(java.util.List<Library> libs)
Reloading libraries has the side affect that any EditWindows containing cells that were reloaded now point to old, unlinked cells instead of the new ones. |
static java.io.File |
getCellFile(Cell cell)
Get the file for the given Cell, assuming the library is in DELIB format. |
static java.lang.String |
getCVSLastCommitMessage()
|
static java.lang.String |
getCVSProgram()
|
static java.lang.String |
getCVSRepository()
|
static CVS |
getCVSTool()
|
static java.lang.String |
getFactoryCVSProgram()
|
static java.lang.String |
getFactoryCVSRepository()
|
void |
init()
The initialization method for this Tool. |
static boolean |
isDELIB(Library lib)
|
static boolean |
isEnabled()
|
static boolean |
isFactoryEnabled()
|
static boolean |
isFileInCVS(java.io.File fd)
Returns true if this file has is being maintained from a CVS respository, returns false otherwise. |
static boolean |
isFileInCVS(java.io.File fd,
boolean assertScheduledForAdd,
boolean assertScheduledForRemove)
Returns true if this file has is being maintained from a CVS respository, returns false otherwise. |
static boolean |
isInCVS(Cell cell)
This checks the CVS Entries file to see if the cell is in cvs. |
static boolean |
isInCVS(Library lib)
This checks the CVS Entries file to see if the library is in cvs (jelib/elib), or if the library dir + header file is in cvs (delib). |
static int |
runCVSCommand(java.lang.String cvsProgram,
java.lang.String repository,
java.lang.String cmd,
java.lang.String comment,
java.lang.String workingDir,
java.io.OutputStream out)
This will run a CVS command in-thread; i.e. |
static void |
runModalCVSCommand(java.lang.String cmd,
java.lang.String comment,
java.lang.String workingDir,
java.io.OutputStream out)
This will run a CVS command in a separate Thread and block the GUI until the command completes, or until the user hits 'cancel', which will try to terminate the external command. |
static void |
setCVSLastCommitMessage(java.lang.String s)
|
static void |
setCVSProgram(java.lang.String s)
|
static void |
setCVSRepository(java.lang.String s)
|
static void |
setEnabled(boolean b)
|
static void |
showError(java.lang.String message,
java.lang.String title,
java.util.List<Library> badLibs,
java.util.List<Cell> badCells)
Issue an error message |
static void |
testModal()
|
Methods inherited from class com.sun.electric.tool.Listener |
---|
eraseLibrary, examineCell, killObject, modifyArcInst, modifyCell, modifyCellGroup, modifyExport, modifyLibrary, modifyNodeInst, newObject, readLibrary, renameObject, request, slice, startBatch, writeLibrary |
Methods inherited from class com.sun.electric.tool.Tool |
---|
clearAnalysis, clearBackground, clearFixErrors, clearIncremental, clearOn, clearSynthesis, compareTo, findTool, getIndex, getListeners, getName, getNumTools, getProjectSettings, getTools, initAllTools, isAnalysis, isBackground, isFixErrors, isIncremental, isOn, isSynthesis, setAnalysis, setBackground, setFixErrors, setIncremental, setOn, setSynthesis, setVarInJob, testAll, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void init()
Tool
init
in interface Changes
init
in class Tool
public static CVS getCVSTool()
public void endBatch(Snapshot oldSnapshot, Snapshot newSnapshot, boolean undoRedo)
endBatch
in interface Changes
endBatch
in class Listener
oldSnapshot
- database snapshot before Job.newSnapshot
- database snapshot after Job and constraint propagation.undoRedo
- true if Job was Undo/Redo job.public static void checkoutFromRepository()
public static int runCVSCommand(java.lang.String cvsProgram, java.lang.String repository, java.lang.String cmd, java.lang.String comment, java.lang.String workingDir, java.io.OutputStream out)
cvsProgram
- the name of CVS programrepository
- the path to cvs repositirycmd
- the command to runcomment
- the message to display on the dialogworkingDir
- the directory in which to run the CVS command
(null for current working directory). I recommend you specify
this as the current library dir.out
- where the result of the command gets printed. May be
a ByteArrayOutputStream for storing it, or just System.out for
printing it.
public static void runModalCVSCommand(java.lang.String cmd, java.lang.String comment, java.lang.String workingDir, java.io.OutputStream out)
cmd
- the command to runcomment
- the message to display on the dialogworkingDir
- the directory in which to run the CVS command
(null for current working directory). I recommend you specify
this as the current library dir.out
- where the result of the command gets printed. May be
a ByteArrayOutputStream for storing it, or just System.out for
printing it.public static void testModal()
public static java.io.File getCellFile(Cell cell)
cell
- the Cell being examined.
public static boolean isDELIB(Library lib)
public static boolean isFileInCVS(java.io.File fd)
public static boolean isFileInCVS(java.io.File fd, boolean assertScheduledForAdd, boolean assertScheduledForRemove)
public static boolean isInCVS(Library lib)
lib
-
public static boolean isInCVS(Cell cell)
cell
-
public static boolean assertNotModified(Cell cell, java.lang.String cmd, boolean dialog)
cell
- dialog
- true to pop up a dialog to tell the user, false to not do so.
public static boolean assertInCVS(Library lib, java.lang.String cmd, boolean dialog)
lib
- the library to checkcmd
- the CVS command (for error message display)dialog
- true to show a modal dialog, false to write error to message window
public static boolean assertInCVS(Cell cell, java.lang.String cmd, boolean dialog)
cell
- the cell to checkcmd
- the CVS command (for error message display)dialog
- true to show a modal dialog, false to write error to message window
public static void showError(java.lang.String message, java.lang.String title, java.util.List<Library> badLibs, java.util.List<Cell> badCells)
message
- title
- badLibs
- badCells
- public static int askForChoice(java.lang.String message, java.lang.String title, java.util.List<Library> badLibs, java.util.List<Cell> badCells, java.lang.String[] choices, java.lang.String defaultChoice)
public static void fixStaleCellReferences(java.util.List<Library> libs)
public static void fixStaleCellReferences(Library reloadedLib)
public static boolean isEnabled()
public static void setEnabled(boolean b)
public static boolean isFactoryEnabled()
public static java.lang.String getCVSProgram()
public static void setCVSProgram(java.lang.String s)
public static java.lang.String getFactoryCVSProgram()
public static java.lang.String getCVSRepository()
public static void setCVSRepository(java.lang.String s)
public static java.lang.String getFactoryCVSRepository()
public static java.lang.String getCVSLastCommitMessage()
public static void setCVSLastCommitMessage(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |