Examples of OpAction


Examples of org.locationtech.udig.ui.operations.OpAction

            }
        }
        for( IConfigurationElement element : list ) {
            if (element.getName().equals("category")) //$NON-NLS-1$
                continue;
            OpAction action = new OpAction(element);
           
            if (window != null)
                window.getSelectionService().addSelectionListener(action);
            OperationCategory category = categories.get(element.getAttribute("categoryId")); //$NON-NLS-1$
            if (category != null) {
                category.add(action);
            } else {
                actions.add(action);
                if (element.getAttribute("categoryId") != null && element.getAttribute("categoryId").length() != 0) { //$NON-NLS-1$ //$NON-NLS-2$
                    UiPlugin.log("Action '"+action.getText()+"' references invalid category '"+element.getAttribute("categoryId")+"'.", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                }
            }
        }
    }
View Full Code Here

Examples of org.locationtech.udig.ui.operations.OpAction

            List<OpAction> actionList = ((OperationCategory) element).getActions();
            OpAction [] actions = actionList.toArray(new OpAction[actionList.size()]);
            if (actions != null) {
                ArrayList filtered = new ArrayList();
                for (int i = 0; i < actions.length; i++) {
                    OpAction action = actions[i];
                    if (!action.isEnabled() || WorkbenchActivityHelper.filterItem(action))
                        continue;
                    filtered.add(action);
                }
                return filtered.toArray();
            }
View Full Code Here

Examples of org.locationtech.udig.ui.operations.OpAction

        if (!categoriesToExpand.isEmpty())
            tree.setExpandedElements(categoriesToExpand.toArray());
       
        String selectedOperationID = settings.get(STORE_SELECTED_OPERATION_ID);
        if (selectedOperationID != null) {
            OpAction action = opMenuFactory.find(selectedOperationID);
            if (action != null) {
                tree.setSelection(new StructuredSelection(action), true);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.