@Override public FileLocator getFileLocator() { FileLocator locator = super.getFileLocator(); if (locator == null){ return projectFileLocator; } return locator; }
FileObject testFO = testSession.getFileLocator().find(javacIncludes); lookup = Lookups.fixed(testFO); FileObject testFO = testSession.getFileLocator().find(testIncludes); lookup = Lookups.fixed(testFO); String testMethods = properties.getProperty("test.methods");//NOI18N if(testClass != null) { FileObject testFO = testSession.getFileLocator().find(testClass.replace('.', '/') + ".java"); //NOI18N if (testMethods != null) { SingleMethod methodSpec = new SingleMethod(testFO, testMethods); String methodName = properties.getProperty("methodname"); //NOI18N if (className != null){ FileObject testFO = testSession.getFileLocator().find(className.replace('.', '/') + ".java"); //NOI18N if (methodName != null){ SingleMethod methodSpec = new SingleMethod(testFO, methodName);
static void openCallstackFrame(Node node, @NonNull String frameInfo) { JUnitTestMethodNode methodNode = getTestMethodNode(node); FileLocator locator = methodNode.getTestcase().getSession().getFileLocator(); if (locator == null) { return;
return; FileLocator locator = methodNode.getTestcase().getSession().getFileLocator(); if (locator == null) { return;
FileLocator locator = methodNode.getTestcase().getSession().getFileLocator(); if (locator == null) { return;
public void openCallstackFrame(Node node, String frameInfo) { if(!(node instanceof TestNGMethodNode)) { return; } TestNGMethodNode methodNode = (TestNGMethodNode) UIJavaUtils.getTestMethodNode(node); FileLocator locator = methodNode.getTestcase().getSession().getFileLocator(); if (locator == null) { return; } final int[] lineNumStorage = new int[1]; FileObject file = UIJavaUtils.getFile(frameInfo, lineNumStorage, locator); if ((file == null) && (methodNode.getTestcase().getTrouble() != null)) { String[] st = methodNode.getTestcase().getTrouble().getStackTrace(); if ((st != null) && (st.length > 0)) { file = UIJavaUtils.getFile(st[st.length - 1], lineNumStorage, locator); } } UIJavaUtils.openFile(file, lineNumStorage[0]); } }