Tabnine Logo
CndFileUtils.getCanonicalPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getCanonicalPath
method
in
org.netbeans.modules.cnd.utils.cache.CndFileUtils

Best Java code snippets using org.netbeans.modules.cnd.utils.cache.CndFileUtils.getCanonicalPath (Showing top 4 results out of 315)

origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

private static CharSequence getCanonicalKey(FileObject fileObject, CharSequence fileKey) {
  try {
    CharSequence res = CndFileUtils.getCanonicalPath(fileObject);
    res = FilePathCache.getManager().getString(res);
    if (fileKey.equals(res)) {
      return fileKey;
    }
    return res;
  } catch (IOException e) {
    // skip exception
    return fileKey;
  }
}

origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

void load(Properties properties, FileObject projectDir) {
  try {
    sourceRoots.clear();
    this.sourceProjectName = CharSequences.create(properties.getProperty(PROJECT_TAG + "." + SOURCE_NAME));
    final String destName = properties.getProperty(PROJECT_TAG + "." + DESTINATION_NAME);
    this.destinationProjectName = CharSequences.create(destName == null ?
        CndFileUtils.getCanonicalPath(projectDir) : destName);
    for (String key : properties.stringPropertyNames()) {
      if (key.matches(PROJECT_TAG + "\\d*[.]" + SOURCE_ROOT)) { //NOI18N
        String keyValue = key.substring(0, key.indexOf("." + SOURCE_ROOT)); //NOI18N
        String sourceRoot = properties.getProperty(key);
        String destRoot = properties.getProperty(keyValue + "." + DESTINATION_ROOT);
        addMapping(CharSequences.create(sourceRoot), CharSequences.create(destRoot));
      }
    }
  } catch (IOException ex) {
    //log an ignore
    //Exceptions.printStackTrace(ex);
  }
}

origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

public static String toProperPath(FileObject base, FileObject path, MakeProjectOptions.PathMode pathMode) {
  switch (pathMode) {
    case REL_OR_ABS:
      return CndPathUtilities.toAbsoluteOrRelativePath(base, path);
    case REL:
      return CndPathUtilities.toRelativePath(base, path);
    case ABS:
      try {
        return CndFileUtils.getCanonicalPath(path);
      } catch (IOException e) {
        e.printStackTrace(System.err);
        return path.getPath();
      }
    default:
      throw new IllegalStateException("Unexpected path mode: " + pathMode); //NOI18N
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

private void addFileItemBasedPath(NativeFileItem nativeFileItem) {
  FileObject fo = nativeFileItem.getFileObject();
  FileObject parent = fo.getParent();
  String path = CndFileUtils.normalizePath(parent);
  addPath(path);
  String canonicalPath;
  try {
    canonicalPath = CndFileUtils.getCanonicalPath(parent);
    if (!path.equals(canonicalPath)) {
      addPath(canonicalPath);
    }
  } catch (IOException ex) {
    DiagnosticExceptoins.register(ex);
  }
}

org.netbeans.modules.cnd.utils.cacheCndFileUtilsgetCanonicalPath

Popular methods of CndFileUtils

  • isLocalFileSystem
  • normalizeAbsolutePath
  • toFileObject
  • getLocalFileSystem
  • createLocalFile
  • normalizeFile
    normalize file
  • fileObjectToUrl
  • getFileSeparatorChar
  • isExistingFile
    Tests whether the file exists and not directory. One of file or filePath must be not null
  • normalizePath
  • urlToFileObject
  • areFilenamesEqual
  • urlToFileObject,
  • areFilenamesEqual,
  • getCanonicalFileObject,
  • isExistingDirectory,
  • isSystemCaseSensitive,
  • toFSPathList,
  • toFile,
  • changeStringCaseIfNeeded,
  • clearFileExistenceCache

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now