Examples of WGADesignStructureHelper


Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

        }
  }

  @Override
  public void saveChanges() throws IOException {
    WGADesignStructureHelper helper = new WGADesignStructureHelper(_designContainer);
    try {
      helper.makeDesignConfigWriteable();
    } catch (CoreException e) {
      IOException ioe = new IOException("Unable to save design config changes. Configuration is readonly.");
      ioe.setStackTrace(e.getStackTrace());
      throw ioe;
    }
   
    super.saveChanges();
   
    if (_schema != null) {
        OutputStream out = new FileOutputStream(getSchemaDefinitionFile().getLocation().toFile());
        try {
            _schema.write(out);
        } catch (Exception e) {
            IOException ioe = new IOException("Unable to save design config changes.");
              ioe.setStackTrace(e.getStackTrace());
              throw ioe;
        } finally {
            out.close();
        }
    }
   
    try {
      new WGADesignStructureHelper(_designContainer).enforceDesignEncoding();
      _designContainer.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());     
    } catch (CoreException e) {     
    } 
   
    if (_directAccessDefaultChanged) {
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

    return result;
  }
 
  private void refreshSystemFileContainer(int depth) {
    if (_designContainer != null) {
      WGADesignStructureHelper helper = new WGADesignStructureHelper(_designContainer);
      IFolder systemContainer = helper.getFileContainer("system");
      if (systemContainer != null) {
        try {
          systemContainer.refreshLocal(depth, new NullProgressMonitor());
        } catch (CoreException e) {
        }
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

  private WGADesignConfigurationModel _model;

  public TMLFileMetadataModel(IFile tmlFile) {
    _tmlFile = tmlFile;
   
    WGADesignStructureHelper helper = new WGADesignStructureHelper(_tmlFile);
   
    _fileEncoding = helper.determineDesignEncoding();
   
    try {
      _model = helper.createModel();
    } catch (IOException e) {
      Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, "Unable to retrieve designconfigurationmodel for tml resource '" + _tmlFile.getLocation() + "'.", e));
    }
   
    try {
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

          } catch (Exception e) {           
          }
        }
                     
        // 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);
              
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

    if(!project.exists()){
      try {               
        WGADesign design = WGADesignFactory.createDesign(project, _page.getTemplate());
               
        try {
          WGADesignStructureHelper helper = new WGADesignStructureHelper(design.getDesignFolder());
          WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(helper.getSyncInfo()));
          WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(design.getDesignFolder()));
        } catch (Exception e) {       
        }
       
        return true;
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

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

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

                            
                Map<String, IContainer> contentDesign = currentRuntime.getConnectedDesignContainers();               
               
                for(String key : contentDesign.keySet()){
                    IContainer currentDesignFolder = contentDesign.get(key);
                    WGADesignStructureHelper helper = new WGADesignStructureHelper(currentDesignFolder);
                    if(helper.isWGADesignResourceOfCurrentDesign(tmlfile)){
                        return key;
                    }
                }  
                IFolder[] pluginFolders = currentRuntime.getPluginsAsFolder(true);  
                for(IFolder currentFolder : pluginFolders){                 
                    WGADesignStructureHelper helper = new WGADesignStructureHelper(currentFolder);
                    if(helper.isWGADesignResourceOfCurrentDesign(tmlfile)){             
                        WGADesignConfigurationModelWrapper wrapper = new WGADesignConfigurationModelWrapper(helper.getSyncInfo());         
                        return "plugin-"+wrapper.getDesignKey();
                    }
                }  
               
               
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

    int charStart = partition.getOffset();
    int charEnd = charStart + partition.getLength();
   
    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))) {
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

    public void apply(IDocument document) {
      IResource resource = _markerAnnotation.getMarker().getResource();
      if (resource instanceof IFile) {
        IFile referer = (IFile) resource;
        IFolder tmlFolder = new WGADesignStructureHelper(referer).getTmlRoot();
        IFile fileToCreate = tmlFolder.getFile(new Path(_refPath));
        if (!fileToCreate.exists()) {
          try {
            // mkdir
            IContainer parent = fileToCreate.getParent();
View Full Code Here

Examples of de.innovationgate.eclipse.utils.wga.WGADesignStructureHelper

    public void apply(IDocument document) {
      IResource resource = _markerAnnotation.getMarker().getResource();
      if (resource instanceof IFile) {
        IFile referer = (IFile) resource;
        WGADesignStructureHelper helper = new WGADesignStructureHelper(referer);
        IFolder scriptFolder = helper.getScriptsRoot();
        IFile fileToCreate = scriptFolder.getFile(new Path(_refPath));
        if (!fileToCreate.exists()) {
          try {
            // mkdir
            IContainer parent = fileToCreate.getParent();
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.