Search in sources :

Example 1 with CssInvalidHtmlTagReferenceInspection

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

the class FlexHighlightingTest method testSwitchToClassicCssQuickFix1.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testSwitchToClassicCssQuickFix1() throws Exception {
    enableInspectionTool(new CssInvalidHtmlTagReferenceInspection());
    doHighlightingWithInvokeFixAndCheckResult(CssBundle.message("switch.to.css.dialect.quickfix.name", CssDialect.CLASSIC.getDisplayName()), "css");
}
Also used : CssInvalidHtmlTagReferenceInspection(com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)

Example 2 with CssInvalidHtmlTagReferenceInspection

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

the class FlexHighlightingTest method testSwitchToFlexCssQuickFix1.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testSwitchToFlexCssQuickFix1() throws Exception {
    enableInspectionTool(new CssInvalidHtmlTagReferenceInspection());
    try {
        CssDialectMappings.getInstance(getProject()).setMapping(null, CssDialect.CLASSIC);
        doHighlightingWithInvokeFixAndCheckResult(CssBundle.message("switch.to.css.dialect.quickfix.name", FlexCSSDialect.getInstance().getDisplayName()), "css");
    } finally {
        CssDialectMappings.getInstance(getProject()).cleanupForNextTest();
    }
}
Also used : CssInvalidHtmlTagReferenceInspection(com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)

Example 3 with CssInvalidHtmlTagReferenceInspection

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

the class FlexHighlightingTest method testSwitchToClassicCssQuickFix3.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testSwitchToClassicCssQuickFix3() throws Exception {
    enableInspectionTool(new CssInvalidHtmlTagReferenceInspection());
    configureByFile(BASE_PATH + '/' + getTestName(false) + '.' + "mxml");
    doHighlighting();
    final List<IntentionAction> actions = CodeInsightTestFixtureImpl.getAvailableIntentions(myEditor, myFile);
    final String text = CssBundle.message("switch.to.css.dialect.quickfix.name", CssDialect.CLASSIC.getDisplayName());
    final IntentionAction action = CodeInsightTestUtil.findIntentionByText(actions, text);
    assertNull(action);
}
Also used : IntentionAction(com.intellij.codeInsight.intention.IntentionAction) CssInvalidHtmlTagReferenceInspection(com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)

Example 4 with CssInvalidHtmlTagReferenceInspection

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

the class FlexHighlightingTest method testSwitchToFlexCssQuickFix3.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testSwitchToFlexCssQuickFix3() throws Exception {
    enableInspectionTool(new CssInvalidHtmlTagReferenceInspection());
    try {
        CssDialectMappings.getInstance(getProject()).setMapping(null, CssDialect.CLASSIC);
        configureByFile(BASE_PATH + '/' + getTestName(false) + '.' + "html");
        doHighlighting();
        final List<IntentionAction> actions = CodeInsightTestFixtureImpl.getAvailableIntentions(myEditor, myFile);
        final String text = CssBundle.message("switch.to.css.dialect.quickfix.name", FlexCSSDialect.getInstance().getDisplayName());
        final IntentionAction action = CodeInsightTestUtil.findIntentionByText(actions, text);
        assertNull(action);
    } finally {
        CssDialectMappings.getInstance(getProject()).cleanupForNextTest();
    }
}
Also used : IntentionAction(com.intellij.codeInsight.intention.IntentionAction) CssInvalidHtmlTagReferenceInspection(com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)

Example 5 with CssInvalidHtmlTagReferenceInspection

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

the class FlexHighlightingTest method testFlexWithCss7.

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

Aggregations

CssInvalidHtmlTagReferenceInspection (com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection)6 IntentionAction (com.intellij.codeInsight.intention.IntentionAction)2 CssInvalidPropertyValueInspection (com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)2 CssUnknownPropertyInspection (com.intellij.psi.css.inspections.CssUnknownPropertyInspection)1