Package org.apache.directory.studio.schemaeditor.model

Examples of org.apache.directory.studio.schemaeditor.model.Project


    public boolean performFinish()
    {
        String[] selectedSchemas = page.getSelectedSchemas();;
        ServerTypeEnum serverType = page.getServerType();

        Project project = Activator.getDefault().getProjectsHandler().getOpenProject();
        if ( project != null )
        {
            if ( ( selectedSchemas != null ) && ( serverType != null ) )
            {
                SchemaHandler schemaHandler = project.getSchemaHandler();
                for ( String selectedSchema : selectedSchemas )
                {
                    Schema schema = PluginUtils.loadCoreSchema( serverType, selectedSchema );
                    if ( schema != null )
                    {
View Full Code Here


     * @throws ProjectsImportException
     *      if an error occurs when importing the project
     */
    public static Project getProject( InputStream inputStream, String path ) throws ProjectsImportException
    {
        Project project = new Project();

        SAXReader reader = new SAXReader();
        Document document = null;
        try
        {
View Full Code Here

        }

        for ( Iterator<?> i = rootElement.elementIterator( PROJECT_TAG ); i.hasNext(); )
        {
            Element projectElement = ( Element ) i.next();
            Project project = new Project();
            readProject( projectElement, project, path );
            projects.add( project );
        }

        return projects.toArray( new Project[0] );
View Full Code Here

        // ProjectsHandlerListener
        Activator.getDefault().getProjectsHandler().addListener( projectsHandlerListener );

        // SchemaCheckerListener
        Project project = Activator.getDefault().getProjectsHandler().getOpenProject();
        if ( project != null )
        {
            addSchemaCheckerListener( project );
        }
View Full Code Here

    {
        // ProjectsHandlerListener
        Activator.getDefault().getProjectsHandler().removeListener( projectsHandlerListener );

        // SchemaCheckerListener
        Project project = Activator.getDefault().getProjectsHandler().getOpenProject();
        if ( project != null )
        {
            removeSchemaCheckerListener( project );
        }
    }
View Full Code Here

    /**
     * Initializes the state of the View.
     */
    private void initState()
    {
        Project project = Activator.getDefault().getProjectsHandler().getOpenProject();
        if ( project != null )
        {
            viewer.getTree().setEnabled( true );
            newSchema.setEnabled( true );
            newAttributeType.setEnabled( true );
View Full Code Here

     */
    public Image getImage( Object element )
    {
        if ( element instanceof ProjectWrapper )
        {
            Project project = ( ( ProjectWrapper ) element ).getProject();
            ProjectType type = project.getType();
            switch ( type )
            {
                case OFFLINE:
                    ProjectState state = project.getState();
                    switch ( state )
                    {
                        case OPEN:
                            return Activator.getDefault().getImage( PluginConstants.IMG_PROJECT_OFFLINE );
                        case CLOSED:
                            return Activator.getDefault().getImage( PluginConstants.IMG_PROJECT_OFFLINE_CLOSED );
                    }
                case ONLINE:
                    ProjectState state2 = project.getState();
                    switch ( state2 )
                    {
                        case OPEN:
                            return Activator.getDefault().getImage( PluginConstants.IMG_PROJECT_ONLINE );
                        case CLOSED:
View Full Code Here

            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();

                if ( ( !selection.isEmpty() ) && ( selection.size() == 1 ) )
                {
                    Project project = ( ( ProjectWrapper ) selection.getFirstElement() ).getProject();
                    if ( project.getState().equals( ProjectState.CLOSED ) )
                    {
                        projectsHandler.openProject( project );
                    }
                }
            }
View Full Code Here

    {
        coreSchemaSelectionWidget = new CoreSchemasSelectionWidget();
        Composite composite = coreSchemaSelectionWidget.createWidget( parent );
        coreSchemaSelectionWidget.init( ServerTypeEnum.APACHE_DS );

        Project project = Activator.getDefault().getProjectsHandler().getOpenProject();
        if ( project != null )
        {
            List<Schema> schemas = project.getSchemaHandler().getSchemas();
            List<String> schemaNames = new ArrayList<String>();
            for ( Schema schema : schemas )
            {
                schemaNames.add( schema.getName() );
            }
View Full Code Here

    /**
     * Initializes the UI Fields.
     */
    private void initFields()
    {
        Project project = Activator.getDefault().getProjectsHandler().getOpenProject();

        differencesWidget.setInput( DifferenceEngine.getDifferences( project.getSchemaBackup(), project
            .getSchemaHandler().getSchemas() ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.schemaeditor.model.Project

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.