Package org.apache.directory.studio.apacheds.configuration.model

Examples of org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParser


     */
    public boolean performFinish()
    {
        try
        {
            ServerConfigurationParser parser = new ServerConfigurationParser();
            ServerConfiguration serverConfiguration = parser.parse( Activator.class
                .getResourceAsStream( "default-server.xml" ) );

            IWorkbenchPage page = window.getActivePage();
            page.openEditor( new NonExistingServerConfigurationInput( serverConfiguration ), ServerConfigurationEditor.ID );
        }
View Full Code Here


        {
            if ( input instanceof FileEditorInput )
            // The 'FileEditorInput' class is used when the file is opened
            // from a project in the workspace.
            {
                ServerConfigurationParser parser = new ServerConfigurationParser();
                serverConfiguration = parser.parse( ( ( FileEditorInput ) input ).getFile().getContents() );
            }
            else if ( input instanceof IPathEditorInput )
            {
                ServerConfigurationParser parser = new ServerConfigurationParser();
                serverConfiguration = parser.parse( new FileInputStream( new File( ( ( IPathEditorInput ) input )
                    .getPath().toOSString() ) ) );
            }
            else if ( inputClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" )
                || inputClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) )
            // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
            // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
            // The class 'org.eclipse.ui.ide.FileStoreEditorInput' is used when
            // opening a file from the menu File > Open... in Eclipse 3.3.x
            {
                // We use the tooltip to get the full path of the file
                ServerConfigurationParser parser = new ServerConfigurationParser();
                serverConfiguration = parser.parse( new FileInputStream( new File( input.getToolTipText() ) ) );
            }
            else if ( input instanceof NonExistingServerConfigurationInput )
            {
                // The 'ServerConfigurationEditorInput' class is used when a
                // new Server Configuration File is created.
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
     */
    public void run( IAction action )
    {
        ServerConfigurationParser parser = new ServerConfigurationParser();
        ServerConfiguration serverConfiguration = null;
       
        try
        {
            serverConfiguration = parser.parse( Activator.class.getResourceAsStream( "default-server.xml" ) );
        }
        catch ( ServerConfigurationParserException e )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.OK | SWT.ICON_ERROR );
View Full Code Here

        if ( selectedFile == null || "".equals( selectedFile ) )
        {
            return;
        }

        ServerConfigurationParser parser = new ServerConfigurationParser();
        ServerConfiguration serverConfiguration = null;

        try
        {
            serverConfiguration = parser.parse( selectedFile );
        }
        catch ( ServerConfigurationParserException e )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.OK | SWT.ICON_ERROR );
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParser

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.