コード例 #1
0
 /**
  * @param parentManager
  * @param itemModel
  */
 private void processSeparator(ToolBarManager parentManager, MToolBarSeparator itemModel) {
   IContributionItem ici = getContribution(itemModel);
   if (ici != null) {
     return;
   }
   AbstractGroupMarker marker = null;
   if (itemModel.isVisible() && !itemModel.getTags().contains(MenuManagerRenderer.GROUP_MARKER)) {
     marker = new Separator();
     marker.setId(itemModel.getElementId());
   } else {
     if (itemModel.getElementId() != null) {
       marker = new GroupMarker(itemModel.getElementId());
     }
   }
   if (marker != null) {
     addToManager(parentManager, itemModel, marker);
     linkModelToContribution(itemModel, marker);
   }
 }
コード例 #2
0
 /**
  * @param menuManager
  * @param itemModel
  */
 private void processSeparator(MenuManager menuManager, MMenuSeparator itemModel) {
   IContributionItem ici = getContribution(itemModel);
   if (ici != null) {
     return;
   }
   AbstractGroupMarker marker = null;
   if (itemModel.getTags().contains(GROUP_MARKER) || !itemModel.isVisible()) {
     if (itemModel.getElementId() != null) {
       marker = new GroupMarker(itemModel.getElementId());
     }
   } else {
     marker = new Separator();
     marker.setId(itemModel.getElementId());
   }
   if (marker == null) {
     return;
   }
   addToManager(menuManager, itemModel, marker);
   linkModelToContribution(itemModel, marker);
 }