Changeset 1921
- Timestamp:
- 03/12/15 15:53:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/VisualizationUtils.java
r1495 r1921 119 119 120 120 if (parent.getData() instanceof ITask) { 121 contextValue = taskInfo.getMeasureValue(metrics[i] , (ITask) parent.getData());121 contextValue = taskInfo.getMeasureValue(metrics[i]); 122 122 } 123 123 … … 197 197 final SelectionAdapter menuItemSelectionAdapter) 198 198 { 199 final Menu menu = new Menu(tree); 200 tree.setMenu(menu); 199 Menu menu = tree.getMenu(); 200 201 if (menu == null) { 202 menu = new Menu(tree); 203 tree.setMenu(menu); 204 } 205 206 final Menu finalMenu = menu; 207 201 208 menu.addMenuListener(new MenuAdapter() { 202 209 public void menuShown(MenuEvent e) { 203 MenuItem[] items = menu.getItems();210 MenuItem[] items = finalMenu.getItems(); 204 211 for (int i = 0; i < items.length; i++) { 205 items[i].dispose(); 212 if (menuItemText.equals(items[i].getText())) { 213 items[i].dispose(); 214 } 206 215 } 207 216 208 217 if (selectedItemDataType.isInstance(tree.getSelection()[0].getData())) { 209 MenuItem newItem = new MenuItem( menu, SWT.NONE);218 MenuItem newItem = new MenuItem(finalMenu, SWT.NONE); 210 219 newItem.setText(menuItemText); 211 220 newItem.addSelectionListener(menuItemSelectionAdapter);
Note: See TracChangeset
for help on using the changeset viewer.