本文整理了Java中org.eclipse.jdt.internal.core.util.Util.getNameWithoutJavaLikeExtension()
方法的一些代码示例,展示了Util.getNameWithoutJavaLikeExtension()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getNameWithoutJavaLikeExtension()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.core.util.Util
类名称:Util
方法名:getNameWithoutJavaLikeExtension
[英]Returns the substring of the given file name, ending at the start of a Java like extension. The entire file name is returned if it doesn't end with a Java like extension.
[中]
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Removes the file extension from the given file name, if it has a Java-like file
* extension. Otherwise the file name itself is returned.
* Note this removes the dot ('.') before the extension as well.
*
* @param fileName the name of a file
* @return the fileName without the Java-like extension
* @since 3.2
*/
public static String removeJavaLikeExtension(String fileName) {
return Util.getNameWithoutJavaLikeExtension(fileName);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Removes the file extension from the given file name, if it has a Java-like file
* extension. Otherwise the file name itself is returned.
* Note this removes the dot ('.') before the extension as well.
*
* @param fileName the name of a file
* @return the fileName without the Java-like extension
* @since 3.2
*/
public static String removeJavaLikeExtension(String fileName) {
return Util.getNameWithoutJavaLikeExtension(fileName);
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* Removes the file extension from the given file name, if it has a Java-like file
* extension. Otherwise the file name itself is returned.
* Note this removes the dot ('.') before the extension as well.
*
* @param fileName the name of a file
* @return the fileName without the Java-like extension
* @since 3.2
*/
public static String removeJavaLikeExtension(String fileName) {
return Util.getNameWithoutJavaLikeExtension(fileName);
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* Removes the file extension from the given file name, if it has a Java-like file
* extension. Otherwise the file name itself is returned.
* Note this removes the dot ('.') before the extension as well.
*
* @param fileName the name of a file
* @return the fileName without the Java-like extension
* @since 3.2
*/
public static String removeJavaLikeExtension(String fileName) {
return Util.getNameWithoutJavaLikeExtension(fileName);
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* Removes the file extension from the given file name, if it has a Java-like file
* extension. Otherwise the file name itself is returned.
* Note this removes the dot ('.') before the extension as well.
*
* @param fileName the name of a file
* @return the fileName without the Java-like extension
* @since 3.2
*/
public static String removeJavaLikeExtension(String fileName) {
return Util.getNameWithoutJavaLikeExtension(fileName);
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* Removes the file extension from the given file name, if it has a Java-like file
* extension. Otherwise the file name itself is returned.
* Note this removes the dot ('.') before the extension as well.
*
* @param fileName the name of a file
* @return the fileName without the Java-like extension
* @since 3.2
*/
public static String removeJavaLikeExtension(String fileName) {
return Util.getNameWithoutJavaLikeExtension(fileName);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
*/
@Override
public char[] getMainTypeName(){
return Util.getNameWithoutJavaLikeExtension(getElementName()).toCharArray();
}
/**
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
*/
public char[] getMainTypeName(){
return Util.getNameWithoutJavaLikeExtension(getElementName()).toCharArray();
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
*/
public char[] getMainTypeName(){
return Util.getNameWithoutJavaLikeExtension(getElementName()).toCharArray();
}
/**
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
*/
public char[] getMainTypeName(){
return Util.getNameWithoutJavaLikeExtension(getElementName()).toCharArray();
}
/**
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
*/
public char[] getMainTypeName(){
return Util.getNameWithoutJavaLikeExtension(getElementName()).toCharArray();
}
/**
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* @see ICompilationUnit#findPrimaryType()
*/
public IType findPrimaryType() {
String typeName = Util.getNameWithoutJavaLikeExtension(getElementName());
IType primaryType= getType(typeName);
if (primaryType.exists()) {
return primaryType;
}
return null;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* @see ICompilationUnit#findPrimaryType()
*/
@Override
public IType findPrimaryType() {
String typeName = Util.getNameWithoutJavaLikeExtension(getElementName());
IType primaryType= getType(typeName);
if (primaryType.exists()) {
return primaryType;
}
return null;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* @see ICompilationUnit#findPrimaryType()
*/
public IType findPrimaryType() {
String typeName = Util.getNameWithoutJavaLikeExtension(getElementName());
IType primaryType= getType(typeName);
if (primaryType.exists()) {
return primaryType;
}
return null;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* @see ICompilationUnit#findPrimaryType()
*/
public IType findPrimaryType() {
String typeName = Util.getNameWithoutJavaLikeExtension(getElementName());
IType primaryType= getType(typeName);
if (primaryType.exists()) {
return primaryType;
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* @see ICompilationUnit#findPrimaryType()
*/
public IType findPrimaryType() {
String typeName = Util.getNameWithoutJavaLikeExtension(getElementName());
IType primaryType= getType(typeName);
if (primaryType.exists()) {
return primaryType;
}
return null;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* @see ICompilationUnit#findPrimaryType()
*/
public IType findPrimaryType() {
String typeName = Util.getNameWithoutJavaLikeExtension(getElementName());
IType primaryType= getType(typeName);
if (primaryType.exists()) {
return primaryType;
}
return null;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns <code>true</code> if this element is the main type of its compilation unit.
*/
protected boolean isRenamingMainType(IJavaElement element, IJavaElement dest) throws JavaModelException {
if ((isRename() || getNewNameFor(element) != null)
&& dest.getElementType() == IJavaElement.COMPILATION_UNIT) {
String typeName = dest.getElementName();
typeName = org.eclipse.jdt.internal.core.util.Util.getNameWithoutJavaLikeExtension(typeName);
return element.getElementName().equals(typeName) && element.getParent().equals(dest);
}
return false;
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Returns <code>true</code> if this element is the main type of its compilation unit.
*/
protected boolean isRenamingMainType(IJavaElement element, IJavaElement dest) throws JavaModelException {
if ((isRename() || getNewNameFor(element) != null)
&& dest.getElementType() == IJavaElement.COMPILATION_UNIT) {
String typeName = dest.getElementName();
typeName = org.eclipse.jdt.internal.core.util.Util.getNameWithoutJavaLikeExtension(typeName);
return element.getElementName().equals(typeName) && element.getParent().equals(dest);
}
return false;
}
/**
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns <code>true</code> if this element is the main type of its compilation unit.
*/
protected boolean isRenamingMainType(IJavaElement element, IJavaElement dest) throws JavaModelException {
if ((isRename() || getNewNameFor(element) != null)
&& dest.getElementType() == IJavaElement.COMPILATION_UNIT) {
String typeName = dest.getElementName();
typeName = org.eclipse.jdt.internal.core.util.Util.getNameWithoutJavaLikeExtension(typeName);
return element.getElementName().equals(typeName) && element.getParent().equals(dest);
}
return false;
}
/**
内容来源于网络,如有侵权,请联系作者删除!