Code Duplication    Length = 101-108 lines in 6 locations

plugins/DataPropertyMapping/src/main/java/br/ufrj/ppgi/greco/kettle/DataPropertyMappingStepDialog.java 1 location

@@ 229-336 (lines=108) @@
226
		wLangTagOutputFieldName.addSelectionListener(lsDef);
227
	}
228
229
	public String open() {
230
231
		Shell parent = getParent();
232
		Display display = parent.getDisplay();
233
234
		shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
235
		props.setLook(shell);
236
		setShellImage(shell, input);
237
238
		// ModifyListener padrao
239
		ModifyListener lsMod = new ModifyListener() {
240
241
			public void modifyText(ModifyEvent e) {
242
				input.setChanged();
243
			}
244
		};
245
246
		boolean changed = input.hasChanged();
247
248
		FormLayout formLayout = new FormLayout();
249
		formLayout.marginWidth = Const.FORM_MARGIN;
250
		formLayout.marginHeight = Const.FORM_MARGIN;
251
252
		shell.setLayout(formLayout);
253
254
		shell.setText(dialogTitle);
255
256
		int middle = props.getMiddlePct();
257
		int margin = Const.MARGIN;
258
259
		// Adiciona um label e um input text no topo do dialog shell
260
		wlStepname = new Label(shell, SWT.RIGHT);
261
		wlStepname.setText(BaseMessages.getString(PKG, "DataPropertyMappingStep.StepNameField.Label"));
262
		props.setLook(wlStepname);
263
264
		fdlStepname = new FormData();
265
		fdlStepname.left = new FormAttachment(0, 0);
266
		fdlStepname.right = new FormAttachment(middle, -margin);
267
		fdlStepname.top = new FormAttachment(0, margin);
268
		wlStepname.setLayoutData(fdlStepname);
269
270
		wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
271
		wStepname.setText(stepname);
272
		props.setLook(wStepname);
273
274
		wStepname.addModifyListener(lsMod);
275
		fdStepname = new FormData();
276
		fdStepname.left = new FormAttachment(middle, 0);
277
		fdStepname.top = new FormAttachment(0, margin);
278
		fdStepname.right = new FormAttachment(100, 0);
279
		wStepname.setLayoutData(fdStepname);
280
		Control lastControl = wStepname;
281
282
		lastControl = buildContents(lastControl, lsMod);
283
284
		// Bottom buttons
285
		wOK = new Button(shell, SWT.PUSH);
286
		wOK.setText(BaseMessages.getString(PKG, "DataPropertyMappingStep.Btn.OK"));
287
		wCancel = new Button(shell, SWT.PUSH);
288
		wCancel.setText(BaseMessages.getString(PKG, "DataPropertyMappingStep.Btn.Cancel"));
289
		setButtonPositions(new Button[] { wOK, wCancel }, margin, lastControl);
290
291
		// Add listeners
292
		lsCancel = new Listener() {
293
			public void handleEvent(Event e) {
294
				cancel();
295
			}
296
		};
297
		lsOK = new Listener() {
298
			public void handleEvent(Event e) {
299
				ok();
300
			}
301
		};
302
303
		wCancel.addListener(SWT.Selection, lsCancel);
304
		wOK.addListener(SWT.Selection, lsOK);
305
306
		// It closes the window affirmatively when the user press enter in one
307
		// of the text input fields
308
		lsDef = new SelectionAdapter() {
309
			public void widgetDefaultSelected(SelectionEvent e) {
310
				ok();
311
			}
312
		};
313
		wStepname.addSelectionListener(lsDef);
314
		addSelectionListenerToControls(lsDef);
315
316
		// Detect X or ALT-F4 or something that kills this window...
317
		shell.addShellListener(new ShellAdapter() {
318
			public void shellClosed(ShellEvent e) {
319
				cancel();
320
			}
321
		});
322
323
		// Populate the data of the controls
324
		getData();
325
326
		// Set the shell size, based upon previous time...
327
		setSize();
328
329
		input.setChanged(changed);
330
331
		shell.open();
332
		while (!shell.isDisposed()) {
333
			if (!display.readAndDispatch())
334
				display.sleep();
335
		}
336
		return stepname;
337
	}
