List of usage examples for org.eclipse.jdt.core JavaCore getJavaLikeExtensions
public static String[] getJavaLikeExtensions()
From source file:fede.workspace.eclipse.java.JavaProjectManager.java
License:Apache License
/** * Determines if a file name corresponds to a Java source file name. * //from ww w. jav a2s .co m * @param fileName * the file name * * @return true, if checks if is java file name */ public static boolean isJavaFileName(String fileName) { String extension = fileName.substring(fileName.lastIndexOf(".")); for (String javaExtension : JavaCore.getJavaLikeExtensions()) { if (javaExtension.equals(extension)) { return true; } } return false; }