awltech / org.parallelj.studio

ParallelJ-Studio is a part of the ParallelJ project corresponding to the Eclipse plug-ins part. It contains the graphical editor, but also the code generator and the ParallelJ metamodel. More information can be found on our website: http://www.parallelj.org
http://www.parallelj.org
3 stars 2 forks source link

Datas aren't taken into account whan generating code #40

Closed ElieMalesys closed 12 years ago

ElieMalesys commented 12 years ago

My runnable constructor take 3 parameters (designed as data in my program) :

public MyRunnable(String param1, String param2, List param3) {...}

but //J generated code dont take it into account and call the constructor without any paramater :

public MyRunnable process() {
    // TODO : to be implemented
    return new MyRunnable();
               }

it can easily be corrected manually and anyway the process method have to be implemented by user, but //J generated code doesn't compile

aneveux commented 12 years ago

Actually this is the normal behavior. Because you're free to define the constructors of your executables, with as many parameters as you want. You're also free to define multiple constructors with different paremeters. In this case, //J can't know which constructor is the one to call. Moreover, as soon as there's parameters, ParallelJ can't know the value to give to your constructor's parameters.

So that's actually the normal behavior, even if it's giving some compilation errors at the generation.