~ubuntu-branches/ubuntu/oneiric/electric/oneiric

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/user/menus/EditMenu.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:
58
58
import com.sun.electric.tool.user.CircuitChangeJobs;
59
59
import com.sun.electric.tool.user.CircuitChanges;
60
60
import com.sun.electric.tool.user.Clipboard;
61
 
import com.sun.electric.tool.user.Highlight2;
 
61
import com.sun.electric.tool.user.Highlight;
62
62
import com.sun.electric.tool.user.Highlighter;
63
63
import com.sun.electric.tool.user.User;
64
64
import com.sun.electric.tool.user.dialogs.Array;
89
89
import com.sun.electric.tool.user.ui.EditWindow;
90
90
import com.sun.electric.tool.user.ui.ErrorLoggerTree;
91
91
import com.sun.electric.tool.user.ui.LayerVisibility;
 
92
import com.sun.electric.tool.user.ui.MessagesWindow;
92
93
import com.sun.electric.tool.user.ui.OutlineListener;
93
94
import com.sun.electric.tool.user.ui.PaletteFrame;
94
95
import com.sun.electric.tool.user.ui.SizeListener;
237
238
                                new EMenuItem("Align Vertically to _Bottom") { public void run() {
238
239
                                        CircuitChanges.alignNodes(false, 1); }},
239
240
                                new EMenuItem("Align _Vertically to Center") { public void run() {
240
 
                                        CircuitChanges.alignNodes(false, 2); }}),
 
241
                                        CircuitChanges.alignNodes(false, 2); }},
 
242
                SEPARATOR,
 
243
                                new EMenuItem("Cell Center to Center of Selection") { public void run() {
 
244
                                        CircuitChanges.cellCenterToCenterOfSelection(); }}
 
245
                      ),
241
246
 
242
247
                        SEPARATOR,
243
248
 
429
434
                                new EMenuItem("Technology Creation _Wizard...") { public void run() {
430
435
                                        TechEditWizard.techEditWizardCommand(); }}),
431
436
 
432
 
                // mnemonic keys available:  B   F    K M   Q        Z
 
437
                // mnemonic keys available:      F    K     Q        Z
433
438
                        new EMenu("_Selection",
434
439
                                new EMenuItem("Sele_ct All", 'A') { public void run() {
435
440
                                        selectAllCommand(); }},
447
452
                                new EMenuItem("Select _Previous Like This") { public void run() {
448
453
                                        selectNextLikeThisCommand(false); }},
449
454
                                SEPARATOR,
450
 
                                new EMenuItem("_Select Object...") { public void run() {
 
455
                                new EMenuItem("Select O_bject...") { public void run() {
451
456
                                        SelectObject.selectObjectDialog(null, false); }},
452
457
                                new EMenuItem("Deselect All _Arcs") { public void run() {
453
458
                                        deselectAllArcsCommand(); }},
468
473
                                        selectEnclosedObjectsCommand(); }},
469
474
                                SEPARATOR,
470
475
                                new EMenuItem("Show Ne_xt Error", KeyStroke.getKeyStroke('>')) { public void run() {
471
 
                                        showNextErrorCommand(); }},
 
476
                                        showNextErrorCommand(true); }},
472
477
                                new EMenuItem("Show Pre_vious Error", KeyStroke.getKeyStroke('<')) { public void run() {
473
 
                                        showPrevErrorCommand(); }},
 
478
                                        showPrevErrorCommand(true); }},
 
479
                                new EMenuItem("Show Next Error, _same Window", KeyStroke.getKeyStroke(']')) { public void run() {
 
480
                                        showNextErrorCommand(false); }},
 
481
                                new EMenuItem("Show Previous Error, sa_me Window", KeyStroke.getKeyStroke('[')) { public void run() {
 
482
                                        showPrevErrorCommand(false); }},
474
483
                new EMenuItem("Show Single Geometry", KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, 0)) { public void run() {
475
484
                                        showSingleGeometryCommand(); }},
476
485
                new EMenuItem("Show Current Co_llection of Errors") { public void run() {
508
517
                } else
509
518
                {
510
519
                        int [] counts = new int[5];
511
 
                        NodeInst theNode = Highlight2.getInfoCommand(wnd.getHighlighter().getHighlights(), counts);
 
520
                        NodeInst theNode = Highlight.getInfoCommand(wnd.getHighlighter().getHighlights(), counts);
512
521
                        // information about the selected items
513
522
                        int arcCount = counts[0];
514
523
                        int nodeCount = counts[1];
902
911
         */
903
912
        public static void selectAllCommand()
904
913
        {
905
 
                doSelection(false, false);
 
914
        // is this the messages window?
 
915
        MessagesWindow mw = TopLevel.getMessagesWindow();
 
916
        if (mw.isFocusOwner())
 
917
        {
 
918
                mw.selectAll();
 
919
                return;
 
920
        }
 
921
 
 
922
        doSelection(false, false);
906
923
        }
907
924
 
908
925
        /**
1054
1071
 
1055
1072
                // make a set of prototypes and characteristics to match
1056
1073
                Set<Object> likeThis = new HashSet<Object>();
1057
 
                for(Highlight2 h : highlighter.getHighlights())
 
1074
                for(Highlight h : highlighter.getHighlights())
1058
1075
                {
1059
1076
                        // handle attribute text
1060
1077
                        if (h.isHighlightText())
1157
1174
                EditWindow wnd = EditWindow.getCurrent();
1158
1175
                if (wnd == null) return;
1159
1176
                Highlighter highlighter = wnd.getHighlighter();
1160
 
                Highlight2 high = highlighter.getOneHighlight();
 
1177
                Highlight high = highlighter.getOneHighlight();
1161
1178
                if (high == null) return;
1162
1179
                ElectricObject eObj = high.getElectricObject();
1163
1180
                if (high.isHighlightEOBJ())
1323
1340
        if (wnd == null) return;
1324
1341
        Highlighter highlighter = wnd.getHighlighter();
1325
1342
 
1326
 
        List<Highlight2> newHighList = new ArrayList<Highlight2>();
1327
 
        for(Highlight2 h : highlighter.getHighlights())
 
1343
        List<Highlight> newHighList = new ArrayList<Highlight>();
 
1344
        for(Highlight h : highlighter.getHighlights())
1328
1345
        {
1329
1346
            if (h.isHighlightEOBJ() || h.isHighlightText())
1330
1347
            {
1425
1442
    /**
1426
1443
     * This method implements the command to show the next logged error.
1427
1444
     * The error log lists the results of the latest command (DRC, NCC, etc.)
 
1445
     * @param separateWindow true to show each cell in its own window; false to show in the current window.
1428
1446
     */
1429
 
    private static void showNextErrorCommand()
 
1447
    private static void showNextErrorCommand(boolean separateWindow)
1430
1448
    {
1431
 
        String msg = ErrorLoggerTree.reportNextMessage();
 
1449
        String msg = ErrorLoggerTree.reportNextMessage(separateWindow);
1432
1450
        System.out.println(msg);
1433
1451
    }
1434
1452
 
1439
1457
     */
1440
1458
    private static void showSingleGeometryCommand()
1441
1459
    {
1442
 
        ErrorLoggerTree.reportSingleGeometry();
 
1460
        ErrorLoggerTree.reportSingleGeometry(true);
1443
1461
    }
1444
1462
 
1445
1463
    /**
1446
1464
     * This method implements the command to show the last logged error.
1447
1465
     * The error log lists the results of the latest command (DRC, NCC, etc.)
 
1466
     * @param separateWindow true to show each cell in its own window; false to show in the current window.
1448
1467
     */
1449
 
    private static void showPrevErrorCommand()
 
1468
    private static void showPrevErrorCommand(boolean separateWindow)
1450
1469
    {
1451
 
        String msg = ErrorLoggerTree.reportPrevMessage();
 
1470
        String msg = ErrorLoggerTree.reportPrevMessage(separateWindow);
1452
1471
        System.out.println(msg);
1453
1472
    }
1454
1473
 
1741
1760
            if (np.isNotUsed()) continue;
1742
1761
            PrimitiveNode.Function fun = np.getFunction();
1743
1762
            totalCount++;
1744
 
            if (fun == PrimitiveNode.Function.PIN) pinCount++; else
1745
 
            if (fun == PrimitiveNode.Function.CONTACT || fun == PrimitiveNode.Function.CONNECT) contactCount++; else
 
1763
            if (fun.isPin()) pinCount++; else
 
1764
            if (fun.isContact() || fun == PrimitiveNode.Function.CONNECT) contactCount++; else
1746
1765
            if (fun == PrimitiveNode.Function.NODE) pureCount++;
1747
1766
        }
1748
1767
        if (pinCount > 0)
1755
1774
                PrimitiveNode np = it.next();
1756
1775
                if (np.isNotUsed()) continue;
1757
1776
                PrimitiveNode.Function fun = np.getFunction();
1758
 
                if (fun != PrimitiveNode.Function.PIN) continue;
 
1777
                if (!fun.isPin()) continue;
1759
1778
                String addThis = " " + np.getName();
1760
1779
                if (sb.length() + addThis.length() > pageWidth)
1761
1780
                {
1777
1796
                PrimitiveNode np = it.next();
1778
1797
                if (np.isNotUsed()) continue;
1779
1798
                PrimitiveNode.Function fun = np.getFunction();
1780
 
                if (fun != PrimitiveNode.Function.CONTACT && fun != PrimitiveNode.Function.CONNECT)
 
1799
                if (!fun.isContact() && fun != PrimitiveNode.Function.CONNECT)
1781
1800
                    continue;
1782
1801
                String addThis = " " + np.getName();
1783
1802
                if (sb.length() + addThis.length() > pageWidth)
1800
1819
                PrimitiveNode np = it.next();
1801
1820
                if (np.isNotUsed()) continue;
1802
1821
                PrimitiveNode.Function fun = np.getFunction();
1803
 
                if (fun == PrimitiveNode.Function.PIN || fun == PrimitiveNode.Function.CONTACT ||
 
1822
                if (fun.isPin() || fun.isContact() ||
1804
1823
                    fun == PrimitiveNode.Function.CONNECT || fun == PrimitiveNode.Function.NODE)
1805
1824
                    continue;
1806
1825
                String addThis = " " + np.getName();