Examples of NewObjectDelegate


Examples of org.locationtech.udig.ui.action.NewObjectDelegate

        List<IConfigurationElement> list = ExtensionPointList
                .getExtensionPointList(NewObjectContribution.NEW_ACTION_ID);
        Collections.sort(list, new NewObjectDelegateComparator());
        for( IConfigurationElement element : list ) {
            final NewObjectDelegate item = new NewObjectDelegate(element, window);
            Action newAction = new Action(){
                @Override
                public void runWithEvent( org.eclipse.swt.widgets.Event event ) {
                    item.runAction();
                }
            };
            newAction.setText(item.text);
            newAction.setImageDescriptor(item.icon);
            newMenu.appendToGroup(Constants.NEW_START, newAction);
View Full Code Here

Examples of org.locationtech.udig.ui.action.NewObjectDelegate

        newMenu.add(new GroupMarker(Constants.NEW_START));
        List<IConfigurationElement> list = ExtensionPointList
                .getExtensionPointList(NewObjectContribution.NEW_ACTION_ID);
        Collections.sort(list, new NewObjectDelegateComparator());
        for( IConfigurationElement element : list ) {
            final NewObjectDelegate item = new NewObjectDelegate(element, window);
            Action newAction = new Action(){
                @Override
                public void runWithEvent( org.eclipse.swt.widgets.Event event ) {
                    item.runAction();
                }
            };
            newAction.setText(item.text);
            newAction.setImageDescriptor(item.icon);
            newMenu.appendToGroup(Constants.NEW_START, newAction);
        }
        newMenu.add(ContributionItemFactory.NEW_WIZARD_SHORTLIST.create(window));

        fileMenu.add(newMenu);
        fileMenu.add(new GroupMarker(Constants.OPEN_EXT));
        fileMenu.add(new Separator());
        fileMenu.add(new GroupMarker(Constants.PROJECT_EXT));
        fileMenu.add(new Separator());
        fileMenu.add(new GroupMarker(Constants.CLOSE_EXT));
        fileMenu.add(ActionFactory.CLOSE.create(window));
        fileMenu.add(ActionFactory.CLOSE_ALL.create(window));
        fileMenu.add(new Separator());

        fileMenu.add(new GroupMarker(Constants.SAVE_EXT));
        fileMenu.add(ActionFactory.SAVE.create(window));
        fileMenu.add(ActionFactory.SAVE_ALL.create(window));
        fileMenu.add(new Separator());

        fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
        fileMenu.add(new GroupMarker(ActionFactory.REFRESH.getId()));
        fileMenu.add(new GroupMarker(Constants.RENAME_EXT));
        fileMenu.add(new Separator());

        fileMenu.add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT));
        fileMenu.add(new Separator());

        fileMenu.add(ActionFactory.IMPORT.create(window));
        fileMenu.add(ActionFactory.EXPORT.create(window));
        fileMenu.add(new Separator());
        fileMenu.add(ActionFactory.PROPERTIES.create(window));
       
        fileMenu.add(new GroupMarker(Constants.CONFIG_EXT));
        fileMenu.add(new Separator());

        fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MRU));

        fileMenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));

        IWorkbenchAction quit = ActionFactory.QUIT.create(window);
        IContributionItem item = new ActionContributionItem(quit);
        item.setVisible(!Platform.OS_MACOSX.equals(Platform.getOS()));
       
        fileMenu.add(item);
    }
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.