/** * This populates the pop-up menu before it appears. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public void menuAboutToShow(IMenuManager menuManager) { super.menuAboutToShow(menuManager); MenuManager submenuManager = null; submenuManager = new MenuManager(EclipseconEditPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); populateManager(submenuManager, createChildActions, null); menuManager.insertBefore("additions", submenuManager); submenuManager = new MenuManager(EclipseconEditPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); populateManager(submenuManager, createSiblingActions, null); menuManager.insertBefore("additions", submenuManager); }
/** * This populates the pop-up menu before it appears. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public void menuAboutToShow(IMenuManager menuManager) { super.menuAboutToShow(menuManager); MenuManager submenuManager = null; submenuManager = new MenuManager(CoordinationEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); populateManager(submenuManager, createChildActions, null); menuManager.insertBefore("edit", submenuManager); submenuManager = new MenuManager(CoordinationEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); populateManager(submenuManager, createSiblingActions, null); menuManager.insertBefore("edit", submenuManager); }
/** * This populates the pop-up menu before it appears. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public void menuAboutToShow(IMenuManager menuManager) { super.menuAboutToShow(menuManager); MenuManager submenuManager = null; submenuManager = new MenuManager( SimpleUMLEditPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); // $NON-NLS-1$ populateManager(submenuManager, createChildActions, null); menuManager.insertBefore("edit", submenuManager); // $NON-NLS-1$ submenuManager = new MenuManager( SimpleUMLEditPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); // $NON-NLS-1$ populateManager(submenuManager, createSiblingActions, null); menuManager.insertBefore("edit", submenuManager); // $NON-NLS-1$ }
/** * This populates the pop-up menu before it appears. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @param menuManager the menu manager * @generated_not */ @Override public void menuAboutToShow(IMenuManager menuManager) { super.menuAboutToShow(menuManager); if (generateDataSourceMenu) { generateDataSourceSubMenusAndActions(); menuManager.insertBefore("edit", dsMenuManager); generateDataSourceMenu = false; } if (generateQueryAndOperationAndResourceMenu) { if (config != null && StringUtils.isNotBlank(config.getId())) { menuManager.insertBefore("edit", configPropertyAction); menuManager.insertBefore("edit", queryAction); menuManager.insertBefore("edit", operationAction); menuManager.insertBefore("edit", resourceAction); generateQueryAndOperationAndResourceMenu = false; } else { displayError("Enter the DataSource Id to proceed."); } } if (generateQueryChildrenMenu) { if (query != null && StringUtils.isNotBlank(query.getId())) { menuManager.insertBefore("edit", queryPropertyGroupAction); menuManager.insertBefore("edit", resultAction); DataServiceImpl dsImpl = (DataServiceImpl) query.eContainer(); // Get all the config elements in the tree Iterator<DataSourceConfiguration> iterator = dsImpl.getDataSources().iterator(); // Get the config element that corresponds to the selected query while (iterator.hasNext()) { config = (DataSourceConfigurationImpl) iterator.next(); if (config.getId() != null && config.getId().equals(query.getDataSourceId())) { break; } } // Check the type of the configuration (config). If the type is // not a csv, excel or gspread // (if the type is rdbms, jndi or carbon data source) show the // "Add Input Parameter" menu item. if (config != null) { String confProperty = config.getConfigurationProperties().get(0).getName(); if (!(confProperty.equals(DSActionConstants.CSV_DATASOURCE_PROPERTY) || confProperty.equals(DSActionConstants.EXCEL_DATASOURCE_PROPERTY) || confProperty.equals(DSActionConstants.GSPREAD_DATASOURCE_PROPERTY))) { menuManager.insertBefore("edit", inputParamAction); } } menuManager.insertBefore("edit", eventTriggerAction); generateQueryChildrenMenu = false; } else { displayError("Enter the Query Id to proceed."); } } if (generateSubscriptionMenu) { if (eventTrigger != null && StringUtils.isNotBlank(eventTrigger.getId())) { menuManager.insertBefore("edit", subscriptionAction); generateSubscriptionMenu = false; } else { displayError("Enter the Event Id to proceed."); } } // To add an Output Mapping to a Result element, the Grouped By Element // and Row Name values should be provided. if (generateOutputMappingMenu) { if (result != null && (result.getElementName() == null || StringUtils.isBlank(result.getElementName()))) { displayError("Enter value for Grouped by Element"); } else if (result != null && (result.getRowName() == null || (StringUtils.isBlank(result.getRowName())))) { displayError("Enter value for Row Name"); } else { generateOutputMappingSubMenusAndActions(); menuManager.insertBefore("edit", outputMappingsMenuManager); generateOutputMappingMenu = false; } } if (generateCallQueryInputMappingMenu) { menuManager.insertBefore("edit", callQueryInputMappingAction); generateCallQueryInputMappingMenu = false; } if (generateValidatorMenu) { generateValidatorSubMenusAndActions(); menuManager.insertBefore("edit", validatorMenuManager); generateValidatorMenu = false; } if (generateCallQueryMenu) { menuManager.insertBefore("edit", callQueryAction); generateCallQueryMenu = false; } if (generateQueryPropertyListMenu) { menuManager.insertBefore("edit", queryPropertyAction); generateQueryPropertyListMenu = false; } }