Examples of WGADesignConfigurationModel


Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

          }
        }
                     
        // modify plugin config and open plugin design editor
        IFile syncInfo = new WGADesignStructureHelper(designProject.getDesignFolder()).getSyncInfo();
        WGADesignConfigurationModel model = new WGADesignConfigurationModelWrapper(syncInfo);
       

                model.setVersionCompliance(Activator.DEFAULT_VERSION_COMPLIANCE);
              
        model.createPluginConfig();
        model.setPluginUniqueName(_page.getPluginUniqueName());
        model.saveChanges();
       
        try {
          // select syncinfo in navigation views
          WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(syncInfo));
        } catch (Exception e) {         
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

          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){
                                configModel.setVersionCompliance(vc);
                                configModel.saveChanges();
                            }
             }
             
             
            WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(helper.getSyncInfo()));
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

   
    String designDBValue = tmlInfo.getAttributeValue("designdb");
    if (tmlInfo.hasAttribute("designdb") && !tmlInfo.isDynamicAttributeValue("designdb") && designDBValue != null && designDBValue.startsWith("@")) {           
      WGADesignStructureHelper helper = new WGADesignStructureHelper(file);   
      try {
        WGADesignConfigurationModel model  = helper.createModel();
        boolean designDBReferenceFound = false;
        if (model.isFeatureSupported(WGADesignConfigurationModel.FEATURE_SHORTCUTS)) {
          for (Shortcut shortCut : model.getShortcuts()) {
            if (shortCut.getType() == Shortcut.TYPE_PLUGIN) {
              if (shortCut.getShortcut().equals(designDBValue.substring(1))) {
                designDBReferenceFound = true;
                break;
              }
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

  private String determineDesignEncoding(String fallBackEncoding) {
    IFile syncInfo = _syncInfo;
    if (syncInfo != null) {
      try {
        WGADesignConfigurationModel model = new WGADesignConfigurationModel(syncInfo.getLocation().toFile());
        Encoding encoding = model.getDesignEncoding();
        if (encoding != null && !encoding.getKey().equals(WGADesignConfigurationModel.STRING_NOT_SET)) {
          return encoding.getKey();
        } else {
          Activator.getDefault().getLog().log(
              new Status(Status.WARNING, Activator.PLUGIN_ID, "Design encoding not set for design '" + syncInfo.getParent().getLocation().toString() + "'. Using platform encoding '"
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

  private static VersionCompliance getWGAVersionCompliance(IResource resource, boolean fallbackToDefault) { 
    IFile wgaConfFile = WGADesignStructureHelper.determineSyncInfo(resource);   
    VersionCompliance wgaVersionCompliance = null;
    if (wgaConfFile != null) {
      WGADesignConfigurationModel currentWGAConf;
      try {
        currentWGAConf = new WGADesignConfigurationModelWrapper(wgaConfFile);
        wgaVersionCompliance = currentWGAConf.getVersionCompliance();
      } catch (IOException e) {
      }
    }
    if (wgaVersionCompliance == null && fallbackToDefault) {
        Activator.getDefault().logWarning("Unable to determine version compliance for '" + resource.getLocation() + "'. Using default version compliance '" + Activator.DEFAULT_VERSION_COMPLIANCE.getValue() + "'.");
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

  public static TMLMetadataInfo getMetaDataInfo(IFile tmlFile) {
    WGADesignStructureHelper helper = new WGADesignStructureHelper(tmlFile);
    TMLMetadataInfo metaData = new TMLMetadataInfo();

    try {
      WGADesignConfigurationModel wgaDesignConfig = helper.createModel();
      metaData.setDirectAccess(wgaDesignConfig.isDirectAccessDefault());
    } catch (IOException e) {
      Activator.getDefault().logError("Cannot load WGADesignConfig", e);
    }

    if (getMetadataFile(tmlFile).exists()) {
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

  public Set<String> lookupValues(TMLRegion region, IDocument document, ITextViewer viewer, IFile activeFile) {
    Set<String> values = new HashSet<String>();
   
    WGADesignStructureHelper helper = new WGADesignStructureHelper(activeFile);   
    try {
      WGADesignConfigurationModel model  = helper.createModel();
      if (model.isFeatureSupported(WGADesignConfigurationModel.FEATURE_SHORTCUTS)) {
        for (Shortcut shortCut : model.getShortcuts()) {
          if (shortCut.getType() == Shortcut.TYPE_PLUGIN) {
            values.add("@" + shortCut.getShortcut());
          }
        }
      }
View Full Code Here

Examples of de.innovationgate.wga.model.WGADesignConfigurationModel

              } else {
                  IFolder[] pluginFolders = runtime.getPluginsAsFolder(true);
                        for (IFolder pluginFolder : pluginFolders) {
                            if (WGADesignStructureHelper.isDesignFolder(pluginFolder)) {
                                WGADesignStructureHelper helper = new WGADesignStructureHelper(pluginFolder);
                                WGADesignConfigurationModel model = helper.createModel();
                                if (model != null && model.hasPluginConfig()) {
                                    String pluginUName = model.getPluginUniqueName();
                                    if (pluginUName != null) {
                                        String pluginDBKey = null;                                   
                                        if (pluginUName.contains(".")) {
                                            pluginDBKey = "plugin-" + pluginUName.substring(pluginUName.lastIndexOf("."));   
                                        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.