예제 #1
0
 private java.io.File getCodeFoldingStateFile(String uriString) {
   org.osgi.framework.Bundle bundle =
       org.eclipse.core.runtime.Platform.getBundle(
           edu.ustb.sei.mde.testing.testdefinition.resource.testmodel.ui.TestmodelUIPlugin
               .PLUGIN_ID);
   org.eclipse.core.runtime.IPath path =
       org.eclipse.core.runtime.Platform.getStateLocation(bundle);
   if (path == null) {
     return null;
   }
   path = path.append(makeMD5(uriString) + ".xml");
   return path.toFile();
 }
예제 #2
0
 private File getFileLocation(String dir, String name, boolean local) throws ProcessingException {
   try {
     String path = m_rootPath;
     if (path == null) {
       path = Platform.getStateLocation(getBundle()).toFile().getCanonicalPath();
       if (!path.endsWith("/")) {
         path = path + "/";
       }
       if (local) {
         path = path + "local";
       } else {
         path = path + "remote";
       }
     }
     if (dir != null) {
       dir = dir.replace("\\", "/");
       if (!dir.startsWith("/")) {
         path = path + "/";
       }
       path = path + dir;
     }
     if (!path.endsWith("/")) {
       path = path + "/";
     }
     File file = new File(path);
     if (!file.exists()) {
       file.mkdirs();
     }
     if (name != null) {
       file = new File(path + name);
     }
     return file;
   } catch (IOException e) {
     throw new ProcessingException("io error getting file", e);
   }
 }
예제 #3
0
 /** Returns the path to the file caching the product configuration. */
 IPath getConfigurationCachePath() {
   IPath stateLocation = Platform.getStateLocation(getBundle());
   IPath configFile = stateLocation.append("repositoryConfigurations"); // $NON-NLS-1$
   return configFile;
 }
 public IPath getRepostioryAttributeCachePath2() {
   IPath stateLocation = Platform.getStateLocation(getBundle());
   return stateLocation.append("repositoryClientDataCache.zip"); // $NON-NLS-1$
 }
예제 #5
0
 public IPath getDefaultContextLocation() {
   IPath stateLocation = Platform.getStateLocation(getBundle());
   IPath cacheFile = stateLocation.append("contexts"); // $NON-NLS-1$
   return cacheFile;
 }