~ubuntu-branches/ubuntu/natty/electric/natty

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/user/ViewChanges.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2010-01-09 16:26:04 UTC
  • mfrom: (1.1.4 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100109162604-1ypvmy8ijmlc6oq7
Tags: 8.10-1
* New upstream version.
* debian/control
  - Add libjava3d-java and quilt build dependencies.
  - Update standards version to 3.8.3.
  - Add libjava3d-java as recommends to binary package.
* debian/rules
  - Use quilt patch system instead of simple patchsys.
  - Add java3d related jar files to DEB_JARS.
* debian/patches/*
  - Update as per current upstream source. Convert to quilt.
* debian/ant.properties
  - Do not disable 3D plugin anymore.
  - Use new property to disable compilation of OS X related classes.
* debian/wrappers/electric
  - Add java3d related jar files to runtime classpath.
* debian/README.source
  - Change text to the appropriate one for quilt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
 
140
140
                public void terminateOK()
141
141
                {
142
 
                        WindowFrame.createEditWindow(c);
 
142
            WindowFrame wf = WindowFrame.getCurrentWindowFrame();
 
143
                        if (User.isShowCellsInNewWindow()) wf = null;
 
144
                        if (wf == null) wf = WindowFrame.createEditWindow(c);
 
145
            wf.setCellWindow(c, null);
143
146
                }
144
147
        }
145
148
 
175
178
        {
176
179
                private List<Cell> multiPageCells;
177
180
                private Dimension2D alignment;
 
181
                private boolean fromRight;
178
182
 
179
183
                protected FixOldMultiPageSchematics(List<Cell> multiPageCells, Dimension2D alignment)
180
184
                {
181
185
                        super("Repair old-style Multi-Page Schematics", User.getUserTool(), Job.Type.CHANGE, null, null, Job.Priority.USER);
182
186
                        this.multiPageCells = multiPageCells;
183
187
                        this.alignment = alignment;
 
188
                        this.fromRight = User.isIncrementRightmostIndex();
184
189
                        startJob();
185
190
                }
186
191
 
212
217
                                for(Iterator<ArcInst> aIt = cell.getArcs(); aIt.hasNext(); )
213
218
                                        geomList.add(aIt.next());
214
219
                                Clipboard.copyListToCell(destCell, geomList, textList, null, null, new Point2D.Double(0, dY),
215
 
                                        true, true, alignment, null, null);
 
220
                                        true, fromRight, true, alignment, null, null);
216
221
 
217
222
                                // also copy any variables on the cell
218
223
                                for(Iterator<Variable> vIt = cell.getVariables(); vIt.hasNext(); )
362
367
                        {
363
368
                                System.out.println("Cell " + skeletonCell.describe(true) + " created with a skeletal representation of " +
364
369
                                        curCell);
365
 
                                WindowFrame.createEditWindow(skeletonCell);
 
370
                WindowFrame wf = WindowFrame.getCurrentWindowFrame();
 
371
                        if (User.isShowCellsInNewWindow()) wf = null;
 
372
                        if (wf == null) wf = WindowFrame.createEditWindow(skeletonCell);
 
373
                wf.setCellWindow(skeletonCell, null);
366
374
                        }
367
375
                }
368
376
        }
1182
1190
                        if (newCell != null)
1183
1191
                        {
1184
1192
                                System.out.println("Cell " + newCell.describe(true) + " created with a schematic representation of " + oldCell);
1185
 
                                WindowFrame.createEditWindow(newCell);
 
1193
                WindowFrame wf = WindowFrame.getCurrentWindowFrame();
 
1194
                        if (User.isShowCellsInNewWindow()) wf = null;
 
1195
                        if (wf == null) wf = WindowFrame.createEditWindow(newCell);
 
1196
                wf.setCellWindow(newCell, null);
1186
1197
                        }
1187
1198
                }
1188
1199
        }
1243
1254
                        PrimitiveNode.Function type = getNodeType(mosNI);
1244
1255
                        NodeInst schemNI = null;
1245
1256
                        if (type == PrimitiveNode.Function.UNKNOWN) continue;
1246
 
                        if (type == PrimitiveNode.Function.PIN)
 
1257
                        if (type.isPin())
1247
1258
                        {
1248
1259
                                // compute new x, y coordinates
1249
1260
                                NodeProto prim = Schematics.tech().wirePinNode;
1347
1358
        private static PortInst convertPort(NodeInst mosNI, PortProto mosPP, NodeInst schemNI)
1348
1359
        {
1349
1360
                PrimitiveNode.Function fun = getNodeType(schemNI);
1350
 
                if (fun == PrimitiveNode.Function.PIN)
 
1361
                if (fun.isPin())
1351
1362
                {
1352
1363
                        return schemNI.getOnlyPortInst();
1353
1364
                }
1442
1453
                if (ni.isCellInstance()) return null;
1443
1454
                PrimitiveNode.Function fun = ni.getFunction();
1444
1455
                if (fun.isTransistor()) return fun;
1445
 
                if (fun == PrimitiveNode.Function.PIN || fun == PrimitiveNode.Function.CONTACT ||
 
1456
                if (fun.isPin() || fun.isContact() ||
1446
1457
                        fun == PrimitiveNode.Function.NODE || fun == PrimitiveNode.Function.CONNECT ||
1447
1458
                        fun == PrimitiveNode.Function.SUBSTRATE || fun == PrimitiveNode.Function.WELL)
1448
1459
                                return PrimitiveNode.Function.PIN;
1675
1686
//                              System.out.println("Created cell " + cell.describe(true) + " in technology " + newTech.getTechName());
1676
1687
                        }
1677
1688
                        if (showCell != null)
1678
 
                                WindowFrame.createEditWindow(showCell);
 
1689
                        {
 
1690
                WindowFrame wf = WindowFrame.getCurrentWindowFrame();
 
1691
                        if (User.isShowCellsInNewWindow()) wf = null;
 
1692
                        if (wf == null) wf = WindowFrame.createEditWindow(showCell);
 
1693
                wf.setCellWindow(showCell, null);
 
1694
                        }
1679
1695
                }
1680
1696
 
1681
1697
                private static class Info extends HierarchyEnumerator.CellInfo
1847
1863
                                                        convertedNodes.put(no, newNi);
1848
1864
                                                } else
1849
1865
                                                {
1850
 
                                                        if (np.getFunction() == PrimitiveNode.Function.PIN) continue;
 
1866
                                                        if (np.getFunction().isPin()) continue;
1851
1867
                                                        if (np.getFunction() == PrimitiveNode.Function.CONNECT) continue;
1852
1868
                                                        if (no.getName().startsWith("fill") || no.getName().startsWith("tfill")) continue;
1853
1869
 
1994
2010
                                // special case again: one-port capacitors are OK
1995
2011
                                PrimitiveNode.Function oldFun = schConn.no.getNodeInst().getFunction();
1996
2012
                                PrimitiveNode.Function newFun = layNi.getFunction();
1997
 
                                if (oldFun == PrimitiveNode.Function.CAPAC && newFun == PrimitiveNode.Function.ECAPAC) return layNi.getPortInst(0);
 
2013
                                if (oldFun.isCapacitor() && newFun.isCapacitor()) 
 
2014
//                              if (oldFun == PrimitiveNode.Function.CAPAC && newFun == PrimitiveNode.Function.ECAPAC) 
 
2015
                                        return layNi.getPortInst(0);
1998
2016
 
1999
2017
                                // association has failed: assume the first port
2000
2018
                                System.out.println("No port association between " + schConn.no.getName() + ", "
2292
2310
                                        System.out.println("Could not create " + newNp + " in " + newCell);
2293
2311
                                        return null;
2294
2312
                                }
2295
 
                                newNi.copyStateBits(ni);
 
2313
                                newNi.copyStateBitsAndExpandedFlag(ni);
2296
2314
                                if (!no.getParent().isSchematic())
2297
2315
                                        newNi.copyVarsFrom(ni);
2298
2316
 
2619
2637
                                // special case again: one-port capacitors are OK
2620
2638
                                PrimitiveNode.Function oldFun = ni.getFunction();
2621
2639
                                PrimitiveNode.Function newFun = newNi.getFunction();
2622
 
                                if (oldFun == PrimitiveNode.Function.CAPAC && newFun == PrimitiveNode.Function.ECAPAC)
 
2640
                                if (oldFun.isCapacitor() && newFun.isCapacitor())
 
2641
//                              if (oldFun == PrimitiveNode.Function.CAPAC && newFun == PrimitiveNode.Function.ECAPAC)
2623
2642
                                        return newNi.getProto().getPort(0);
2624
2643
 
2625
2644
                                // association has failed: assume the first port
2694
2713
                                        NodeInst ni = it.next();
2695
2714
                                        if (ni.isIconOfParent()) continue;
2696
2715
                                        PrimitiveNode.Function fun = ni.getFunction();
2697
 
                                        if (fun == PrimitiveNode.Function.PIN) continue;
 
2716
                                        if (fun.isPin()) continue;
2698
2717
                                        if (fun == PrimitiveNode.Function.CONNECT) continue;
2699
2718
                                        if (fun == PrimitiveNode.Function.ART) continue;
2700
2719
                                        if (essentialContent != null) { essentialContent = null;   break; }