Created
March 9, 2009 09:19
-
-
Save anshumanatri/76187 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
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