tags:

views:

552

answers:

1

When developing Flex projects, Eclipse gives warnings about the default index.html file generated by Flex Builder. The file is in the 'target' folder (or "generated artifacts" folder. Yes, I'm also using Maven). Can I eliminate or disable this warning?

The code which generates the warning is below, though I would definitely prefer not changing the html - as I say this is the template suggested by Adobe. Eclipse warns of "Undefined attribute name (xxx)" for scroll on the body tag, and most of the embed attributes.

There is no DOCTYPE declaration in the html file.

<html lang="en">
...
<body scroll="no">
...

    <embed src="myswf.swf" quality="high" bgcolor="#869ca7"
         width="100%" height="100%" name="myswf-flex" align="middle"
         play="true"
         loop="false"
         quality="high"
         allowScriptAccess="sameDomain"
         type="application/x-shockwave-flash"
         pluginspage="http://www.adobe.com/go/getflashplayer"&gt;
    </embed>
...
+1  A: 

There are a few options. The simplest way is to filter the target folder from the package explorer.

On the Package Explorer view there is a little downwards pointing triangle on the top right of the view (with tooltip View Menu), Click on that and select Filters.... On the dialog check Name filter patterns (matching items will be hidden): and type target in the field. The target folder should now be hidden and errors for the target folder suppressed.

A few other alternatives to try: On the Problems view, select the View Menu triangle and select Configure Contents.

In the dialog, you can:

  1. Uncheck the HTML Problem item in the Types list. Obviously this disables all HTML problems which isn't great.
  2. In the Scope section, select On working set:. To create a new working set, choose Select..., create a new working set for the project that includes everything except target.
Rich Seller
I'm hoping there's a global validation filter based on directory. I can set the scope filter (your option #2) which hides 'target' warnings in the Problems view, but icon overlays in both Navigator and Explorer still show the warning up the directory structure to the basdir. Based on that I expect setting filters on the Navigator or Explorer would only apply to that view. It's a good start though. --Note, I'm unable to set Navigator filters, but that may be a new Eclipse 3.5.x (galileo) feature (I'm on 3.4.x, ganymede).
Chadwick