338
339
	private void getData() {

plugins/SparqlEndpoint/src/main/java/br/ufrj/ppgi/greco/kettle/SparqlStepDialog.java 1 location

@@ 224-331 (lines=108) @@
221
		wPrefixVar.addSelectionListener(lsDef);
222
	}
223
224
	public String open() {
225
226
		Shell parent = getParent();
227
		Display display = parent.getDisplay();
228
229
		shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
230
		props.setLook(shell);
231
		setShellImage(shell, input);
232
233
		// ModifyListener padrao
234
		ModifyListener lsMod = new ModifyListener() {
235
236
			public void modifyText(ModifyEvent e) {
237
				input.setChanged();
238
			}
239
		};
240
		boolean changed = input.hasChanged();
241
242
		FormLayout formLayout = new FormLayout();
243
		formLayout.marginWidth = Const.FORM_MARGIN;
244
		formLayout.marginHeight = Const.FORM_MARGIN;
245
246
		shell.setLayout(formLayout);
247
248
		shell.setText(dialogTitle);
249
250
		int middle = props.getMiddlePct();
251
		int margin = Const.MARGIN;
252
253
		// Adiciona um label e um input text no topo do dialog shell
254
		wlStepname = new Label(shell, SWT.RIGHT);
255
		wlStepname.setText(BaseMessages.getString(PKG, "SparqlStep.StepNameField.Label"));
256
		props.setLook(wlStepname);
257
258
		fdlStepname = new FormData();
259
		fdlStepname.left = new FormAttachment(0, 0);
260
		fdlStepname.right = new FormAttachment(middle, -margin);
261
		fdlStepname.top = new FormAttachment(0, margin);
262
		wlStepname.setLayoutData(fdlStepname);
263
264
		wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
265
		wStepname.setText(stepname);
266
		props.setLook(wStepname);
267
268
		wStepname.addModifyListener(lsMod);
269
		fdStepname = new FormData();
270
		fdStepname.left = new FormAttachment(middle, 0);
271
		fdStepname.top = new FormAttachment(0, margin);
272
		fdStepname.right = new FormAttachment(100, 0);
273
		wStepname.setLayoutData(fdStepname);
274
		Control lastControl = wStepname;
275
276
		// Chama metodo que adiciona os widgets especificos da janela
277
		lastControl = buildContents(lastControl, lsMod);
278
279
		// Bottom buttons
280
		wOK = new Button(shell, SWT.PUSH);
281
		wOK.setText(BaseMessages.getString(PKG, "SparqlStep.Btn.OK")); //$NON-NLS-1$
282
		wCancel = new Button(shell, SWT.PUSH);
283
		wCancel.setText(BaseMessages.getString(PKG, "SparqlStep.Btn.Cancel")); //$NON-NLS-1$
284
		setButtonPositions(new Button[] { wOK, wCancel }, margin, lastControl);
285
286
		// Add listeners
287
		lsCancel = new Listener() {
288
			public void handleEvent(Event e) {
289
				cancel();
290
			}
291
		};
292
		lsOK = new Listener() {
293
			public void handleEvent(Event e) {
294
				ok();
295
			}
296
		};
297
298
		wCancel.addListener(SWT.Selection, lsCancel);
299
		wOK.addListener(SWT.Selection, lsOK);
300
301
		// It closes the window affirmatively when the user press enter in one
302
		// of the text input fields
303
		lsDef = new SelectionAdapter() {
304
			public void widgetDefaultSelected(SelectionEvent e) {
305
				ok();
306
			}
307
		};
308
		wStepname.addSelectionListener(lsDef);
309
		addSelectionListenerToControls(lsDef);
310
311
		// Detect X or ALT-F4 or something that kills this window...
312
		shell.addShellListener(new ShellAdapter() {
313
			public void shellClosed(ShellEvent e) {
314
				cancel();
315
			}
316
		});
317
318
		// Populate the data of the controls
319
		getData();
320
321
		// Set the shell size, based upon previous time...
322
		setSize();
323
324
		input.setChanged(changed);
325
326
		shell.open();
327
		while (!shell.isDisposed()) {
328
			if (!display.readAndDispatch())
329
				display.sleep();
330
		}
331
		return stepname;
332
	}
333
334
	private void getData() {

plugins/GraphSparqlEndpoint/src/main/java/br/ufrj/ppgi/greco/kettle/GraphSparqlStepDialog.java 1 location

@@ 188-295 (lines=108) @@
185
		wDefaultGraph.addSelectionListener(lsDef);
186
	}
187
188
	public String open() {
189
190
		Shell parent = getParent();
191
		Display display = parent.getDisplay();
192
193
		shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
194
		props.setLook(shell);
195
		setShellImage(shell, input);
196
197
		// ModifyListener padrao
198
		ModifyListener lsMod = new ModifyListener() {
199
200
			public void modifyText(ModifyEvent e) {
201
				input.setChanged();
202
			}
203
		};
204
		boolean changed = input.hasChanged();
205
206
		FormLayout formLayout = new FormLayout();
207
		formLayout.marginWidth = Const.FORM_MARGIN;
208
		formLayout.marginHeight = Const.FORM_MARGIN;
209
210
		shell.setLayout(formLayout);
211
212
		shell.setText(dialogTitle);
213
214
		int middle = props.getMiddlePct();
215
		int margin = Const.MARGIN;
216
217
		// Adiciona um label e um input text no topo do dialog shell
218
		wlStepname = new Label(shell, SWT.RIGHT);
219
		wlStepname.setText(BaseMessages.getString(PKG, "GraphSparqlStep.StepNameField.Label"));
220
		props.setLook(wlStepname);
221
222
		fdlStepname = new FormData();
223
		fdlStepname.left = new FormAttachment(0, 0);
224
		fdlStepname.right = new FormAttachment(middle, -margin);
225
		fdlStepname.top = new FormAttachment(0, margin);
226
		wlStepname.setLayoutData(fdlStepname);
227
228
		wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
229
		wStepname.setText(stepname);
230
		props.setLook(wStepname);
231
232
		wStepname.addModifyListener(lsMod);
233
		fdStepname = new FormData();
234
		fdStepname.left = new FormAttachment(middle, 0);
235
		fdStepname.top = new FormAttachment(0, margin);
236
		fdStepname.right = new FormAttachment(100, 0);
237
		wStepname.setLayoutData(fdStepname);
238
		Control lastControl = wStepname;
239
240
		// Chama metodo que adiciona os widgets especificos da janela
241
		lastControl = buildContents(lastControl, lsMod);
242
243
		// Bottom buttons
244
		wOK = new Button(shell, SWT.PUSH);
245
		wOK.setText(BaseMessages.getString(PKG, "GraphSparqlStep.Btn.OK")); //$NON-NLS-1$
246
		wCancel = new Button(shell, SWT.PUSH);
247
		wCancel.setText(BaseMessages.getString(PKG, "GraphSparqlStep.Btn.Cancel")); //$NON-NLS-1$
248
		setButtonPositions(new Button[] { wOK, wCancel }, margin, lastControl);
249
250
		// Add listeners
251
		lsCancel = new Listener() {
252
			public void handleEvent(Event e) {
253
				cancel();
254
			}
255
		};
256
		lsOK = new Listener() {
257
			public void handleEvent(Event e) {
258
				ok();
259
			}
260
		};
261
262
		wCancel.addListener(SWT.Selection, lsCancel);
263
		wOK.addListener(SWT.Selection, lsOK);
264
265
		// It closes the window affirmatively when the user press enter in one
266
		// of the text input fields
267
		lsDef = new SelectionAdapter() {
268
			public void widgetDefaultSelected(SelectionEvent e) {
269
				ok();
270
			}
271
		};
272
		wStepname.addSelectionListener(lsDef);
273
		addSelectionListenerToControls(lsDef);
274
275
		// Detect X or ALT-F4 or something that kills this window...
276
		shell.addShellListener(new ShellAdapter() {
277
			public void shellClosed(ShellEvent e) {
278
				cancel();
279
			}
280
		});
281
282
		// Populate the data of the controls
283
		getData();
284
285
		// Set the shell size, based upon previous time...
286
		setSize();
287
288
		input.setChanged(changed);
289
290
		shell.open();
291
		while (!shell.isDisposed()) {
292
			if (!display.readAndDispatch())
293
				display.sleep();
294
		}
295
		return stepname;
296
	}
