Package de.innovationgate.eclipse.wgadesigner.models

Examples of de.innovationgate.eclipse.wgadesigner.models.DesignTemplate


    }
   
    BeanListPreferencesStore<DesignTemplate> templateStore = WGADesignerPlugin.getDefault().getDesginTemplateStore();
    templateStore.load();
    Iterator<DesignTemplate> DesignTemplateIterator = templateStore.getBeans().iterator();
    DesignTemplate desginTemplate;

    while (DesignTemplateIterator.hasNext()) {
      desginTemplate = DesignTemplateIterator.next();
      _designTemplates.put(desginTemplate.getName(), desginTemplate);
    }
  }
View Full Code Here


 
  private DesignTemplate getPluginTemplate() {
    // init design with "empty" template
    BeanListPreferencesStore<DesignTemplate> templateStore = WGADesignerPlugin.getDefault().getDesginTemplateStore();
    templateStore.load();
    DesignTemplate template = null;
    Iterator<DesignTemplate> templates = templateStore.getBeans().iterator();
    while (templates.hasNext()) {
      DesignTemplate temp = templates.next();
      if (temp.getName().equals("empty")) {
        return temp;
      }
    }
    return null;
  }
View Full Code Here

    if(runtime != null){
      try {
        IFolder folder = runtime.getDesignRoot().getFolder(new Path(_page.getDesignName()));
        if (!folder.exists()) {
          folder.create(false, true, new NullProgressMonitor());
          DesignTemplate template = _page.getTemplate();
          WGADesignFactory.createDesign(folder, folder.getName(), template);
         
          if (!_page.isCreateContentStore()) {
            _page.getRuntime().register(folder, false, null, null, null, template.getProperties());
          } else {
            _page.getRuntime().register(folder, true, _page.getDatabaseKey(), _page.getDatabaseTitle(), _page.getDomain(), template.getProperties());
          }
         
          WGADesignStructureHelper helper = new WGADesignStructureHelper(folder);
            
          try {
            // select new created design in packages explorer, resource navigator & project explorer 
              if(template.getName().equals("empty")){
                  String wgaDistributionName = runtime.getConfiguration().getWgaDistribution();             
                            WGADeployment wgaDeployment = WGADesignerPlugin.getDefault().getWGADeploymentManager().getDeployment(wgaDistributionName);
                            WGADesignConfigurationModel configModel = helper.createModel();   
                            VersionCompliance vc = WGADesignStructureHelper.wgaVersionToVersionCompliance(wgaDeployment.getWGAVersion());
                            if(vc!=null){
View Full Code Here

    BeanListPreferencesStore<DesignTemplate> templateStore = WGADesignerPlugin.getDefault().getDesginTemplateStore();

    templateStore.load();

    Iterator<DesignTemplate> DesignTemplateIterator = templateStore.getBeans().iterator();
    DesignTemplate desginTemplate;

    while (DesignTemplateIterator.hasNext()) {
      desginTemplate = DesignTemplateIterator.next();
      _designTemplates.put(desginTemplate.getName(), desginTemplate);
    }
  }
View Full Code Here

      File template = new File(_tmplFile.getText());
      if (!template.exists()) {
        messages.add(template.getAbsolutePath() + " not found");
      }
     
      _design = new DesignTemplate(_tmplName.getText(), template.getAbsolutePath());   
     
    }
   
    // validate location
    String currentLocation = _tmplFile.getText();
View Full Code Here

   
  }
 
  public static List<DesignTemplate> getDefaultTemplates(){
    List<DesignTemplate> templates = new ArrayList<DesignTemplate>();
    templates.add(new DesignTemplate("empty", "resources/templates/empty.zip"));
    templates.add(new DesignTemplate("website-sample""resources/templates/cms-sample.zip"));
    templates.add(new DesignTemplate("application-sample", "resources/templates/app-sample.zip"));
    return templates;
  }
View Full Code Here

    _tableControl.getTable().addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
       
       
        if (_tableControl.getTable().getSelectionCount() > 0) {
          DesignTemplate design = (DesignTemplate) _tableControl.getTable().getSelection()[0].getData();         
         
          if (PreferenceInitializer.getDefaultTemplates().contains(design)) {
            _tableControl.getButton(EditableTableControl.BUTTON_REMOVE).setEnabled(false);
          } else {
            _tableControl.getButton(EditableTableControl.BUTTON_REMOVE).setEnabled(true);
View Full Code Here

  }

  private void handleRemove() {

    if (_tableControl.getTable().getSelectionCount() > 0) {
      DesignTemplate design = (DesignTemplate) _tableControl.getTable().getSelection()[0].getData();
      _model.remove(design);
    }
  }
View Full Code Here

TOP

Related Classes of de.innovationgate.eclipse.wgadesigner.models.DesignTemplate

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.