File tree Expand file tree Collapse file tree
RubyScript/src/org/knime/ext/jruby Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import org.fife.ui.rsyntaxtextarea._
3838import RubyScriptNodeDialog ._
3939// remove if not needed
4040import scala .collection .JavaConversions ._
41+ import scala .collection .convert .WrapAsScala .enumerationAsScalaIterator
4142
4243object RubyScriptNodeDialog {
4344
@@ -301,9 +302,7 @@ class RubyScriptNodeDialog(private var factory: RubyScriptNodeFactory)
301302 val model = (columnTables(i).getModel)
302303 .asInstanceOf [ScriptNodeOutputColumnsTableModel ]
303304 model.clearRows()
304- var item = specs(i).iterator()
305- while (item.hasNext) {
306- val spec = item.next()
305+ for (spec <- specs(i)) {
307306 model.addRow(spec.getName, spec.getType.toString)
308307 }
309308 }
@@ -336,9 +335,8 @@ class RubyScriptNodeDialog(private var factory: RubyScriptNodeFactory)
336335 }
337336 })
338337 val flow_variables = factory.getModel.getAvailableFlowVariables
339- var i = flow_variables.values.iterator()
340- while (i.hasNext) {
341- val varDescr = i.next()
338+
339+ for (varDescr <- flow_variables.values) {
342340 table.getModel.asInstanceOf [ScriptNodeOutputColumnsTableModel ]
343341 .addRow(varDescr.getName, varDescr.getStringValue)
344342 }
You can’t perform that action at this time.
0 commit comments