297
298
	private void getData() {

plugins/ObjectPropertyMapping/src/main/java/br/ufrj/ppgi/greco/kettle/ObjectPropertyMappingStepDialog.java 1 location

@@ 157-264 (lines=108) @@
154
		wObjectOutputFieldName.addSelectionListener(lsDef);
155
	}
156
157
	public String open() {
158
159
		Shell parent = getParent();
160
		Display display = parent.getDisplay();
161
162
		shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
163
		props.setLook(shell);
164
		setShellImage(shell, input);
165
166
		// ModifyListener padrao
167
		ModifyListener lsMod = new ModifyListener() {
168
169
			public void modifyText(ModifyEvent e) {
170
				input.setChanged();
171
			}
172
		};
173
		boolean changed = input.hasChanged();
174
175
		FormLayout formLayout = new FormLayout();
176
		formLayout.marginWidth = Const.FORM_MARGIN;
177
		formLayout.marginHeight = Const.FORM_MARGIN;
178
179
		shell.setLayout(formLayout);
180
181
		shell.setText(dialogTitle);
182
183
		int middle = props.getMiddlePct();
184
		int margin = Const.MARGIN;
185
186
		// Adiciona um label e um input text no topo do dialog shell
187
		wlStepname = new Label(shell, SWT.RIGHT);
188
		wlStepname.setText(BaseMessages.getString(PKG, "ObjectPropertyMappingStep.StepNameField.Label"));
189
		props.setLook(wlStepname);
190
191
		fdlStepname = new FormData();
192
		fdlStepname.left = new FormAttachment(0, 0);
193
		fdlStepname.right = new FormAttachment(middle, -margin);
194
		fdlStepname.top = new FormAttachment(0, margin);
195
		wlStepname.setLayoutData(fdlStepname);
196
197
		wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
198
		wStepname.setText(stepname);
199
		props.setLook(wStepname);
200
201
		wStepname.addModifyListener(lsMod);
202
		fdStepname = new FormData();
203
		fdStepname.left = new FormAttachment(middle, 0);
204
		fdStepname.top = new FormAttachment(0, margin);
205
		fdStepname.right = new FormAttachment(100, 0);
206
		wStepname.setLayoutData(fdStepname);
207
		Control lastControl = wStepname;
208
209
		// Chama metodo que adiciona os widgets especificos da janela
210
		lastControl = buildContents(lastControl, lsMod);
211
212
		// Bottom buttons
213
		wOK = new Button(shell, SWT.PUSH);
214
		wOK.setText(BaseMessages.getString(PKG, "ObjectPropertyMappingStep.Btn.OK")); //$NON-NLS-1$
215
		wCancel = new Button(shell, SWT.PUSH);
216
		wCancel.setText(BaseMessages.getString(PKG, "ObjectPropertyMappingStep.Btn.Cancel")); //$NON-NLS-1$
217
		setButtonPositions(new Button[] { wOK, wCancel }, margin, lastControl);
218
219
		// Add listeners
220
		lsCancel = new Listener() {
221
			public void handleEvent(Event e) {
222
				cancel();
223
			}
224
		};
225
		lsOK = new Listener() {
226
			public void handleEvent(Event e) {
227
				ok();
228
			}
229
		};
230
231
		wCancel.addListener(SWT.Selection, lsCancel);
232
		wOK.addListener(SWT.Selection, lsOK);
233
234
		// It closes the window affirmatively when the user press enter in one
235
		// of the text input fields
236
		lsDef = new SelectionAdapter() {
237
			public void widgetDefaultSelected(SelectionEvent e) {
238
				ok();
239
			}
240
		};
241
		wStepname.addSelectionListener(lsDef);
242
		addSelectionListenerToControls(lsDef);
243
244
		// Detect X or ALT-F4 or something that kills this window...
245
		shell.addShellListener(new ShellAdapter() {
246
			public void shellClosed(ShellEvent e) {
247
				cancel();
248
			}
249
		});
250
251
		// Populate the data of the controls
252
		getData();
253
254
		// Set the shell size, based upon previous time...
255
		setSize();
256
257
		input.setChanged(changed);
258
259
		shell.open();
260
		while (!shell.isDisposed()) {
261
			if (!display.readAndDispatch())
262
				display.sleep();
263
		}
264
		return stepname;
265
	}
