com.bbn.swede.ui.wizards
Class NewOWLDocumentWizard

java.lang.Object
  extended byWizard
      extended bycom.bbn.swede.ui.wizards.NewOWLDocumentWizard

public class NewOWLDocumentWizard
extends Wizard

Wizard for adding a new OWL document to a project.

Author:
tself
See Also:
Serialized Form

Constructor Summary
NewOWLDocumentWizard()
           
 
Method Summary
 void addPages()
          Add the one page to the wizard, the reused page WizardNewProjectCreationPage.
 IOWLDocument createNewDocument()
          Deprecated. As of SWeDE 1.0.2, replaced by createNewDocument(InputStream). Creating the input stream externally allows the wizard to recover gracefully and notify the user if the URL is unreachable. See also NewOWLDocumentWizardPage.openStream().
 IOWLDocument createNewDocument(InputStream input)
          Creates a new project resource with the name selected in the wizard page.
 void init(IWorkbench workbench, IStructuredSelection selection)
          Initializes this creation wizard using the passed workbench and object selection.
 boolean performFinish()
          Creates a project with a CustomNature association.
protected  void resultError(String title, String msg)
          Used to show action results.
protected  void resultInformation(String title, String msg)
          Used to show action results.
protected  boolean workspaceNotEmpty()
          Checks that there is at least one active/open project in the workspace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewOWLDocumentWizard

public NewOWLDocumentWizard()
Method Detail

addPages

public void addPages()
Add the one page to the wizard, the reused page WizardNewProjectCreationPage. This page provides basic project name validation and allows for

See Also:
Wizard

init

public void init(IWorkbench workbench,
                 IStructuredSelection selection)
Initializes this creation wizard using the passed workbench and object selection.

This method is called after the no argument constructor and before other methods are called.

Parameters:
workbench - the current workbench
selection - the current object selection
See Also:
IWorkbenchWizard

performFinish

public boolean performFinish()
Creates a project with a CustomNature association.

Returns:
true to indicate the finish request was accepted, and false to indicate that the finish request was refused
See Also:
IWizard

createNewDocument

public IOWLDocument createNewDocument()
Deprecated. As of SWeDE 1.0.2, replaced by createNewDocument(InputStream). Creating the input stream externally allows the wizard to recover gracefully and notify the user if the URL is unreachable. See also NewOWLDocumentWizardPage.openStream().

Creates a new project resource with the name selected in the wizard page. Project creation is wrapped in a WorkspaceModifyOperation.

Returns:
the created project resource, or null if the project was not created
See Also:
WorkspaceModifyOperation

createNewDocument

public IOWLDocument createNewDocument(InputStream input)
Creates a new project resource with the name selected in the wizard page. Project creation is wrapped in a WorkspaceModifyOperation.

Parameters:
input - An input stream for the external document being imported. If no document is being imported, this parameter is ignored and may be null.
Returns:
the created project resource, or null if the project was not created
See Also:
NewOWLDocumentWizardPage.openStream(), WorkspaceModifyOperation

workspaceNotEmpty

protected boolean workspaceNotEmpty()
Checks that there is at least one active/open project in the workspace. Provides user with opporunity to create one if not.

Returns:
boolean true if projects exist

resultInformation

protected void resultInformation(String title,
                                 String msg)
Used to show action results.

See Also:
MessageDialog

resultError

protected void resultError(String title,
                           String msg)
Used to show action results.

See Also:
MessageDialog


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.