This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE Dev (Build 200911171401) (#d7b3ad6247f5) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc. Steps to reproduce: - Format the code ----------------------------------------- class Foo { var seq: String[] on replace oldSlice[a..b] = newSlice{ for(s in seq[a..b]){ println(s) } }; } ----------------------------------------- The result is ----------------------------------------- class Foo { var seq: String[] on replace oldSlice [a..b] = newSlice{ for(s in seq[a..b]){ println(s) } }; } -----------------------------------------
One more sample. Format the code: ------------------------------------------------------------------- import javax.swing.JTable; import javax.swing.JComponent; import javax.swing.table.DefaultTableModel; import javafx.ext.swing.SwingComponent; package class TableCell{ public var text: String; } package class TableRow{ public var cells: TableCell[]; } package class SwingTable extends SwingComponent { var table: JTable; var model: DefaultTableModel; public var rows: TableRow[] on replace oldValue[lo..hi] = newVals{ for(index in [hi..lo step -1]){ model.removeRow(index); } for(row in newVals){ model.addRow(for(cell in row.cells) cell.text); } }; override protected function createJComponent(): JComponent { return new JTable(model); } } ------------------------------------------------------------------- The result is: ------------------------------------------------------------------- public var rows: TableRow[] on replace oldValue [lo..hi ] = newVals{ for(index in [hi..lo step -1]){ model.removeRow(index); } for(row in newVals){ model.addRow(for(cell in row.cells) cell.text); } }; -------------------------------------------------------------------
Compiler issue: http://javafx-jira.kenai.com/browse/JFXC-3718
fixed http://hg.netbeans.org/javafx/rev/f06f3e2776f6
verified in NetBeans-JavaFX-Soma: #140