Pages: [1]
  Print  
Author Topic: Script Operator Made Easier?  (Read 1943 times)
wessel
Hero Member
*****
Posts: 554


« on: September 02, 2013, 05:09:03 PM »

Dear RM Developers,

I'm a big fan of the Script operator.
But it always takes a long time to do things, because there is no code completion or error highlighting, etc.

Is the user-friendliness of the script operator likely to change in the future?

On a side note, I always use Eclipse to edit scripts, and then copy paste to Script Operator Editor.

Best regards,

Wessel
« Last Edit: September 02, 2013, 05:27:20 PM by wessel » Logged
wessel
Hero Member
*****
Posts: 554


« Reply #1 on: September 02, 2013, 06:53:03 PM »

Can potentially do an SVN checkout and create a class Foo in the default package.
But it will still do tons of errors because I think eclipse SVN checkout is not doing Groovy?
Or maybe it is doing Groovy but it can't find anything on the Operator Input?

import com.rapidminer.example.Example;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.Operator;

public class Foo {

   @SuppressWarnings("unused")
   public static void main(String[] args) {
      new Foo();
   }

   static Operator operator;

   Foo() {
      ExampleSet es = bar();
   }

   private ExampleSet bar() {
      ExampleSet es = operator.getInput(ExampleSet.class);

      for (Example e : es) {
         e["att1"] = e["att2"] + e["att3"];
      }

      return es;
   }
}
Logged
Pages: [1]
  Print  
 
Jump to: