Created
March 9, 2009 09:14
-
-
Save anshumanatri/76185 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomFlexProjectWizard extends FlexProjectWizard | |
{ | |
//override to add custom stuff. | |
@Override | |
public boolean performFinish() | |
{ | |
boolean retSuper = super.performFinish(); | |
addSomeStuff(); | |
return retSuper; | |
} | |
//open the main.mxml file created and add the necessary contents. | |
private void addSomeStuff() | |
{ | |
try | |
{ | |
IPath path = getCurrentProjectLocation(); | |
path = getMainFilePath(); | |
File f = path.toFile(); | |
PrintWriter pr = new PrintWriter(f); | |
pr.write(str); | |
pr.flush(); | |
pr.close(); | |
this.project.getMainApplication().refreshLocal(0, null); | |
} | |
catch(Exception ex) | |
{ | |
ex.printStackTrace(); | |
} | |
} | |
String str = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + | |
"<mx:Application xmlns:mx=\"http://www.adobe.com/2006/mxml\"" + | |
"layout=\"absolute\">\n" + | |
"<mx:Label text=\"Hello Polestar\"/>\n" + | |
"</mx:Application>\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment