~ubuntu-branches/ubuntu/jaunty/electric/jaunty

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/io/input/EDIF.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2009-01-08 02:05:08 UTC
  • mfrom: (1.1.2 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090108020508-0h3li7zt9mu5gf0i
Tags: 8.08-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
419
419
                if (errorCount != 0 || warningCount != 0)
420
420
                        System.out.println("A total of " + errorCount + " errors, and " + warningCount + " warnings encountered during load");
421
421
 
422
 
                if (Job.getUserInterface().getCurrentCell(curLibrary) == null && curLibrary.getCells().hasNext())
 
422
                if (curLibrary != null && Job.getUserInterface().getCurrentCell(curLibrary) == null && curLibrary.getCells().hasNext())
423
423
                        Job.getUserInterface().setCurrentCell(curLibrary, curLibrary.getCells().next());
424
424
                return curLibrary;
425
425
        }
995
995
                }
996
996
        }
997
997
 
998
 
        private Export makeExport(Cell cell, PortInst pi, String name)
 
998
        private Export makeExport(Cell cell, PortInst pi, String name, PortCharacteristic pc)
999
999
        {
1000
 
                Export ppt = Export.newInstance(cell, pi, convertParens(name));
 
1000
                Export ppt = Export.newInstance(cell, pi, convertParens(name), pc);
1001
1001
                return ppt;
1002
1002
        }
1003
1003
 
1967
1967
                                                        errorCount++;
1968
1968
                                                }
1969
1969
                                                PortInst pi = ni.findPortInstFromProto(defaultIconPort);
1970
 
                                                ppt = makeExport(curCell, pi, pName);
 
1970
                                                ppt = makeExport(curCell, pi, pName, ePort.direction);
1971
1971
                                                if (ppt == null)
1972
1972
                                                {
1973
1973
                                                        System.out.println("Error, line " + lineReader.getLineNumber() + ": could not create port <" + pName + ">");
1974
1974
                                                        errorCount++;
1975
 
                                                } else
1976
 
                                                {
1977
 
                                                        // set the direction
1978
 
                                                        ppt.setCharacteristic(ePort.direction);
1979
1975
                                                }
1980
1976
                                        }
1981
1977
                                }
3072
3068
 
3073
3069
                        // now create the port
3074
3070
                        PortInst pi = ni.findPortInstFromProto(fPp);
3075
 
                        Export ppt = makeExport(curCell, pi, portsListHead.name);
 
3071
                        Export ppt = makeExport(curCell, pi, portsListHead.name, portsListHead.direction);
3076
3072
                        if (ppt == null)
3077
3073
                        {
3078
3074
                                System.out.println("Error, line " + lineReader.getLineNumber() + ": could not create port <" + portsListHead.name + ">");
3079
3075
                                errorCount++;
3080
 
                        } else
3081
 
                        {
3082
 
                                ppt.setCharacteristic(portsListHead.direction);
3083
3076
                        }
3084
3077
                        portReference = "";
3085
3078
 
3760
3753
                                        if (ppt == null)
3761
3754
                                        {
3762
3755
                                                PortInst pi = ni.findPortInstFromProto(defaultIconPort);
3763
 
                                                ppt = makeExport(curCell, pi, exportName);
 
3756
                                                ppt = makeExport(curCell, pi, exportName, null);
3764
3757
                                        }
3765
3758
                                        if (ppt == null)
3766
3759
                                        {
4143
4136
                                                        iX = arrayXVal;
4144
4137
                                                        iY = arrayYVal;
4145
4138
                                                        PortInst pi = ni.findPortInstFromProto(defaultIconPort);
4146
 
                                                        Export ppt = makeExport(curCell, pi, pName);
 
4139
 
 
4140
                                                        // locate the direction of the port
 
4141
                                                        PortCharacteristic pc = null;
 
4142
                                                        for (EDIFPort ePort = portsListHead; ePort != null; ePort = ePort.next)
 
4143
                                                        {
 
4144
                                                                if (ePort.reference.equalsIgnoreCase(portReference))
 
4145
                                                                {
 
4146
                                                                        // set the direction
 
4147
                                                                        pc = ePort.direction;
 
4148
                                                                        break;
 
4149
                                                                }
 
4150
                                                        }
 
4151
                                                        Export ppt = makeExport(curCell, pi, pName, pc);
4147
4152
                                                        if (ppt == null)
4148
4153
                                                        {
4149
4154
                                                                System.out.println("Error, line " + lineReader.getLineNumber() + ": could not create port <" + pName + ">");
4150
4155
                                                                errorCount++;
4151
 
                                                        } else
4152
 
                                                        {
4153
 
                                                                // locate the direction of the port
4154
 
                                                                for (EDIFPort ePort = portsListHead; ePort != null; ePort = ePort.next)
4155
 
                                                                {
4156
 
                                                                        if (ePort.reference.equalsIgnoreCase(portReference))
4157
 
                                                                        {
4158
 
                                                                                // set the direction
4159
 
                                                                                ppt.setCharacteristic(ePort.direction);
4160
 
                                                                                break;
4161
 
                                                                        }
4162
 
                                                                }
4163
4156
                                                        }
4164
4157
                                                } else
4165
4158
                                                {