266
267
	private void getData() {

plugins/LinkDiscoveryTool/src/main/java/br/ufrj/ppgi/greco/kettle/LinkDiscoveryToolStepDialog.java 1 location

@@ 293-396 (lines=104) @@
290
		wOutputGraph.addSelectionListener(lsDef);
291
	}
292
293
	public String open() {
294
295
		Shell parent = getParent();
296
		Display display = parent.getDisplay();
297
298
		shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
299
		props.setLook(shell);
300
		setShellImage(shell, input);
301
302
		ModifyListener lsMod = new ModifyListener() {
303
304
			public void modifyText(ModifyEvent e) {
305
				input.setChanged();
306
			}
307
		};
308
		boolean changed = input.hasChanged();
309
310
		FormLayout formLayout = new FormLayout();
311
		formLayout.marginWidth = Const.FORM_MARGIN;
312
		formLayout.marginHeight = Const.FORM_MARGIN;
313
314
		shell.setLayout(formLayout);
315
316
		shell.setText(dialogTitle);
317
318
		int middle = props.getMiddlePct();
319
		int margin = Const.MARGIN;
320
321
		// Adiciona um label e um input text no topo do dialog shell
322
		wlStepname = new Label(shell, SWT.RIGHT);
323
		wlStepname.setText("Step Name");
324
		props.setLook(wlStepname);
325
326
		fdlStepname = new FormData();
327
		fdlStepname.left = new FormAttachment(0, 0);
328
		fdlStepname.right = new FormAttachment(middle, -margin);
329
		fdlStepname.top = new FormAttachment(0, margin);
330
		wlStepname.setLayoutData(fdlStepname);
331
332
		wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
333
		wStepname.setText(stepname);
334
		props.setLook(wStepname);
335
336
		wStepname.addModifyListener(lsMod);
337
		fdStepname = new FormData();
338
		fdStepname.left = new FormAttachment(middle, 0);
339
		fdStepname.top = new FormAttachment(0, margin);
340
		fdStepname.right = new FormAttachment(100, 0);
341
		wStepname.setLayoutData(fdStepname);
342
		Control lastControl = wStepname;
343
344
		lastControl = buildContents(lastControl, lsMod);
345
346
		// Bottom buttons
347
		wOK = new Button(shell, SWT.PUSH);
348
		wOK.setText("OK"); //$NON-NLS-1$
349
		wCancel = new Button(shell, SWT.PUSH);
350
		wCancel.setText("Cancel"); //$NON-NLS-1$
351
		setButtonPositions(new Button[] { wOK, wCancel }, margin, lastControl);
352
353
		// Add listeners
354
		lsCancel = new Listener() {
355
			public void handleEvent(Event e) {
356
				cancel();
357
			}
358
		};
359
		lsOK = new Listener() {
360
			public void handleEvent(Event e) {
361
				ok();
362
			}
363
		};
364
365
		wCancel.addListener(SWT.Selection, lsCancel);
366
		wOK.addListener(SWT.Selection, lsOK);
367
368
		lsDef = new SelectionAdapter() {
369
			public void widgetDefaultSelected(SelectionEvent e) {
370
				ok();
371
			}
372
		};
373
		wStepname.addSelectionListener(lsDef);
374
		addSelectionListenerToControls(lsDef);
375
376
		// Detect X or ALT-F4 or something that kills this window...
377
		shell.addShellListener(new ShellAdapter() {
378
			public void shellClosed(ShellEvent e) {
379
				cancel();
380
			}
381
		});
382
383
		// Populate the data of the controls
384
		getData();
385
386
		// Set the shell size, based upon previous time...
387
		setSize();
388
389
		input.setChanged(changed);
390
391
		shell.open();
392
		while (!shell.isDisposed()) {
393
			if (!display.readAndDispatch())
394
				display.sleep();
395
		}
396
		return stepname;
397
	}
