Package boco.ejb3PlugIn.gui

Examples of boco.ejb3PlugIn.gui.AttributesSelectionDialog


      String oldMethodAnnotations = "";
      String oldMethodSourceCode = "";
     
      String targetBean = Utils.getTargetBean(compilationUnit,method.getElementName());
           
      AttributesSelectionDialog attributesSelectionDialog = new AttributesSelectionDialog(Utils.getCompilationUnit(compilationUnit,targetBean),true,false);
      attributesSelectionDialog.pack();
      attributesSelectionDialog.setLocationRelativeTo(null);
      attributesSelectionDialog.setVisible(true);     
     
      if(!attributesSelectionDialog.selectedAttributes())
        return;
     
     
      // Dal codice esistente rimuove l'annotazione se presente
      StringTokenizer st = new StringTokenizer(method.getSource(),"\t\n\r\f");
      while (st.hasMoreTokens())
      {
        String token = st.nextToken();
       
        if(!token.contains("@ShowRelationshipAttributesInForm"))
        {
          if (token.startsWith("@"))
            oldMethodAnnotations += token + "\r\n";
          else
            oldMethodSourceCode += token + "\r\n";
        }
      }     
     
      IType type = compilationUnit.getTypes()[0];

      //Rimuove il metodo esistente
      type.getMethod(method.getElementName(),null).delete(true, null);
           
      newMethodSourceCode += "\r\n@ShowRelationshipAttributesInForm(names="+attributesSelectionDialog.getSelectedAttributes()+", orders="+attributesSelectionDialog.getSelectedAttributesOrders()+")\r\n";
           
      newMethodSourceCode = oldMethodAnnotations + newMethodSourceCode + oldMethodSourceCode + "\r\n";
     
      type.createMethod(newMethodSourceCode, null, true, null);
     
View Full Code Here


      String oldMethodAnnotations = "";
      String oldMethodSourceCode = "";

      String targetBean = Utils.getTargetBean(compilationUnit, method.getElementName());

      AttributesSelectionDialog attributesSelectionDialog = new AttributesSelectionDialog(Utils.getCompilationUnit(compilationUnit, targetBean), true, false);
      attributesSelectionDialog.pack();
      attributesSelectionDialog.setLocationRelativeTo(null);
      attributesSelectionDialog.setVisible(true);

      String selectedAttributes = attributesSelectionDialog.getSelectedAttributes();
      String selectedAttributesOrders = attributesSelectionDialog.getSelectedAttributesOrders();

      // Dal codice esistente rimuove l'annotazione se presente
      StringTokenizer st = new StringTokenizer(method.getSource(), "\t\n\r\f");
      while (st.hasMoreTokens())
      {
View Full Code Here

      String newMethodSourceCode = "";
      String oldMethodSourceCode = "";

      String targetBean = Utils.getTargetBean(compilationUnit, method.getElementName());
     
      AttributesSelectionDialog attributesSelectionDialog = new AttributesSelectionDialog(Utils.getCompilationUnit(compilationUnit, targetBean), true, false);
     
      attributesSelectionDialog.setSingleRelationship(true);
     
      attributesSelectionDialog.pack();
      attributesSelectionDialog.setLocationRelativeTo(null);
      attributesSelectionDialog.setVisible(true);
     
      String selectedAttributes = attributesSelectionDialog.getSelectedAttributes();
      String order              = attributesSelectionDialog.getSelectedAttributesFirstOrder();
     
     
      // Dal codice esistente rimuove l'annotazione se presente
      StringTokenizer st = new StringTokenizer(method.getSource(),"\t\n\r\f");
      while (st.hasMoreTokens())
View Full Code Here

      String oldMethodSourceCode = "";

     
      String targetBean = Utils.getTargetBean(compilationUnit, method.getElementName());
     
      AttributesSelectionDialog attributesSelectionDialog = new AttributesSelectionDialog(Utils.getCompilationUnit(compilationUnit, targetBean), false, false);
     
      attributesSelectionDialog.setSingleRelationship(true);
     
      attributesSelectionDialog.pack();
      attributesSelectionDialog.setLocationRelativeTo(null);
      attributesSelectionDialog.setVisible(true);
     
      String selectedAttributes = attributesSelectionDialog.getSelectedAttributes();
       
      // Dal codice esistente rimuove l'annotazione se presente
      StringTokenizer st = new StringTokenizer(method.getSource(),"\t\n\r\f");
      while (st.hasMoreTokens())
      {
View Full Code Here

TOP

Related Classes of boco.ejb3PlugIn.gui.AttributesSelectionDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.