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

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

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

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

@Override
public FileSystem getFileSystem() {
  return CndFileUtils.getLocalFileSystem();
}

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

public static boolean isLocalFileSystem(FileSystem fs) {
  return fs == getLocalFileSystem();
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

private String preparePath(String path) {
  String absPath = changeStringCaseIfNeeded(getLocalFileSystem(), path);
  if (isWindows) {
    absPath = absPath.replace('/', '\\');
  }
  return absPath;
}

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

public static boolean isLocalFileSystem(FileObject fo) {
  try {
    return fo.getFileSystem() == getLocalFileSystem();
  } catch (FileStateInvalidException ex) {
    return false;
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

@Override
public FileSystem getFileSystem() {
  try {
    return projectRoot.getFileSystem();
  } catch (FileStateInvalidException ex) {
    Exceptions.printStackTrace(ex);
    return CndFileUtils.getLocalFileSystem();
  }
}        
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

private static FileSystem getFileSystem(FileObject fo) {
  try {
    return fo.getFileSystem();
  } catch (FileStateInvalidException ex) {
    Exceptions.printStackTrace(ex);
    return CndFileUtils.getLocalFileSystem();
  }
}
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

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

public static boolean exists(File file) {
  return getFlags(getLocalFileSystem(), file.getAbsolutePath(), true).exist;
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

public ProjectParameters(String projectName, File projectFolder) {
  this(projectName, new FSPath(CndFileUtils.getLocalFileSystem(), projectFolder.getAbsolutePath()));
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

public static boolean isExistingFile(String filePath) {
  return isExistingFile(getLocalFileSystem(), filePath);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  private void cleanCachesImpl(String file) {
    String absPath = preparePath(file);
    Flags removed = getFilesMap(getLocalFileSystem()).remove(absPath);
    if (TRACE_EXTERNAL_CHANGES) {
      System.err.printf("clean cache for %s->%s\n", absPath, removed);
    }
    invalidateFile(file, absPath);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

@Override
public java.awt.Component getCustomEditor() {
  FileSystem fs = (makeConfiguration == null) ? CndFileUtils.getLocalFileSystem() : makeConfiguration.getSourceFileSystem();
  return new DirectoryChooserPanel(seed, this, propenv, fs);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

  public ReferencesIndexKey() {
    super(KeyUtilities.getUnitId(new UnitDescriptor(UNIT_NAME, CndFileUtils.getLocalFileSystem())));
    // TODO: ???
//        KeyUtilities.getFileIdByName(getUnitId(), "ReferencesIndexKey$$"); // NOI18N
  }

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

@Override
public void fileFolderCreated(FileEvent fe) {
  File file = CndFileUtils.toFile(fe.getFile());
  String path = file.getAbsolutePath();
  String absPath = preparePath(path);
  if (getFilesMap(getLocalFileSystem()).put(absPath, Flags.DIRECTORY) != null) {
    // If there was something in the map already - invalidate it
    invalidateFile(path, absPath);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@Override
public void fileDataCreated(FileEvent fe) {
  File file = CndFileUtils.toFile(fe.getFile());
  String path = file.getAbsolutePath();
  String absPath = preparePath(path);
  if (getFilesMap(getLocalFileSystem()).put(absPath, Flags.FILE) != null) {
    // If there was something in the map already - invalidate it
    invalidateFile(path, absPath);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

public static FileSystem getSourceFileSystem(NativeDebugger debugger) {
  if (debugger != null) {
    NativeDebuggerInfo ndi = debugger.getNDI();
    if (ndi != null) {
      Configuration conf = ndi.getConfiguration();
      if (conf instanceof MakeConfiguration) {
        return ((MakeConfiguration)conf).getSourceFileSystem();
      }
    }
  }
  return CndFileUtils.getLocalFileSystem();
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

/**
 * Will create the configuration of type MakeConfiguration.TYPE_MAKEFILE, the configuration will be saved on the local machine
 * and will be created for default Build Host, which is returned by {@link #org.netbeans.modules.cnd.makeproject.configurations.CppUtils.getDefaultDevelopmentHost()} method
 * For full remote project should use {@link #createMakefileConfiguration(FSPath, String, String)}
 * @param baseDir path to the folder the configuration will be saved in
 * @param name the name of the configuration
 * @return the MakeConfiguration
 */
public static MakeConfiguration createDefaultHostMakefileConfiguration(String baseDir, String name) {
  return new MakeConfiguration(new FSPath(CndFileUtils.getLocalFileSystem(), baseDir), name, MakeConfiguration.TYPE_MAKEFILE, null, null);
}

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

@Override
public FileObject getFileObject() {
  ProjectBase csmProject = _getProject();
  FileSystem fs = (csmProject == null) ? CndFileUtils.getLocalFileSystem() : csmProject.getFileSystem();
  return InvalidFileObjectSupport.getInvalidFileObject(fs, getAbsolutePath());
}

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

private void testLibProject() {
  LibProjectImpl libProject = LibProjectImpl.createInstance(getModel(), CndFileUtils.getLocalFileSystem(), "/usr/include", -1); // NOI18N
  getModel().testAddProject(libProject);
  CsmCacheManager.enter();
  try {
    tracer.dumpModel(libProject);
  } finally {
    CsmCacheManager.leave();
  }
}
org.netbeans.modules.cnd.utils.cacheCndFileUtilsgetLocalFileSystem

Popular methods of CndFileUtils

  • isLocalFileSystem
  • normalizeAbsolutePath
  • toFileObject
  • 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
  • getCanonicalFileObject
  • areFilenamesEqual,
  • getCanonicalFileObject,
  • getCanonicalPath,
  • isExistingDirectory,
  • isSystemCaseSensitive,
  • toFSPathList,
  • toFile,
  • changeStringCaseIfNeeded,
  • clearFileExistenceCache

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • CodeWhisperer alternatives
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