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

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

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

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

@Override
public List<FSPath> getUserIncludePaths() {
  return CndFileUtils.toFSPathList(CndFileUtils.getLocalFileSystem(), this.usrIncludes);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

@Override
public List<FSPath> getSystemIncludePaths() {
  return CndFileUtils.toFSPathList(CndFileUtils.getLocalFileSystem(), this.sysIncludes);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

private APTIncludeHandler getIncludeHandler(FileObject fo) {
  FileSystem localFS = CndFileUtils.getLocalFileSystem();
  List<FSPath> systemIncludes = CndFileUtils.toFSPathList(localFS, getSystemIncludes());
  List<IncludeDirEntry> sysIncludes = sysAPTData.getIncludes(systemIncludes.toString(), systemIncludes); // NOI18N
  List<String> qInc = getQuoteIncludePaths();
  if (isPathsRelCurFile()) {
    qInc = new ArrayList<>(getQuoteIncludePaths().size());
    for (Iterator<String> it = getQuoteIncludePaths().iterator(); it.hasNext();) {
      String path = it.next();
      if (CndPathUtilities.isPathAbsolute(path)) {
        qInc.add(path);
      } else {
        FileObject dirFO = fo.getParent();
        FileObject pathFile = dirFO.getFileObject(path);
        if (pathFile != null && pathFile.isValid()) {
          path = pathFile.getPath();
          qInc.add(path);
        }
      }                
    }
  }
  StartEntry startEntry = new StartEntry(localFS, fo.getPath(), getProject().getUIDKey());
  List<IncludeDirEntry> userIncludes = userPathStorage.get(qInc.toString(), CndFileUtils.toFSPathList(localFS, qInc));
  return APTHandlersSupport.createIncludeHandler(startEntry, sysIncludes, userIncludes, Collections.<String>emptyList(), null);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

/**
 * Returns a list <String> of compiler defined include paths used when parsing 'orpan' source files.
 * @return a list <String> of compiler defined include paths.
 * A path is always an absolute path.
 * Include paths are not prefixed with the compiler include path option (usually -I).
 */
/*
 * Return C++ settings
 **/
@Override
public List<FSPath> getSystemIncludePaths() {
  ArrayList<FSPath> vec = new ArrayList<>();
  MakeConfiguration makeConfiguration = getMakeConfiguration();
  if (makeConfiguration != null) {
    CompilerSet compilerSet = makeConfiguration.getCompilerSet().getCompilerSet();
    if (compilerSet == null) {
      return vec;
    }
    AbstractCompiler compiler = (AbstractCompiler) compilerSet.getTool(PredefinedToolKind.CCCompiler);
    if (compiler != null) {
      FileSystem compilerFS = FileSystemProvider.getFileSystem(compiler.getExecutionEnvironment());
      vec.addAll(CndFileUtils.toFSPathList(compilerFS, compiler.getSystemIncludeDirectories()));
    }
  }
  return vec;
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

@Override
public List<FSPath> getSystemIncludePaths() {
  List<FSPath> vec = new ArrayList<>();
  MakeConfiguration makeConfiguration = getMakeConfiguration();
  ItemConfiguration itemConfiguration = getItemConfiguration(makeConfiguration);//ItemConfiguration)makeConfiguration.getAuxObject(ItemConfiguration.getId(getPath()));
  if (itemConfiguration == null || !itemConfiguration.isCompilerToolConfiguration()) { // FIXUP: sometimes itemConfiguration is null (should not happen)
    return vec;
  }
  CompilerSet compilerSet = makeConfiguration.getCompilerSet().getCompilerSet();
  if (compilerSet == null) {
    return vec;
  }
  AbstractCompiler compiler = (AbstractCompiler) compilerSet.getTool(itemConfiguration.getTool());
  BasicCompilerConfiguration compilerConfiguration = itemConfiguration.getCompilerConfiguration();
  if (compilerConfiguration instanceof CCCCompilerConfiguration) {
    // Get include paths from compiler
    if (compiler != null && compiler.getPath() != null && compiler.getPath().length() > 0) {
      FileSystem fs = FileSystemProvider.getFileSystem(compiler.getExecutionEnvironment());
      if (makeConfiguration.isMakefileConfiguration()) {
        vec.addAll(CndFileUtils.toFSPathList(fs, compiler.getSystemIncludeDirectories(getImportantFlags())));
      } else {
        String importantFlags = SPI_ACCESSOR.getImportantFlags(compilerConfiguration, compiler, makeConfiguration);
        vec.addAll(CndFileUtils.toFSPathList(fs, compiler.getSystemIncludeDirectories(importantFlags)));
      }
    }
  }
  return SPI_ACCESSOR.expandIncludePaths(vec, compilerConfiguration, compiler, makeConfiguration);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

  usrMacros.addAll(prototype.getUserMacroDefinitions());
} else  {
  sysIncludes.addAll(CndFileUtils.toFSPathList(fs, DefaultSystemSettings.getDefault().getSystemIncludes(lang, impl)));
  sysMacros.addAll(DefaultSystemSettings.getDefault().getSystemMacros(lang, impl));
org.netbeans.modules.cnd.utils.cacheCndFileUtilstoFSPathList

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,
  • getCanonicalPath,
  • isExistingDirectory,
  • isSystemCaseSensitive,
  • toFile,
  • changeStringCaseIfNeeded,
  • clearFileExistenceCache

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • String (java.lang)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top Sublime Text 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