398
399
	private void getData() {

plugins/OwlInput/src/main/java/br/ufrj/ppgi/greco/kettle/OwlInputStepDialog.java 1 location

@@ 241-341 (lines=101) @@
238
		wHelloFieldName.addSelectionListener(lsDef);
239
	}
240
241
	public String open() {
242
243
		Shell parent = getParent();
244
		Display display = parent.getDisplay();
245
246
		shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
247
		props.setLook(shell);
248
		setShellImage(shell, meta);
249
250
		ModifyListener lsMod = new ModifyListener() {
251
252
			public void modifyText(ModifyEvent e) {
253
				meta.setChanged();
254
			}
255
		};
256
257
		changed = meta.hasChanged();
258
259
		FormLayout formLayout = new FormLayout();
260
		formLayout.marginWidth = Const.FORM_MARGIN;
261
		formLayout.marginHeight = Const.FORM_MARGIN;
262
263
		shell.setLayout(formLayout);
264
265
		shell.setText(this.dialogTitle);
266
267
		int middle = props.getMiddlePct();
268
		int margin = Const.MARGIN;
269
270
		wlStepname = new Label(shell, SWT.RIGHT);
271
		wlStepname.setText(BaseMessages.getString(PKG, "OwlInputStep.StepNameField.Label"));
272
		props.setLook(wlStepname);
273
274
		fdlStepname = new FormData();
275
		fdlStepname.left = new FormAttachment(0, 0);
276
		fdlStepname.top = new FormAttachment(0, margin);
277
		fdlStepname.right = new FormAttachment(middle, -margin);
278
		wlStepname.setLayoutData(fdlStepname);
279
280
		wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
281
		wStepname.setText(this.dialogTitle);
282
		props.setLook(wStepname);
283
284
		wStepname.addModifyListener(lsMod);
285
		fdStepname = new FormData();
286
		fdStepname.left = new FormAttachment(middle, 0);
287
		fdStepname.top = new FormAttachment(0, margin);
288
		fdStepname.right = new FormAttachment(100, 0);
289
		wStepname.setLayoutData(fdStepname);
290
		Control lastControl = wStepname;
291
292
		lastControl = buildContents(lastControl, lsMod);
293
294
		wOK = new Button(shell, SWT.PUSH);
295
		wOK.setText(BaseMessages.getString(PKG, "OwlInputStep.Btn.OK"));
296
		wCancel = new Button(shell, SWT.PUSH);
297
		wCancel.setText(BaseMessages.getString(PKG, "OwlInputStep.Btn.Cancel"));
298
		setButtonPositions(new Button[] { wOK, wCancel }, margin, lastControl);
299
300
		lsCancel = new Listener() {
301
			public void handleEvent(Event e) {
302
				cancel();
303
			}
304
		};
305
		lsOK = new Listener() {
306
			public void handleEvent(Event e) {
307
				ok();
308
			}
309
		};
310
311
		wCancel.addListener(SWT.Selection, lsCancel);
312
		wOK.addListener(SWT.Selection, lsOK);
313
314
		lsDef = new SelectionAdapter() {
315
			public void widgetDefaultSelected(SelectionEvent e) {
316
				ok();
317
			}
318
		};
319
320
		wStepname.addSelectionListener(lsDef);
321
		addSelectionListenerToControls(lsDef);
322
323
		shell.addShellListener(new ShellAdapter() {
324
			public void shellClosed(ShellEvent e) {
325
				cancel();
326
			}
327
		});
328
329
		setSize();
330
331
		populateDialog();
332
333
		meta.setChanged(changed);
334
335
		shell.open();
336
		while (!shell.isDisposed()) {
337
			if (!display.readAndDispatch())
338
				display.sleep();
339
		}
340
341
		return stepname;
342
	}
343
344
	private void populateDialog() {