use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCompletionTest method testResourceBundleFromSdk.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testResourceBundleFromSdk() throws Exception {
final String testName = getTestName(false);
final Sdk flexSdk = FlexUtils.getSdkForActiveBC(getModule());
final SdkModificator sdkModificator = flexSdk.getSdkModificator();
final VirtualFile swcFile = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + "/" + getBasePath() + "/" + testName + ".swc");
sdkModificator.addRoot(JarFileSystem.getInstance().getJarRootForLocalFile(swcFile), OrderRootType.CLASSES);
sdkModificator.commitChanges();
doTest("", "as");
doTest("", "mxml");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexOptimizeImportsTest method testNoBlankLines2.
@JSTestOptions({ JSTestOption.WithFlexFacet })
public void testNoBlankLines2() throws Throwable {
JSTestUtils.addClassesToProject(myFixture, true, "com.Foo", "com.Bar", "com.Zzz");
final CodeStyleSettings styleSettings = CodeStyleSettingsManager.getSettings(getProject());
XmlCodeStyleSettings xmlSettings = styleSettings.getCustomSettings(XmlCodeStyleSettings.class);
boolean b = xmlSettings.XML_KEEP_WHITE_SPACES_INSIDE_CDATA;
try {
xmlSettings.XML_KEEP_WHITE_SPACES_INSIDE_CDATA = true;
runOptimizeAction(MXML_FILE_EXTENSION);
} finally {
xmlSettings.XML_KEEP_WHITE_SPACES_INSIDE_CDATA = b;
}
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ResolveExternalInlineStyleSourceActionTest method testFindInnerComponentInDeclarations.
@JSTestOptions({ JSTestOption.WithGumboSdk, JSTestOption.WithFlexFacet })
public void testFindInnerComponentInDeclarations() throws Exception {
Map<String, String> styles = new THashMap<>();
styles.put("skinClass", "spark.skins.spark.ButtonBarMiddleButtonSkin");
ResolveExternalInlineStyleSourceAction action = new ResolveExternalInlineStyleSourceAction("innerComponentInDeclarations", "spark.components.ButtonBarButton", "skinClass", styles, myModule);
PsiElement element = (PsiElement) action.find();
assertNotNull(element);
assertEquals(1002, element.getTextOffset());
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ResolveExternalInlineStyleSourceActionTest method testFindInnerComponentInDeclarationsAsTag.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithJsSupportLoader, JSTestOption.WithGumboSdk, JSTestOption.WithFlexFacet })
public void testFindInnerComponentInDeclarationsAsTag() throws Exception {
Map<String, String> styles = new THashMap<>();
styles.put("skinClass", "spark.skins.spark.ButtonBarLastButtonSkin");
ResolveExternalInlineStyleSourceAction action = new ResolveExternalInlineStyleSourceAction("innerComponentInDeclarations", "spark.components.ButtonBarButton", "skinClass", styles, myModule);
PsiElement element = (PsiElement) action.find();
assertNotNull(element);
assertEquals(1323, element.getTextOffset());
}
Aggregations