|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.tool.user.ErrorLogger
public class ErrorLogger
Class for logging errors. Holds a log of errors:
ErrorLogger errorLogger = ErrorLogger.newInstance(String s): get new logger for s
MessageLog errorLog = errorLogger.logError(string msg, cell c, int k): Create a new log with message 'msg', for cell 'c', with sortKey 'k'.
Various methods for adding highlights to errorLog:
To end logging, call errorLogger.termLogging(boolean explain).
Nested Class Summary | |
---|---|
static class |
ErrorLogger.MessageLog
Create a Log of a single message. |
static class |
ErrorLogger.WarningLog
Create a Log of a single warning. |
static class |
ErrorLogger.XMLParser
|
Constructor Summary | |
---|---|
ErrorLogger()
|
Method Summary | |
---|---|
void |
addMessages(java.util.List<ErrorLogger.MessageLog> messages)
|
void |
clearAllLogs()
Method to remove all errors and warnings |
boolean |
clearLogs(Cell cell)
Removes all errors and warnings associated with Cell cell. |
void |
deleteLog(int i)
|
void |
deleteMessages(java.util.List<ErrorLogger.MessageLog> messages)
|
void |
exportErrorLogger(java.lang.String filePath)
|
boolean |
findMessage(Cell cell,
Geometric geom1,
Cell cell2,
Geometric geom2,
boolean searchInError)
Method to determine if existing report was not looged already as error or warning |
java.util.ArrayList<ErrorLogger.MessageLog> |
getAllLogs(Cell cell)
Method to retrieve all MessageLogs associated with a given Cell |
java.lang.String |
getGroupName(int sortKey)
Get a group name for a sortKey. |
java.lang.String |
getInfo()
Method to retrieve general information about the errorLogger. |
ErrorLogger.MessageLog |
getLog(int i)
|
java.util.Iterator<ErrorLogger.MessageLog> |
getLogs()
Method to list all logged errors and warnings. |
int |
getNumErrors()
Method to tell the number of logged errors. |
int |
getNumLogs()
Method to tell the number of logged errors. |
int |
getNumMessages(Cell cell,
boolean searchInError)
|
int |
getNumWarnings()
Method to tell the number of logged errors. |
java.util.HashMap<java.lang.Integer,java.lang.String> |
getSortKeyToGroupNames()
|
java.lang.String |
getSystem()
|
boolean |
isPersistent()
|
void |
logError(java.lang.String message,
CellId cellId,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
Cell cell,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
EPoint pt,
Cell cell,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
Export pp,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
Geometric geom,
Cell cell,
VarContext context,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
java.util.List<Geometric> geomList,
java.util.List<Export> exportList,
Cell cell,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
java.util.List<Geometric> geomList,
java.util.List<Export> exportList,
java.util.List<EPoint> lineList,
java.util.List<EPoint> pointList,
java.util.List<PolyBase> polyList,
Cell cell,
int sortKey)
Factory method to log an error message. |
void |
logError(java.lang.String message,
PolyBase poly,
Cell cell,
int sortKey)
Factory method to log an error message. |
void |
logWarning(java.lang.String message,
Cell cell,
int sortKey)
Factory method to log a warning message. |
void |
logWarning(java.lang.String message,
Export pp,
Cell cell,
VarContext context,
int sortKey)
Factory method to log a warning message. |
void |
logWarning(java.lang.String message,
Geometric geom,
Cell cell,
VarContext context,
int sortKey)
Factory method to log a warning message. |
void |
logWarning(java.lang.String message,
java.util.List<Geometric> geomList,
java.util.List<Export> exportList,
java.util.List<EPoint> lineList,
java.util.List<EPoint> pointList,
java.util.List<PolyBase> polyList,
Cell cell,
int sortKey)
Factory method to log a warning message. |
static ErrorLogger |
newInstance(java.lang.String system)
Create a new ErrorLogger instance. |
static ErrorLogger |
newInstance(java.lang.String system,
boolean persistent)
Create a new ErrorLogger instance. |
void |
setGroupName(int sortKey,
java.lang.String groupName)
Set a group name for a sortKey. |
void |
sortLogs()
Method to sort the errors by their "key" (a value provided to "logerror()"). |
void |
termLogging_(boolean terminate)
|
void |
termLogging(boolean explain)
Method called when all errors are logged. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorLogger()
Method Detail |
---|
public java.util.HashMap<java.lang.Integer,java.lang.String> getSortKeyToGroupNames()
public java.lang.String getSystem()
public boolean isPersistent()
public static ErrorLogger newInstance(java.lang.String system)
public static ErrorLogger newInstance(java.lang.String system, boolean persistent)
public void addMessages(java.util.List<ErrorLogger.MessageLog> messages)
public void deleteMessages(java.util.List<ErrorLogger.MessageLog> messages)
public void logError(java.lang.String message, int sortKey)
message
- the string to display.sortKey
- the sorting order of this message.public void logError(java.lang.String message, Cell cell, int sortKey)
message
- the string to display.cell
- the cell in which this message applies.sortKey
- the sorting order of this message.public void logError(java.lang.String message, CellId cellId, int sortKey)
message
- the string to display.cellId
- the Id of the cell in which this message applies.sortKey
- the sorting order of this message.public void logError(java.lang.String message, Geometric geom, Cell cell, VarContext context, int sortKey)
message
- the string to display.geom
- the node or arc to displaycell
- the cell in which this message applies.context
- the VarContext of the Cell.sortKey
- the sorting order of this message.public void logError(java.lang.String message, Export pp, int sortKey)
message
- the string to display.pp
- the Export to displaysortKey
- the sorting order of this message.public void logError(java.lang.String message, EPoint pt, Cell cell, int sortKey)
message
- the string to display.pt
- the point to displaycell
- the cell in which this message applies.sortKey
- the sorting order of this message.public void logError(java.lang.String message, PolyBase poly, Cell cell, int sortKey)
message
- the string to display.poly
- the polygon to displaycell
- the cell in which this message applies.sortKey
- the sorting order of this message.public void logError(java.lang.String message, java.util.List<Geometric> geomList, java.util.List<Export> exportList, Cell cell, int sortKey)
message
- the string to display.geomList
- a list of nodes or arcs to display (may be null).exportList
- a list of Exports to display (may be null).cell
- the cell in which this message applies.sortKey
- the sorting order of this message.public void logError(java.lang.String message, java.util.List<Geometric> geomList, java.util.List<Export> exportList, java.util.List<EPoint> lineList, java.util.List<EPoint> pointList, java.util.List<PolyBase> polyList, Cell cell, int sortKey)
message
- the string to display.geomList
- a list of nodes or arcs to display (may be null).exportList
- a list of Exports to display (may be null).lineList
- a list of lines (pairs of points) to display (may be null).pointList
- a list of points to display (may be null).polyList
- a list of polygons to display (may be null).cell
- the cell in which this message applies.sortKey
- the sorting order of this message.public void logWarning(java.lang.String message, Cell cell, int sortKey)
message
- the string to display.cell
- the cell in which this message applies.sortKey
- the sorting order of this message.public void logWarning(java.lang.String message, Geometric geom, Cell cell, VarContext context, int sortKey)
message
- the string to display.geom
- a node or arc to display.cell
- the cell in which this message applies.context
- the VarContext of the Cell.sortKey
- the sorting order of this message.public void logWarning(java.lang.String message, Export pp, Cell cell, VarContext context, int sortKey)
message
- the string to display.pp
- an Exports to display.cell
- the cell in which this message applies.context
- the VarContext of the Cell.sortKey
- the sorting order of this message.public void logWarning(java.lang.String message, java.util.List<Geometric> geomList, java.util.List<Export> exportList, java.util.List<EPoint> lineList, java.util.List<EPoint> pointList, java.util.List<PolyBase> polyList, Cell cell, int sortKey)
message
- the string to display.geomList
- a list of nodes or arcs to display (may be null).exportList
- a list of Exports to display (may be null).lineList
- a list of lines (pairs of points) to display (may be null).pointList
- a list of points to display (may be null).polyList
- a list of polygons to display (may be null).cell
- the cell in which this message applies.sortKey
- the sorting order of this message.public int getNumMessages(Cell cell, boolean searchInError)
public boolean findMessage(Cell cell, Geometric geom1, Cell cell2, Geometric geom2, boolean searchInError)
public void clearAllLogs()
public java.util.ArrayList<ErrorLogger.MessageLog> getAllLogs(Cell cell)
cell
- the Cell to examine.
public boolean clearLogs(Cell cell)
cell
- the cell for which errors and warnings will be removed
public void exportErrorLogger(java.lang.String filePath)
public void setGroupName(int sortKey, java.lang.String groupName)
sortKey
- the error log sortKeygroupName
- the group namepublic java.lang.String getGroupName(int sortKey)
sortKey
- the error log sortKey
public void termLogging(boolean explain)
public void termLogging_(boolean terminate)
public java.lang.String getInfo()
public void sortLogs()
public int getNumErrors()
public int getNumWarnings()
public int getNumLogs()
public ErrorLogger.MessageLog getLog(int i)
public java.util.Iterator<ErrorLogger.MessageLog> getLogs()
public void deleteLog(int i)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |