()
| 657 | |
| 658 | |
| 659 | public boolean handleSaveAs() { |
| 660 | //System.out.println("handleSaveAs"); |
| 661 | String oldName = getSketch().getCode(0).getFileName(); |
| 662 | //System.out.println("old name: " + oldName); |
| 663 | boolean saved = super.handleSaveAs(); |
| 664 | if (saved) { |
| 665 | // re-set breakpoints in first tab (name has changed) |
| 666 | List<LineBreakpoint> bps = debugger.getBreakpoints(oldName); |
| 667 | debugger.clearBreakpoints(oldName); |
| 668 | String newName = getSketch().getCode(0).getFileName(); |
| 669 | //System.out.println("new name: " + newName); |
| 670 | for (LineBreakpoint bp : bps) { |
| 671 | LineID line = new LineID(newName, bp.lineID().lineIdx()); |
| 672 | //System.out.println("setting: " + line); |
| 673 | debugger.setBreakpoint(line); |
| 674 | } |
| 675 | // add breakpoint marker comments to source file |
| 676 | for (SketchCode code : getSketch().getCode()) { |
| 677 | addBreakpointComments(code.getFileName()); |
| 678 | } |
| 679 | |
| 680 | // set new name of variable inspector |
| 681 | //inspector.setTitle(getSketch().getName()); |
| 682 | } |
| 683 | return saved; |
| 684 | } |
| 685 | |
| 686 | |
| 687 | /** |
nothing calls this directly
no test coverage detected