Method Summary |
|
static boolean | areAnnotationsSupported(FileObject file) Checks whether Java annotations are applicable in the given file. |
static boolean | areAnnotationsSupported(String sourceLevel) Determines whether Java annotations are supported by the given
Java source level.
Parameters: sourceLevel - Java source level (e.g. |
public static String | convertClass2TestName(String classFileName) Converts given class filename to test filename, e.g.
"org/netbeans/Foo"
-> "org/netbeans/{test-prefix}Foo{test-suffix}"
Parameters: classFileName - class filename in form of"org/netbeans/Foo",i.e. |
public static String | convertPackage2SuiteName(String packageFileName) Converts given package filename to test suite filename, e.g. |
public static String | createNewName(int i, Set usedNames) |
static String | fileToClassName(String fileName) Converts filename to the fully qualified name of the main class
residing in the file.
For example: test/myapp/App.java --> test.myapp.App
Parameters: filename - corresponding package name. |
public static ClassTree | findMainClass(CompilationInfo compInfo) Finds a main class.
Parameters: compInfo - defines scope in which the class is to be found Parameters: className - name of the class to be found the found class; or null if the class was notfound (e.g. |
public static SourceGroup | findSourceGroupOwner(FileObject file) Finds a SourceGroup the given file belongs to. |
public static SourceGroup | findSourceGroupOwner(Project project, FileObject file) Finds a SourceGroup the given file belongs to.
Only Java SourceGroup s are taken into account. |
public static Collection<SourceGroup> | findSourceGroupOwners(Project project, String className) Finds all SourceGroup s of the given project
containing a class of the given name. |
public static Map<FileObject, SourceGroup> | getFileObject2SourceGroupMap(Project project) Creates a map from folders to SourceGroup s of a given
project. |
public static FileObject | getFileObjectFromNode(Node node) |
public static List<String> | getJavaFileNames(FileObject packageFolder, ClassPath classPath) Returns full names of all primary Java classes
withing the specified folder (non-recursive). |
static String | getPackageName(String fullName) |
public static JUnitPlugin | getPluginForProject(Project project) |
public static Map<CreateTestParam, Object> | getSettingsMap(boolean multipleFiles) Creates a map of parameters according to the current JUnit module
settings.
Note: The map may not contain all the necessary settings,
i.g. |
static String | getSimpleName(String fullName) Gets the last part of a fully qualified Java name. |
static String | getSourceLevel(FileObject file) Determines source level of the given file.
Parameters: file - file whose source level is to be determined string denoting source level of the given file(e.g. |
public static String | getTestClassFullName(String sourceClassName, String packageName) |
public static String | getTestClassName(String sourceClassName) |
public static Object[] | getTestTargets(FileObject fileObject) Finds SourceGroup s where a test for the given class
can be created (so that it can be found by the projects infrastructure
when a test for the class is to be opened or run). |
static boolean | isClassException(CompilationInfo compilationInfo, TypeElement classElem) |
static boolean | isClassImplementingTestInterface(CompilationInfo compilationInfo, TypeElement classElem) |
static boolean | isClassTest(CompilationInfo compilationInfo, TypeElement classElem) |
static boolean | isJavaFile(FileObject fileObj) |
public static boolean | isValidPackageName(String str) |
public static void | notifyUser(String msg) Show error message box. |
public static void | notifyUser(String msg, int messageType) Show message box of the specified severity. |
public static T[] | skipNulls(T[] objs, T[] type) Creates a copy of the given array, except that null objects
are omitted.
The length of the returned array is (l - n), where
l is length of the passed array and n is number
of null elements of the array. |