Search in sources :

Example 1 with CssInvalidPropertyValueInspection

use of com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testFlexCssFileInsideLibrary.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssFileInsideLibrary() throws Exception {
    enableInspectionTool(new CssInvalidPropertyValueInspection());
    final String libFileName = "CssInside.zip";
    final String basePath = getTestDataPath() + getBasePath() + "/";
    myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "lib", basePath, libFileName, null, null);
    // warm up
    configureByFile(getBasePath() + "/FlexWithCss7.css");
    VirtualFile libRoot = null;
    for (OrderEntry entry : ModuleRootManager.getInstance(myModule).getOrderEntries()) {
        if (entry instanceof LibraryOrderEntry) {
            final LibraryOrderEntry libraryOrderEntry = (LibraryOrderEntry) entry;
            if ("lib".equals(libraryOrderEntry.getLibraryName())) {
                VirtualFile[] files = libraryOrderEntry.getRootFiles(OrderRootType.CLASSES);
                libRoot = files[0];
            }
        }
    }
    VirtualFile file = libRoot.findFileByRelativePath("dir/default.css");
    configureByExistingFile(file);
    doHighlighting();
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) CssInvalidPropertyValueInspection(com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)

Example 2 with CssInvalidPropertyValueInspection

use of com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testFlexCssShouldNotComplainAboutUnitlessLength.

public void testFlexCssShouldNotComplainAboutUnitlessLength() throws Exception {
    enableInspectionTool(new CssInvalidPropertyValueInspection());
    doTestFor(true, getTestName(false) + ".css");
}
Also used : CssInvalidPropertyValueInspection(com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)

Example 3 with CssInvalidPropertyValueInspection

use of com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testFlexWithCss4.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexWithCss4() throws Exception {
    enableInspectionTool(new CssInvalidPropertyValueInspection());
    myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "library", getTestDataPath() + getBasePath() + "/", "LibForCss.swc", "LibForCss_src.zip", null);
    doTestFor(true, getTestName(false) + ".css");
}
Also used : CssInvalidPropertyValueInspection(com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)

Example 4 with CssInvalidPropertyValueInspection

use of com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testCssDialectMappings.

public void testCssDialectMappings() throws Exception {
    enableInspectionTool(new CssInvalidPropertyValueInspection());
    enableInspectionTool(new CssUnknownPropertyInspection());
    try {
        CssDialectMappings.getInstance(getProject()).setMapping(null, CssDialect.CLASSIC);
        doTestFor(true, getTestName(false) + ".css");
    } finally {
        CssDialectMappings.getInstance(getProject()).cleanupForNextTest();
    }
}
Also used : CssUnknownPropertyInspection(com.intellij.psi.css.inspections.CssUnknownPropertyInspection) CssInvalidPropertyValueInspection(com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)

Example 5 with CssInvalidPropertyValueInspection

use of com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testHtmlCss.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testHtmlCss() throws Exception {
    enableInspectionTool(new CssInvalidPropertyValueInspection());
    enableInspectionTool(new CssInvalidHtmlTagReferenceInspection());
    enableInspectionTool(new CssUnknownPropertyInspection());
    doTestFor(true, getTestName(false) + ".html");
}
Also used : CssUnknownPropertyInspection(com.intellij.psi.css.inspections.CssUnknownPropertyInspection) CssInvalidPropertyValueInspection(com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection) CssInvalidHtmlTagReferenceInspection(com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)

Aggregations

CssInvalidPropertyValueInspection (com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)7 CssUnknownPropertyInspection (com.intellij.psi.css.inspections.CssUnknownPropertyInspection)2 CssInvalidHtmlTagReferenceInspection (com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 CssInvalidElementInspection (com.intellij.psi.css.inspections.CssInvalidElementInspection)1 CssInvalidFunctionInspection (com.intellij.psi.css.inspections.invalid.CssInvalidFunctionInspection)1