1 11 package org.eclipse.team.internal.ui.wizards; 12 13 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.jface.wizard.IWizard; 16 import org.eclipse.jface.wizard.IWizardNode; 17 import org.eclipse.swt.graphics.Point; 18 import org.eclipse.team.internal.ui.Policy; 19 20 24 public class ConfigurationWizardNode implements IWizardNode { 25 ConfigurationWizardElement element; 27 IWizard wizard; 29 30 35 public ConfigurationWizardNode(ConfigurationWizardElement element) { 36 this.element = element; 37 } 38 41 public void dispose() { 42 if (wizard != null) { 43 wizard.dispose(); 44 wizard = null; 45 } 46 } 47 50 public Point getExtent() { 51 return new Point(-1, -1); 52 } 53 56 public IWizard getWizard() { 57 if (wizard == null) { 58 try { 59 wizard = (IWizard)element.createExecutableExtension(); 60 } catch (CoreException e) { 61 System.out.println(Policy.bind("ConfigurationWizard.exceptionCreatingWizard")); } 63 } 64 return wizard; 65 } 66 69 public boolean isContentCreated() { 70 return wizard != null; 71 } 72 } 73 | Popular Tags |