public static String filenameWithoutExtension(IFile file){
  String filename=file.getName();
  int extPos=filename.lastIndexOf('.');
  if (extPos == -1) {
    return filename;
  }
  return filename.substring(0,extPos);
}

public static String filenameWithoutExtension ( IFile file ) { String filename = file . getName ( ) ; int extPos = filename . lastIndexOf ( '.' ) ; if ( extPos == - 1 ) { return filename ; } return filename . substring ( 0 , extPos ) ; }
returns the filename without its file extension ( if present ) . note that this only removes the last extension , in the case of multiple extensions . note that if the file has a leading dot ( e . g . hidden files ) , this method will return an empty string .
