本文整理了Java中org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray()
方法的一些代码示例,展示了Util.getResourceContentsAsCharArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getResourceContentsAsCharArray()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.core.util.Util
类名称:Util
方法名:getResourceContentsAsCharArray
[英]Returns the given file's contents as a character array.
[中]以字符数组的形式返回给定文件的内容。
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return (this.contents = Util.getResourceContentsAsCharArray(this.file));
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return (this.contents = Util.getResourceContentsAsCharArray(this.file));
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getResourceContentsAsCharArray(this.file);
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getResourceContentsAsCharArray(this.file);
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return (this.contents = Util.getResourceContentsAsCharArray(this.file));
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getResourceContentsAsCharArray(this.file);
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
// otherwise retrieve it
try {
return Util.getResourceContentsAsCharArray(this.file);
} catch (CoreException e) {
return CharOperation.NO_CHAR;
}
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns the given file's contents as a character array.
*/
public static char[] getResourceContentsAsCharArray(IFile file) throws JavaModelException {
// Get encoding from file
String encoding;
try {
encoding = file.getCharset();
} catch(CoreException ce) {
// do not use any encoding
encoding = null;
}
return getResourceContentsAsCharArray(file, encoding);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public char[] getCharContents() {
if (this.charContents != null) return this.charContents;
try {
return Util.getResourceContentsAsCharArray(getFile());
} catch (JavaModelException e) {
if (BasicSearchEngine.VERBOSE || JobManager.VERBOSE) { // used during search and during indexing
e.printStackTrace();
}
return null;
}
}
public String getEncoding() {
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public char[] getCharContents() {
if (this.charContents != null) return this.charContents;
try {
return Util.getResourceContentsAsCharArray(getFile());
} catch (JavaModelException e) {
if (BasicSearchEngine.VERBOSE || JobManager.VERBOSE) { // used during search and during indexing
e.printStackTrace();
}
return null;
}
}
public String getEncoding() {
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public char[] getCharContents() {
if (this.charContents != null) return this.charContents;
try {
return Util.getResourceContentsAsCharArray(getFile());
} catch (JavaModelException e) {
if (BasicSearchEngine.VERBOSE || JobManager.VERBOSE) { // used during search and during indexing
e.printStackTrace();
}
return null;
}
}
public String getEncoding() {
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public char[] getCharContents() {
if (this.charContents != null) return this.charContents;
try {
return Util.getResourceContentsAsCharArray(getFile());
} catch (JavaModelException e) {
if (BasicSearchEngine.VERBOSE || JobManager.VERBOSE) { // used during search and during indexing
e.printStackTrace();
}
return null;
}
}
public String getEncoding() {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public char[] getCharContents() {
if (this.charContents != null) return this.charContents;
try {
return Util.getResourceContentsAsCharArray(getFile());
} catch (JavaModelException e) {
if (BasicSearchEngine.VERBOSE || JobManager.VERBOSE) { // used during search and during indexing
e.printStackTrace();
}
return null;
}
}
@Override
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public char[] getCharContents() {
if (this.charContents != null) return this.charContents;
try {
return Util.getResourceContentsAsCharArray(getFile());
} catch (JavaModelException e) {
if (BasicSearchEngine.VERBOSE || JobManager.VERBOSE) { // used during search and during indexing
e.printStackTrace();
}
return null;
}
}
public String getEncoding() {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public char[] getContents() {
try {
return Util.getResourceContentsAsCharArray(this.resource);
} catch (CoreException e) {
throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public char[] getContents() {
try {
return Util.getResourceContentsAsCharArray(this.resource);
} catch (CoreException e) {
throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public char[] getContents() {
try {
return Util.getResourceContentsAsCharArray(this.resource);
} catch (CoreException e) {
throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public char[] getContents() {
try {
return Util.getResourceContentsAsCharArray(this.resource);
} catch (CoreException e) {
throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public char[] getContents() {
try {
return Util.getResourceContentsAsCharArray(this.resource);
} catch (CoreException e) {
throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public char[] getContents() {
try {
return Util.getResourceContentsAsCharArray(this.resource);
} catch (CoreException e) {
throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
}
}
内容来源于网络,如有侵权,请联系作者删除!