|
Lines 369-375
Link Here
|
| 369 |
|
369 |
|
| 370 |
// Add action. |
370 |
// Add action. |
| 371 |
try { |
371 |
try { |
| 372 |
insertAfter(parent, mgroup, ad.getAction()); |
372 |
insertAfter(parent, mgroup, ad); |
| 373 |
} catch (IllegalArgumentException e) { |
373 |
} catch (IllegalArgumentException e) { |
| 374 |
WorkbenchPlugin |
374 |
WorkbenchPlugin |
| 375 |
.log("Plug-in '" + ad.getPluginId() + "' contributed an invalid Menu Extension (Group: '" + mgroup + "' is missing): " + ad.getId()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
375 |
.log("Plug-in '" + ad.getPluginId() + "' contributed an invalid Menu Extension (Group: '" + mgroup + "' is missing): " + ad.getId()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
|
Lines 441-447
Link Here
|
| 441 |
} |
441 |
} |
| 442 |
// Add action to tool bar. |
442 |
// Add action to tool bar. |
| 443 |
try { |
443 |
try { |
| 444 |
insertAfter(toolbar, tgroup, ad.getAction()); |
444 |
insertAfter(toolbar, tgroup, ad); |
| 445 |
} catch (IllegalArgumentException e) { |
445 |
} catch (IllegalArgumentException e) { |
| 446 |
WorkbenchPlugin |
446 |
WorkbenchPlugin |
| 447 |
.log("Plug-in '" + ad.getPluginId() //$NON-NLS-1$ |
447 |
.log("Plug-in '" + ad.getPluginId() //$NON-NLS-1$ |
|
Lines 463-470
Link Here
|
| 463 |
* Subclasses may override. |
463 |
* Subclasses may override. |
| 464 |
*/ |
464 |
*/ |
| 465 |
protected void insertAfter(IContributionManager mgr, String refId, |
465 |
protected void insertAfter(IContributionManager mgr, String refId, |
| 466 |
PluginAction action) { |
466 |
ActionDescriptor desc) { |
| 467 |
insertAfter(mgr, refId, new PluginActionContributionItem(action)); |
467 |
final PluginActionContributionItem item = new PluginActionContributionItem(desc.getAction()); |
|
|
468 |
item.setMode(desc.getMode()); |
| 469 |
insertAfter(mgr, refId, item); |
| 468 |
} |
470 |
} |
| 469 |
|
471 |
|
| 470 |
/** |
472 |
/** |