Modifier and Type | Method and Description |
---|---|
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() |
eraseLibrary, examineCell, killObject, modifyArcInst, modifyCell, modifyCellGroup, modifyExport, modifyLibrary, modifyNodeInst, newObject, readLibrary, renameObject, request, slice, startBatch, writeLibrary
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
public void init()
Tool
public static CVS getCVSTool()
public void endBatch(Snapshot oldSnapshot, Snapshot newSnapshot, boolean undoRedo)
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 windowpublic 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 windowpublic 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)