com.sun.electric.tool.user
Class ExportChanges

java.lang.Object
  extended by com.sun.electric.tool.user.ExportChanges

public final class ExportChanges
extends java.lang.Object

This class has all of the Export change commands in Electric.


Nested Class Summary
static class ExportChanges.ExportsByNumber
          Comparator class for sorting Export by their name with number considered.
static class ExportChanges.ExportSortedByBusIndex
           
static class ExportChanges.FollowExport
          Class to follow the current export up the hierarchy.
static class ExportChanges.ReExportPorts
          Helper class for re-exporting a port on a node.
static class ExportChanges.RenumberNumericExports
          Class to rename a list of Exports with numeric suffixes in a new thread.
 
Constructor Summary
ExportChanges()
           
 
Method Summary
static void deleteExport()
          Method to delete the currently selected exports.
static void deleteExports(Cell cell, java.util.List<Export> exportsToDelete)
           
static void deleteExportsInArea()
          Method to delete all exports in the highlighted area.
static void deleteExportsOnSelected()
          Method to delete all exports on the highlighted objects.
static void describeExports(boolean summarize)
          EXPORT LISTING
static PortInst getNewPortFromReferenceExport(NodeInst newNi, Export referenceExport)
          This returns the port inst on newNi that corresponds to the portinst that has been exported as 'referenceExport' on some other nodeinst of the same node prototype.
static void moveExport()
          Method to move the currently selected export from one node to another.
static void reExportAll()
          Method to re-export all unwired/unexported ports on cell instances in the current Cell.
static void reExportHighlighted(boolean deep, boolean wiredPorts, boolean unwiredPorts)
          Method to re-export all unwired/unexported ports on cell instances in the current Cell.
static int reExportNodes(Cell cell, java.util.List<Geometric> nodeInsts, boolean wiredPorts, boolean unwiredPorts, boolean onlyPowerGround, boolean ignorePrimitives)
          Re-exports ports on each NodeInst in the list, in the order the nodeinsts appear in the list.
static int reExportPorts(Cell cell, java.util.List<PortInst> portInsts, boolean sort, boolean wiredPorts, boolean unwiredPorts, boolean onlyPowerGround, java.util.Map<PortInst,Export> originalExports)
          Re-exports the PortInsts in the list.
static void reExportPowerAndGround()
          Method to re-export all unwired/unexported ports on cell instances in the current Cell.
static void reExportSelected(boolean wiredPorts, boolean unwiredPorts)
          Method to re-export everything that is selected.
static void reExportSelectedPort()
          Method to reexport the selected port on other nodes in the cell.
static void renameExport()
          Method to rename the currently selected export.
static void replaceFromOtherLibrary()
          Method to replace all cell instances in the current cell with like-named ones from another library.
static void showExports()
          Method to show all exports in the current cell.
static void showPorts()
          Method to show all ports on the selected nodes in the current cell.
static void synchronizeLibrary()
          Method to synchronize the exports in two libraries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportChanges

public ExportChanges()
Method Detail

describeExports

public static void describeExports(boolean summarize)
EXPORT LISTING


reExportAll

public static void reExportAll()
Method to re-export all unwired/unexported ports on cell instances in the current Cell.


reExportSelected

public static void reExportSelected(boolean wiredPorts,
                                    boolean unwiredPorts)
Method to re-export everything that is selected.

Parameters:
wiredPorts - true to re-export ports that are wired.
unwiredPorts - true to re-export ports that are unwired.

reExportSelectedPort

public static void reExportSelectedPort()
Method to reexport the selected port on other nodes in the cell.


reExportPowerAndGround

public static void reExportPowerAndGround()
Method to re-export all unwired/unexported ports on cell instances in the current Cell. Only works for power and ground ports.


reExportNodes

public static int reExportNodes(Cell cell,
                                java.util.List<Geometric> nodeInsts,
                                boolean wiredPorts,
                                boolean unwiredPorts,
                                boolean onlyPowerGround,
                                boolean ignorePrimitives)
Re-exports ports on each NodeInst in the list, in the order the nodeinsts appear in the list. Sorts the exports on each node before exporting them to make sure they get the correct bus indices at the next level up.

Parameters:
cell - the cell in which exporting is happening.
nodeInsts - a list of NodeInsts whose ports will be exported
wiredPorts - true to include ports that have wire connections
unwiredPorts - true to include ports that do not have wire connections
onlyPowerGround - true to only export power and ground type ports
ignorePrimitives - true to ignore primitive nodes
Returns:
the number of exports created

reExportHighlighted

public static void reExportHighlighted(boolean deep,
                                       boolean wiredPorts,
                                       boolean unwiredPorts)
Method to re-export all unwired/unexported ports on cell instances in the current Cell. Only works in the currently highlighted area.

Parameters:
deep - true to reexport hierarchically to the bottom.
wiredPorts - true to reexport ports that are wired.
unwiredPorts - true to reexport ports that are not wired.

reExportPorts

public static int reExportPorts(Cell cell,
                                java.util.List<PortInst> portInsts,
                                boolean sort,
                                boolean wiredPorts,
                                boolean unwiredPorts,
                                boolean onlyPowerGround,
                                java.util.Map<PortInst,Export> originalExports)
Re-exports the PortInsts in the list. If sort is true, it first sorts the list by name and bus index. Otherwise, they are exported in the order they are found in the list. Note that ports are filtered first, then sorted.

Parameters:
cell - the cell in which exporting is happening.
portInsts - the list of PortInsts to export
sort - true to re-sort the portInsts list
wiredPorts - true to export ports that are already wired
unwiredPorts - true to export ports that are not already wired
onlyPowerGround - true to only export ports that are power and ground
originalExports - a map from the entries in portInsts to original Exports. This is used when re-exporting ports on a copy that were exported on the original. Ignored if null.
Returns:
the number of ports exported

getNewPortFromReferenceExport

public static PortInst getNewPortFromReferenceExport(NodeInst newNi,
                                                     Export referenceExport)
This returns the port inst on newNi that corresponds to the portinst that has been exported as 'referenceExport' on some other nodeinst of the same node prototype. This method is useful when re-exporting ports on copied nodes because the original port was exported.

Parameters:
newNi - the new node inst on which the port inst will be found
referenceExport - the export on the old node inst
Returns:
the port inst on newNi which corresponds to the exported portinst on the oldNi referred to through 'referenceExport'.

deleteExport

public static void deleteExport()
Method to delete the currently selected exports.


deleteExportsOnSelected

public static void deleteExportsOnSelected()
Method to delete all exports on the highlighted objects.


deleteExportsInArea

public static void deleteExportsInArea()
Method to delete all exports in the highlighted area.


deleteExports

public static void deleteExports(Cell cell,
                                 java.util.List<Export> exportsToDelete)

moveExport

public static void moveExport()
Method to move the currently selected export from one node to another.


renameExport

public static void renameExport()
Method to rename the currently selected export.


showExports

public static void showExports()
Method to show all exports in the current cell.


showPorts

public static void showPorts()
Method to show all ports on the selected nodes in the current cell.


synchronizeLibrary

public static void synchronizeLibrary()
Method to synchronize the exports in two libraries. The user is prompted for another library (other than the current one) and all exports in that library are copied to the current one.


replaceFromOtherLibrary

public static void replaceFromOtherLibrary()
Method to replace all cell instances in the current cell with like-named ones from another library.