Search in sources :

Example 1 with CssUnknownPropertyInspection

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

the class FlexHighlightingTest method testFontFaceProperties.

public void testFontFaceProperties() throws Throwable {
    final Sdk sdk = FlexTestUtils.createSdk(FlexTestUtils.getPathToCompleteFlexSdk("4.5"), null, true);
    WriteAction.run(() -> FlexTestUtils.modifyBuildConfiguration(myModule, bc -> FlexTestUtils.setSdk(bc, sdk)));
    enableInspectionTool(new CssUnknownPropertyInspection());
    defaultTest();
}
Also used : InjectedLanguageManager(com.intellij.lang.injection.InjectedLanguageManager) XmlFile(com.intellij.psi.xml.XmlFile) VirtualFile(com.intellij.openapi.vfs.VirtualFile) THashSet(gnu.trove.THashSet) AnnotationBackedDescriptor(com.intellij.lang.javascript.flex.AnnotationBackedDescriptor) JSAttributeListOwner(com.intellij.lang.javascript.psi.ecmal4.JSAttributeListOwner) PsiTreeUtil(com.intellij.psi.util.PsiTreeUtil) CheckXmlFileWithXercesValidatorInspection(com.intellij.xml.util.CheckXmlFileWithXercesValidatorInspection) DumbServiceImpl(com.intellij.openapi.project.DumbServiceImpl) WriteCommandAction(com.intellij.openapi.command.WriteCommandAction) ActionScriptDaemonAnalyzerTestCase(com.intellij.flex.util.ActionScriptDaemonAnalyzerTestCase) Module(com.intellij.openapi.module.Module) com.intellij.lang.javascript(com.intellij.lang.javascript) JavaScriptIndex(com.intellij.lang.javascript.index.JavaScriptIndex) UnterminatedStatementJSInspection(com.intellij.lang.javascript.inspections.UnterminatedStatementJSInspection) JSAttributeList(com.intellij.lang.javascript.psi.ecmal4.JSAttributeList) Extensions(com.intellij.openapi.extensions.Extensions) CssUnknownPropertyInspection(com.intellij.psi.css.inspections.CssUnknownPropertyInspection) StdModuleTypes(com.intellij.openapi.module.StdModuleTypes) IncorrectOperationException(com.intellij.util.IncorrectOperationException) XmlHighlighterColors(com.intellij.openapi.editor.XmlHighlighterColors) PsiTestUtil(com.intellij.testFramework.PsiTestUtil) JSUseNamespaceDirective(com.intellij.lang.javascript.psi.ecmal4.JSUseNamespaceDirective) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) ModifiableFlexBuildConfiguration(com.intellij.lang.javascript.flex.projectStructure.model.ModifiableFlexBuildConfiguration) ModuleOrProjectCompilerOptions(com.intellij.lang.javascript.flex.projectStructure.model.ModuleOrProjectCompilerOptions) JSUnusedGlobalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection) JSClass(com.intellij.lang.javascript.psi.ecmal4.JSClass) HighlightInfoFilter(com.intellij.codeInsight.daemon.impl.HighlightInfoFilter) CssInvalidHtmlTagReferenceInspection(com.intellij.psi.css.inspections.invalid.CssInvalidHtmlTagReferenceInspection) VfsUtilCore.urlToPath(com.intellij.openapi.vfs.VfsUtilCore.urlToPath) java.util(java.util) FlexProjectLevelCompilerOptionsHolder(com.intellij.lang.javascript.flex.projectStructure.FlexProjectLevelCompilerOptionsHolder) HighlightInfo(com.intellij.codeInsight.daemon.impl.HighlightInfo) FlexUnitLibs(com.intellij.flex.util.FlexUnitLibs) CssDialect(com.intellij.lang.css.CssDialect) DaemonCodeAnalyzer(com.intellij.codeInsight.daemon.DaemonCodeAnalyzer) CssNoGenericFontNameInspection(com.intellij.psi.css.inspections.bugs.CssNoGenericFontNameInspection) XmlNSDescriptorImpl(com.intellij.xml.impl.dtd.XmlNSDescriptorImpl) ModuleType(com.intellij.openapi.module.ModuleType) CssBundle(com.intellij.psi.css.CssBundle) JSUnusedLocalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection) PropertiesBundle(com.intellij.lang.properties.PropertiesBundle) FileTemplateManager(com.intellij.ide.fileTemplates.FileTemplateManager) JSResolveUtil(com.intellij.lang.javascript.psi.resolve.JSResolveUtil) StringUtil(com.intellij.openapi.util.text.StringUtil) FlexSchemaHandler(com.intellij.javascript.flex.mxml.schema.FlexSchemaHandler) XmlNSDescriptor(com.intellij.xml.XmlNSDescriptor) IOException(java.io.IOException) Target(java.lang.annotation.Target) JSPsiImplUtils(com.intellij.lang.javascript.psi.impl.JSPsiImplUtils) Sdk(com.intellij.openapi.projectRoots.Sdk) File(java.io.File) JarFileSystem(com.intellij.openapi.vfs.JarFileSystem) FileTemplateUtil(com.intellij.ide.fileTemplates.FileTemplateUtil) XmlAttributeDescriptor(com.intellij.xml.XmlAttributeDescriptor) LocalInspectionTool(com.intellij.codeInspection.LocalInspectionTool) JSFunctionsSearch(com.intellij.lang.javascript.search.JSFunctionsSearch) DaemonCodeAnalyzerImpl(com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl) CssUnknownTargetInspection(com.intellij.psi.css.inspections.invalid.CssUnknownTargetInspection) VfsRootAccess(com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess) JSMethodCanBeStaticInspection(com.intellij.lang.javascript.inspections.JSMethodCanBeStaticInspection) EXTENSION_POINT_NAME(com.intellij.codeInsight.daemon.impl.HighlightInfoFilter.EXTENSION_POINT_NAME) TargetPlatform(com.intellij.flex.model.bc.TargetPlatform) SpellCheckingInspection(com.intellij.spellchecker.inspections.SpellCheckingInspection) FlexStylesIndexableSetContributor(com.intellij.javascript.flex.css.FlexStylesIndexableSetContributor) CssDialectMappings(com.intellij.lang.css.CssDialectMappings) Disposer(com.intellij.openapi.util.Disposer) FlexCSSDialect(com.intellij.javascript.flex.css.FlexCSSDialect) XmlAttributeValue(com.intellij.psi.xml.XmlAttributeValue) Method(java.lang.reflect.Method) ReferencesSearch(com.intellij.psi.search.searches.ReferencesSearch) DumbService(com.intellij.openapi.project.DumbService) XmlUnusedNamespaceInspection(com.intellij.codeInsight.daemon.impl.analysis.XmlUnusedNamespaceInspection) FlexUnitTestCreator(com.intellij.lang.javascript.flex.flexunit.FlexUnitTestCreator) CssInvalidFunctionInspection(com.intellij.psi.css.inspections.invalid.CssInvalidFunctionInspection) FlexBundle(com.intellij.lang.javascript.flex.FlexBundle) LocalFileSystem(com.intellij.openapi.vfs.LocalFileSystem) VfsUtilCore.convertFromUrl(com.intellij.openapi.vfs.VfsUtilCore.convertFromUrl) ApplicationManager(com.intellij.openapi.application.ApplicationManager) CssNegativeValueInspection(com.intellij.psi.css.inspections.CssNegativeValueInspection) IntentionAction(com.intellij.codeInsight.intention.IntentionAction) FlexMxmlNSDescriptor(com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor) com.intellij.psi(com.intellij.psi) NotNull(org.jetbrains.annotations.NotNull) FlexBuildConfigurationManager(com.intellij.lang.javascript.flex.projectStructure.model.FlexBuildConfigurationManager) JSInheritanceUtil(com.intellij.lang.javascript.psi.resolve.JSInheritanceUtil) Ref(com.intellij.openapi.util.Ref) CssUnusedSymbolInspection(com.intellij.psi.css.inspections.CssUnusedSymbolInspection) NavigationItem(com.intellij.navigation.NavigationItem) CodeInsightTestUtil(com.intellij.testFramework.fixtures.CodeInsightTestUtil) OutputType(com.intellij.flex.model.bc.OutputType) WriteAction(com.intellij.openapi.application.WriteAction) FlexModuleType(com.intellij.lang.javascript.flex.FlexModuleType) NonNls(org.jetbrains.annotations.NonNls) ContainerUtil(com.intellij.util.containers.ContainerUtil) XmlPathReferenceInspection(com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection) ExpectedHighlightingData(com.intellij.testFramework.ExpectedHighlightingData) Retention(java.lang.annotation.Retention) FileEditorManager(com.intellij.openapi.fileEditor.FileEditorManager) com.intellij.openapi.roots(com.intellij.openapi.roots) CssUnitlessNumberInspection(com.intellij.psi.css.inspections.bugs.CssUnitlessNumberInspection) RenameProcessor(com.intellij.refactoring.rename.RenameProcessor) ImplementationSearcher(com.intellij.codeInsight.navigation.ImplementationSearcher) BadExpressionStatementJSInspection(com.sixrr.inspectjs.validity.BadExpressionStatementJSInspection) FlexTestUtils(com.intellij.flex.util.FlexTestUtils) InjectedLanguageUtil(com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil) OpenFileDescriptor(com.intellij.openapi.fileEditor.OpenFileDescriptor) CodeInsightTestFixtureImpl(com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl) JSFieldCanBeLocalInspection(com.intellij.lang.javascript.inspections.actionscript.JSFieldCanBeLocalInspection) VfsUtilCore(com.intellij.openapi.vfs.VfsUtilCore) XmlAttribute(com.intellij.psi.xml.XmlAttribute) JSDialectSpecificHandlersFactory(com.intellij.lang.javascript.dialects.JSDialectSpecificHandlersFactory) com.intellij.lang.javascript.psi(com.intellij.lang.javascript.psi) FileDocumentManager(com.intellij.openapi.fileEditor.FileDocumentManager) JSUntypedDeclarationInspection(com.intellij.lang.javascript.inspections.actionscript.JSUntypedDeclarationInspection) ElementType(java.lang.annotation.ElementType) BuildConfigurationNature(com.intellij.flex.model.bc.BuildConfigurationNature) JSClassResolver(com.intellij.lang.javascript.psi.resolve.JSClassResolver) SdkModificator(com.intellij.openapi.projectRoots.SdkModificator) CssInvalidElementInspection(com.intellij.psi.css.inspections.CssInvalidElementInspection) CssInvalidPropertyValueInspection(com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection) RetentionPolicy(java.lang.annotation.RetentionPolicy) CssUnknownPropertyInspection(com.intellij.psi.css.inspections.CssUnknownPropertyInspection) Sdk(com.intellij.openapi.projectRoots.Sdk)

