44
44
import org .eclipse .jdt .internal .ui .wizards .dialogfields .IDialogFieldListener ;
45
45
import org .eclipse .jdt .internal .ui .wizards .dialogfields .IStringButtonAdapter ;
46
46
import org .eclipse .jdt .internal .ui .wizards .dialogfields .LayoutUtil ;
47
- import org .eclipse .jdt .internal .ui .wizards .dialogfields .SelectionButtonDialogFieldGroup ;
48
47
import org .eclipse .jdt .internal .ui .wizards .dialogfields .Separator ;
49
48
import org .eclipse .jdt .internal .ui .wizards .dialogfields .StringButtonDialogField ;
50
49
import org .eclipse .jdt .internal .ui .wizards .dialogfields .StringDialogField ;
55
54
import org .eclipse .swt .SWT ;
56
55
import org .eclipse .swt .layout .GridLayout ;
57
56
import org .eclipse .swt .widgets .Composite ;
58
- import org .eclipse .swt .widgets .Control ;
59
57
import org .eclipse .swt .widgets .Text ;
60
58
import org .eclipse .ui .dialogs .ElementListSelectionDialog ;
61
59
@@ -74,10 +72,12 @@ public class NewHostPageWizardPage extends WizardPage {
74
72
private class HostPageFieldAdapter implements IDialogFieldListener ,
75
73
IModulesChangeListener {
76
74
75
+ @ Override
77
76
public void dialogFieldChanged (DialogField field ) {
78
77
validateFields ();
79
78
}
80
79
80
+ @ Override
81
81
public void onModulesChanged () {
82
82
validateFields ();
83
83
}
@@ -86,6 +86,7 @@ public void onModulesChanged() {
86
86
private class PathFieldAdapter extends HostPageFieldAdapter implements
87
87
IStringButtonAdapter {
88
88
89
+ @ Override
89
90
public void changeControlPressed (DialogField field ) {
90
91
IPath path = choosePath (new Path (pathField .getText ()));
91
92
if (path != null ) {
@@ -97,6 +98,7 @@ public void changeControlPressed(DialogField field) {
97
98
private class ProjectFieldAdapter extends HostPageFieldAdapter implements
98
99
IStringButtonAdapter {
99
100
101
+ @ Override
100
102
public void changeControlPressed (DialogField field ) {
101
103
IJavaProject jproject = chooseProject ();
102
104
if (jproject != null ) {
@@ -110,8 +112,6 @@ public void changeControlPressed(DialogField field) {
110
112
111
113
private StringDialogField fileNameField ;
112
114
113
- private SelectionButtonDialogFieldGroup hostPageElementsButtons ;
114
-
115
115
private IPath hostPagePath ;
116
116
117
117
private IProject hostPageProject ;
@@ -149,13 +149,9 @@ protected NewHostPageWizardPage() {
149
149
150
150
modulesBlock = new EntryPointModulesSelectionBlock ("Modules:" ,
151
151
new HostPageFieldAdapter ());
152
-
153
- String [] buttonNames = new String [] {"Support for browser history (Back, Forward, bookmarks)" };
154
- hostPageElementsButtons = new SelectionButtonDialogFieldGroup (SWT .CHECK ,
155
- buttonNames , 1 );
156
- hostPageElementsButtons .setLabelText ("Which elements do you want to include in your page?" );
157
152
}
158
153
154
+ @ Override
159
155
public void createControl (Composite parent ) {
160
156
initializeDialogUnits (parent );
161
157
Composite composite = new Composite (parent , SWT .NONE );
@@ -172,7 +168,6 @@ public void createControl(Composite parent) {
172
168
173
169
createFileNameControls (composite , columns );
174
170
createModulesComponent (composite , columns );
175
- createPageElementsControls (composite , columns );
176
171
}
177
172
178
173
public String getFileName () {
@@ -208,16 +203,10 @@ public void init(IResource selection) {
208
203
initModules (selection );
209
204
}
210
205
211
- setPageElementsSelection (true );
212
-
213
206
// Validate the initial field values
214
207
validateFields ();
215
208
}
216
209
217
- public boolean isHistorySupportIncluded () {
218
- return hostPageElementsButtons .isSelected (0 );
219
- }
220
-
221
210
@ Override
222
211
public void setVisible (boolean visible ) {
223
212
super .setVisible (visible );
@@ -286,16 +275,6 @@ private void createModulesComponent(Composite parent, int columns) {
286
275
modulesBlock .doFillIntoGrid (parent , columns );
287
276
}
288
277
289
- private void createPageElementsControls (Composite composite , int nColumns ) {
290
- Control labelControl = hostPageElementsButtons .getLabelControl (composite );
291
- LayoutUtil .setHorizontalSpan (labelControl , nColumns );
292
-
293
- DialogField .createEmptySpace (composite );
294
-
295
- Control buttonGroup = hostPageElementsButtons .getSelectionButtonsGroup (composite );
296
- LayoutUtil .setHorizontalSpan (buttonGroup , nColumns - 1 );
297
- }
298
-
299
278
private void createPathControls (Composite composite , int columns ) {
300
279
pathField .doFillIntoGrid (composite , columns );
301
280
setFieldWidthHint (pathField );
@@ -383,10 +362,6 @@ private void setFocus() {
383
362
fileNameField .setFocus ();
384
363
}
385
364
386
- private void setPageElementsSelection (boolean historySupport ) {
387
- hostPageElementsButtons .setSelection (0 , historySupport );
388
- }
389
-
390
365
private void updateModulesIfProjectChanged () {
391
366
if (hostPageProject != null ) {
392
367
if (hostPageProject != null
0 commit comments