Пример #1
0
 public static String getNpmPath() {
   String nodePath =
       Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.NODE_PATH);
   String npmPath = nodePath.substring(0, nodePath.lastIndexOf(File.separator) + 1);
   if (OSUtils.isWindows()) {
     return npmPath + Constants.NPM_CMD;
   } else {
     return npmPath + Constants.NPM;
   }
 }
Пример #2
0
  public static String getBundledPath(String path) {
    Bundle bundle = Activator.getDefault().getBundle();
    if (bundle == null) {
      LogUtil.info("getBundlePath(" + path + " bundle is null");
      return "";
    }
    try {
      URL location = FileLocator.toFileURL(bundle.getEntry("/"));
      File file = new File(location.getPath(), path);
      LogUtil.info("BundledPath: " + file.getAbsolutePath());

      return file.getAbsolutePath();
    } catch (Exception ex) {
      LogUtil.error(ex);
      return "";
    }
  }
Пример #3
0
 public static String getCompletionsJsonPath() {
   return Activator.getDefault()
       .getPreferenceStore()
       .getString(PreferenceConstants.COMPLETIONS_JSON_PATH);
 }
Пример #4
0
 public static String getExpressVersion() {
   return Activator.getDefault()
       .getPreferenceStore()
       .getString(PreferenceConstants.EXPRESS_VERSION);
 }
Пример #5
0
 public static String getExpressPath() {
   return Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.EXPRESS_PATH);
 }
Пример #6
0
 public static String getNodePath() {
   return Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.NODE_PATH);
 }