Example 2 with CssUnknownPropertyInspection

use of com.intellij.psi.css.inspections.CssUnknownPropertyInspection 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 3 with CssUnknownPropertyInspection

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

the class FlexHighlightingTest method testSwitchToFlexCssQuickFix2.

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

Example 4 with CssUnknownPropertyInspection

use of com.intellij.psi.css.inspections.CssUnknownPropertyInspection 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)

Example 5 with CssUnknownPropertyInspection

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

the class FlexHighlightingTest method testSwitchToClassicCssQuickFix2.

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

Aggregations

CssUnknownPropertyInspection (com.intellij.psi.css.inspections.CssUnknownPropertyInspection)5 CssInvalidPropertyValueInspection (com.intellij.psi.css.inspections.invalid.CssInvalidPropertyValueInspection)3 DaemonCodeAnalyzer (com.intellij.codeInsight.daemon.DaemonCodeAnalyzer)1 DaemonCodeAnalyzerImpl (com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl)1 HighlightInfo (com.intellij.codeInsight.daemon.impl.HighlightInfo)1 HighlightInfoFilter (com.intellij.codeInsight.daemon.impl.HighlightInfoFilter)1 EXTENSION_POINT_NAME (com.intellij.codeInsight.daemon.impl.HighlightInfoFilter.EXTENSION_POINT_NAME)1 XmlPathReferenceInspection (com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection)1 XmlUnusedNamespaceInspection (com.intellij.codeInsight.daemon.impl.analysis.XmlUnusedNamespaceInspection)1 IntentionAction (com.intellij.codeInsight.intention.IntentionAction)1 ImplementationSearcher (com.intellij.codeInsight.navigation.ImplementationSearcher)1 LocalInspectionTool (com.intellij.codeInspection.LocalInspectionTool)1 BuildConfigurationNature (com.intellij.flex.model.bc.BuildConfigurationNature)1 OutputType (com.intellij.flex.model.bc.OutputType)1 TargetPlatform (com.intellij.flex.model.bc.TargetPlatform)1 ActionScriptDaemonAnalyzerTestCase (com.intellij.flex.util.ActionScriptDaemonAnalyzerTestCase)1 FlexTestUtils (com.intellij.flex.util.FlexTestUtils)1 FlexUnitLibs (com.intellij.flex.util.FlexUnitLibs)1 FileTemplateManager (com.intellij.ide.fileTemplates.FileTemplateManager)1 FileTemplateUtil (com.intellij.ide.fileTemplates.FileTemplateUtil)1