4242import org .eclipse .ui .INewWizard ;
4343import org .eclipse .ui .IWorkbench ;
4444import org .eclipse .ui .forms .widgets .FormText ;
45- import org .eclipse .ui .forms .widgets .ScrolledFormText ;
4645import org .slf4j .Logger ;
4746import org .slf4j .LoggerFactory ;
4847
@@ -70,7 +69,6 @@ public class NewWorkspaceWizard extends Wizard implements IImportWizard, INewWiz
7069 final UI <Model > ui ;
7170 final NewWorkspaceWizardPage page = new NewWorkspaceWizardPage ();
7271 final FragmentTemplateEngine templates ;
73- private ScrolledFormText txtDescription ;
7472
7573 final static Image verified = Icons .image ("icons/tick.png" , false );
7674 final static Image verifiedGreyedOut = new Image (Display .getDefault (), verified , SWT .IMAGE_DISABLE );
@@ -155,11 +153,12 @@ class NewWorkspaceWizardPage extends WizardPage {
155153 NewWorkspaceWizardPage () {
156154 super ("New Workspace" );
157155 setTitle ("Create New Workspace" );
158- setDescription ("Specify the workspace details." );
156+ setDescription ("Specify the workspace details and select the template fragments to apply ." );
159157 }
160158
161159 @ Override
162160 public void createControl (Composite parent ) {
161+
163162 Composite container = new Composite (parent , SWT .NONE );
164163 setControl (container );
165164 container .setLayout (new GridLayout (8 , false ));
@@ -272,19 +271,19 @@ public Image getImage(Object element) {
272271
273272
274273 tableLayout .addColumnData (new ColumnWeightData (1 , 150 , false ));
275- tableLayout .addColumnData (new ColumnWeightData (10 , 200 , true ));
276- tableLayout .addColumnData (new ColumnWeightData (20 , 80 , true ));
274+ tableLayout .addColumnData (new ColumnWeightData (10 , 400 , true ));
275+ tableLayout .addColumnData (new ColumnWeightData (20 , 100 , true ));
277276
278277 Button addButton = new Button (container , SWT .PUSH );
279278 addButton .setText ("+" );
280279 addButton .setLayoutData (new GridData (SWT .LEFT , SWT .TOP , false , false , 2 , 1 ));
280+ addButton .setToolTipText ("Add entry via URI to a template repo index.bnd" );
281281
282- txtDescription = new ScrolledFormText (container , SWT .V_SCROLL | SWT .H_SCROLL , false );
283- FormText formText = new FormText (txtDescription , SWT .NO_FOCUS );
284- txtDescription .setFormText (formText );
285- formText .setText ("Double click to open the Github-Repo in your browser." , false , false );
286-
282+ FormText formText = new FormText (container , SWT .NO_FOCUS | SWT .FILL );
283+ formText .setText ("Double click to open the fragment template Github-Repo in your browser." , false , false );
284+ formText .setLayoutData (new GridData (SWT .FILL , SWT .CENTER , true , false , 6 , 1 ));
287285
286+ model .updateWorkspace (true );
288287 ui .u ("location" , model .location , UI .text (location )
289288 .map (File ::getAbsolutePath , File ::new ));
290289 ui .u ("clean" , model .clean , UI .checkbox (clean ));
@@ -293,7 +292,8 @@ public Image getImage(Object element) {
293292 .bind (v -> browseButton .setEnabled (!v ))
294293 .bind (v -> switchWorkspace .setEnabled (!v ))
295294 .bind (v -> clean .setEnabled (!v ))
296- .bind (v -> setTitle (v ? "Update Workspace" : "Create New Workspace" ))
295+ .bind (v -> setTitle (
296+ v ? "Update Workspace with template fragment" : "Create New Workspace from template fragment" ))
297297 .bind (v -> setWindowTitle (v ? "Update Workspace" : "Create New Workspace" ));
298298
299299 ui .u ("valid" , model .valid , this ::setErrorMessage );
@@ -308,6 +308,7 @@ public Image getImage(Object element) {
308308 UI .checkbox (browseButton )
309309 .subscribe (this ::browseForLocation );
310310
311+ getShell ().setSize (840 , 480 );
311312 ui .update ();
312313 }
313314
0 commit comments