Package boco.ejb3PlugIn.gui

Examples of boco.ejb3PlugIn.gui.LocalSearchOnAttributeDialog


      return;
    }

    ICompilationUnit compilationUnit = field.getCompilationUnit();

    LocalSearchOnAttributeDialog localSearchOnAttributeDialog = new LocalSearchOnAttributeDialog(null);
    localSearchOnAttributeDialog.pack();
    localSearchOnAttributeDialog.setLocationRelativeTo(null);
    localSearchOnAttributeDialog.setVisible(true);
    String order = localSearchOnAttributeDialog.getOrder();
    String implementationType = localSearchOnAttributeDialog.getType();

    if (order == null)
      return;

    try
    {
      String newFieldSourceCode = "";
      String oldFieldSourceCode = "";

      // Dal codice esistente rimuove l'annotazione se presente
      StringTokenizer st = new StringTokenizer(field.getSource(),"\t\n\r\f");
      while (st.hasMoreTokens())
      {
        String token = st.nextToken();
        // System.out.println(".."+token);
       
        if(!token.contains("@LocalSearchOnAttribute"))
        {
          oldFieldSourceCode += token+"\r\n";;
        }
      }     
     
      IType type = compilationUnit.getTypes()[0];

      //Rimuove il campo esistente
      type.getField(field.getElementName()).delete(true, null);

      newFieldSourceCode += "\r\n\r\n@LocalSearchOnAttribute(order=" + order;
     
      if((localSearchOnAttributeDialog.getEvent()!=null) && (!localSearchOnAttributeDialog.getEvent().equals(""))  )
      {
        newFieldSourceCode += ", events={\""+localSearchOnAttributeDialog.getEvent()+"\"}, eventFunctions={\""+localSearchOnAttributeDialog.getFunction()+"\"}";
      }
     
      newFieldSourceCode += ")\r\n";
     
      newFieldSourceCode += oldFieldSourceCode + "\r\n";
View Full Code Here

TOP

Related Classes of boco.ejb3PlugIn.gui.LocalSearchOnAttributeDialog

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.