public String __invoke_user_code__(
      final com.mia.formation.mvc.View current,
      final com.mia.openapi.gen.Context context,
      final com.mia.openapi.gen.GenerationServicesManager manager) {

    java.lang.StringBuffer _template_buffer = new java.lang.StringBuffer();
    _template_buffer.append("src/com/mia/banque/ui/view/swt/");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append(".java");
    return _template_buffer.toString();
  }
Exemple #2
0
 void open(java.lang.String name) {
   final java.lang.String textString;
   if (name == null || name.length() == 0) {
     return;
   }
   java.io.File file = new java.io.File(name);
   if (!file.exists()) {
     java.lang.String message =
         MessageFormat.format(
             resources.getString("Err_file_no_exist"), new java.lang.String[] {file.getName()});
     displayError(message);
     return;
   }
   try {
     java.io.FileInputStream stream = new java.io.FileInputStream(file.getPath());
     try {
       java.io.Reader in = new java.io.BufferedReader(new java.io.InputStreamReader(stream));
       char[] readBuffer = new char[2048];
       java.lang.StringBuffer buffer = new java.lang.StringBuffer((int) file.length());
       int n;
       while ((n = in.read(readBuffer)) > 0) {
         buffer.append(readBuffer, 0, (-n));
       }
       textString = buffer.toString();
       stream.close();
     } catch (java.io.IOException e) {
       java.lang.String message =
           MessageFormat.format(
               resources.getString("Err_file_io"), new java.lang.String[] {file.getName()});
       displayError(message);
       return;
     }
   } catch (java.io.FileNotFoundException e) {
     java.lang.String message =
         MessageFormat.format(
             resources.getString("Err_not_found"), new java.lang.String[] {file.getName()});
     displayError(message);
     return;
   }
   org.eclipse.swt.widgets.Display display = text.getDisplay();
   display.asyncExec(
       new java.lang.Runnable() {
         public void run() {
           text.setText(textString);
         }
       });
   lineStyler.parseBlockComments(textString);
 }
  public String __invoke_user_code__(
      final com.mia.formation.mvc.Model current,
      final com.mia.openapi.gen.Context context,
      final com.mia.openapi.gen.GenerationServicesManager manager) {

    java.lang.StringBuffer _template_buffer = new java.lang.StringBuffer();
    _template_buffer.append("	/**");
    _template_buffer.append('\n');
    _template_buffer.append("	 * Returns the list of ");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s of this model");
    _template_buffer.append('\n');
    _template_buffer.append("	 * @return {@link List}<{@link I");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("}> - The ");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s");
    _template_buffer.append('\n');
    _template_buffer.append("	 */ ");
    _template_buffer.append('\n');
    _template_buffer.append("	public List<I");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("> get");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s();");
    _template_buffer.append('\n');
    _template_buffer.append("	/**");
    _template_buffer.append('\n');
    _template_buffer.append("	 * Set the list of ");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s of this model");
    _template_buffer.append('\n');
    _template_buffer.append("	 * @param list");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s {@link List}<{@link I");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("}> - The new ");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s");
    _template_buffer.append('\n');
    _template_buffer.append("	 */");
    _template_buffer.append('\n');
    _template_buffer.append("	public void set");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s(List<I");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("> list");
    _template_buffer.append(manager.action(current, "name"));
    _template_buffer.append("s);");
    _template_buffer.append('\n');

    return _template_buffer.toString();
  }