Import / Export Existing Projects in FDT (Eclipse)
I’ve been using FDT for awhile, and convinced the project manager on a new job to purchase licenses for the whole team. I’d not used FDT in a team environment before, let alone with FDT / Eclipse noobs. That makes me the de-facto expert, and I was asked how to import a project I sent over. I’d assumed there was just a menu item for that, or it was a google-able thing. Well, you know what they say about assumptions.
I’m going to include export directions for completeness, but I imagine you could just zip up the whole project folder and get away with it in many cases. Using the export feature will capture source libraries located outside the project folder in your filesystem hierarchy and give you the opportunity to select/deselect the ones you specifically want included/excluded. With great power comes great responsibility!
Exporting
- Right-click your project in the Flash Explorer. Choose “Export…”
- Choose General >> File System
- Click Next.
- Choose a directory to export to. A top-level folder will be created within it having a name matching the project name.
- Deselect any libraries (etc) you specifically want to exclude from the project tree. Coordinate with your team members!
- Click Finish.
That covers exporting the project and any source libraries you want to package with it. One thing remaining — the launch configuration(s) — those settings cover what classes get compiled into what swf files, custom compiler arguments, etc.
- Right-click your project in the Flash Explorer. Choose “Export…”
- Choose Run / Debug >> Launch Configurations
- Click Next.
- (Your choices here depend on how you’ve been using FDT.) Expand “FDT AS3 Application” and select the appropriate file(s).
- Browse to the same folder you selected in step 4 of the project export process above.
Importing
Before you begin, especially if you’re following along and you’ve just done this on your own machine, be sure you don’t have an existing project with the same name as the one you’ll be importing. Eclipse will complain: Some projects were hidden because they exist in the workspace directory. To change it:
- Make sure the project is open. (You can’t rename a closed project)
- Right click the conflicting project.
- Enter a new name.
- Click OK.
Eclipse will do all the hard stuff for you.
Now to do the actual importing.
- File Menu >> Import
- General >> Existing Projects into Workspace
- Click Next
- Browse to the exported project folder and select it.
- Eclipse will list all the projects it finds within. Verify the one(s) you want is/are checked.
- Personally, I check off “Copy projects into workspace” at the bottom. Make sure you don’t have any conflicting projects with the same name. See above. It’s helpful to understand Eclipse workspaces when deciding which is best for you.
- You should now have a new project in your workspace.
- Ideally everyone on the team will want to use the same project name. Change it using the instructions above.
- Project Menu >> Clean…
Import your Run Configuration file using the same steps, but you’ll probably want to read the next section first.
Mangled Run Configurations
If you don’t do this, you will likely have problems with your Run Configurations and have no easy way to fix them or any reasonable explanation what’s wrong (Null Pointer Exception). For your reference, the original launch configuration files are located in:
{workspace}/.metadata/.plugins/org.eclipse.debug.core/.launches/{PROJECT_NAME}.launch
Edit the line that reads: <stringAttribute key=”PROJECT_NAME” value=”MODIFY_ME”/>
I really wish this were part of the project export…
Comments on this article are particularly encouraged. If you find a better technique or an inaccuracy, please let me know!
Thanks for sharing. Your wishes might become true! The FDT team has taken note 😉
If you have any further requests, feel free to post them or vote your favorite one on http://bugs.powerflasher.com/
Great article. I have a related question:
Let’s say I received a large AS3 Flash Pro project from someone else via their svn. I want to begin working with this project in FDT. What is the process?It seems like creating a new project isn’t what I want because it tries to make new folders and/or files, but everything was already created by someone else and I don’t want anything new made. I tried “importing” a preexisting project, but it seemed to be looking for an FDT project file which I don’t have since this project was made by someone else (using who-knows what workflow).
Any help would be greatly appreciated!! Thanks ahead of time…
@NateJC – Great question — to which I don’t have a clear answer. I tend to set up a new project, and then copy the class files etc in manually. SVN is a huge wrinkle, naturally — it can be a huge mess if you change the file paths and then want to re-commit to the SVN repository.
I don’t know of a way to automatically convert FlashBuilder or FlashDevelop project files to FDT, but doing it manually isn’t impossible. The biggest hassle is managing SWCs and classpaths etc. So it’s pretty important to get the other developer to document as much of that as possible.