Search in sources :

Example 1 with CssDocumentationProvider

use of com.intellij.psi.css.impl.util.CssDocumentationProvider in project intellij-plugins by JetBrains.

the class FlexDocumentationTest method testFlexCssSelectorMultiDocumentationInLookup.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssSelectorMultiDocumentationInLookup() throws Exception {
    myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "TestLib", getTestDataPath() + BASE_PATH, "MyLib1.swc", "MyLib1_src.zip", null);
    String doc = testOne(new CssDocumentationProvider(), getTestName(false) + ".css");
    assertTrue(doc.indexOf("p1.MyClass") >= 0);
    assertTrue(doc.indexOf("p2.MyClass") >= 0);
}
Also used : CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 2 with CssDocumentationProvider

use of com.intellij.psi.css.impl.util.CssDocumentationProvider in project intellij-plugins by JetBrains.

the class FlexDocumentationTest method testMxmlDoc5.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testMxmlDoc5() throws Exception {
    PsiElement element = getDocElementForLookupItem(new CssDocumentationProvider(), getTestName(false) + ".mxml");
    assertNull(element);
}
Also used : PsiElement(com.intellij.psi.PsiElement) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 3 with CssDocumentationProvider

use of com.intellij.psi.css.impl.util.CssDocumentationProvider in project intellij-plugins by JetBrains.

the class FlexDocumentationTest method testFlexCssProperty.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssProperty() throws Exception {
    DocumentationProvider cssDocumentationProvider = new CssDocumentationProvider();
    PsiElement docElement = getDocElementForLookupItem(cssDocumentationProvider, getTestName(false) + ".css");
    assertInstanceOf(docElement, JSAttributeNameValuePair.class);
}
Also used : PsiElement(com.intellij.psi.PsiElement) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) FlexDocumentationProvider(com.intellij.javascript.flex.FlexDocumentationProvider) DocumentationProvider(com.intellij.lang.documentation.DocumentationProvider) JSDocumentationProvider(com.intellij.lang.javascript.documentation.JSDocumentationProvider) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 4 with CssDocumentationProvider

use of com.intellij.psi.css.impl.util.CssDocumentationProvider in project intellij-plugins by JetBrains.

the class FlexDocumentationTest method testFlexCssPropertyMultiDocumentationInLookup.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssPropertyMultiDocumentationInLookup() throws Exception {
    DocumentationProvider cssDocProvider = new CssDocumentationProvider();
    String doc = testOne(cssDocProvider, getTestName(false) + ".css", new CssPropertyDescriptorStub("borderColor"));
    assertNotNull(doc);
    assertTrue("Container's borderColor property missing", doc.indexOf("Container") >= 0);
    assertTrue("Button's borderColor property missing", doc.indexOf("Button") >= 0);
    assertTrue("UIComponent's borderColor property missing", doc.indexOf("UIComponent") >= 0);
}
Also used : CssPropertyDescriptorStub(com.intellij.psi.css.descriptor.CssPropertyDescriptorStub) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) FlexDocumentationProvider(com.intellij.javascript.flex.FlexDocumentationProvider) DocumentationProvider(com.intellij.lang.documentation.DocumentationProvider) JSDocumentationProvider(com.intellij.lang.javascript.documentation.JSDocumentationProvider) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 5 with CssDocumentationProvider

use of com.intellij.psi.css.impl.util.CssDocumentationProvider in project intellij-plugins by JetBrains.

the class FlexDocumentationTest method testFlexCssSelector.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssSelector() throws Exception {
    DocumentationProvider cssDocumentationProvider = new CssDocumentationProvider();
    PsiElement docElement = getDocElementForLookupItem(cssDocumentationProvider, getTestName(false) + ".css");
    assertInstanceOf(docElement, JSClass.class);
}
Also used : PsiElement(com.intellij.psi.PsiElement) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) FlexDocumentationProvider(com.intellij.javascript.flex.FlexDocumentationProvider) DocumentationProvider(com.intellij.lang.documentation.DocumentationProvider) JSDocumentationProvider(com.intellij.lang.javascript.documentation.JSDocumentationProvider) CssDocumentationProvider(com.intellij.psi.css.impl.util.CssDocumentationProvider) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Aggregations

JSTestOptions (com.intellij.lang.javascript.JSTestOptions)5 CssDocumentationProvider (com.intellij.psi.css.impl.util.CssDocumentationProvider)5 FlexDocumentationProvider (com.intellij.javascript.flex.FlexDocumentationProvider)3 DocumentationProvider (com.intellij.lang.documentation.DocumentationProvider)3 JSDocumentationProvider (com.intellij.lang.javascript.documentation.JSDocumentationProvider)3 PsiElement (com.intellij.psi.PsiElement)3 CssPropertyDescriptorStub (com.intellij.psi.css.descriptor.CssPropertyDescriptorStub)1