Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
47 | 2 | 1 | 0.999 | class_body_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 47 | 237 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java |
2 | 47 | 193 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TreeListDialogField.java |
| ||||
// ------ layout helpers /* * @see DialogField#doFillIntoGrid */ public Control[] doFillIntoGrid(Composite parent, int nColumns) { PixelConverter converter = new PixelConverter(parent); assertEnoughColumns(nColumns); Label label = getLabelControl(parent); GridData gd = gridDataForLabel(1); gd.verticalAlignment = GridData.BEGINNING; label.setLayoutData(gd); Control list = getListControl(parent); gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalSpan = nColumns - 2; gd.widthHint = converter.convertWidthInCharsToPixels(50); gd.heightHint = converter.convertHeightInCharsToPixels(6); list.setLayoutData(gd); Composite buttons = getButtonBox(parent); gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalSpan = 1; buttons.setLayoutData(gd); return new Control[] { label, list, buttons }; } /* * @see DialogField#getNumberOfControls */ public int getNumberOfControls() { return 3; } /** * Sets the minimal width of the buttons. Must be called after widget creation. */ public void setButtonsMinWidth(int minWidth) { if (fLastSeparator != null) { ((GridData) fLastSeparator.getLayoutData()).widthHint = minWidth; } } |
| ||||
// ------ layout helpers /* * @see DialogField#doFillIntoGrid */ public Control[] doFillIntoGrid(Composite parent, int nColumns) { PixelConverter converter = new PixelConverter(parent); assertEnoughColumns(nColumns); Label label = getLabelControl(parent); GridData gd = gridDataForLabel(1); gd.verticalAlignment = GridData.BEGINNING; label.setLayoutData(gd); Control list = getTreeControl(parent); gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalSpan = nColumns - 2; gd.widthHint = converter.convertWidthInCharsToPixels(50); gd.heightHint = converter.convertHeightInCharsToPixels(6); list.setLayoutData(gd); Composite buttons = getButtonBox(parent); gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalSpan = 1; buttons.setLayoutData(gd); return new Control[] { label, list, buttons }; } /* * @see DialogField#getNumberOfControls */ public int getNumberOfControls() { return 3; } /** * Sets the minimal width of the buttons. Must be called after widget creation. */ public void setButtonsMinWidth(int minWidth) { if (fLastSeparator != null) { ((GridData) fLastSeparator.getLayoutData()).widthHint = minWidth; } } |
| |||
// ------ layout helpers /* * @see DialogField#doFillIntoGrid */ /* * @see DialogField#doFillIntoGrid */ public Control[] doFillIntoGrid(Composite parent, int nColumns) { PixelConverter converter = new PixelConverter(parent); assertEnoughColumns(nColumns); Label label = getLabelControl(parent); GridData gd = gridDataForLabel(1); gd.verticalAlignment = GridData.BEGINNING; label.setLayoutData(gd); Control list = [[#variableb9b30440]](parent); gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalSpan = nColumns - 2; gd.widthHint = converter.convertWidthInCharsToPixels(50); gd.heightHint = converter.convertHeightInCharsToPixels(6); list.setLayoutData(gd); Composite buttons = getButtonBox(parent); gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.verticalAlignment = GridData.FILL; gd.grabExcessVerticalSpace = true; gd.horizontalSpan = 1; buttons.setLayoutData(gd); return new Control[] { label, list, buttons }; } /* * @see DialogField#getNumberOfControls */ /* * @see DialogField#getNumberOfControls */ public int getNumberOfControls() { return 3; } /** * Sets the minimal width of the buttons. Must be called after widget creation. */ /** * Sets the minimal width of the buttons. Must be called after widget creation. */ public void setButtonsMinWidth(int minWidth) { if (fLastSeparator != null) { ((GridData) fLastSeparator.getLayoutData()).widthHint = minWidth; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b9b30440]] | getListControl |
1 | 2 | [[#b9b30440]] | getTreeControl |