Skip to content

Instantly share code, notes, and snippets.

@anshumanatri
Created March 9, 2009 09:19
Show Gist options
  • Save anshumanatri/76187 to your computer and use it in GitHub Desktop.
Save anshumanatri/76187 to your computer and use it in GitHub Desktop.
package com.sap.polestar.eclipse.ui.wizards;
import org.eclipse.jface.viewers.IStructuredSelection;
import com.adobe.flexbuilder.editors.common.ui.wizards.AbstractNewFlexFileWizardPage;
import com.adobe.flexbuilder.editors.mxml.ui.wizards.NewMXMLComponentWizard;
public class PolestarFileWizard extends NewMXMLComponentWizard
{
protected class PolestarFileWizardPage extends NewMXMLComponentWizard.NewMXMLComponentWizardPage
{
public PolestarFileWizardPage(String pageName, IStructuredSelection selection)
{
super(pageName, selection);
}
@Override
protected String getFileContents()
{
return str;
}
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=\"New Polestar Page\"/>\n" +
"</mx:Application>\n";
}
@Override
protected AbstractNewFlexFileWizardPage createMainWizardPage(
String pageName, IStructuredSelection selection)
{
NewMXMLComponentWizardPage page = new PolestarFileWizardPage(pageName, selection);
org.eclipse.core.resources.IContainer container = getContainerFromSelection(selection);
if(container != null)
page.setContainerFullPath(container);
return page;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment