org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName()方法的一些代码示例,展示了Util.isJavaLikeFileName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.isJavaLikeFileName()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.core.util.Util
类名称:Util
方法名:isJavaLikeFileName

Util.isJavaLikeFileName介绍

[英]Returns true if the given name ends with one of the known java like extension. (implementation is not creating extra strings)
[中]如果给定名称以一个已知的类java扩展名结尾,则返回true。(实现不创建额外字符串)

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Returns whether the given file name's extension is a Java-like extension.
 *
 * @return whether the given file name's extension is a Java-like extension
 * @see #getJavaLikeExtensions()
 * @since 3.2
 */
public static boolean isJavaLikeFileName(String fileName) {
  return Util.isJavaLikeFileName(fileName);
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Returns whether the given file name's extension is a Java-like extension.
 *
 * @return whether the given file name's extension is a Java-like extension
 * @see #getJavaLikeExtensions()
 * @since 3.2
 */
public static boolean isJavaLikeFileName(String fileName) {
  return Util.isJavaLikeFileName(fileName);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Returns whether the given file name's extension is a Java-like extension.
 *
 * @return whether the given file name's extension is a Java-like extension
 * @see #getJavaLikeExtensions()
 * @since 3.2
 */
public static boolean isJavaLikeFileName(String fileName) {
  return Util.isJavaLikeFileName(fileName);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Returns whether the given file name's extension is a Java-like extension.
 *
 * @return whether the given file name's extension is a Java-like extension
 * @see #getJavaLikeExtensions()
 * @since 3.2
 */
public static boolean isJavaLikeFileName(String fileName) {
  return Util.isJavaLikeFileName(fileName);
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Returns whether the given file name's extension is a Java-like extension.
 *
 * @return whether the given file name's extension is a Java-like extension
 * @see #getJavaLikeExtensions()
 * @since 3.2
 */
public static boolean isJavaLikeFileName(String fileName) {
  return Util.isJavaLikeFileName(fileName);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see IPackageFragment#getCompilationUnit(String)
 * @exception IllegalArgumentException if the name does not end with ".java"
 */
@Override
public ICompilationUnit getCompilationUnit(String cuName) {
  if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(cuName)) {
    throw new IllegalArgumentException(Messages.convention_unit_notJavaName);
  }
  return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
}
/**

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * @see IPackageFragment#getCompilationUnit(String)
 * @exception IllegalArgumentException if the name does not end with ".java"
 */
public ICompilationUnit getCompilationUnit(String cuName) {
  if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(cuName)) {
    throw new IllegalArgumentException(Messages.convention_unit_notJavaName);
  }
  return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
}
/**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * @see IPackageFragment#getCompilationUnit(String)
 * @exception IllegalArgumentException if the name does not end with ".java"
 */
public ICompilationUnit getCompilationUnit(String cuName) {
  if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(cuName)) {
    throw new IllegalArgumentException(Messages.convention_unit_notJavaName);
  }
  return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
}
/**

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see IPackageFragment#getCompilationUnit(String)
 * @exception IllegalArgumentException if the name does not end with ".java"
 */
public ICompilationUnit getCompilationUnit(String cuName) {
  if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(cuName)) {
    throw new IllegalArgumentException(Messages.convention_unit_notJavaName);
  }
  return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
}
/**

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public void indexResolvedDocument(SearchDocument document, IPath indexPath) {
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    if (this.sourceIndexer != null)
      this.sourceIndexer.indexResolvedDocument();
    this.sourceIndexer = null;
  }
}

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

public void resolveDocument(SearchDocument document) {
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    if (this.sourceIndexer != null)
      this.sourceIndexer.resolveDocument();
  }
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public void resolveDocument(SearchDocument document) {
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    if (this.sourceIndexer != null)
      this.sourceIndexer.resolveDocument();
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public void resolveDocument(SearchDocument document) {
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    if (this.sourceIndexer != null)
      this.sourceIndexer.resolveDocument();
  }
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public void resolveDocument(SearchDocument document) {
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    if (this.sourceIndexer != null)
      this.sourceIndexer.resolveDocument();
  }
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
  public boolean visit(IResourceProxy proxy) /* throws CoreException */{
    if (proxy.getType() == IResource.FILE) {
      if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName()))
        indexManager.addSource((IFile) proxy.requestResource(), container, parser);
      return false;
    }
    return true;
  }
},

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

public void indexDocument(SearchDocument document, IPath indexPath) {
  // TODO must verify that the document + indexPath match, when this is not called from scheduleDocumentIndexing
  document.removeAllIndexEntries(); // in case the document was already indexed
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    this.sourceIndexer = new SourceIndexer(document);
    this.sourceIndexer.indexDocument();
  } else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(documentPath)) {
    new BinaryIndexer(document).indexDocument();
  }
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public void indexDocument(SearchDocument document, IPath indexPath) {
  // TODO must verify that the document + indexPath match, when this is not called from scheduleDocumentIndexing
  document.removeAllIndexEntries(); // in case the document was already indexed
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    this.sourceIndexer = new SourceIndexer(document);
    this.sourceIndexer.indexDocument();
  } else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(documentPath)) {
    new BinaryIndexer(document).indexDocument();
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public void indexDocument(SearchDocument document, IPath indexPath) {
  // TODO must verify that the document + indexPath match, when this is not called from scheduleDocumentIndexing
  document.removeAllIndexEntries(); // in case the document was already indexed
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    this.sourceIndexer = new SourceIndexer(document);
    this.sourceIndexer.indexDocument();
  } else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(documentPath)) {
    new BinaryIndexer(document).indexDocument();
  }
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public void indexDocument(SearchDocument document, IPath indexPath) {
  // TODO must verify that the document + indexPath match, when this is not called from scheduleDocumentIndexing
  document.removeAllIndexEntries(); // in case the document was already indexed
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    this.sourceIndexer = new SourceIndexer(document);
    this.sourceIndexer.indexDocument();
  } else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(documentPath)) {
    new BinaryIndexer(document).indexDocument();
  }
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public void indexDocument(SearchDocument document, IPath indexPath) {
  // TODO must verify that the document + indexPath match, when this is not called from scheduleDocumentIndexing
  document.removeAllIndexEntries(); // in case the document was already indexed
  String documentPath = document.getPath();
  if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
    new SourceIndexer(document).indexDocument();
  } else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(documentPath)) {
    new BinaryIndexer(document).indexDocument();
  }
}

相关文章

Util类方法