1 11 12 package org.eclipse.ui.internal.menus; 13 14 import java.util.ArrayList ; 15 import java.util.Collection ; 16 import java.util.HashMap ; 17 import java.util.HashSet ; 18 import java.util.Iterator ; 19 import java.util.List ; 20 import java.util.Map ; 21 22 import org.eclipse.core.commands.Category; 23 import org.eclipse.core.commands.Command; 24 import org.eclipse.core.commands.CommandEvent; 25 import org.eclipse.core.commands.ICommandListener; 26 import org.eclipse.core.commands.IHandler; 27 import org.eclipse.core.commands.ParameterizedCommand; 28 import org.eclipse.core.commands.State; 29 import org.eclipse.core.expressions.Expression; 30 import org.eclipse.core.runtime.IConfigurationElement; 31 import org.eclipse.core.runtime.IExtensionRegistry; 32 import org.eclipse.core.runtime.IRegistryChangeEvent; 33 import org.eclipse.core.runtime.Platform; 34 import org.eclipse.jface.action.Action; 35 import org.eclipse.jface.action.LegacyActionTools; 36 import org.eclipse.jface.bindings.Binding; 37 import org.eclipse.jface.bindings.Scheme; 38 import org.eclipse.jface.bindings.keys.IKeyLookup; 39 import org.eclipse.jface.bindings.keys.KeyBinding; 40 import org.eclipse.jface.bindings.keys.KeyLookupFactory; 41 import org.eclipse.jface.bindings.keys.KeySequence; 42 import org.eclipse.jface.bindings.keys.KeyStroke; 43 import org.eclipse.jface.commands.RadioState; 44 import org.eclipse.jface.commands.ToggleState; 45 import org.eclipse.jface.contexts.IContextIds; 46 import org.eclipse.jface.menus.IMenuStateIds; 47 import org.eclipse.ui.IWorkbenchWindow; 48 import org.eclipse.ui.PlatformUI; 49 import org.eclipse.ui.SelectionEnabler; 50 import org.eclipse.ui.commands.ICommandService; 51 import org.eclipse.ui.handlers.IHandlerActivation; 52 import org.eclipse.ui.handlers.IHandlerService; 53 import org.eclipse.ui.internal.ActionExpression; 54 import org.eclipse.ui.internal.WorkbenchMessages; 55 import org.eclipse.ui.internal.WorkbenchPlugin; 56 import org.eclipse.ui.internal.expressions.LegacyActionExpressionWrapper; 57 import org.eclipse.ui.internal.expressions.LegacyActionSetExpression; 58 import org.eclipse.ui.internal.expressions.LegacyEditorContributionExpression; 59 import org.eclipse.ui.internal.expressions.LegacySelectionEnablerWrapper; 60 import org.eclipse.ui.internal.expressions.LegacyViewContributionExpression; 61 import org.eclipse.ui.internal.expressions.LegacyViewerContributionExpression; 62 import org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy; 63 import org.eclipse.ui.internal.handlers.IActionCommandMappingService; 64 import org.eclipse.ui.internal.keys.BindingService; 65 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants; 66 import org.eclipse.ui.internal.services.RegistryPersistence; 67 import org.eclipse.ui.keys.IBindingService; 68 69 82 public final class LegacyActionPersistence extends RegistryPersistence { 83 84 89 private static final int INDEX_ACTION_SETS = 0; 90 91 96 private static final int INDEX_EDITOR_CONTRIBUTIONS = 1; 97 98 103 private static final int INDEX_OBJECT_CONTRIBUTIONS = 2; 104 105 110 private static final int INDEX_VIEW_CONTRIBUTIONS = 3; 111 112 117 private static final int INDEX_VIEWER_CONTRIBUTIONS = 4; 118 119 120 136 private static final Expression readVisibility( 137 final IConfigurationElement parentElement, final String parentId, 138 final List warningsToLog) { 139 final IConfigurationElement[] visibilityElements = parentElement 140 .getChildren(TAG_VISIBILITY); 141 if ((visibilityElements == null) || (visibilityElements.length == 0)) { 142 return null; 143 } 144 145 if (visibilityElements.length != 1) { 146 addWarning(warningsToLog, 147 "There can only be one visibility element", parentElement, parentId); 149 } 150 151 final IConfigurationElement visibilityElement = visibilityElements[0]; 152 final ActionExpression visibilityActionExpression = new ActionExpression( 153 visibilityElement); 154 final LegacyActionExpressionWrapper wrapper = new LegacyActionExpressionWrapper( 155 visibilityActionExpression, null); 156 return wrapper; 157 } 158 159 163 private final BindingService bindingService; 164 165 166 167 171 private final ICommandService commandService; 172 173 178 private final Collection handlerActivations = new ArrayList (); 179 180 185 private final Collection menuContributions = new ArrayList (); 186 187 191 private final IWorkbenchWindow window; 192 193 196 private ICommandListener actionSetListener = new ICommandListener() { 197 public void commandChanged(CommandEvent commandEvent) { 198 Command cmd = commandEvent.getCommand(); 199 String commandId = cmd.getId(); 200 Binding binding = (Binding) commandIdToBinding.get(commandId); 201 if (binding != null) { 202 if (cmd.isEnabled()) { 203 if (!actionSetActiveBindings.contains(binding)) { 204 bindingService.addBinding(binding); 205 actionSetActiveBindings.add(binding); 206 } 207 } else if (actionSetActiveBindings.contains(binding)) { 208 bindingService.removeBinding(binding); 209 actionSetActiveBindings.remove(binding); 210 } 211 } 212 } 213 }; 214 215 218 private HashMap commandIdToBinding = new HashMap (); 219 220 223 private HashSet actionSetActiveBindings = new HashSet (); 224 225 232 public LegacyActionPersistence(final IWorkbenchWindow window) { 233 this.bindingService = (BindingService) window 235 .getService(IBindingService.class); 236 237 this.commandService = (ICommandService) window 238 .getService(ICommandService.class); 239 this.window = window; 240 } 241 242 246 private final void clearActivations() { 247 final IHandlerService service = (IHandlerService) window 248 .getService(IHandlerService.class); 249 service.deactivateHandlers(handlerActivations); 250 final Iterator activationItr = handlerActivations.iterator(); 251 while (activationItr.hasNext()) { 252 final IHandlerActivation activation = (IHandlerActivation) activationItr 253 .next(); 254 final IHandler handler = activation.getHandler(); 255 if (handler != null) { 256 handler.dispose(); 257 } 258 } 259 handlerActivations.clear(); 260 } 261 262 266 private final void clearBindings() { 267 Iterator i = commandIdToBinding.entrySet().iterator(); 268 while (i.hasNext()) { 269 Map.Entry entry = (Map.Entry ) i.next(); 270 String commandId = (String ) entry.getKey(); 271 Binding binding = (Binding) entry.getValue(); 272 commandService.getCommand(commandId).removeCommandListener(actionSetListener); 273 if (binding!=null && actionSetActiveBindings.contains(binding)) { 274 bindingService.removeBinding(binding); 275 } 276 } 277 commandIdToBinding.clear(); 278 actionSetActiveBindings.clear(); 279 } 280 281 286 private final void clearImages() { 287 } 289 290 294 private final void clearMenus() { 295 menuContributions.clear(); 296 } 297 298 309 private final void convertActionToBinding( 310 final IConfigurationElement element, 311 final ParameterizedCommand command, final List warningsToLog) { 312 String acceleratorText = readOptional(element, ATT_ACCELERATOR); 314 if (acceleratorText == null) { 315 final String label = readOptional(element, ATT_LABEL); 316 if (label != null) { 317 acceleratorText = LegacyActionTools 318 .extractAcceleratorText(label); 319 } 320 } 321 322 if (acceleratorText != null) { 324 final IKeyLookup lookup = KeyLookupFactory.getSWTKeyLookup(); 325 final int acceleratorInt = LegacyActionTools 326 .convertAccelerator(acceleratorText); 327 final int modifierMask = lookup.getAlt() | lookup.getCommand() 328 | lookup.getCtrl() | lookup.getShift(); 329 final int modifierKeys = acceleratorInt & modifierMask; 330 final int naturalKey = acceleratorInt & ~modifierMask; 331 final KeyStroke keyStroke = KeyStroke.getInstance(modifierKeys, 332 naturalKey); 333 final KeySequence keySequence = KeySequence.getInstance(keyStroke); 334 335 final Scheme activeScheme = bindingService.getActiveScheme(); 336 337 try { 338 final Binding binding = new KeyBinding(keySequence, command, 339 activeScheme.getId(), IContextIds.CONTEXT_ID_WINDOW, 340 null, null, null, Binding.SYSTEM); 341 commandIdToBinding.put(command.getCommand().getId(), binding); 342 343 if (command.getCommand().isEnabled()) { 344 bindingService.addBinding(binding); 345 actionSetActiveBindings.add(binding); 346 } 347 348 command.getCommand().addCommandListener(actionSetListener); 349 } catch (IllegalArgumentException e) { 350 addWarning(warningsToLog, 351 "invalid keybinding: " + e.getMessage(), element, command.getCommand().getId()); 353 } 354 } 355 } 356 357 379 private final ParameterizedCommand convertActionToCommand( 380 final IConfigurationElement element, final String primaryId, 381 final String secondaryId, final List warningsToLog) { 382 String commandId = readOptional(element, ATT_DEFINITION_ID); 383 Command command = null; 384 if (commandId != null) { 385 command = commandService.getCommand(commandId); 386 } 387 388 final IActionCommandMappingService mappingService = (IActionCommandMappingService) window 389 .getService(IActionCommandMappingService.class); 390 391 String label = null; 392 if ((commandId == null) || (!command.isDefined())) { 393 if (commandId == null && mappingService != null) { 395 commandId = mappingService.getGeneratedCommandId(primaryId, 396 secondaryId); 397 } 398 if (commandId == null) { 399 WorkbenchPlugin.log("MappingService unavailable"); return null; 401 } 402 403 label = readRequired(element, ATT_LABEL, warningsToLog, 405 "Actions require a non-empty label or definitionId", commandId); 407 if (label == null) { 408 label = WorkbenchMessages.LegacyActionPersistence_AutogeneratedCommandName; 409 } 410 411 415 final String tooltip = readOptional(element, ATT_TOOLTIP); 416 417 command = commandService.getCommand(commandId); 419 final Category category = commandService.getCategory(null); 420 final String name = LegacyActionTools.removeAcceleratorText(Action 421 .removeMnemonics(label)); 422 command.define(name, tooltip, category, null); 423 424 final String style = readOptional(element, ATT_STYLE); 426 if (STYLE_RADIO.equals(style)) { 427 final State state = new RadioState(); 428 final boolean checked = readBoolean(element, ATT_STATE, false); 430 state.setValue((checked) ? Boolean.TRUE : Boolean.FALSE); 431 command.addState(IMenuStateIds.STYLE, state); 432 433 } else if (STYLE_TOGGLE.equals(style)) { 434 final State state = new ToggleState(); 435 final boolean checked = readBoolean(element, ATT_STATE, false); 436 state.setValue((checked) ? Boolean.TRUE : Boolean.FALSE); 437 command.addState(IMenuStateIds.STYLE, state); 438 } 439 } 440 if (mappingService != null && commandId != null) { 443 mappingService.map(mappingService.getGeneratedCommandId(primaryId, 444 secondaryId), commandId); 445 } 446 447 return new ParameterizedCommand(command, null); 448 } 449 450 476 private final void convertActionToHandler( 477 final IConfigurationElement element, final String actionId, 478 final ParameterizedCommand command, 479 final Expression activeWhenExpression, final String viewId, 480 final List warningsToLog) { 481 final boolean retarget = readBoolean(element, ATT_RETARGET, false); 483 484 final boolean classAvailable = (element.getAttribute(ATT_CLASS) != null) 485 || (element.getChildren(TAG_CLASS).length != 0); 486 String classString = readOptional(element, ATT_CLASS); 488 if (classAvailable && classString == null) { 489 classString = readOptional(element.getChildren(TAG_CLASS)[0], 490 ATT_CLASS); 491 } 492 493 if (retarget) { 494 if (classAvailable && !isPulldown(element)) { 495 addWarning(warningsToLog, 496 "The class was not null but retarget was set to true", element, actionId, ATT_CLASS, classString); 498 } 499 500 final IActionCommandMappingService mappingService = (IActionCommandMappingService) window 502 .getService(IActionCommandMappingService.class); 503 if (mappingService != null) { 504 mappingService.map(actionId, command.getId()); 505 } else { 506 addWarning( 509 warningsToLog, 510 "Retarget service unavailable", element, actionId); 512 } 513 return; 515 } else if (!classAvailable) { 516 addWarning( 517 warningsToLog, 518 "There was no class provided, and the action is not retargettable", element, actionId); 520 return; } 522 523 SelectionEnabler enabler = null; 525 if (element.getAttribute(ATT_ENABLES_FOR) != null) { 526 enabler = new SelectionEnabler(element); 527 } else { 528 IConfigurationElement[] kids = element.getChildren(TAG_ENABLEMENT); 529 if (kids.length > 0) { 530 enabler = new SelectionEnabler(element); 531 } 532 } 533 final Expression enabledWhenExpression; 534 if (enabler == null) { 535 enabledWhenExpression = null; 536 } else { 537 enabledWhenExpression = new LegacySelectionEnablerWrapper(enabler, 538 window); 539 } 540 541 546 final ActionDelegateHandlerProxy handler = new ActionDelegateHandlerProxy( 547 element, ATT_CLASS, actionId, command, window, null, 548 enabledWhenExpression, viewId); 549 550 final String helpContextId = readOptional(element, ATT_HELP_CONTEXT_ID); 552 if (helpContextId != null) { 553 commandService.setHelpContextId(handler, helpContextId); 554 } 555 556 final String commandId = command.getId(); 558 final IHandlerService service = (IHandlerService) window 559 .getService(IHandlerService.class); 560 final IHandlerActivation handlerActivation; 561 if (activeWhenExpression == null) { 562 handlerActivation = service.activateHandler(commandId, handler); 563 } else { 564 handlerActivation = service.activateHandler(commandId, handler, 565 activeWhenExpression); 566 } 567 handlerActivations.add(handlerActivation); 568 } 569 570 571 572 public final void dispose() { 573 super.dispose(); 574 clear(); 575 } 576 577 private void clear() { 578 clearActivations(); 579 clearBindings(); 580 clearImages(); 581 clearMenus(); 582 } 583 584 protected final boolean isChangeImportant(final IRegistryChangeEvent event) { 585 return !((event.getExtensionDeltas(PlatformUI.PLUGIN_ID, 586 IWorkbenchRegistryConstants.PL_ACTION_SETS).length == 0) 587 && (event.getExtensionDeltas(PlatformUI.PLUGIN_ID, 588 IWorkbenchRegistryConstants.PL_EDITOR_ACTIONS).length == 0) 589 && (event.getExtensionDeltas(PlatformUI.PLUGIN_ID, 590 IWorkbenchRegistryConstants.PL_POPUP_MENU).length == 0) && (event 591 .getExtensionDeltas(PlatformUI.PLUGIN_ID, 592 IWorkbenchRegistryConstants.PL_VIEW_ACTIONS).length == 0)); 593 } 594 595 606 public final void read() { 607 clear(); 608 LegacyActionPersistence.super.read(); 609 610 final IExtensionRegistry registry = Platform.getExtensionRegistry(); 612 int actionSetCount = 0; 613 int editorContributionCount = 0; 614 int objectContributionCount = 0; 615 int viewContributionCount = 0; 616 int viewerContributionCount = 0; 617 final IConfigurationElement[][] indexedConfigurationElements = new IConfigurationElement[5][]; 618 619 final IConfigurationElement[] actionSetsExtensionPoint = registry 621 .getConfigurationElementsFor(EXTENSION_ACTION_SETS); 622 for (int i = 0; i < actionSetsExtensionPoint.length; i++) { 623 final IConfigurationElement element = actionSetsExtensionPoint[i]; 624 final String name = element.getName(); 625 if (TAG_ACTION_SET.equals(name)) { 626 addElementToIndexedArray(element, indexedConfigurationElements, 627 INDEX_ACTION_SETS, actionSetCount++); 628 } 629 } 630 631 final IConfigurationElement[] editorActionsExtensionPoint = registry 633 .getConfigurationElementsFor(EXTENSION_EDITOR_ACTIONS); 634 for (int i = 0; i < editorActionsExtensionPoint.length; i++) { 635 final IConfigurationElement element = editorActionsExtensionPoint[i]; 636 final String name = element.getName(); 637 if (TAG_EDITOR_CONTRIBUTION.equals(name)) { 638 addElementToIndexedArray(element, indexedConfigurationElements, 639 INDEX_EDITOR_CONTRIBUTIONS, editorContributionCount++); 640 } 641 } 642 643 final IConfigurationElement[] popupMenusExtensionPoint = registry 645 .getConfigurationElementsFor(EXTENSION_POPUP_MENUS); 646 for (int i = 0; i < popupMenusExtensionPoint.length; i++) { 647 final IConfigurationElement element = popupMenusExtensionPoint[i]; 648 final String name = element.getName(); 649 if (TAG_OBJECT_CONTRIBUTION.equals(name)) { 650 addElementToIndexedArray(element, indexedConfigurationElements, 651 INDEX_OBJECT_CONTRIBUTIONS, objectContributionCount++); 652 } else if (TAG_VIEWER_CONTRIBUTION.equals(name)) { 653 addElementToIndexedArray(element, indexedConfigurationElements, 654 INDEX_VIEWER_CONTRIBUTIONS, viewerContributionCount++); 655 } 656 } 657 658 final IConfigurationElement[] viewActionsExtensionPoint = registry 660 .getConfigurationElementsFor(EXTENSION_VIEW_ACTIONS); 661 for (int i = 0; i < viewActionsExtensionPoint.length; i++) { 662 final IConfigurationElement element = viewActionsExtensionPoint[i]; 663 final String name = element.getName(); 664 if (TAG_VIEW_CONTRIBUTION.equals(name)) { 665 addElementToIndexedArray(element, indexedConfigurationElements, 666 INDEX_VIEW_CONTRIBUTIONS, viewContributionCount++); 667 } 668 } 669 670 readActionSets(indexedConfigurationElements[INDEX_ACTION_SETS], 671 actionSetCount); 672 readEditorContributions( 673 indexedConfigurationElements[INDEX_EDITOR_CONTRIBUTIONS], 674 editorContributionCount); 675 readObjectContributions( 676 indexedConfigurationElements[INDEX_OBJECT_CONTRIBUTIONS], 677 objectContributionCount); 678 readViewContributions( 679 indexedConfigurationElements[INDEX_VIEW_CONTRIBUTIONS], 680 viewContributionCount); 681 readViewerContributions( 682 indexedConfigurationElements[INDEX_VIEWER_CONTRIBUTIONS], 683 viewerContributionCount); 684 685 } 686 687 712 private final void readActions(final String primaryId, 713 final IConfigurationElement[] elements, final List warningsToLog, 714 final Expression visibleWhenExpression, final String viewId) { 715 for (int i = 0; i < elements.length; i++) { 716 final IConfigurationElement element = elements[i]; 717 718 722 final String id = readRequired(element, ATT_ID, warningsToLog, 723 "Actions require an id"); if (id == null) { 725 continue; 726 } 727 728 final ParameterizedCommand command = convertActionToCommand( 730 element, primaryId, id, warningsToLog); 731 if (command == null) { 732 continue; 733 } 734 735 convertActionToHandler(element, id, command, visibleWhenExpression, 736 viewId, warningsToLog); 737 739 convertActionToBinding(element, command, warningsToLog); 740 741 } 742 } 743 744 770 private final void readActionsAndMenus( 771 final IConfigurationElement element, final String id, 772 final List warningsToLog, 773 final Expression visibleWhenExpression, final String viewId) { 774 775 final IConfigurationElement[] actionElements = element 777 .getChildren(TAG_ACTION); 778 readActions(id, actionElements, 779 warningsToLog, visibleWhenExpression, viewId); 780 781 } 782 783 794 private final void readActionSets( 795 final IConfigurationElement[] configurationElements, 796 final int configurationElementCount) { 797 807 final List warningsToLog = new ArrayList (1); 808 809 for (int i = 0; i < configurationElementCount; i++) { 810 final IConfigurationElement element = configurationElements[i]; 811 812 final String id = readRequired(element, ATT_ID, warningsToLog, 814 "Action sets need an id"); if (id == null) { 816 continue; 817 } 818 819 final String label = readRequired(element, ATT_LABEL, 821 warningsToLog, "Actions set need a label", id); 823 if (label == null) { 824 continue; 825 } 826 827 final LegacyActionSetExpression expression = new LegacyActionSetExpression( 829 id, window); 830 831 832 readActionsAndMenus(element, id, 834 warningsToLog, expression, null); 835 } 837 838 logWarnings( 839 warningsToLog, 840 "Warnings while parsing the action sets from the 'org.eclipse.ui.actionSets' extension point"); } 842 843 854 private final void readEditorContributions( 855 final IConfigurationElement[] configurationElements, 856 final int configurationElementCount) { 857 final List warningsToLog = new ArrayList (1); 858 859 for (int i = 0; i < configurationElementCount; i++) { 860 final IConfigurationElement element = configurationElements[i]; 861 862 final String id = readRequired(element, ATT_ID, warningsToLog, 864 "Editor contributions need an id"); if (id == null) { 866 continue; 867 } 868 869 873 final String targetId = readRequired(element, ATT_TARGET_ID, 874 warningsToLog, "Editor contributions need a target id", id); if (targetId == null) { 876 continue; 877 } 878 final Expression visibleWhenExpression = new LegacyEditorContributionExpression( 879 targetId, window); 880 881 readActionsAndMenus(element, id, warningsToLog, 883 visibleWhenExpression, null); 884 } 885 886 logWarnings( 887 warningsToLog, 888 "Warnings while parsing the editor contributions from the 'org.eclipse.ui.editorActions' extension point"); } 890 891 892 893 894 905 private final void readObjectContributions( 906 final IConfigurationElement[] configurationElements, 907 final int configurationElementCount) { 908 final List warningsToLog = new ArrayList (1); 909 910 for (int i = 0; i < configurationElementCount; i++) { 911 final IConfigurationElement element = configurationElements[i]; 912 913 final String id = readRequired(element, ATT_ID, warningsToLog, 915 "Object contributions need an id"); if (id == null) { 917 continue; 918 } 919 920 final String objectClass = readRequired(element, ATT_OBJECTCLASS, 922 warningsToLog, 923 "Object contributions need an object class", id); if (objectClass == null) { 925 continue; 926 } 927 928 932 937 938 941 final Expression visibleWhenExpression = readVisibility(element, 944 id, warningsToLog); 945 946 readActionsAndMenus(element, id, warningsToLog, 948 visibleWhenExpression, null); 949 } 950 951 logWarnings( 952 warningsToLog, 953 "Warnings while parsing the object contributions from the 'org.eclipse.ui.popupMenus' extension point"); } 955 956 967 private final void readViewContributions( 968 final IConfigurationElement[] configurationElements, 969 final int configurationElementCount) { 970 final List warningsToLog = new ArrayList (1); 971 972 for (int i = 0; i < configurationElementCount; i++) { 973 final IConfigurationElement element = configurationElements[i]; 974 975 final String id = readRequired(element, ATT_ID, warningsToLog, 977 "View contributions need an id"); if (id == null) { 979 continue; 980 } 981 982 986 final String targetId = readRequired(element, ATT_TARGET_ID, 987 warningsToLog, "View contributions need a target id", id); if (targetId == null) { 989 continue; 990 } 991 final Expression visibleWhenExpression = new LegacyViewContributionExpression( 992 targetId, window); 993 994 readActionsAndMenus(element, id, warningsToLog, 996 visibleWhenExpression, targetId); 997 } 998 999 logWarnings( 1000 warningsToLog, 1001 "Warnings while parsing the view contributions from the 'org.eclipse.ui.viewActions' extension point"); } 1003 1004 1015 private final void readViewerContributions( 1016 final IConfigurationElement[] configurationElements, 1017 final int configurationElementCount) { 1018 final List warningsToLog = new ArrayList (1); 1019 1020 for (int i = 0; i < configurationElementCount; i++) { 1021 final IConfigurationElement element = configurationElements[i]; 1022 1023 final String id = readRequired(element, ATT_ID, warningsToLog, 1025 "Viewer contributions need an id"); if (id == null) { 1027 continue; 1028 } 1029 1030 1034 final String targetId = readRequired(element, ATT_TARGET_ID, 1035 warningsToLog, "Viewer contributions need a target id", id); if (targetId == null) { 1037 continue; 1038 } 1039 1040 final Expression visibleWhenExpression = readVisibility(element, 1042 id, warningsToLog); 1043 final Expression menuVisibleWhenExpression = new LegacyViewerContributionExpression( 1044 targetId, window, visibleWhenExpression); 1045 1046 readActionsAndMenus(element, id, warningsToLog, 1048 menuVisibleWhenExpression, targetId); 1049 } 1050 1051 logWarnings( 1052 warningsToLog, 1053 "Warnings while parsing the viewer contributions from the 'org.eclipse.ui.popupMenus' extension point"); } 1055} 1056 | Popular Tags |