You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2009/05/21 14:38:59 UTC

svn commit: r777093 [2/2] - in /incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor: ./ core/ editor/ editor/util/ ui/ ui/wizards/

Modified: incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/ImportDocumentWizard.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/ImportDocumentWizard.java?rev=777093&r1=777092&r2=777093&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/ImportDocumentWizard.java (original)
+++ incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/ImportDocumentWizard.java Thu May 21 12:38:53 2009
@@ -16,24 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
 
 package org.apache.uima.caseditor.ui.wizards;
 
@@ -49,55 +31,51 @@
 import org.eclipse.ui.wizards.datatransfer.ImportOperation;
 
 /**
- * This import dialog can import text files into a corpus.
- * Currently plain text and rich text format is supported.
+ * This import dialog can import text files into a corpus. Currently plain text and rich text format
+ * is supported.
  */
-public final class ImportDocumentWizard extends Wizard implements IImportWizard
-{
-    private ImportDocumentWizardPage mMainPage;
+public final class ImportDocumentWizard extends Wizard implements IImportWizard {
+  private ImportDocumentWizardPage mMainPage;
 
-    private IStructuredSelection mCurrentResourceSelection;
+  private IStructuredSelection mCurrentResourceSelection;
 
-    public void init(IWorkbench workbench, IStructuredSelection selection)
-    {
-        mCurrentResourceSelection = selection; // if corpus set as import corpus
+  public void init(IWorkbench workbench, IStructuredSelection selection) {
+    mCurrentResourceSelection = selection; // if corpus set as import corpus
 
-        setWindowTitle("Import Documents");
-    }
+    setWindowTitle("Import Documents");
+  }
 
-    @Override
-    public void addPages()
-    {
-        mMainPage = new ImportDocumentWizardPage("ImportDocuments", mCurrentResourceSelection);
+  @Override
+  public void addPages() {
+    mMainPage = new ImportDocumentWizardPage("ImportDocuments", mCurrentResourceSelection);
 
-        addPage(mMainPage);
-    }
-
-    @Override
-    public boolean performFinish()
-    {
-      IImportStructureProvider importProvider = new DocumentImportStructureProvider();
+    addPage(mMainPage);
+  }
 
-      ImportOperation operation = new ImportOperation(mMainPage.getImportDestinationPath(),
-              importProvider, null, mMainPage.getFilesToImport());
+  @Override
+  public boolean performFinish() {
+    IImportStructureProvider importProvider = new DocumentImportStructureProvider();
 
-      operation.setContext(getShell());
+    ImportOperation operation =
+            new ImportOperation(mMainPage.getImportDestinationPath(), importProvider, null,
+            mMainPage.getFilesToImport());
 
-      operation.setOverwriteResources(false);
+    operation.setContext(getShell());
 
-      try {
-        getContainer().run(true, true, operation);
-      } catch (InvocationTargetException e) {
-        CasEditorPlugin.log(e);
+    operation.setOverwriteResources(false);
 
-        MessageDialog.openError(getContainer().getShell(),
-                "Error during import", e.getMessage());
+    try {
+      getContainer().run(true, true, operation);
+    } catch (InvocationTargetException e) {
+      CasEditorPlugin.log(e);
 
-        return false;
-      } catch (InterruptedException e) {
-        return false;
-      }
+      MessageDialog.openError(getContainer().getShell(), "Error during import", e.getMessage());
 
-      return true;
+      return false;
+    } catch (InterruptedException e) {
+      return false;
     }
-}
\ No newline at end of file
+
+    return true;
+  }
+}

Modified: incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/NewNlpProjectWizardPage.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/NewNlpProjectWizardPage.java?rev=777093&r1=777092&r2=777093&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/NewNlpProjectWizardPage.java (original)
+++ incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/NewNlpProjectWizardPage.java Thu May 21 12:38:53 2009
@@ -15,7 +15,9 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */package org.apache.uima.caseditor.ui.wizards;
+ */
+
+package org.apache.uima.caseditor.ui.wizards;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;

Modified: incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFileCreation.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFileCreation.java?rev=777093&r1=777092&r2=777093&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFileCreation.java (original)
+++ incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFileCreation.java Thu May 21 12:38:53 2009
@@ -15,7 +15,9 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */package org.apache.uima.caseditor.ui.wizards;
+ */
+
+package org.apache.uima.caseditor.ui.wizards;
 
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
@@ -25,42 +27,38 @@
 /**
  * Wizard to create a new file.
  */
-final public class WizardNewFileCreation extends Wizard implements INewWizard
-{
-    /**
-     * The ID of the new nlp project wizard.
-     */
-    public static final String ID =
-        "org.apache.uima.caseditor.ui.wizards.WizardNewFileCreation";
-
-    // private WizardNewFileCreationPage mMainPage;
-
-    /**
-     * Initializes the <code>NLPProjectWizard</code>.
-     */
-    public void init(IWorkbench workbench, IStructuredSelection selection) {
-        setWindowTitle("New file");
-    }
-
-    /**
-     * Adds the project wizard page to the wizard.
-     */
-    @Override
-    public void addPages()
-    {
-//        mMainPage = new WizardNewFileCreationPage("File", selection);
-//        mMainPage.setTitle("File creation");
-//        mMainPage.setDescription("Create a file");
-//        addPage(mMainPage);
-    }
-
-    /**
-     * Creates the nlp project.
-     */
-    @Override
-    public boolean performFinish()
-    {
-        // mMainPage.createNewFile();
-        return true;
-    }
+final public class WizardNewFileCreation extends Wizard implements INewWizard {
+  /**
+   * The ID of the new nlp project wizard.
+   */
+  public static final String ID = "org.apache.uima.caseditor.ui.wizards.WizardNewFileCreation";
+
+  // private WizardNewFileCreationPage mMainPage;
+
+  /**
+   * Initializes the <code>NLPProjectWizard</code>.
+   */
+  public void init(IWorkbench workbench, IStructuredSelection selection) {
+    setWindowTitle("New file");
+  }
+
+  /**
+   * Adds the project wizard page to the wizard.
+   */
+  @Override
+  public void addPages() {
+    // mMainPage = new WizardNewFileCreationPage("File", selection);
+    // mMainPage.setTitle("File creation");
+    // mMainPage.setDescription("Create a file");
+    // addPage(mMainPage);
+  }
+
+  /**
+   * Creates the nlp project.
+   */
+  @Override
+  public boolean performFinish() {
+    // mMainPage.createNewFile();
+    return true;
+  }
 }

Modified: incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFolderCreation.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFolderCreation.java?rev=777093&r1=777092&r2=777093&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFolderCreation.java (original)
+++ incubator/uima/sandbox/trunk/CasEditorEclipsePlugin/src/main/java/org/apache/uima/caseditor/ui/wizards/WizardNewFolderCreation.java Thu May 21 12:38:53 2009
@@ -15,7 +15,9 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */package org.apache.uima.caseditor.ui.wizards;
+ */
+
+package org.apache.uima.caseditor.ui.wizards;
 
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
@@ -25,42 +27,38 @@
 /**
  * Wizard to create a new folder.
  */
-final public class WizardNewFolderCreation extends Wizard implements INewWizard
-{
-    /**
-     * The ID of the new nlp project wizard.
-     */
-    public static final String ID =
-        "org.apache.uima.caseditor.ui.wizards.WizardNewFolderCreation";
-
-//    private WizardNewFolderCreationPage mMainPage;
-
-    /**
-     * Initializes the <code>NLPProjectWizard</code>.
-     */
-    public void init(IWorkbench workbench, IStructuredSelection selection) {
-        setWindowTitle("New folder");
-    }
-
-    /**
-     * Adds the project wizard page to the wizard.
-     */
-    @Override
-    public void addPages()
-    {
-//        mMainPage = new WizardNewFolderCreationPage("Folder", selection);
-//        mMainPage.setTitle("Folder creation");
-//        mMainPage.setDescription("Create a folder");
-//        addPage(mMainPage);
-    }
-
-    /**
-     * Creates the nlp project.
-     */
-    @Override
-    public boolean performFinish()
-    {
-//        mMainPage.createNewFolder();
-        return true;
-    }
+final public class WizardNewFolderCreation extends Wizard implements INewWizard {
+  /**
+   * The ID of the new nlp project wizard.
+   */
+  public static final String ID = "org.apache.uima.caseditor.ui.wizards.WizardNewFolderCreation";
+
+  // private WizardNewFolderCreationPage mMainPage;
+
+  /**
+   * Initializes the <code>NLPProjectWizard</code>.
+   */
+  public void init(IWorkbench workbench, IStructuredSelection selection) {
+    setWindowTitle("New folder");
+  }
+
+  /**
+   * Adds the project wizard page to the wizard.
+   */
+  @Override
+  public void addPages() {
+    // mMainPage = new WizardNewFolderCreationPage("Folder", selection);
+    // mMainPage.setTitle("Folder creation");
+    // mMainPage.setDescription("Create a folder");
+    // addPage(mMainPage);
+  }
+
+  /**
+   * Creates the nlp project.
+   */
+  @Override
+  public boolean performFinish() {
+    // mMainPage.createNewFolder();
+    return true;
+  }
 }