|
Lines 27-32
Link Here
|
| 27 |
import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer; |
27 |
import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer; |
| 28 |
import org.eclipse.jdt.ui.IJavaElementSearchConstants; |
28 |
import org.eclipse.jdt.ui.IJavaElementSearchConstants; |
| 29 |
import org.eclipse.jdt.ui.JavaUI; |
29 |
import org.eclipse.jdt.ui.JavaUI; |
|
|
30 |
import org.eclipse.jface.dialogs.IDialogSettings; |
| 30 |
import org.eclipse.jface.viewers.IStructuredSelection; |
31 |
import org.eclipse.jface.viewers.IStructuredSelection; |
| 31 |
import org.eclipse.jface.window.Window; |
32 |
import org.eclipse.jface.window.Window; |
| 32 |
import org.eclipse.jface.wizard.WizardDialog; |
33 |
import org.eclipse.jface.wizard.WizardDialog; |
|
Lines 64-70
Link Here
|
| 64 |
|
65 |
|
| 65 |
private static final String F_FILE_EXTENSION = "xml"; //$NON-NLS-1$ |
66 |
private static final String F_FILE_EXTENSION = "xml"; //$NON-NLS-1$ |
| 66 |
|
67 |
|
| 67 |
private static final String F_COMPONENT_NAME = "component.xml"; //$NON-NLS-1$ |
68 |
private static final String F_DEFAULT_COMPONENT_NAME = "component.xml"; //$NON-NLS-1$ |
|
|
69 |
|
| 70 |
private static final String S_COMPONENT_NAME = "component"; //$NON-NLS-1$ |
| 68 |
|
71 |
|
| 69 |
private Group fGroup; |
72 |
private Group fGroup; |
| 70 |
|
73 |
|
|
Lines 93-99
Link Here
|
| 93 |
setDescription(Messages.DSFileWizardPage_description); |
96 |
setDescription(Messages.DSFileWizardPage_description); |
| 94 |
// Force the file extension to be 'xml' |
97 |
// Force the file extension to be 'xml' |
| 95 |
setFileExtension(F_FILE_EXTENSION); |
98 |
setFileExtension(F_FILE_EXTENSION); |
| 96 |
setFileName(F_COMPONENT_NAME); |
|
|
| 97 |
} |
99 |
} |
| 98 |
|
100 |
|
| 99 |
private void setComponentName() { |
101 |
private void setComponentName() { |
|
Lines 134-139
Link Here
|
| 134 |
} |
136 |
} |
| 135 |
|
137 |
|
| 136 |
protected void createAdvancedControls(Composite parent) { |
138 |
protected void createAdvancedControls(Composite parent) { |
|
|
139 |
IDialogSettings settings = getDialogSettings(); |
| 140 |
if (settings != null) { |
| 141 |
String component = settings.get(S_COMPONENT_NAME); |
| 142 |
if (component != null && !component.equals("")) { |
| 143 |
setFileName(component); |
| 144 |
} else { |
| 145 |
setFileName(F_DEFAULT_COMPONENT_NAME); |
| 146 |
} |
| 147 |
} else { |
| 148 |
setFileName(F_DEFAULT_COMPONENT_NAME); |
| 149 |
} |
| 137 |
|
150 |
|
| 138 |
// Controls Group |
151 |
// Controls Group |
| 139 |
fGroup = new Group(parent, SWT.NONE); |
152 |
fGroup = new Group(parent, SWT.NONE); |
|
Lines 312-315
Link Here
|
| 312 |
return checkPageComplete(); |
325 |
return checkPageComplete(); |
| 313 |
} |
326 |
} |
| 314 |
|
327 |
|
|
|
328 |
public void saveSettings(IDialogSettings settings) { |
| 329 |
settings.put(S_COMPONENT_NAME, getFileName()); |
| 330 |
|
| 331 |
} |
| 332 |
|
| 333 |
|
| 334 |
|
| 315 |
} |
335 |
} |