use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testPackageNameCombo.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testPackageNameCombo() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
PsiFile fragment = JSReferenceEditor.forPackageName("", myProject, "", GlobalSearchScope.projectScope(myProject), "").getPsiFile();
String[] included = new String[] { "com" };
String[] excluded = new String[] { "public", "function", "while", "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher" };
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, included, excluded, "com", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testCreateFlexSkinHostComponent.
@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithGumboSdk })
public void testCreateFlexSkinHostComponent() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
PsiFile fragment = CreateFlexSkinDialog.createHostComponentCombo("", myModule).getPsiFile();
String[] included = new String[] { "Z111", "Z222" };
// TODO primitive types (and e.g. not subclasses of SkinnableComponent?) should be removed from completion list
String[] excluded = new String[] { "public", "function", "while", "Z333", "EventDispatcher", "int", "String", "uint", "Number" };
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, included, excluded, "Z111", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCompletionInUmlTextFieldsTest method testCreateUmlFieldInitializer.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testCreateUmlFieldInitializer() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSCreateFieldDialog.createInitializerCodeFragment(createFakeClass());
String[] included = DEFALUT_VALUES;
// TODO classes should be removed from completion list
included = ArrayUtil.mergeArrays(included, "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher");
String[] excluded = new String[] { "public", "function", "while" };
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCompletionInUmlTextFieldsTest method testCreateUmlFieldType.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testCreateUmlFieldType() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
PsiFile fragment = JSCreateFieldDialog.createTypeField(myProject, JSCreateFieldDialog.getTypeFieldScope(myModule, myProject)).getPsiFile();
String[] included = new String[] { "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher", "void", "*" };
String[] excluded = ArrayUtil.mergeArrays(DEFALUT_VALUES, "public", "function", "while");
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, included, excluded, "Z111", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexNavigationTest method testSdkClass2.
@JSTestOptions({ JSTestOption.WithFlexFacet })
public void testSdkClass2() throws Exception {
VirtualFile asdoc = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + BASE_PATH + "SdkAsdoc.zip");
asdoc = JarFileSystem.getInstance().getJarRootForLocalFile(asdoc);
VirtualFile swc = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + BASE_PATH + "CustomSdk.swc");
swc = JarFileSystem.getInstance().getJarRootForLocalFile(swc);
FlexTestUtils.setupCustomSdk(myModule, swc, null, asdoc);
myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "Lib", getTestDataPath() + BASE_PATH, "TestLib1.swc", null, null);
VirtualFile forAsDoc = swc.findChild("library.swf");
doTest("SdkClass.as", null, forAsDoc);
}
Aggregations