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

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

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

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

public static char getFileSeparatorChar(FileSystem fs) {
  if (isLocalFileSystem(fs)) {
    return File.separatorChar;
  } else {
    return '/'; //NOI18N
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

  @Override
  public String toString(){
    return "ResPath{" + path + " in " + folder + (CndFileUtils.isLocalFileSystem(fileSystem) ? "" : fileSystem) + "}"; // NOI18N
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

@Override
public String getHtmlDisplayName() {
  if (CndFileUtils.isLocalFileSystem(fileSystem)) {
    return name.toString();
  } else {
    return NbBundle.getMessage(getClass(), "ProjectHtmlDisplayName", name, fileSystem.getDisplayName());
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-repository-api

  @Override
  public String toString() {
    return CndFileUtils.isLocalFileSystem(fileSystem) ? name.toString() :  (fileSystem.getDisplayName() + ":" + name); // NOI18N
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

@Override
public String getDisplayName() {
  if (CndFileUtils.isLocalFileSystem(fileSystem)) {
    return name.toString();
  } else {
    return NbBundle.getMessage(getClass(), "ProjectDisplayName", name, fileSystem.getDisplayName());
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

private static String changeStringCaseIfNeeded(FileSystem fs, String path) {
  if (isLocalFileSystem(fs)) {
    if (CndFileUtils.isSystemCaseSensitive()) {
      return path;
    } else {
      return path.toLowerCase();
    }
  } else {
    return path; // remote is always case sensitive
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@Override
protected boolean addFileChangeListenerImpl(FileChangeListener listener, FileSystem fileSystem, String path) {
  for (CndFileSystemProvider provider : cache) {
    if (provider.addFileChangeListenerImpl(listener, fileSystem, path)) {
      return true;
    }
  }
  if (CndFileUtils.isLocalFileSystem(fileSystem)) {
    FileUtil.addFileChangeListener(listener, FileUtil.normalizeFile(new File(path)));
    return true;
  } else {
    return false;
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@Override
protected boolean removeFileChangeListenerImpl(FileChangeListener listener, FileSystem fileSystem, String path) {
  for (CndFileSystemProvider provider : cache) {
    if (provider.removeFileChangeListenerImpl(listener, fileSystem, path)) {
      return true;
    }
  }
  if (CndFileUtils.isLocalFileSystem(fileSystem)) {
    FileUtil.removeFileChangeListener(listener, FileUtil.normalizeFile(new File(path)));
    return true;
  } else {
    return false;
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

private static FileObject toFileObjectImpl(FileSystem fs, CharSequence absolutePath) {
  if (isLocalFileSystem(fs)) {
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

public static CharSequence getUniqueName(FileSystem fs, Object platformProject) {
  Parameters.notNull("FileSystem", fs); //NOI18N
  String postfix = CndFileUtils.isLocalFileSystem(fs) ? "" : fs.getDisplayName();
  String result;
  if (platformProject instanceof NativeProject) {
    result = ((NativeProject) platformProject).getProjectRoot() + "/N/" + postfix; // NOI18N
  } else if (platformProject instanceof CharSequence) {
    result = ((CharSequence)platformProject).toString() + "/L/" + postfix; // NOI18N
  } else if (platformProject == null) {
    throw new IllegalArgumentException("Incorrect platform project: null"); // NOI18N
  } else {
    throw new IllegalArgumentException("Incorrect platform project class: " + platformProject.getClass()); // NOI18N
  }
  return ProjectNameCache.getManager().getString(result);
}

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

if (!CndFileUtils.isLocalFileSystem(primaryFile.getFileSystem())) {
  return null;
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

private static Flags get(FileSystem fs, String absPath) {
  FileObject fo;
  if (isLocalFileSystem(fs)) {
    absPath = FileUtil.normalizePath(absPath);
    fo = CndFileSystemProvider.toFileObject(absPath);                
  } else {
    fo = fs.findResource(absPath);
  }
  return get(fo);
}

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

if (CndFileUtils.isLocalFileSystem(fileSystem)) {
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

if (CndFileUtils.isLocalFileSystem(projectDirectory)) {
  File cache = new File(projectDirectory.getPath() + "/nbproject/private/cache/model"); //NOI18N
  cache.mkdirs();
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

public void setBaseDir(String baseDir) {
  CndUtils.assertTrue(CndFileUtils.isLocalFileSystem(fsPath.getFileSystem()), "Setting baseDir for non-local configuration?!"); //NOI18N
  this.fsPath = new FSPath(fsPath.getFileSystem(), baseDir);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

@Override
public RemoteSyncFactory getSyncFactory() {
  MakeConfiguration activeConfiguration = project.getActiveConfiguration();
  if (activeConfiguration != null) {
    if (CndFileUtils.isLocalFileSystem(activeConfiguration.getBaseFSPath().getFileSystem())) {
      return activeConfiguration.getRemoteSyncFactory();
    } else {
      return RemoteSyncFactory.fromID(RemoteProject.FULL_REMOTE_SYNC_ID);
    }
  } else {
    return null;
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

private static void index(FileSystem fs, String path, ConcurrentMap<String, Flags> files) {
  if (isLocalFileSystem(fs)) {
    File file = new File(path);
    if (CndFileSystemProvider.canRead(path)) {
origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

try {
  FileSystem fs = dObj.getPrimaryFile().getFileSystem();
  if (!CndFileUtils.isLocalFileSystem(fs)) {
    annotationAttrs.add(new AttrValuePair(ATTR_ANNOTATION_FS,
      CndFileUtils.fileObjectToUrl(fs.getRoot()).toString()));
origin: org.netbeans.modules/org-netbeans-modules-cnd-source

FileObject fo = dao.getPrimaryFile();
boolean resetLS = true;
if (CndFileUtils.isLocalFileSystem(fo.getFileSystem())) {
  resetLS = false;
} else {
origin: org.netbeans.modules/org-netbeans-modules-cnd-api-remote

/**
 * In many places, standard sequence is as follows:
 *  - convert path to absolute if need
 *  - normalize it
 *  - find file object
 * In the case of non-local file systems we should delegate it to correspondent file systems.
 */
public static FileObject getFileObject(FileObject baseFileObject, String relativeOrAbsolutePath) {
  FileObject result = FileSystemProvider.getFileObject(baseFileObject, relativeOrAbsolutePath);
  if (result == null) {
    String absRootPath = CndPathUtilities.toAbsolutePath(baseFileObject, relativeOrAbsolutePath);
    try {
      // XXX:fullRemote we use old logic for local and new for remote
      // but remote approach for local gives #197093 -  Exception: null file
      final FileSystem fs = baseFileObject.getFileSystem();
      if (CndFileUtils.isLocalFileSystem(fs)) {
        result = CndFileUtils.toFileObject(CndFileUtils.normalizeAbsolutePath(absRootPath));
      } else {
        result = InvalidFileObjectSupport.getInvalidFileObject(fs, absRootPath);
      }
    } catch (FileStateInvalidException ex) {
      Exceptions.printStackTrace(ex);
      result = InvalidFileObjectSupport.getInvalidFileObject(InvalidFileObjectSupport.getDummyFileSystem(), absRootPath);
    }
  }
  return result;
}
org.netbeans.modules.cnd.utils.cacheCndFileUtilsisLocalFileSystem

Popular methods of CndFileUtils

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

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JPanel (javax.swing)
  • Best plugins for Eclipse
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