9

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

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

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).

However:

  • the Problems view still shows the warning and the default css Editor shows the warning, too.
  • I do not want to add /SuppressWarnings/ since the css files are automatically generated with WinLess.

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.

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/

Screenshot that shows the warnings and the Problem view (click to enlarge) enter image description here

Stefan
  • 10,010
  • 7
  • 61
  • 117
  • I have the same issue with E(fx)clipse 2.0 Mars. All CSS properties are showing up as warnings in the IDE. I have my CSS under src/main/resources - would love to get a solution to this before rolling the project out to more people. – purring pigeon Aug 14 '15 at 17:00

3 Answers3

8

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

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:

<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

[2] Using JavaFX in JRE 8

Community
  • 1
  • 1
Stefan
  • 10,010
  • 7
  • 61
  • 117
  • Also see this related question for maven projects: https://stackoverflow.com/questions/32565193/how-to-define-access-rules-for-classpath-entries-in-maven-pom-xml-file-for-eclip – Stefan Sep 19 '15 at 11:56
7

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

Screenshot: How locate Option in Problems view

Aldhor
  • 81
  • 1
  • 4
  • 1
    The option disables the css warning in the Problems View. This is very helpful. Unfortunately the warning icons are still present in the package explorer and in the editors. – Stefan Sep 19 '15 at 11:55
  • 1
    This is ok to me, but this is "Xtext ..." at the end of the option list, not "Text .." – pdem Jan 21 '16 at 10:13
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.

  1. Right-click on your project and select Properties
  2. Under Validation, check the Enable project specific settings box.
  3. Scroll down and select Web Resources Validator.
  4. 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.

Maybe you've already tried something like this.

UltraSonja
  • 881
  • 1
  • 20
  • 33
  • 1
    Thank you for your suggestion. I don't have the option "Web Resources Validator". I tried to disable all my Validators in the project specific settings. The warnings are still present. – Stefan Aug 18 '15 at 21:24
  • That's unfortunate, sorry it didn't help. This should start getting more attention as people move from Luna to Mars. – UltraSonja Aug 18 '15 at 21:31