congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JComboBox (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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