Mercurial > projects > dwt-addons
comparison dwtx/jface/action/ContributionManager.d @ 72:5df4896124c7
JFace and its examples do compile
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 17:56:17 +0200 |
parents | 46a6e0e6ccd4 |
children | 7ffeace6c47f |
comparison
equal
deleted
inserted
replaced
71:4878bef4a38e | 72:5df4896124c7 |
---|---|
84 | 84 |
85 /* | 85 /* |
86 * (non-Javadoc) Method declared on IContributionManager. | 86 * (non-Javadoc) Method declared on IContributionManager. |
87 */ | 87 */ |
88 public void add(IAction action) { | 88 public void add(IAction action) { |
89 Assert.isNotNull(action, "Action must not be null"); //$NON-NLS-1$ | 89 Assert.isNotNull( cast(Object)action, "Action must not be null"); //$NON-NLS-1$ |
90 add(new ActionContributionItem(action)); | 90 add(new ActionContributionItem(action)); |
91 } | 91 } |
92 | 92 |
93 /* | 93 /* |
94 * (non-Javadoc) Method declared on IContributionManager. | 94 * (non-Javadoc) Method declared on IContributionManager. |
95 */ | 95 */ |
96 public void add(IContributionItem item) { | 96 public void add(IContributionItem item) { |
97 Assert.isNotNull(item, "Item must not be null"); //$NON-NLS-1$ | 97 Assert.isNotNull( cast(Object)item, "Item must not be null"); //$NON-NLS-1$ |
98 if (allowItem(item)) { | 98 if (allowItem(item)) { |
99 contributions.append(item); | 99 contributions.append(item); |
100 itemAdded(item); | 100 itemAdded(item); |
101 } | 101 } |
102 } | 102 } |