Issue Details (XML | Word | Printable)

Key: FDT-2511
Type: Featurerequest Featurerequest
Status: Confirmed Confirmed
Resolution: Won't Fix
Priority: Major Major
Assignee: FDT Team
Reporter: Tim van den Eijnden
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FDT

Ignore parsing files

Created: 04/Jan/12 08:55 AM   Updated: 11/Jul/12 03:33 PM
Component/s: Editor (Deprecated), Parser
Affects Version/s: FDT 5.0
Fix Version/s: FDT
Security Level: public

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. Include 2.jpg
(165 kB)

2. Using Include.jpg
(148 kB)
Issue Links:
Duplicate
 

Review Type: Review by Product Owner


 Description  « Hide
We have an advanced build process where our projects are build on a windows server and this includes updating the version in each SWF compiled.
This is done by replacing a string in a file which is included in the main actionscript file of the project.
The include self is not the problem but parsing the file that's being included causes the problems. The file (version.inc.as) only contains the following line:

public static const VERSION:String = "@VERSION@";

The parser cannot parse this file and wrapping the line in /FDT_IGNORE/ tags does not work. So I'd like to ignore this file completely. A change in a configuration file of the project will do.
We're currently trying FDT5 for 30 days, we had no problems with this using Adobe Flash Builder 4.6.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Alan K (Deprecated) added a comment - 04/Jan/12 05:14 PM
Hey Tim,

There's a lot going on here. I'll start with a solution for you....

Take a look at the screenshot I posted. Here I'm successfully using the 'include' directive to add a property to 'Main.as'. The two keys are:

1) Both times I have to use the /FDT_IGNORE/ syntax in both linking and when making any reference to code therein.

2) I put the include file in a folder that is not on the source path.

There is another option which is the 2nd screenshot. Here I create a souce folder but tell FDT to not generate problems for the folder.

What's going on is that when an '.as' file is placed in a FDT source folder, FDT will assume that it is a Class and will mark anything not matching valid AS3 Class syntax will be flagged with having errors. This is why even when you add the /FDT_IGNORE/ syntax to the file you described, FDT still flags it as an error - it's expecting it to follow an AS3 Class structure.

As far as the feature request for ignoring files...
I think the best thing to do here is to focus on what the issue is at hand - which is using includes and having '.as' files be on the source path that are not classes.

We have requests for supporting includes (I just linked the tickets) and that is unlikely to be added to FDT in the near future (due to the complexity).

The other is having '.as' files on the source path that are not classes. That is a good idea for a feature request and I will create a ticket for that. It could simply be named a 'Actionscript File' and never be parsed.

Flash Builder sort of supports includes (try using auto complete to add an event listener within the include file) but really relies on the feedback from the compiler in order to provide feedback / errors when using includes. This is because it does not have a comprehensive parser (instead relying on a compile) and why the dev process for large projects can really be painfull.

There's plus and minuse to both approaches and when it comes to this specific feature request, I think a good comprimse would be the option to have non parsed 'Actionscript Files' available on the source path.

Your thoughts?


Alan K (Deprecated) added a comment - 04/Jan/12 05:15 PM
Another option for using includes.

Alan K (Deprecated) added a comment - 04/Jan/12 05:30 PM - edited
I'm closing this ticket and creating a new one. This was a bug but is now a feature request.

Alan K (Deprecated) added a comment - 04/Jan/12 05:31 PM - edited
I'm moving the issue Please vote and follow up here if this new ticket is helpful. Otherwise comment here.

Tim van den Eijnden added a comment - 09/Jan/12 08:55 AM
We've solved this problem the the following way:
We created a new file called: VERSION (no extension) it won't be parsed by FDT.
We don't include it but embed it, we now have access to the contents of the file.

This way there won't be any errors in FDT + this is a more elegant solution.


Alan K (Deprecated) added a comment - 09/Jan/12 07:48 PM
Good idea Tim. I'll suggest this in the future.