本文整理了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
[英]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();
}
}
内容来源于网络,如有侵权,请联系作者删除!