comparison dwtx/jface/action/ControlContribution.d @ 43:ea8ff534f622

Fix override and super aliases
author Frank Benoit <benoit@tionex.de>
date Fri, 11 Apr 2008 01:24:25 +0200
parents eb6b3e6de869
children
comparison
equal deleted inserted replaced
42:4567a6f54939 43:ea8ff534f622
32 * The <code>createControl</code> framework method must be implemented 32 * The <code>createControl</code> framework method must be implemented
33 * by concrete subclasses. 33 * by concrete subclasses.
34 * </p> 34 * </p>
35 */ 35 */
36 public abstract class ControlContribution : ContributionItem { 36 public abstract class ControlContribution : ContributionItem {
37 alias ContributionItem.fill fill;
37 /** 38 /**
38 * Creates a control contribution item with the given id. 39 * Creates a control contribution item with the given id.
39 * 40 *
40 * @param id the contribution item id 41 * @param id the contribution item id
41 */ 42 */
77 * The control item implementation of this <code>IContributionItem</code> 78 * The control item implementation of this <code>IContributionItem</code>
78 * method calls the <code>createControl</code> framework method. 79 * method calls the <code>createControl</code> framework method.
79 * Subclasses must implement <code>createControl</code> rather than 80 * Subclasses must implement <code>createControl</code> rather than
80 * overriding this method. 81 * overriding this method.
81 */ 82 */
82 public final void fill(Composite parent) { 83 public override final void fill(Composite parent) {
83 createControl(parent); 84 createControl(parent);
84 } 85 }
85 86
86 /** 87 /**
87 * The control item implementation of this <code>IContributionItem</code> 88 * The control item implementation of this <code>IContributionItem</code>
88 * method throws an exception since controls cannot be added to menus. 89 * method throws an exception since controls cannot be added to menus.
89 */ 90 */
90 public final void fill(Menu parent, int index) { 91 public override final void fill(Menu parent, int index) {
91 Assert.isTrue(false, "Can't add a control to a menu");//$NON-NLS-1$ 92 Assert.isTrue(false, "Can't add a control to a menu");//$NON-NLS-1$
92 } 93 }
93 94
94 /** 95 /**
95 * The control item implementation of this <code>IContributionItem</code> 96 * The control item implementation of this <code>IContributionItem</code>
97 * create a control under the given parent, and then creates 98 * create a control under the given parent, and then creates
98 * a new tool item to hold it. 99 * a new tool item to hold it.
99 * Subclasses must implement <code>createControl</code> rather than 100 * Subclasses must implement <code>createControl</code> rather than
100 * overriding this method. 101 * overriding this method.
101 */ 102 */
102 public final void fill(ToolBar parent, int index) { 103 public override final void fill(ToolBar parent, int index) {
103 Control control = createControl(parent); 104 Control control = createControl(parent);
104 ToolItem ti = new ToolItem(parent, DWT.SEPARATOR, index); 105 ToolItem ti = new ToolItem(parent, DWT.SEPARATOR, index);
105 ti.setControl(control); 106 ti.setControl(control);
106 ti.setWidth(computeWidth(control)); 107 ti.setWidth(computeWidth(control));
107 } 108 }