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

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

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

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

/*package*/ static CsmFile findSource(CsmFile header) {
  String name = getName(header.getAbsolutePath().toString());
  Collection<CsmFile> includers = CsmIncludeHierarchyResolver.getDefault().getFiles(header);
  for (CsmFile f : includers) {
    if (CndFileUtils.areFilenamesEqual( getName(f.getAbsolutePath().toString()), name )) {
      // we found source file with the same name
      // as header and with dependency to it. Best shot.
      return f;
    }
  }
  // look for random namesake
  for (CsmFile f : header.getProject().getSourceFiles()) {
    if (CndFileUtils.areFilenamesEqual( getName(f.getAbsolutePath().toString()), name )) {
      return f;
    }
  }
  return null;
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring

private static CsmFile findSource(CsmFile header) {
  String name = getFileName(header.getAbsolutePath());
  Collection<CsmFile> includers = CsmIncludeHierarchyResolver.getDefault().getFiles(header);
  for (CsmFile f : includers) {
    if (CndFileUtils.areFilenamesEqual(getFileName(f.getAbsolutePath()), name)) {
      // we found source file with the same name
      // as header and with dependency to it. Best shot.
      return f;
    }
  }
  // look for random namesake
  for (CsmFile f : header.getProject().getSourceFiles()) {
    if (CndFileUtils.areFilenamesEqual(getFileName(f.getAbsolutePath().toString()), name)) {
      return f;
    }
  }
  return null;
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-navigation

      && CndFileUtils.areFilenamesEqual( name, getName(h.getIncludeFile().getAbsolutePath().toString())) ) {
    return h.getIncludeFile();
CsmFile namesake = null;
for (CsmFile f : source.getProject().getHeaderFiles()) {
  if (CndFileUtils.areFilenamesEqual( getName(f.getAbsolutePath().toString()), name)) {
    if (CndFileUtils.areFilenamesEqual( path, trimExtension(f.getAbsolutePath().toString()) )) {
    if (CndFileUtils.areFilenamesEqual( getName(f.getAbsolutePath().toString()), name)) {
      if (CndFileUtils.areFilenamesEqual( path, trimExtension(f.getAbsolutePath().toString()) )) {
        return f;
origin: org.netbeans.modules/org-netbeans-modules-cnd-navigation

private static FileObject findBrother(DataObject dob, Collection<String> extensions) {
  assert (dob != null);
  assert (dob.getPrimaryFile() != null);
  if (!extensions.isEmpty()) {
    // get a file object associated with the data object
    FileObject fo = dob.getPrimaryFile();
    FileObject[] childs = fo.getParent().getChildren();
    // try to find a file with the same name and one of passed extensions
    for (String ext : extensions) {
      // use FileUtilities to find brother of the file object
      // FileObject res = FileUtil.findBrother(fo, ext[i]);
      // IZ117750. Netbeans don't recognize MAC FS as case-insensitive
      // so FileObject.getFileObject(name, extension) can create
      // separate FileObjects for name.h and name.H although they are names
      // of the same file. So FileUtil.findBrother can't be used for now.
      
      String ne = fo.getName() + '.' + ext;
      for (int j = 0; j < childs.length; j++) {
        FileObject fileObject = childs[j];
        if ( CndFileUtils.areFilenamesEqual( fileObject.getNameExt(), ne )) {
          return fileObject;
        }
      }
    }
  }
  return null;
}
org.netbeans.modules.cnd.utils.cacheCndFileUtilsareFilenamesEqual

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

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • startActivity (Activity)
  • Kernel (java.awt.image)
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JFileChooser (javax.swing)
  • Github Copilot 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