Package org.locationtech.udig.internal.ui.operations

Examples of org.locationtech.udig.internal.ui.operations.OperationMenuFactory


        if (inputElement instanceof OperationCategory) {
            OperationCategory operationCategory = (OperationCategory) inputElement;
            return operationCategory.getActions().toArray();
        }
        else if (inputElement instanceof OperationDialog) {
            OperationMenuFactory factory = UiPlugin.getDefault().getOperationMenuFactory();
            return factory.getCategories().values().toArray();
        }
        return null;
    }
View Full Code Here


     * </ul>
     */
    @Override
    protected IContributionItem[] getContributionItems() {
        if( items == null ){
            OperationMenuFactory factory = UiPlugin.getDefault().getOperationMenuFactory();           
            List<IContributionItem> list = factory.createContributionItems( categoryId );
            if( list.size() == 0 ){
                items = new IContributionItem[0];
            }
            else if( list.size() == 1 ){
                items = list.toArray( new IContributionItem[list.size()]);
            }
            else {
                OperationCategory category = factory.findCategory( categoryId );
                MenuManager subMenu = new MenuManager( category.getMenuText(), category.getId() );
                for( IContributionItem item : list ){
                    subMenu.add( item );
                }
                items = new IContributionItem[]{ subMenu, };
View Full Code Here

        return INSTANCE;
    }

    public OperationMenuFactory getOperationMenuFactory() {
        if (operationMenuFactory == null) {
            operationMenuFactory = new OperationMenuFactory();
        }

        return operationMenuFactory;
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.internal.ui.operations.OperationMenuFactory

Copyright © 2018 www.massapicom. 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.