Package org.sylfra.idea.plugins.xstructure

Examples of org.sylfra.idea.plugins.xstructure.XSException


    boolean freshInstall = (!configDir.exists());
    if (freshInstall)
    {
      if (!configDir.mkdir())
      {
        throw new XSException("Can't create directory to store mapping files : "
          + configDir.getAbsolutePath());
      }
    }

    if ((freshInstall) || (settings.isSyncMappingsAtStartup()))
    {
      File destDir = new File(settings.getMappingsStorageDir(), "default");
      if ((!destDir.isDirectory()) && (!destDir.mkdir()))
      {
        throw new XSException("Can't create directory to store DEFAULT mapping files : "
          + configDir.getAbsolutePath());
      }

      for (File file : DefaultMappingsRegistry.getDefaultMappings())
      {
        File destFile = new File(destDir, file.getName());
        if ((!destFile.exists()) || (settings.isOverwriteWhenSyncMappings()))
        {
          try
          {
            FileUtil.copy(file, destFile);
          }
          catch (IOException e)
          {
            throw new XSException("Can't copy configuration file to "
              + destFile.getAbsolutePath(), e);
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.sylfra.idea.plugins.xstructure.XSException

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.