如何禁用Eclipse Mars中的css警告“未知属性”?

时间:2023-01-22 10:47:40

I get many "Unknown property" warnings in my css files.

我的css文件中有很多“未知属性”警告。

This might be due to the fact that I have e(fx)clipse 2.0 and the Eclipse Web Developer Tools installed.

这可能是因为我安装了e(fx)clipse 2.0和Eclipse Web Developer Tools。

If I open the css files with the e(fx)clipse css editor and add /SuppressWarnings/ the warning icon changes its color (see figure below).

如果我用e(fx)clipse css编辑器打开css文件并添加/ SuppressWarnings /警告图标会改变其颜色(见下图)。

However:

然而:

  • the Problems view still shows the warning and the default css Editor shows the warning, too.
  • Problems视图仍显示警告,默认css Editor也显示警告。
  • I do not want to add /SuppressWarnings/ since the css files are automatically generated with WinLess.
  • 我不想添加/ SuppressWarnings /,因为使用WinLess自动生成css文件。

How can I disable the "Unknown property" warnings for specific files or at all?

如何禁用特定文件的“未知属性”警告?

My css files are not located under "src" but under a folder "help". That help folder contains html files for my Eclipse plugin and corresponding css files. =>Those files are not used for JavaFx/e(fx)clipse.

我的css文件不在“src”下,而是在“help”文件夹下。该帮助文件夹包含我的Eclipse插件和相应的css文件的html文件。 =>这些文件不用于JavaFx / e(fx)clipse。

Here is a related article that did not really help me but might give you further information: https://www.eclipse.org/forums/index.php/t/515810/

这篇相关的文章并没有真正帮助我,但可能会为您提供更多信息:https://www.eclipse.org/forums/index.php/t/515810/

Screenshot that shows the warnings and the Problem view (click to enlarge) 如何禁用Eclipse Mars中的css警告“未知属性”?

屏幕截图显示警告和问题视图(点击放大)

3 个解决方案

#1


6  

I filed an e(fx)clipse bug [1] and uninstalled e(fx)clipse for the time being.

我暂时提交了一个e(fx)clipse bug [1]和卸载的e(fx)clipse。

The main reason why I had installed e(fx)clipse at the beginning was to get rid of the access restriction warnings related to jfxrt.jar (also see [2]). Now I use additonal access rules for the JRE container in my classpath file instead of using e(fx)eclipse:

我在开头安装e(fx)clipse的主要原因是为了摆脱与jfxrt.jar相关的访问限制警告(另见[2])。现在我在我的类路径文件中使用JRE容器的附加访问规则,而不是使用e(fx)eclipse:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>       
        <accessrules>
            <accessrule kind="accessible" pattern="javafx/**"/>
            <accessrule kind="accessible" pattern="com/sun/javafx/**"/>         
        </accessrules>  
</classpathentry>

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=475347

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=475347

[2] Using JavaFX in JRE 8

[2]在JRE 8中使用JavaFX

#2


6  

You can go to the Problems View Options, select Show items that match any configuration checked bellow and deselect Xtext Check (fast) Type in all Configurations

您可以转到问题视图选项,选择显示与下面选中的任何配置匹配的项目,并取消选择Xtext检查(快速)键入所有配置

Screenshot: How locate Option in Problems view

屏幕截图:如何在Problems视图中找到Option

#3


0  

I really wish I could comment... So I'm using Luna, where everything works fine. However, I had problems with Angular validation in Luna and figured out a way to work around that. So, maybe this could help you.

我真的希望我能发表评论......所以我正在使用Luna,一切正常。但是,我在Luna中遇到了Angular验证的问题,并找到了解决这个问题的方法。所以,也许这可以帮到你。

  1. Right-click on your project and select Properties
  2. 右键单击项目,然后选择“属性”
  3. Under Validation, check the Enable project specific settings box.
  4. 在“验证”下,选中“启用项目特定设置”框。
  5. Scroll down and select Web Resources Validator.
  6. 向下滚动并选择Web Resources Validator。
  7. If there is an Include Group and it contains File extension: css, try removing it an then re-validating your project. If the rule is not there, then Add Rule into the existing Include Group, or make a new Include Group.
  8. 如果有一个包含组并且它包含文件扩展名:css,请尝试将其删除,然后重新验证您的项目。如果规则不存在,则将规则添加到现有的包含组中,或者创建一个新的包含组。

Maybe you've already tried something like this.

也许你已经尝试过类似的东西。

#1


6  

I filed an e(fx)clipse bug [1] and uninstalled e(fx)clipse for the time being.

我暂时提交了一个e(fx)clipse bug [1]和卸载的e(fx)clipse。

The main reason why I had installed e(fx)clipse at the beginning was to get rid of the access restriction warnings related to jfxrt.jar (also see [2]). Now I use additonal access rules for the JRE container in my classpath file instead of using e(fx)eclipse:

我在开头安装e(fx)clipse的主要原因是为了摆脱与jfxrt.jar相关的访问限制警告(另见[2])。现在我在我的类路径文件中使用JRE容器的附加访问规则,而不是使用e(fx)eclipse:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>       
        <accessrules>
            <accessrule kind="accessible" pattern="javafx/**"/>
            <accessrule kind="accessible" pattern="com/sun/javafx/**"/>         
        </accessrules>  
</classpathentry>

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=475347

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=475347

[2] Using JavaFX in JRE 8

[2]在JRE 8中使用JavaFX

#2


6  

You can go to the Problems View Options, select Show items that match any configuration checked bellow and deselect Xtext Check (fast) Type in all Configurations

您可以转到问题视图选项,选择显示与下面选中的任何配置匹配的项目,并取消选择Xtext检查(快速)键入所有配置

Screenshot: How locate Option in Problems view

屏幕截图:如何在Problems视图中找到Option

#3


0  

I really wish I could comment... So I'm using Luna, where everything works fine. However, I had problems with Angular validation in Luna and figured out a way to work around that. So, maybe this could help you.

我真的希望我能发表评论......所以我正在使用Luna,一切正常。但是,我在Luna中遇到了Angular验证的问题,并找到了解决这个问题的方法。所以,也许这可以帮到你。

  1. Right-click on your project and select Properties
  2. 右键单击项目,然后选择“属性”
  3. Under Validation, check the Enable project specific settings box.
  4. 在“验证”下,选中“启用项目特定设置”框。
  5. Scroll down and select Web Resources Validator.
  6. 向下滚动并选择Web Resources Validator。
  7. If there is an Include Group and it contains File extension: css, try removing it an then re-validating your project. If the rule is not there, then Add Rule into the existing Include Group, or make a new Include Group.
  8. 如果有一个包含组并且它包含文件扩展名:css,请尝试将其删除,然后重新验证您的项目。如果规则不存在,则将规则添加到现有的包含组中,或者创建一个新的包含组。

Maybe you've already tried something like this.

也许你已经尝试过类似的东西。