Package org.sintef.umt.propertyeditor

Examples of org.sintef.umt.propertyeditor.PropertyGroup


      output.addLine("Transformation in progress (" + new Date().toString() + ")");
      pimviewer.setTransforming(true);
      try{
        fileviewer.clear ();
        setLastTransformation (action);
        PropertyGroup group = transformationeditor.getPropertyManager().getPropertyGroupForItem(action);
        String type = group.getProperty("Type");
        String outputtype = group.getProperty("Outputtype");
        String implementation = FileUtils.replaceSeparator(group.getProperty("Implementation"));
        String direction = group.getProperty("Direction");             
        String gendir = "src";
               
        if (current_store_dir != null && !(current_store_dir.equals(""))){
          gendir = current_store_dir + System.getProperty("file.separator") + gendir;
        }
        ProjectEditor current = null;
        try {
          current = projectmanager.getCurrentProject();
        if (current != null) {
          gendir = current.getGenDir ();
          gendir = current.getLocation() + System.getProperty("file.separator") + gendir;
          String userfile = current.getUserPropertiesFile();
          PropertyGroup userprops = current.getUserProperties();
         
          if (userfile != null && !userfile.equals("")) {
            // Create the user parameters and store them to the file
           
            // get directory from the location of the 'implementation'
           
            File implfile = new File (implementation);
            String dir = implfile.getParent();
           
            if(dir != null) {
              PrintWriter pf = null;
              try {
                File file = new File (dir + System.getProperty("file.separator") + userfile);
                pf = new PrintWriter( new FileWriter (file));
               
                pf.println("<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:// www.w3.org/1999/XSL/Transform\">");
                pf.println("\n\n<!-- Generated file for user properties.-->\n\n");
                Map userproperties = userprops.getProperties();
                Iterator names = userproperties.keySet().iterator();
                               
                while (names.hasNext()) {
                  String name = (String)names.next();
                  String[] value = (String[])userproperties.get(name);
View Full Code Here


      else if (val[0].equalsIgnoreCase("dependency"))
        theSchema.addValidStereotypeForItem("enumAssociationStereoTypeType",key);
    }
   
    // Then to do basic type set.  This is stored in the <PropertyGroup item="types" name="types" stereotype="" type="types">
    PropertyGroup profile = pm.getPropertyGroupForItem (profileName);
    Map types = profile.getAllPropertiesForItem("types");
   

     
    // For the time being, the types are stored in the types variable
    // The extxmi.xsd schema needs to be changed so there is a smart place to add these types
View Full Code Here

  public PropertyGroup loadProfile(String profileName, String profileFile){
    PropertyManager pm = new PropertyManager(profileFile);
   
    pm.loadProperties();
   
    PropertyGroup pg = pm.getPropertyGroupForItem(profileName);
   
    return pg;
  }
View Full Code Here

  /**
   *
   * @return user variable properties
   */
  public PropertyGroup getUserProperties () {
    PropertyGroup pg = _propertymanager.getPropertyGroupForItem("User Variables");
    return pg;
  }
View Full Code Here

    _propertymanager.setProperty(group, "", property);
    _propertymanager.storeProperties();       
  }
 
  private String getPropertyForGroupItem (String group, String property_name) {
    PropertyGroup pg = _propertymanager.getPropertyGroupForItem(group);
    String property_value = pg.getProperty(property_name);
    return property_value;   
  }
View Full Code Here

   * Returns all properties for a specific group
   * @param group
   * @return
   */
  private Collection getPropertiesForGroupItem (String group) {
    PropertyGroup pg = _propertymanager.getPropertyGroupForItem(group);
    return pg.getProperties().values();
  }
View Full Code Here

  private void initProjectList () {
    try {
      Vector newdata = new Vector ();
      _project_ids.clear();
      for (Iterator projects = _propertymanager.getPropertyGroups();projects.hasNext();) {
        PropertyGroup pg = (PropertyGroup)projects.next();
        newdata.add(pg.getItem());
        _project_ids.add(pg.getId());
      }
      _projectlist.setListData(newdata);
      _projectlist.revalidate();
      _projectlist.setSelectedIndex(_projectlist.getModel().getSize() - 1);
      int index = _projectlist.getSelectedIndex();
View Full Code Here

   */
 
  public void deleteProjectByName (String project, String location) {
    Iterator it = _propertymanager.getPropertyGroups();
    for (;it.hasNext();){
      PropertyGroup projectgroup = (PropertyGroup)it.next();
      String current_location = projectgroup.getProperty("location");     
      if (projectgroup.getName().equals(project) && current_location.equalsIgnoreCase(location)) {
        // this project matches....
        // _propertymanager.removePropertyGroup(project, project, "");
        _propertymanager.removePropertyGroup(projectgroup);
        initProjectList ()
        _propertymanager.storeProperties();
View Full Code Here

*/
 
  public void deleteProjectByLocation (String location) {
    Iterator it = _propertymanager.getPropertyGroups();
    for (;it.hasNext();){
      PropertyGroup projectgroup = (PropertyGroup)it.next();
      String current_location = projectgroup.getProperty("location");     
      if (current_location.equalsIgnoreCase(location)) {
        _propertymanager.removePropertyGroup(projectgroup);
        initProjectList ()
        _propertymanager.storeProperties();
        break;       
View Full Code Here

    }else
        return null
  }
 
  public void doOpenProject (String project_id) {
    PropertyGroup project = _propertymanager.getPropertyGroup(project_id);
    if (project != null) {
      Map props = project.getProperties();     
      String location = ((String[]) props.get("location"))[0];     
      _current_project = new ProjectEditor (project.getName(), location, _dialog_owner, this, false);
//      _current_project.setVisible(true);
      notifyListeners ("open");
    }               
  }
View Full Code Here

TOP

Related Classes of org.sintef.umt.propertyeditor.PropertyGroup

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.