Package org.apache.directory.studio.schemaeditor.view.wrappers

Examples of org.apache.directory.studio.schemaeditor.view.wrappers.ProjectWrapper


            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.YES | SWT.NO | SWT.ICON_QUESTION );
            int count = selection.size();
            if ( count == 1 )
            {
                ProjectWrapper wrapper = ( ProjectWrapper ) selection.getFirstElement();
                messageBox.setMessage( "Are you sure you want to delete project '" + wrapper.getProject().getName()
                    + "'?" );
            }
            else
            {
                messageBox.setMessage( "Are you sure you want to delete these " + count + " projects?" );
            }
            if ( messageBox.open() == SWT.YES )
            {
                for ( Iterator<?> iterator = selection.iterator(); iterator.hasNext(); )
                {
                    ProjectWrapper wrapper = ( ProjectWrapper ) iterator.next();
                    Project project = wrapper.getProject();

                    if ( project.getState() == ProjectState.OPEN )
                    {
                        // Closing the project before removing it.
                        projectsHandler.closeProject( project );
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.schemaeditor.view.wrappers.ProjectWrapper

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.