|
Line 0
Link Here
|
|
|
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2010 CEA LIST. |
| 3 |
* |
| 4 |
* All rights reserved. This program and the accompanying materials |
| 5 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 6 |
* which accompanies this distribution, and is available at |
| 7 |
* http://www.eclipse.org/legal/epl-v10.html |
| 8 |
* |
| 9 |
* Contributors: |
| 10 |
* Nicolas Bros (Mia-Software) - initial API and implementation |
| 11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.emf.facet.widgets.celleditors.ui; |
| 13 |
|
| 14 |
import java.util.Iterator; |
| 15 |
import java.util.List; |
| 16 |
|
| 17 |
import org.eclipse.emf.common.command.Command; |
| 18 |
import org.eclipse.emf.common.command.CompoundCommand; |
| 19 |
import org.eclipse.emf.ecore.EAttribute; |
| 20 |
import org.eclipse.emf.ecore.EDataType; |
| 21 |
import org.eclipse.emf.ecore.EObject; |
| 22 |
import org.eclipse.emf.ecore.EStructuralFeature; |
| 23 |
import org.eclipse.emf.edit.domain.EditingDomain; |
| 24 |
import org.eclipse.emf.facet.widgets.CustomizableLabelProvider; |
| 25 |
import org.eclipse.emf.facet.widgets.celleditors.CommandFactoriesRegistry; |
| 26 |
import org.eclipse.emf.facet.widgets.celleditors.ICommandFactory; |
| 27 |
import org.eclipse.emf.facet.widgets.celleditors.Messages; |
| 28 |
import org.eclipse.jface.dialogs.Dialog; |
| 29 |
import org.eclipse.jface.dialogs.IDialogConstants; |
| 30 |
import org.eclipse.jface.viewers.ColumnLabelProvider; |
| 31 |
import org.eclipse.jface.viewers.ISelection; |
| 32 |
import org.eclipse.jface.viewers.IStructuredContentProvider; |
| 33 |
import org.eclipse.jface.viewers.IStructuredSelection; |
| 34 |
import org.eclipse.jface.viewers.LabelProvider; |
| 35 |
import org.eclipse.jface.viewers.TableViewer; |
| 36 |
import org.eclipse.jface.viewers.TableViewerColumn; |
| 37 |
import org.eclipse.jface.viewers.Viewer; |
| 38 |
import org.eclipse.osgi.util.NLS; |
| 39 |
import org.eclipse.swt.SWT; |
| 40 |
import org.eclipse.swt.events.ControlEvent; |
| 41 |
import org.eclipse.swt.events.ControlListener; |
| 42 |
import org.eclipse.swt.events.KeyAdapter; |
| 43 |
import org.eclipse.swt.events.KeyEvent; |
| 44 |
import org.eclipse.swt.events.SelectionAdapter; |
| 45 |
import org.eclipse.swt.events.SelectionEvent; |
| 46 |
import org.eclipse.swt.graphics.Color; |
| 47 |
import org.eclipse.swt.graphics.Image; |
| 48 |
import org.eclipse.swt.layout.GridData; |
| 49 |
import org.eclipse.swt.layout.GridLayout; |
| 50 |
import org.eclipse.swt.widgets.Button; |
| 51 |
import org.eclipse.swt.widgets.Composite; |
| 52 |
import org.eclipse.swt.widgets.Control; |
| 53 |
import org.eclipse.swt.widgets.Display; |
| 54 |
import org.eclipse.swt.widgets.Event; |
| 55 |
import org.eclipse.swt.widgets.Label; |
| 56 |
import org.eclipse.swt.widgets.Listener; |
| 57 |
import org.eclipse.swt.widgets.Shell; |
| 58 |
import org.eclipse.swt.widgets.Table; |
| 59 |
import org.eclipse.swt.widgets.TableColumn; |
| 60 |
|
| 61 |
/** A dialog to edit a multiplicity-many {@link EAttribute} */ |
| 62 |
public class NaryAttributeEditingDialog extends Dialog { |
| 63 |
|
| 64 |
private static final int LIST_WIDTH = 200; |
| 65 |
private static final int LIST_HEIGHT = 250; |
| 66 |
private static final int NUM_COLUMNS = 2; |
| 67 |
private TableViewer fFeatureValuesTableViewer; |
| 68 |
private Button fAddButton; |
| 69 |
private Button fRemoveButton; |
| 70 |
private Button fUpButton; |
| 71 |
private Button fDownButton; |
| 72 |
private final EStructuralFeature fFeature; |
| 73 |
private final EObject fEObject; |
| 74 |
private final EditingDomain editingDomain; |
| 75 |
private final ICommandFactory commandFactory; |
| 76 |
|
| 77 |
private boolean bAddingValue = false; |
| 78 |
|
| 79 |
public boolean isAddingValue() { |
| 80 |
return this.bAddingValue; |
| 81 |
} |
| 82 |
|
| 83 |
private final Object newValuePlaceholder = new Object(); |
| 84 |
|
| 85 |
private class AssignedValuesContentProvider implements IStructuredContentProvider { |
| 86 |
public Object[] getElements(final Object inputElement) { |
| 87 |
if (inputElement instanceof FeatureValuesInput) { |
| 88 |
FeatureValuesInput valuesInput = (FeatureValuesInput) inputElement; |
| 89 |
EStructuralFeature feature = valuesInput.getFeature(); |
| 90 |
EObject source = valuesInput.getSource(); |
| 91 |
List<?> list = (List<?>) source.eGet(feature); |
| 92 |
// add a temporary cell when editing |
| 93 |
if (isAddingValue()) { |
| 94 |
Object[] result = new Object[list.size() + 1]; |
| 95 |
int i = 0; |
| 96 |
for (Object object : list) { |
| 97 |
result[i++] = object; |
| 98 |
} |
| 99 |
result[i] = NaryAttributeEditingDialog.this.newValuePlaceholder; |
| 100 |
return result; |
| 101 |
} |
| 102 |
return list.toArray(); |
| 103 |
} |
| 104 |
throw new IllegalArgumentException(FeatureValuesInput.class.getSimpleName() |
| 105 |
+ " expected"); //$NON-NLS-1$ |
| 106 |
} |
| 107 |
|
| 108 |
public void dispose() { |
| 109 |
// |
| 110 |
} |
| 111 |
|
| 112 |
public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { |
| 113 |
// |
| 114 |
} |
| 115 |
} |
| 116 |
|
| 117 |
private final ColumnLabelProvider labelProvider = new ColumnLabelProvider() { |
| 118 |
private final LabelProvider delegateLabelProvider = new CustomizableLabelProvider(); |
| 119 |
|
| 120 |
@Override |
| 121 |
public Image getImage(final Object element) { |
| 122 |
return this.delegateLabelProvider.getImage(element); |
| 123 |
} |
| 124 |
|
| 125 |
@Override |
| 126 |
public String getText(final Object element) { |
| 127 |
if (element == NaryAttributeEditingDialog.this.newValuePlaceholder) { |
| 128 |
return Messages.NaryAttributeEditingDialog_enterNewValuePlaceholder; |
| 129 |
} |
| 130 |
return this.delegateLabelProvider.getText(element); |
| 131 |
} |
| 132 |
|
| 133 |
@Override |
| 134 |
public Color getForeground(final Object element) { |
| 135 |
if (element == NaryAttributeEditingDialog.this.newValuePlaceholder) { |
| 136 |
return Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY); |
| 137 |
} |
| 138 |
return null; |
| 139 |
} |
| 140 |
}; |
| 141 |
|
| 142 |
/** |
| 143 |
* @param parent |
| 144 |
* the parent {@link Shell} |
| 145 |
* @param feature |
| 146 |
* the feature to edit |
| 147 |
* @param eObject |
| 148 |
* the {@link EObject} on which the feature must be edited |
| 149 |
* @param editingDomain |
| 150 |
* the {@link EditingDomain} through which all editing is done |
| 151 |
*/ |
| 152 |
public NaryAttributeEditingDialog(final Shell parent, final EStructuralFeature feature, |
| 153 |
final EObject eObject, final EditingDomain editingDomain) { |
| 154 |
super(parent); |
| 155 |
if (!(feature.getEType() instanceof EDataType)) { |
| 156 |
throw new IllegalArgumentException("feature type must be EDataType"); //$NON-NLS-1$ |
| 157 |
} |
| 158 |
|
| 159 |
this.fFeature = feature; |
| 160 |
this.fEObject = eObject; |
| 161 |
this.editingDomain = editingDomain; |
| 162 |
this.commandFactory = CommandFactoriesRegistry.getInstance().getCommandFactoryFor( |
| 163 |
this.editingDomain); |
| 164 |
} |
| 165 |
|
| 166 |
@Override |
| 167 |
protected void configureShell(final Shell shell) { |
| 168 |
super.configureShell(shell); |
| 169 |
shell.setText(NLS.bind(Messages.NaryReferenceEditingDialog_shellTitle, |
| 170 |
this.fFeature.getName(), this.fEObject.eClass().getName())); |
| 171 |
// prevent Escape or Enter from closing the dialog |
| 172 |
// when a cell editor is active |
| 173 |
shell.addListener(SWT.Traverse, new Listener() { |
| 174 |
public void handleEvent(final Event e) { |
| 175 |
if ((e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) |
| 176 |
&& NaryAttributeEditingDialog.this.fFeatureValuesTableViewer |
| 177 |
.isCellEditorActive()) { |
| 178 |
e.doit = false; |
| 179 |
} |
| 180 |
} |
| 181 |
}); |
| 182 |
} |
| 183 |
|
| 184 |
@Override |
| 185 |
protected Control createDialogArea(final Composite parent) { |
| 186 |
final Composite contents = (Composite) super.createDialogArea(parent); |
| 187 |
|
| 188 |
final GridLayout contentsGridLayout = (GridLayout) contents.getLayout(); |
| 189 |
contentsGridLayout.numColumns = NaryAttributeEditingDialog.NUM_COLUMNS; |
| 190 |
|
| 191 |
final GridData contentsGridData = (GridData) contents.getLayoutData(); |
| 192 |
contentsGridData.horizontalAlignment = SWT.FILL; |
| 193 |
contentsGridData.verticalAlignment = SWT.FILL; |
| 194 |
|
| 195 |
createValuesPane(contents); |
| 196 |
createButtonsPane(contents); |
| 197 |
|
| 198 |
// this.fFeatureValuesTableViewer.addOpenListener(new IOpenListener() { |
| 199 |
// public void open(final OpenEvent event) { |
| 200 |
// editSelectedElement(); |
| 201 |
// } |
| 202 |
// }); |
| 203 |
|
| 204 |
this.fUpButton.addSelectionListener(new SelectionAdapter() { |
| 205 |
@Override |
| 206 |
public void widgetSelected(final SelectionEvent event) { |
| 207 |
upButtonClicked(); |
| 208 |
} |
| 209 |
}); |
| 210 |
|
| 211 |
this.fDownButton.addSelectionListener(new SelectionAdapter() { |
| 212 |
@Override |
| 213 |
public void widgetSelected(final SelectionEvent event) { |
| 214 |
downButtonClicked(); |
| 215 |
} |
| 216 |
}); |
| 217 |
|
| 218 |
this.fAddButton.addSelectionListener(new SelectionAdapter() { |
| 219 |
@Override |
| 220 |
public void widgetSelected(final SelectionEvent event) { |
| 221 |
addButtonClicked(); |
| 222 |
} |
| 223 |
}); |
| 224 |
|
| 225 |
this.fRemoveButton.addSelectionListener(new SelectionAdapter() { |
| 226 |
@Override |
| 227 |
public void widgetSelected(final SelectionEvent event) { |
| 228 |
removeButtonClicked(); |
| 229 |
} |
| 230 |
}); |
| 231 |
|
| 232 |
return contents; |
| 233 |
} |
| 234 |
|
| 235 |
@SuppressWarnings("unchecked") |
| 236 |
private void upButtonClicked() { |
| 237 |
final IStructuredSelection selection = (IStructuredSelection) this.fFeatureValuesTableViewer |
| 238 |
.getSelection(); |
| 239 |
|
| 240 |
EditingUtils.moveElementsUp(this.fEObject, this.fFeature, selection.toList(), |
| 241 |
this.commandFactory, this.editingDomain); |
| 242 |
|
| 243 |
this.fFeatureValuesTableViewer.refresh(); |
| 244 |
} |
| 245 |
|
| 246 |
@SuppressWarnings("unchecked") |
| 247 |
private void downButtonClicked() { |
| 248 |
final IStructuredSelection selection = (IStructuredSelection) this.fFeatureValuesTableViewer |
| 249 |
.getSelection(); |
| 250 |
|
| 251 |
EditingUtils.moveElementsDown(this.fEObject, this.fFeature, selection.toList(), |
| 252 |
this.commandFactory, this.editingDomain); |
| 253 |
|
| 254 |
this.fFeatureValuesTableViewer.refresh(); |
| 255 |
} |
| 256 |
|
| 257 |
private void addButtonClicked() { |
| 258 |
this.bAddingValue = true; |
| 259 |
// EDataType dataType = (EDataType) this.fFeature.getEType(); |
| 260 |
// Object defaultValue = dataType.getDefaultValue(); |
| 261 |
// if (dataType == EcorePackage.eINSTANCE.getEString()) { |
| 262 |
// defaultValue = ""; |
| 263 |
// } |
| 264 |
// Command addCommand = |
| 265 |
// this.commandFactory.createAddCommand(this.editingDomain, |
| 266 |
// this.fEObject, this.fFeature, defaultValue); |
| 267 |
// this.editingDomain.getCommandStack().execute(addCommand); |
| 268 |
refresh(); |
| 269 |
// this.fFeatureValuesTableViewer.setSelection(new |
| 270 |
// StructuredSelection(this.tempCellForNewValue), |
| 271 |
// true); |
| 272 |
this.fFeatureValuesTableViewer.editElement(this.newValuePlaceholder, 0); |
| 273 |
} |
| 274 |
|
| 275 |
@SuppressWarnings("unchecked") |
| 276 |
private void removeButtonClicked() { |
| 277 |
final IStructuredSelection selection = (IStructuredSelection) this.fFeatureValuesTableViewer |
| 278 |
.getSelection(); |
| 279 |
|
| 280 |
CompoundCommand compoundCommand = new CompoundCommand(); |
| 281 |
|
| 282 |
List<?> list = (List<?>) this.fEObject.eGet(this.fFeature); |
| 283 |
|
| 284 |
for (final Iterator<Object> it = selection.iterator(); it.hasNext();) { |
| 285 |
final Object element = it.next(); |
| 286 |
|
| 287 |
if (list.contains(element)) { |
| 288 |
Command removeCommand = this.commandFactory.createRemoveCommand(this.editingDomain, |
| 289 |
this.fEObject, this.fFeature, element); |
| 290 |
compoundCommand.append(removeCommand); |
| 291 |
} |
| 292 |
} |
| 293 |
this.editingDomain.getCommandStack().execute(compoundCommand); |
| 294 |
refresh(); |
| 295 |
} |
| 296 |
|
| 297 |
private void spacer(final Composite parent) { |
| 298 |
@SuppressWarnings("unused") |
| 299 |
Label label = new Label(parent, SWT.NONE); |
| 300 |
} |
| 301 |
|
| 302 |
private void createButtonsPane(final Composite contents) { |
| 303 |
final Composite buttonsComposite = new Composite(contents, SWT.NONE); |
| 304 |
final GridData buttonsCompositeGridData = new GridData(); |
| 305 |
buttonsCompositeGridData.verticalAlignment = SWT.FILL; |
| 306 |
buttonsCompositeGridData.horizontalAlignment = SWT.FILL; |
| 307 |
buttonsComposite.setLayoutData(buttonsCompositeGridData); |
| 308 |
buttonsComposite.setLayout(new GridLayout()); |
| 309 |
|
| 310 |
// spacer |
| 311 |
spacer(buttonsComposite); |
| 312 |
|
| 313 |
this.fAddButton = new Button(buttonsComposite, SWT.PUSH); |
| 314 |
this.fAddButton.setText(Messages.NaryAttributeEditingDialog_add); |
| 315 |
final GridData addButtonGridData = new GridData(); |
| 316 |
addButtonGridData.verticalAlignment = SWT.FILL; |
| 317 |
addButtonGridData.horizontalAlignment = SWT.FILL; |
| 318 |
// addButtonGridData.widthHint = 70; |
| 319 |
this.fAddButton.setLayoutData(addButtonGridData); |
| 320 |
|
| 321 |
this.fRemoveButton = new Button(buttonsComposite, SWT.PUSH); |
| 322 |
this.fRemoveButton.setText(Messages.NaryAttributeEditingDialog_delete); |
| 323 |
final GridData removeButtonGridData = new GridData(); |
| 324 |
removeButtonGridData.verticalAlignment = SWT.FILL; |
| 325 |
removeButtonGridData.horizontalAlignment = SWT.FILL; |
| 326 |
this.fRemoveButton.setLayoutData(removeButtonGridData); |
| 327 |
|
| 328 |
spacer(buttonsComposite); |
| 329 |
|
| 330 |
this.fUpButton = new Button(buttonsComposite, SWT.PUSH); |
| 331 |
this.fUpButton.setText(Messages.NaryReferenceEditingDialog_up); |
| 332 |
final GridData upButtonGridData = new GridData(); |
| 333 |
upButtonGridData.verticalAlignment = SWT.FILL; |
| 334 |
upButtonGridData.horizontalAlignment = SWT.FILL; |
| 335 |
this.fUpButton.setLayoutData(upButtonGridData); |
| 336 |
|
| 337 |
this.fDownButton = new Button(buttonsComposite, SWT.PUSH); |
| 338 |
this.fDownButton.setText(Messages.NaryReferenceEditingDialog_down); |
| 339 |
final GridData downButtonGridData = new GridData(); |
| 340 |
downButtonGridData.verticalAlignment = SWT.FILL; |
| 341 |
downButtonGridData.horizontalAlignment = SWT.FILL; |
| 342 |
this.fDownButton.setLayoutData(downButtonGridData); |
| 343 |
} |
| 344 |
|
| 345 |
private void createValuesPane(final Composite contents) { |
| 346 |
final Composite featureComposite = new Composite(contents, SWT.NONE); |
| 347 |
final GridData featureCompositeData = new GridData(SWT.FILL, SWT.FILL, true, true); |
| 348 |
featureCompositeData.horizontalAlignment = SWT.END; |
| 349 |
featureComposite.setLayoutData(featureCompositeData); |
| 350 |
|
| 351 |
final GridLayout featureCompositeLayout = new GridLayout(); |
| 352 |
featureCompositeData.horizontalAlignment = SWT.FILL; |
| 353 |
featureCompositeLayout.marginHeight = 0; |
| 354 |
featureCompositeLayout.marginWidth = 0; |
| 355 |
featureCompositeLayout.numColumns = 1; |
| 356 |
featureComposite.setLayout(featureCompositeLayout); |
| 357 |
|
| 358 |
final Label featureLabel = new Label(featureComposite, SWT.NONE); |
| 359 |
featureLabel.setText(Messages.NaryReferenceEditingDialog_values); |
| 360 |
final GridData valuesLabelGridData = new GridData(); |
| 361 |
valuesLabelGridData.horizontalSpan = 2; |
| 362 |
valuesLabelGridData.horizontalAlignment = SWT.FILL; |
| 363 |
valuesLabelGridData.verticalAlignment = SWT.FILL; |
| 364 |
featureLabel.setLayoutData(valuesLabelGridData); |
| 365 |
|
| 366 |
final Table table = new Table(featureComposite, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION); |
| 367 |
final GridData tableGridData = new GridData(); |
| 368 |
tableGridData.widthHint = NaryAttributeEditingDialog.LIST_WIDTH; |
| 369 |
tableGridData.heightHint = NaryAttributeEditingDialog.LIST_HEIGHT; |
| 370 |
tableGridData.verticalAlignment = SWT.FILL; |
| 371 |
tableGridData.horizontalAlignment = SWT.FILL; |
| 372 |
tableGridData.grabExcessHorizontalSpace = true; |
| 373 |
tableGridData.grabExcessVerticalSpace = true; |
| 374 |
table.setLayoutData(tableGridData); |
| 375 |
final TableColumn tableColumn = new TableColumn(table, SWT.CENTER); |
| 376 |
|
| 377 |
// full-width column |
| 378 |
table.addControlListener(new ControlListener() { |
| 379 |
public void controlResized(final ControlEvent e) { |
| 380 |
tableColumn.setWidth(table.getClientArea().width); |
| 381 |
} |
| 382 |
|
| 383 |
public void controlMoved(final ControlEvent e) { |
| 384 |
// |
| 385 |
} |
| 386 |
}); |
| 387 |
|
| 388 |
this.fFeatureValuesTableViewer = new TableViewer(table); |
| 389 |
this.fFeatureValuesTableViewer.setContentProvider(new AssignedValuesContentProvider()); |
| 390 |
// this.fFeatureValuesTableViewer.setLabelProvider(this.labelProvider); |
| 391 |
this.fFeatureValuesTableViewer |
| 392 |
.setInput(new FeatureValuesInput(this.fFeature, this.fEObject)); |
| 393 |
|
| 394 |
final TableViewerColumn tableViewerColumn = new TableViewerColumn( |
| 395 |
this.fFeatureValuesTableViewer, tableColumn); |
| 396 |
tableViewerColumn.setLabelProvider(this.labelProvider); |
| 397 |
|
| 398 |
tableViewerColumn.setEditingSupport(new ModelCellsEditingSupport( |
| 399 |
this.fFeatureValuesTableViewer, this.fFeature, this.fEObject, this.editingDomain, |
| 400 |
this.newValuePlaceholder)); |
| 401 |
|
| 402 |
// keyboard accessibility |
| 403 |
table.addKeyListener(new KeyAdapter() { |
| 404 |
@Override |
| 405 |
public void keyPressed(final KeyEvent e) { |
| 406 |
if (e.keyCode == SWT.F2) { |
| 407 |
editSelectedElement(); |
| 408 |
} |
| 409 |
if (e.keyCode == SWT.DEL) { |
| 410 |
if (NaryAttributeEditingDialog.this.fRemoveButton.isEnabled()) { |
| 411 |
NaryAttributeEditingDialog.this.fRemoveButton.notifyListeners( |
| 412 |
SWT.Selection, null); |
| 413 |
} |
| 414 |
} |
| 415 |
if (e.keyCode == SWT.ARROW_UP |
| 416 |
&& ((e.stateMask & SWT.COMMAND) != 0 || (e.stateMask & SWT.CONTROL) != 0)) { |
| 417 |
if (NaryAttributeEditingDialog.this.fUpButton.isEnabled()) { |
| 418 |
NaryAttributeEditingDialog.this.fUpButton.notifyListeners(SWT.Selection, |
| 419 |
null); |
| 420 |
} |
| 421 |
} |
| 422 |
if (e.keyCode == SWT.ARROW_DOWN |
| 423 |
&& ((e.stateMask & SWT.COMMAND) != 0 || (e.stateMask & SWT.CONTROL) != 0)) { |
| 424 |
if (NaryAttributeEditingDialog.this.fDownButton.isEnabled()) { |
| 425 |
NaryAttributeEditingDialog.this.fDownButton.notifyListeners(SWT.Selection, |
| 426 |
null); |
| 427 |
} |
| 428 |
} |
| 429 |
} |
| 430 |
}); |
| 431 |
|
| 432 |
} |
| 433 |
|
| 434 |
private void editSelectedElement() { |
| 435 |
ISelection selection = NaryAttributeEditingDialog.this.fFeatureValuesTableViewer |
| 436 |
.getSelection(); |
| 437 |
if (selection instanceof IStructuredSelection) { |
| 438 |
IStructuredSelection structuredSelection = (IStructuredSelection) selection; |
| 439 |
if (structuredSelection.getFirstElement() != null) { |
| 440 |
NaryAttributeEditingDialog.this.fFeatureValuesTableViewer.editElement( |
| 441 |
structuredSelection.getFirstElement(), 0); |
| 442 |
} |
| 443 |
} |
| 444 |
} |
| 445 |
|
| 446 |
@Override |
| 447 |
protected void okPressed() { |
| 448 |
super.okPressed(); |
| 449 |
} |
| 450 |
|
| 451 |
private void refresh() { |
| 452 |
this.fFeatureValuesTableViewer.refresh(); |
| 453 |
} |
| 454 |
|
| 455 |
@Override |
| 456 |
protected boolean isResizable() { |
| 457 |
return true; |
| 458 |
} |
| 459 |
|
| 460 |
@Override |
| 461 |
protected void createButtonsForButtonBar(final Composite parent) { |
| 462 |
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); |
| 463 |
} |
| 464 |
} |