You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2016/11/13 16:13:18 UTC

svn commit: r1769512 [6/15] - in /uima/uimaj/branches/experiment-v3-jcas: uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/ uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ uimaj-ep-cas-editor/src/main/java/org/apache/uim...

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java?rev=1769512&r1=1769511&r2=1769512&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java Sun Nov 13 16:13:16 2016
@@ -80,7 +80,6 @@ import org.apache.uima.resource.metadata
 import org.apache.uima.resource.metadata.TypePriorityList;
 import org.apache.uima.resource.metadata.TypeSystemDescription;
 import org.apache.uima.resource.metadata.impl.MetaDataObject_impl;
-import org.apache.uima.resource.metadata.impl.ResourceMetaData_impl;
 import org.apache.uima.taeconfigurator.CDEpropertyPage;
 import org.apache.uima.taeconfigurator.InternalErrorCDE;
 import org.apache.uima.taeconfigurator.Messages;
@@ -161,6 +160,7 @@ import org.w3c.dom.Node;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 
+// TODO: Auto-generated Javadoc
 /**
  * Main class implementing the multi page editor. In Eclipse 3, we extend FormEditor, which extends
  * in turn MultiPageEditorPart.
@@ -205,11 +205,14 @@ import org.xml.sax.SAXException;
 public class MultiPageEditor extends FormEditor implements IUimaMultiPageEditor {
 
   // ******************************
+  /** The initial size type collections. */
   // * Tuning Parameters
   public final int INITIAL_SIZE_TYPE_COLLECTIONS = 20;
 
+  /** The initial size feature collections. */
   public final int INITIAL_SIZE_FEATURE_COLLECTIONS = 40;
   
+  /** The preserve comments. */
   public final boolean PRESERVE_COMMENTS = true;
 
   // ******************************
@@ -217,17 +220,23 @@ public class MultiPageEditor extends For
   // ***********************************************************
   // M O D E L
   // the following are only populated based on what type
+  /** The ae description. */
   // of descriptor is being edited
   private AnalysisEngineDescription aeDescription = null;
 
+  /** The type system description. */
   private TypeSystemDescription typeSystemDescription = null;
 
+  /** The merged type system description. */
   private TypeSystemDescription mergedTypeSystemDescription = null;
   
+  /** The merged types adding features. */
   private Map<String, Set<String>> mergedTypesAddingFeatures = new TreeMap<String, Set<String>>();
 
+  /** The imported type system description. */
   private TypeSystemDescription importedTypeSystemDescription = null;
 
+  /** The xml infoset. */
   private Node xmlInfoset = null;  // captures comments and ignorableWhitespace
   /**
    * Key = unique ID of included AE in aggregate Value = AnalysisEngineSpecification or URISpecifier
@@ -239,52 +248,67 @@ public class MultiPageEditor extends For
 
   // fully resolved (imports) and merged index collection
   // resolve with mergeDelegateAnalysisEngineFsIndexCollections
+  /** The merged fs index collection. */
   // (This works also for primitives)
   private FsIndexCollection mergedFsIndexCollection;
 
+  /** The imported fs index collection. */
   private FsIndexCollection importedFsIndexCollection;
 
   // fully resolved (imports) and merged type priorities
   // resolve with mergeDelegateAnalysisEngineTypePriorities
   // (This works also for primitives)
   // This collects all the type priority lists into one list, after
+  /** The merged type priorities. */
   // resolving imports.
   private TypePriorities mergedTypePriorities;
 
+  /** The imported type priorities. */
   private TypePriorities importedTypePriorities;
 
   // fully resolved (imports) ResourceManagerConfiguration
   // This collects all the External Resources and bindings into 2 list,
   // resolving imports. The resulting list may have
   // overridden bindings
+  /** The resolved external resources and bindings. */
   // unused external resources (not bound)
   private ResourceManagerConfiguration resolvedExternalResourcesAndBindings;
 
   // private ResourceManagerConfiguration importedExternalResourcesAndBindings;
 
+  /** The resolved flow controller declaration. */
   private FlowControllerDeclaration resolvedFlowControllerDeclaration;
 
+  /** The collection reader description. */
   private CollectionReaderDescription collectionReaderDescription;
 
+  /** The cas initializer description. */
   private CasInitializerDescription casInitializerDescription;
 
+  /** The cas consumer description. */
   private CasConsumerDescription casConsumerDescription;
 
+  /** The flow controller description. */
   private FlowControllerDescription flowControllerDescription;
 
   // values computed when first needed
+  /** The descriptor CAS. */
   // all use common markStale()
   public DescriptorTCAS descriptorCAS;
 
+  /** The all types. */
   public AllTypes allTypes;
 
+  /** The defined types with supers. */
   public DefinedTypesWithSupers definedTypesWithSupers;
 
   // ****************************************
   // * Model parts not part of the descriptor
+  /** The file. */
   // ****************************************
   private IFile file; // file being edited
 
+  /** The file needing context. */
   private IFile fileNeedingContext;
 
   // ***********************************************************
@@ -296,111 +320,175 @@ public class MultiPageEditor extends For
    * instance of the editor opens.
    */
 
+  /** The source index. */
   protected int sourceIndex = -1;
 
+  /** The overview index. */
   protected int overviewIndex = -1;
 
+  /** The aggregate index. */
   private int aggregateIndex = -1;
 
+  /** The parameter index. */
   private int parameterIndex = -1;
 
+  /** The settings index. */
   private int settingsIndex = -1;
 
+  /** The type index. */
   protected int typeIndex = -1;
 
+  /** The capability index. */
   protected int capabilityIndex = -1;
 
+  /** The indexes index. */
   protected int indexesIndex = -1;
 
+  /** The resources index. */
   protected int resourcesIndex = -1;
 
+  /** The overview page. */
   protected OverviewPage overviewPage = null;
 
+  /** The aggregate page. */
   private AggregatePage aggregatePage = null;
 
+  /** The parameter page. */
   private ParameterPage parameterPage = null;
 
+  /** The settings page. */
   private SettingsPage settingsPage = null;
 
+  /** The type page. */
   protected TypePage typePage = null;
 
+  /** The capability page. */
   protected CapabilityPage capabilityPage = null;
 
+  /** The indexes page. */
   protected IndexesPage indexesPage = null;
 
+  /** The resources page. */
   protected ResourcesPage resourcesPage = null;
 
+  /** The source text editor. */
   protected XMLEditor sourceTextEditor;
 
+  /** The m b is inited. */
   private boolean m_bIsInited = false;
 
+  /** The is bad XML. */
   protected boolean isBadXML = true;
 
+  /** The source changed. */
   public boolean sourceChanged = true;
 
+  /** The file dirty. */
   private boolean fileDirty; // can only be set dirty once inited
 
+  /** The dirty type name hash. */
   private HashSet dirtyTypeNameHash; // for generating .java
 
   // type files upon saving (this has a problem if user edited xml
   // directly...)
 
+  /** The m n save as status. */
   public int m_nSaveAsStatus = SAVE_AS_NOT_IN_PROGRESS;
 
+  /** The Constant SAVE_AS_NOT_IN_PROGRESS. */
   public static final int SAVE_AS_NOT_IN_PROGRESS = -1;
 
+  /** The Constant SAVE_AS_STARTED. */
   public static final int SAVE_AS_STARTED = -2;
 
+  /** The Constant SAVE_AS_CANCELLED. */
   public static final int SAVE_AS_CANCELLED = -3;
 
+  /** The Constant SAVE_AS_CONFIRMED. */
   public static final int SAVE_AS_CONFIRMED = -4;
 
+  /** The opening context. */
   private boolean openingContext = false;
 
+  /** The is context loaded. */
   private boolean isContextLoaded = false;
 
+  /**
+   * Gets the checks if is context loaded.
+   *
+   * @return the checks if is context loaded
+   */
   public boolean getIsContextLoaded() {
     return isContextLoaded;
   }
 
+  /** The limit J cas gen to project scope. */
   private boolean limitJCasGenToProjectScope = MultiPageEditorContributor.getLimitJCasGenToProjectScope();
   
+  /**
+   * Gets the limit J cas gen to project scope.
+   *
+   * @return the limit J cas gen to project scope
+   */
   public boolean getLimitJCasGenToProjectScope() {
     return limitJCasGenToProjectScope;
   }
   
+  /**
+   * Sets the limit J cas gen to project scope.
+   *
+   * @param v the new limit J cas gen to project scope
+   */
   public void setLimitJCasGenToProjectScope(boolean v) {
     limitJCasGenToProjectScope = v;
   }
 
-  /**
-   * Descriptor Types
-   */
+  /** Descriptor Types. */
 
   private int descriptorType = 0;
 
+  /**
+   * Gets the descriptor type.
+   *
+   * @return the descriptor type
+   */
   public int getDescriptorType() {
     return descriptorType;
   }
 
+  /** The Constant DESCRIPTOR_AE. */
   public static final int DESCRIPTOR_AE = 1;
 
+  /** The Constant DESCRIPTOR_TYPESYSTEM. */
   public static final int DESCRIPTOR_TYPESYSTEM = 1 << 1;
 
+  /** The Constant DESCRIPTOR_INDEX. */
   public static final int DESCRIPTOR_INDEX = 1 << 2;
 
+  /** The Constant DESCRIPTOR_TYPEPRIORITY. */
   public static final int DESCRIPTOR_TYPEPRIORITY = 1 << 3;
 
+  /** The Constant DESCRIPTOR_EXTRESANDBINDINGS. */
   public static final int DESCRIPTOR_EXTRESANDBINDINGS = 1 << 4;
 
+  /** The Constant DESCRIPTOR_COLLECTIONREADER. */
   public static final int DESCRIPTOR_COLLECTIONREADER = 1 << 5;
 
+  /** The Constant DESCRIPTOR_CASINITIALIZER. */
   public static final int DESCRIPTOR_CASINITIALIZER = 1 << 6;
 
+  /** The Constant DESCRIPTOR_CASCONSUMER. */
   public static final int DESCRIPTOR_CASCONSUMER = 1 << 7;
 
+  /** The Constant DESCRIPTOR_FLOWCONTROLLER. */
   public static final int DESCRIPTOR_FLOWCONTROLLER = 1 << 8;
 
+  /**
+   * Descriptor type string.
+   *
+   * @param pDescriptorType the descriptor type
+   * @return the string
+   */
   public String descriptorTypeString(int pDescriptorType) {
     String r;
     switch (pDescriptorType) {
@@ -429,82 +517,163 @@ public class MultiPageEditor extends For
     return r + Messages.getString("MultiPageEditor.9"); //$NON-NLS-1$
   }
 
+  /**
+   * Descriptor type string.
+   *
+   * @return the string
+   */
   public String descriptorTypeString() {
     return descriptorTypeString(descriptorType);
   }
 
+  /**
+   * Checks if is ae descriptor.
+   *
+   * @return true, if is ae descriptor
+   */
   public boolean isAeDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_AE);
   }
 
+  /**
+   * Checks if is type system descriptor.
+   *
+   * @return true, if is type system descriptor
+   */
   public boolean isTypeSystemDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_TYPESYSTEM);
   }
 
+  /**
+   * Checks if is fs index collection.
+   *
+   * @return true, if is fs index collection
+   */
   public boolean isFsIndexCollection() {
     return 0 != (descriptorType & DESCRIPTOR_INDEX);
   }
 
+  /**
+   * Checks if is type priority descriptor.
+   *
+   * @return true, if is type priority descriptor
+   */
   public boolean isTypePriorityDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_TYPEPRIORITY);
   }
 
+  /**
+   * Checks if is ext res and bindings descriptor.
+   *
+   * @return true, if is ext res and bindings descriptor
+   */
   public boolean isExtResAndBindingsDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_EXTRESANDBINDINGS);
   }
 
+  /**
+   * Checks if is collection reader descriptor.
+   *
+   * @return true, if is collection reader descriptor
+   */
   public boolean isCollectionReaderDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_COLLECTIONREADER);
   }
 
+  /**
+   * Checks if is cas initializer descriptor.
+   *
+   * @return true, if is cas initializer descriptor
+   */
   public boolean isCasInitializerDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_CASINITIALIZER);
   }
 
+  /**
+   * Checks if is cas consumer descriptor.
+   *
+   * @return true, if is cas consumer descriptor
+   */
   public boolean isCasConsumerDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_CASCONSUMER);
   }
 
+  /**
+   * Checks if is flow controller descriptor.
+   *
+   * @return true, if is flow controller descriptor
+   */
   public boolean isFlowControllerDescriptor() {
     return 0 != (descriptorType & DESCRIPTOR_FLOWCONTROLLER);
   }
 
+  /**
+   * Checks if is local processing descriptor.
+   *
+   * @return true, if is local processing descriptor
+   */
   public boolean isLocalProcessingDescriptor() {
     return 0 != (descriptorType & (DESCRIPTOR_AE | DESCRIPTOR_COLLECTIONREADER
             | DESCRIPTOR_CASINITIALIZER | DESCRIPTOR_CASCONSUMER | DESCRIPTOR_FLOWCONTROLLER));
   }
 
+  /**
+   * Checks if is primitive.
+   *
+   * @return true, if is primitive
+   */
   public boolean isPrimitive() {
     return isLocalProcessingDescriptor() && aeDescription.isPrimitive();
   }
 
+  /**
+   * Checks if is aggregate.
+   *
+   * @return true, if is aggregate
+   */
   public boolean isAggregate() {
     return isAeDescriptor() && (!aeDescription.isPrimitive());
   }
 
+  /** The m type priorities backup. */
   private TypePriorities m_typePrioritiesBackup;
 
+  /** The fade color. */
   private Color fadeColor;
 
+  /** The is reverting index. */
   private boolean isRevertingIndex;
 
+  /** The is page change recursion. */
   protected boolean isPageChangeRecursion = false;
 
+  /** The Constant typeDescriptionArray0. */
   public static final TypeDescription[] typeDescriptionArray0 = new TypeDescription[0];
   
+  /** The type systems to merge. */
   private List typeSystemsToMerge;
   
+  /** The type priorities to merge. */
   private List typePrioritiesToMerge;
   
+  /** The fs indexes to merge. */
   private List fsIndexesToMerge;
   
+  /** The failed remotes. */
   private Map failedRemotes = new TreeMap();
+  
+  /** The failed remotes already known. */
   private Set failedRemotesAlreadyKnown = new TreeSet();
 
+  /** The external editor configurations. */
   private static List<IConfigurationElement> externalEditorConfigurations = null;
   
+  /** The current editor. */
   private IUimaMultiPageEditor currentEditor; // can be CDE or another editor
   
+  /**
+   * Instantiates a new multi page editor.
+   */
   public MultiPageEditor() {
     super();
     currentEditor = this; // default
@@ -535,18 +704,38 @@ public class MultiPageEditor extends For
     mergedTypePriorities = aeDescription.getAnalysisEngineMetaData().getTypePriorities();
   }
 
+  /** The Constant EXTENSION_TAG_CLASS_ATTRIB. */
   private static final String EXTENSION_TAG_CLASS_ATTRIB  = "class";
 
   
+  /**
+   * Gets the required editor.
+   *
+   * @param parsedResult the parsed result
+   * @return the required editor
+   */
   private IUimaEditorExtension getRequiredEditor(XMLizable parsedResult) {
     return getRequiredEditor(null, parsedResult.getClass().getName());
   }
  
+  /**
+   * Gets the required editor.
+   *
+   * @param topElementName the top element name
+   * @return the required editor
+   */
   private IUimaEditorExtension getRequiredEditor(String topElementName) {
     return getRequiredEditor(topElementName, null);
   }
 
   // returns null if no matching editor found
+  /**
+   * Gets the required editor.
+   *
+   * @param topElementName the top element name
+   * @param parsedResultClassName the parsed result class name
+   * @return the required editor
+   */
   // otherwise instantiates a new editor
   private  IUimaEditorExtension getRequiredEditor(String topElementName, String parsedResultClassName) {
     IUimaEditorExtension editor;
@@ -565,7 +754,7 @@ public class MultiPageEditor extends For
             editor = (IUimaEditorExtension) xeditor.createExecutableExtension(EXTENSION_TAG_CLASS_ATTRIB); 
           } catch (CoreException e) {
             Utility.popMessage("Unexpected Exception", "While trying to load an editor extension"
-                + getMessagesToRootCause(e), Utility.ERROR);
+                + getMessagesToRootCause(e), MessageDialog.ERROR);
             return null;
           }
           editor.init();
@@ -576,9 +765,15 @@ public class MultiPageEditor extends For
     return null;
   }
     
+  /** The Constant EXTENSION_POINT_ID. */
   private static final String EXTENSION_POINT_ID         = "externalEditor";
  
   // load all of the external editor xml data
+  /**
+   * Gets the external editor configurations.
+   *
+   * @return the external editor configurations
+   */
   //   (but don't load the actual editors, yet)
   private void getExternalEditorConfigurations () {
     // Get extension point from Registry
@@ -595,7 +790,7 @@ public class MultiPageEditor extends For
           Utility.popMessage(
               "Problem with Editor Extension",
               "Editor '" + extension.getContributor().getName() + "' is present, but can't be loaded, probably because of unsatisfied dependencies\n",
-              Utility.ERROR);
+              MessageDialog.ERROR);
           continue;
         }
         for (IConfigurationElement ces : extension.getConfigurationElements()) {
@@ -607,53 +802,105 @@ public class MultiPageEditor extends For
       Utility.popMessage(
           "Internal Error",
           "CDE's extension point is missing",
-          Utility.ERROR);
+          MessageDialog.ERROR);
     }
   }
 
-  /***************************************************************************/
+  /* *************************************************************************/
   /*            Expose "protected" methods and methods from Super            */
-  /***************************************************************************/  
+  /* **************************************************************************/
+  
+  /**
+   * @param site the site
+   * @param editorInput the editor input
+   * @throws PartInitException the part init exception
+   */
   
   public void initSuper(IEditorSite site, IEditorInput editorInput) throws PartInitException {
     super.init(site, editorInput);
   }
   
+  /**
+   * Gets the current page super.
+   *
+   * @return the current page super
+   */
   public int getCurrentPageSuper () {
     return getCurrentPage();
   }
   
+  /**
+   * Sets the part name super.
+   *
+   * @param partName the new part name super
+   */
   public void setPartNameSuper(String partName) {
     super.setPartName(partName);
   }
 
+  /**
+   * Sets the page text super.
+   *
+   * @param pageIndex the page index
+   * @param text the text
+   */
   public void setPageTextSuper(int pageIndex, String text) {
     super.setPageText(pageIndex, text);
   }
   
+  /**
+   * Page change super.
+   *
+   * @param newPageIndex the new page index
+   */
   public void pageChangeSuper(int newPageIndex) {
     super.pageChange(newPageIndex);
   }
 
+  /**
+   * Sets the active page super.
+   *
+   * @param pageIndex the new active page super
+   */
   public void setActivePageSuper (int pageIndex) {
     super.setActivePage(pageIndex);
   }
   
+  /**
+   * Fire property change super.
+   *
+   * @param propertyId the property id
+   */
   public void firePropertyChangeSuper(final int propertyId) {
     super.firePropertyChange(propertyId);
   }
   
+  /**
+   * Sets the input super.
+   *
+   * @param input the new input super
+   */
   public void setInputSuper(IEditorInput input) {
     super.setInput(input);
   }
   
   // XML source editor is opened by CDE when the source is "initially" invalid.
+  /**
+   * Gets the source editor.
+   *
+   * @return the source editor
+   */
   // Called by DDE when the source becomes valid and it is DD.
   public XMLEditor getSourceEditor () {
     return sourceTextEditor;
   }
   
-  /***************************************************************************/
+  /**
+   * ************************************************************************.
+   *
+   * @param display the display
+   * @return the form toolkit
+   */
   
   /**
    * override the createToolkit method in FormEditor - to use a shared colors resource.
@@ -664,10 +911,19 @@ public class MultiPageEditor extends For
    * 
    */
 
+  @Override
   protected FormToolkit createToolkit(Display display) {
     return new FormToolkit(TAEConfiguratorPlugin.getDefault().getFormColors(display));
   }
 
+  /**
+   * Adds the page and set tab title.
+   *
+   * @param page the page
+   * @param keyTabTitle the key tab title
+   * @return the int
+   * @throws PartInitException the part init exception
+   */
   /*
    * Two forms of addPage - one for non-source-editors, and one for source-editor
    */
@@ -678,6 +934,15 @@ public class MultiPageEditor extends For
     return pageIndex;
   }
 
+  /**
+   * Adds the page and set tab title.
+   *
+   * @param page the page
+   * @param input the input
+   * @param keyTabTitle the key tab title
+   * @return the int
+   * @throws PartInitException the part init exception
+   */
   protected int addPageAndSetTabTitle(IEditorPart page, IEditorInput input, String keyTabTitle)
           throws PartInitException {
     int pageIndex = addPage(page, input);
@@ -695,10 +960,15 @@ public class MultiPageEditor extends For
    * 
    * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
    */
+  @Override
   protected void addPages() {
     currentEditor.addPagesForCurrentEditor();
   }
   
+  /* (non-Javadoc)
+   * @see org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor#addPagesForCurrentEditor()
+   */
+  @Override
   public void addPagesForCurrentEditor() {
     boolean allPages = isLocalProcessingDescriptor();
     try {
@@ -747,7 +1017,9 @@ public class MultiPageEditor extends For
   }
 
   /**
-   * @param monitor
+   * Jcas gen.
+   *
+   * @param monitor the monitor
    */
   public void jcasGen(IProgressMonitor monitor) {
     if (MultiPageEditorContributor.getAutoJCasGen()) {
@@ -755,11 +1027,21 @@ public class MultiPageEditor extends For
     }
   }
 
+  /**
+   * Do J cas gen chk src.
+   *
+   * @param monitor the monitor
+   */
   public void doJCasGenChkSrc(IProgressMonitor monitor) {
     if (isSourceFolderValid())
       doJCasGen(monitor);
   }
 
+  /**
+   * Checks if is source folder valid.
+   *
+   * @return true, if is source folder valid
+   */
   public boolean isSourceFolderValid() {
     IResource folder = getPrimarySourceFolder();
     if (folder == null) {
@@ -770,6 +1052,11 @@ public class MultiPageEditor extends For
     return true;
   }
 
+  /**
+   * Sync source before saving to file.
+   *
+   * @return true, if successful
+   */
   private boolean syncSourceBeforeSavingToFile() {
     boolean modelOK = true;
     if (getCurrentPage() != sourceIndex) {
@@ -784,6 +1071,12 @@ public class MultiPageEditor extends For
     return modelOK;
   }
 
+  /**
+   * Checks if is valid AE.
+   *
+   * @param aAe the a ae
+   * @return true, if is valid AE
+   */
   public boolean isValidAE(AnalysisEngineDescription aAe) {
     AbstractSection.setVnsHostAndPort(aAe);
     // copy Ae into real descriptors if needed
@@ -869,17 +1162,30 @@ public class MultiPageEditor extends For
 
   /**
    * Saves the multi-page editor's document.
+   *
+   * @param monitor the monitor
    */
+  @Override
   public void doSave(IProgressMonitor monitor) {
     currentEditor.doSaveForCurrentEditor(monitor);
   }
   
+  /* (non-Javadoc)
+   * @see org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor#doSaveForCurrentEditor(org.eclipse.core.runtime.IProgressMonitor)
+   */
+  @Override
   public void doSaveForCurrentEditor(IProgressMonitor monitor) {
     boolean modelOK = syncSourceBeforeSavingToFile();
     sourceTextEditor.doSave(monitor);
     finishSave(monitor, modelOK);
   }
 
+  /**
+   * Finish save.
+   *
+   * @param monitor the monitor
+   * @param modelOK the model OK
+   */
   private void finishSave(IProgressMonitor monitor, boolean modelOK) {
     if (modelOK) {
       if (dirtyTypeNameHash.size() > 0)
@@ -897,10 +1203,15 @@ public class MultiPageEditor extends For
    * 
    * This is not implemented correctly: filename isn't switched to new filename, etc.
    */
+  @Override
   public void doSaveAs() {
     currentEditor.doSaveAsForCurrentEditor();
   }
   
+  /* (non-Javadoc)
+   * @see org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor#doSaveAsForCurrentEditor()
+   */
+  @Override
   public void doSaveAsForCurrentEditor() {
     boolean modelOK = syncSourceBeforeSavingToFile();
     setSaveAsStatus(SAVE_AS_STARTED);
@@ -924,14 +1235,25 @@ public class MultiPageEditor extends For
     finishSave(null, modelOK);
   }
 
+  /* (non-Javadoc)
+   * @see org.eclipse.ui.forms.editor.FormEditor#isDirty()
+   */
+  @Override
   public boolean isDirty() {
     return fileDirty;
   }
 
+  /* (non-Javadoc)
+   * @see org.eclipse.ui.part.EditorPart#isSaveOnCloseNeeded()
+   */
+  @Override
   public boolean isSaveOnCloseNeeded() {
     return fileDirty;
   }
 
+  /**
+   * Sets the file dirty.
+   */
   public void setFileDirty() {
     if (m_bIsInited) {
       fileDirty = true;
@@ -940,6 +1262,11 @@ public class MultiPageEditor extends For
     }
   }
   
+  /**
+   * Sets the file dirty flag.
+   *
+   * @param value the new file dirty flag
+   */
   // Called by External Editor extensions when doSave or doSaveAs is called
   public void setFileDirtyFlag(boolean value) {
     fileDirty = value;
@@ -950,6 +1277,7 @@ public class MultiPageEditor extends For
    * 
    * @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
    */
+  @Override
   public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
     XMLInputSource input;
 
@@ -989,13 +1317,30 @@ public class MultiPageEditor extends For
     m_bIsInited = true;
   }
 
+  /** The extension editor. */
   private IUimaEditorExtension extensionEditor;
   
+  /**
+   * Parses the source.
+   *
+   * @param input the input
+   * @param filePathName the file path name
+   * @param preserveComments the preserve comments
+   * @throws PartInitException the part init exception
+   */
   private void parseSource(XMLInputSource input, String filePathName, boolean preserveComments) throws PartInitException {
     extensionEditor = null;
     parseSourceInner(input, filePathName, preserveComments);
   }
   
+  /**
+   * Parses the source inner.
+   *
+   * @param input the input
+   * @param filePathName the file path name
+   * @param preserveComments the preserve comments
+   * @throws PartInitException the part init exception
+   */
   private void parseSourceInner(XMLInputSource input, String filePathName, boolean preserveComments) throws PartInitException {
     XMLizable inputDescription = null;
     try {
@@ -1061,7 +1406,7 @@ public class MultiPageEditor extends For
               Utility.popMessage(
                   "Internal Error",
                   "While parsing input for extension editor: " + getMessagesToRootCause(e1),
-                  Utility.ERROR);
+                  MessageDialog.ERROR);
               throw new InternalErrorCDE(e1);
             }
             return;
@@ -1082,6 +1427,12 @@ public class MultiPageEditor extends For
     }
   }
 
+  /**
+   * Validate descriptor type.
+   *
+   * @param newDescriptorType the new descriptor type
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void validateDescriptorType(int newDescriptorType) throws ResourceInitializationException {
     if (0 != descriptorType && !openingContext && ((descriptorType & newDescriptorType) == 0))
       throw new ResourceInitializationException(Messages.getString("MultiPageEditor.12"), //$NON-NLS-1$
@@ -1108,9 +1459,18 @@ public class MultiPageEditor extends For
     return rm;
   }
 
+  /** The cached R mclass path. */
   private String cachedRMclassPath = null; 
+  
+  /** The cached R mcl. */
   private SoftReference<UIMAClassLoader> cachedRMcl = new SoftReference<UIMAClassLoader>(null);
 
+  /**
+   * Creates the resource manager.
+   *
+   * @param classPath the class path
+   * @return the resource manager
+   */
   public ResourceManager createResourceManager(String classPath) {
     ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
 
@@ -1154,14 +1514,23 @@ public class MultiPageEditor extends For
   /*
    * (non-Javadoc) Method declared on IEditorPart.
    */
+  @Override
   public boolean isSaveAsAllowed() {
     return true;
   }
 
+  /* (non-Javadoc)
+   * @see org.eclipse.ui.forms.editor.FormEditor#pageChange(int)
+   */
+  @Override
   protected void pageChange(int newPageIndex) {
     currentEditor.pageChangeForCurrentEditor(newPageIndex);
   }
   
+  /* (non-Javadoc)
+   * @see org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor#pageChangeForCurrentEditor(int)
+   */
+  @Override
   public void pageChangeForCurrentEditor(int newPageIndex) {
     if (isPageChangeRecursion)
       return;
@@ -1205,6 +1574,11 @@ public class MultiPageEditor extends For
     }
   }
 
+  /**
+   * Sets the active page while blocking recursion.
+   *
+   * @param sourceIndex the new active page while blocking recursion
+   */
   protected void setActivePageWhileBlockingRecursion(int sourceIndex) {
     try {
       isPageChangeRecursion = true;
@@ -1219,11 +1593,21 @@ public class MultiPageEditor extends For
     }
   }
 
+  /**
+   * Save good version of type priorities.
+   */
   private void saveGoodVersionOfTypePriorities() {
     TypePriorities tp = getAeDescription().getAnalysisEngineMetaData().getTypePriorities();
     m_typePrioritiesBackup = (null == tp) ? null : (TypePriorities) tp.clone();
   }
 
+  /**
+   * Revert to last valid.
+   *
+   * @param msg the msg
+   * @param msgDetails the msg details
+   * @return true, if successful
+   */
   private boolean revertToLastValid(String msg, String msgDetails) {
     String[] buttonLabels = new String[2];
     buttonLabels[0] = Messages.getString("MultiPageEditor.revertToLastValid"); //$NON-NLS-1$
@@ -1272,6 +1656,12 @@ public class MultiPageEditor extends For
     return true;
   }
 
+  /**
+   * Gets the char set.
+   *
+   * @param text the text
+   * @return the char set
+   */
   public String getCharSet(String text) {
     final String key = Messages.getString("MultiPageEditor.16"); //$NON-NLS-1$
     int i = text.indexOf(key);
@@ -1282,6 +1672,11 @@ public class MultiPageEditor extends For
     return text.substring(i, end);
   }
 
+  /**
+   * Validate source.
+   *
+   * @return true, if successful
+   */
   private boolean validateSource() {
     if (!sourceChanged)
       return true;
@@ -1325,10 +1720,19 @@ public class MultiPageEditor extends For
     return true;
   }
 
+  /**
+   * Mark all pages stale.
+   */
   public void markAllPagesStale() {
     checkForNewlyStaleSections(null, null);
   }
 
+  /**
+   * Check for newly stale sections.
+   *
+   * @param previous the previous
+   * @param current the current
+   */
   private void checkForNewlyStaleSections(MetaDataObject previous, MetaDataObject current) {
 
     // AnalysisEngineMetaData previous,
@@ -1355,6 +1759,11 @@ public class MultiPageEditor extends For
       ((HeaderPage) pages.get(resourcesIndex)).markStale();
   }
 
+  /**
+   * Check for newly dirty types.
+   *
+   * @param oldTsd the old tsd
+   */
   private void checkForNewlyDirtyTypes(TypeSystemDescription oldTsd) {
 
     // an array of TypeDescription objects (not CAS), including imported ones
@@ -1390,6 +1799,11 @@ public class MultiPageEditor extends For
 
   }
 
+  /**
+   * Gets the true descriptor.
+   *
+   * @return the true descriptor
+   */
   /*
    * This returns the true descriptor, accounting for the "trick" when we put CPM descriptors in the
    * AE descriptor. As a side effect, it updates the CPM descriptors
@@ -1423,6 +1837,11 @@ public class MultiPageEditor extends For
     return thing;
   }
 
+  /**
+   * Pretty print model.
+   *
+   * @return the string
+   */
   public String prettyPrintModel() {
     StringWriter writer = new StringWriter();
     String parsedText = null;
@@ -1452,6 +1871,9 @@ public class MultiPageEditor extends For
     return parsedText;
   }
 
+  /**
+   * Update source from model.
+   */
   public void updateSourceFromModel() {
     sourceTextEditor.setIgnoreTextEvent(true);
     IDocument doc = sourceTextEditor.getDocumentProvider().getDocument(
@@ -1460,11 +1882,19 @@ public class MultiPageEditor extends For
     sourceTextEditor.setIgnoreTextEvent(false);
   }
 
+  /**
+   * Gets the ae description.
+   *
+   * @return the ae description
+   */
   public AnalysisEngineDescription getAeDescription() {
     return aeDescription;
   }
 
   /**
+   * Sets the ae description.
+   *
+   * @param aAnalysisEngineDescription the new ae description
    * @throws ResourceInitializationException -
    */
   public void setAeDescription(AnalysisEngineDescription aAnalysisEngineDescription)
@@ -1517,6 +1947,12 @@ public class MultiPageEditor extends For
   }
 
   // note that this also updates merged type system
+  /**
+   * Sets the type system description.
+   *
+   * @param typeSystemDescription the new type system description
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   // Also called for aggregate TAEs
   public void setTypeSystemDescription(TypeSystemDescription typeSystemDescription)
           throws ResourceInitializationException {
@@ -1548,6 +1984,11 @@ public class MultiPageEditor extends For
 
   // **************************************************************
   // * From taeDescriptor back into the Collection part descriptors
+  /**
+   * Link local processing descriptors from ae.
+   *
+   * @param d the d
+   */
   // **************************************************************
   private void linkLocalProcessingDescriptorsFromAe(CollectionReaderDescription d) {
     d.setImplementationName(aeDescription.getAnnotatorImplementationName());
@@ -1555,24 +1996,44 @@ public class MultiPageEditor extends For
     linkCommonCollectionDescriptorsFromAe(d);
   }
 
+  /**
+   * Link local processing descriptors from ae.
+   *
+   * @param d the d
+   */
   private void linkLocalProcessingDescriptorsFromAe(CasInitializerDescription d) {
     d.setImplementationName(aeDescription.getAnnotatorImplementationName());
     d.setFrameworkImplementation(aeDescription.getFrameworkImplementation());
     linkCommonCollectionDescriptorsFromAe(d);
   }
 
+  /**
+   * Link local processing descriptors from ae.
+   *
+   * @param d the d
+   */
   private void linkLocalProcessingDescriptorsFromAe(CasConsumerDescription d) {
     d.setImplementationName(aeDescription.getAnnotatorImplementationName());
     d.setFrameworkImplementation(aeDescription.getFrameworkImplementation());
     linkCommonCollectionDescriptorsFromAe(d);
   }
 
+  /**
+   * Link local processing descriptors from ae.
+   *
+   * @param d the d
+   */
   private void linkLocalProcessingDescriptorsFromAe(FlowControllerDescription d) {
     d.setImplementationName(aeDescription.getAnnotatorImplementationName());
     d.setFrameworkImplementation(aeDescription.getFrameworkImplementation());
     linkCommonCollectionDescriptorsFromAe(d);
   }
 
+  /**
+   * Link common collection descriptors from ae.
+   *
+   * @param r the r
+   */
   private void linkCommonCollectionDescriptorsFromAe(ResourceCreationSpecifier r) {
     r.setExternalResourceDependencies(aeDescription.getExternalResourceDependencies());
     r.setMetaData(convertFromAeMetaData((AnalysisEngineMetaData) aeDescription.getMetaData()));
@@ -1583,6 +2044,12 @@ public class MultiPageEditor extends For
   // * From Collection Part Descriptors into the taeDescriptor
   // *********************************************************
 
+  /**
+   * Creates the and link local processing descriptors to ae.
+   *
+   * @param d the d
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void createAndLinkLocalProcessingDescriptorsToAe(CollectionReaderDescription d)
           throws ResourceInitializationException {
     aeDescription = UIMAFramework.getResourceSpecifierFactory().createAnalysisEngineDescription();
@@ -1591,6 +2058,12 @@ public class MultiPageEditor extends For
     linkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Creates the and link local processing descriptors to ae.
+   *
+   * @param d the d
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void createAndLinkLocalProcessingDescriptorsToAe(CasInitializerDescription d)
           throws ResourceInitializationException {
     aeDescription = UIMAFramework.getResourceSpecifierFactory().createAnalysisEngineDescription();
@@ -1599,6 +2072,12 @@ public class MultiPageEditor extends For
     linkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Creates the and link local processing descriptors to ae.
+   *
+   * @param d the d
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void createAndLinkLocalProcessingDescriptorsToAe(CasConsumerDescription d)
           throws ResourceInitializationException {
     aeDescription = UIMAFramework.getResourceSpecifierFactory().createAnalysisEngineDescription();
@@ -1607,6 +2086,12 @@ public class MultiPageEditor extends For
     linkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Creates the and link local processing descriptors to ae.
+   *
+   * @param d the d
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void createAndLinkLocalProcessingDescriptorsToAe(FlowControllerDescription d)
           throws ResourceInitializationException {
     aeDescription = UIMAFramework.getResourceSpecifierFactory().createAnalysisEngineDescription();
@@ -1615,6 +2100,12 @@ public class MultiPageEditor extends For
     linkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Link local processing descriptors to ae.
+   *
+   * @param r the r
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void linkLocalProcessingDescriptorsToAe(ResourceCreationSpecifier r)
           throws ResourceInitializationException {
     aeDescription.setExternalResourceDependencies(r.getExternalResourceDependencies());
@@ -1624,6 +2115,12 @@ public class MultiPageEditor extends For
     setAeDescription(aeDescription);
   }
 
+  /**
+   * Convert to ae meta data.
+   *
+   * @param r the r
+   * @return the analysis engine meta data
+   */
   private AnalysisEngineMetaData convertToAeMetaData(ResourceMetaData r) {
     ProcessingResourceMetaData p = (ProcessingResourceMetaData) r;
     AnalysisEngineMetaData d = UIMAFramework.getResourceSpecifierFactory()
@@ -1644,6 +2141,12 @@ public class MultiPageEditor extends For
     return d;
   }
 
+  /**
+   * Convert from ae meta data.
+   *
+   * @param p the p
+   * @return the processing resource meta data
+   */
   private ProcessingResourceMetaData convertFromAeMetaData(AnalysisEngineMetaData p) {
     ProcessingResourceMetaData d = UIMAFramework.getResourceSpecifierFactory()
             .createProcessingResourceMetaData();
@@ -1663,30 +2166,60 @@ public class MultiPageEditor extends For
     return d;
   }
 
+  /**
+   * Sets the collection reader description.
+   *
+   * @param d the new collection reader description
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setCollectionReaderDescription(CollectionReaderDescription d)
           throws ResourceInitializationException {
     collectionReaderDescription = d;
     createAndLinkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Sets the cas initializer description.
+   *
+   * @param d the new cas initializer description
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setCasInitializerDescription(CasInitializerDescription d)
           throws ResourceInitializationException {
     casInitializerDescription = d;
     createAndLinkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Sets the cas consumer description.
+   *
+   * @param d the new cas consumer description
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setCasConsumerDescription(CasConsumerDescription d)
           throws ResourceInitializationException {
     casConsumerDescription = d;
     createAndLinkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Sets the flow controller description.
+   *
+   * @param d the new flow controller description
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setFlowControllerDescription(FlowControllerDescription d)
           throws ResourceInitializationException {
     flowControllerDescription = d;
     createAndLinkLocalProcessingDescriptorsToAe(d);
   }
 
+  /**
+   * Sets the type priorities.
+   *
+   * @param typePriorities the new type priorities
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setTypePriorities(TypePriorities typePriorities)
           throws ResourceInitializationException {
     loadContext(typePriorities);
@@ -1696,10 +2229,20 @@ public class MultiPageEditor extends For
     descriptorCAS.validate();
   }
 
+  /**
+   * The Class MultilevelCancel.
+   */
   private static class MultilevelCancel extends RuntimeException {
+    
+    /** The Constant serialVersionUID. */
     private static final long serialVersionUID = 1L;
   }
 
+  /**
+   * Load context.
+   *
+   * @param thing the thing
+   */
   private void loadContext(XMLizable thing) {
     // try to load a context that has the types
     if (isContextLoaded)
@@ -1729,7 +2272,7 @@ public class MultiPageEditor extends For
                 .popMessage(
                         "Context Info",
                         "A context is required to edit this part.  However no context was supplied.  Editing will be cancelled",
-                        Utility.INFORMATION);
+                        MessageDialog.INFORMATION);
         throw new MultilevelCancel();
       } else {
         try {
@@ -1757,12 +2300,18 @@ public class MultiPageEditor extends For
                 AbstractSection.IMPORTABLE_PART_CONTEXT), contextFile);
       } catch (CoreException e) {
         Utility.popMessage("Unexpected Exception", "While loading Context"
-                + getMessagesToRootCause(e), Utility.ERROR);
+                + getMessagesToRootCause(e), MessageDialog.ERROR);
         throw new InternalErrorCDE("Unexpected Exception:" + getMessagesToRootCause(e), e);
       }
     }
   }
 
+  /**
+   * Sets the fs index collection.
+   *
+   * @param indexCollection the new fs index collection
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setFsIndexCollection(FsIndexCollection indexCollection)
           throws ResourceInitializationException {
     loadContext(indexCollection);
@@ -1772,19 +2321,25 @@ public class MultiPageEditor extends For
     descriptorCAS.validate();
   }
 
+  /**
+   * Show context load failure message.
+   *
+   * @param e the e
+   * @param contextFile the context file
+   */
   private void showContextLoadFailureMessage(Exception e, String contextFile) {
     String m = Messages.getFormattedString("MultiPageEditor.IOError", //$NON-NLS-1$
             new String[] { AbstractSection.maybeShortenFileName(contextFile) })
             + Messages.getString("MultiPageEditor.10") + getMessagesToRootCause(e); //$NON-NLS-1$
     Utility.popMessage("Cannot load context", m
             + "\nCannot load the context file for this importable part due to an I/O exception"
-            + " - proceeding without context", Utility.WARNING);
+            + " - proceeding without context", MessageDialog.WARNING);
   }
 
   /**
-   * Only called when editing a resources/bindings descriptor
-   * 
-   * @param rb
+   * Only called when editing a resources/bindings descriptor.
+   *
+   * @param rb the new ext res and bindings
    * @throws ResourceInitializationException -
    */
   private void setExtResAndBindings(ResourceManagerConfiguration rb)
@@ -1800,11 +2355,23 @@ public class MultiPageEditor extends For
     descriptorCAS.validate();
   }
 
+  /**
+   * Gets the absolute path from import.
+   *
+   * @param importItem the import item
+   * @return the absolute path from import
+   */
   public String getAbsolutePathFromImport(Import importItem) {
     // getAbsoluteURLfromImport may return a bundleresource style url
     return new File(getAbsoluteURLfromImport(importItem).getPath()).getPath();
   }
 
+  /**
+   * Gets the absolute UR lfrom import.
+   *
+   * @param importItem the import item
+   * @return the absolute UR lfrom import
+   */
   private URL getAbsoluteURLfromImport(Import importItem) {
     try {
       // if by location, it's relative to the descriptor.
@@ -1816,58 +2383,110 @@ public class MultiPageEditor extends For
     return null;
   }
 
+  /**
+   * Gets the aggregate page.
+   *
+   * @return the aggregate page
+   */
   public AggregatePage getAggregatePage() {
     return aggregatePage;
   }
 
+  /**
+   * Gets the overview page.
+   *
+   * @return the overview page
+   */
   public OverviewPage getOverviewPage() {
     return overviewPage;
   }
 
+  /**
+   * Gets the parameter page.
+   *
+   * @return the parameter page
+   */
   public ParameterPage getParameterPage() {
     return parameterPage;
   }
 
+  /**
+   * Gets the type page.
+   *
+   * @return the type page
+   */
   public TypePage getTypePage() {
     return typePage;
   }
 
+  /**
+   * Gets the capability page.
+   *
+   * @return the capability page
+   */
   public CapabilityPage getCapabilityPage() {
     return capabilityPage;
   }
 
+  /**
+   * Gets the indexes page.
+   *
+   * @return the indexes page
+   */
   public IndexesPage getIndexesPage() {
     return indexesPage;
   }
 
+  /**
+   * Gets the resources page.
+   *
+   * @return the resources page
+   */
   public ResourcesPage getResourcesPage() {
     return resourcesPage;
   }
 
+  /**
+   * Gets the XML editor page.
+   *
+   * @return the XML editor page
+   */
   public XMLEditor getXMLEditorPage() {
     return sourceTextEditor;
   }
 
+  /**
+   * Gets the settings page.
+   *
+   * @return the settings page
+   */
   public SettingsPage getSettingsPage() {
     return settingsPage;
   }
 
   /**
+   * Gets the file.
+   *
    * @return current file being edited
    */
   public IFile getFile() {
     return file;
   }
 
+  /**
+   * Gets the resolved delegates.
+   *
+   * @return the resolved delegates
+   */
   public Map getResolvedDelegates() {
     return resolvedDelegates;
   }
 
   /**
    * gets the Hash Map of resolved AE delegates Clones the description first because the getting
-   * updates it in some cases
-   * 
-   * @param aed
+   * updates it in some cases.
+   *
+   * @param aed the aed
    * @return the Map of resolved AE delegates
    */
   public Map getDelegateAEdescriptions(AnalysisEngineDescription aed) {
@@ -1882,16 +2501,29 @@ public class MultiPageEditor extends For
     return result;
   }
 
+  /**
+   * Mark T cas dirty.
+   */
   public void markTCasDirty() {
     descriptorCAS.markDirty();
     allTypes.markDirty();
     definedTypesWithSupers.markDirty();
   }
 
+  /**
+   * Gets the current view.
+   *
+   * @return the current view
+   */
   public CAS getCurrentView() {
     return descriptorCAS.get();
   }
 
+  /**
+   * Gets the project.
+   *
+   * @return the project
+   */
   public IProject getProject() {
     IFile iFile = getFile();
     if (null == iFile) // can be null when just creating the instance of the MPE, before init()
@@ -1900,6 +2532,11 @@ public class MultiPageEditor extends For
     return getFile().getProject();
   }
 
+  /**
+   * Gets the descriptor directory.
+   *
+   * @return the descriptor directory
+   */
   public String getDescriptorDirectory() {
     String sDir = file.getParent().getLocation().toString();
     if (sDir.charAt(sDir.length() - 1) != '/') {
@@ -1908,6 +2545,12 @@ public class MultiPageEditor extends For
     return sDir;
   }
 
+  /**
+   * Gets the descriptor relative path.
+   *
+   * @param aFullOrRelativePath the a full or relative path
+   * @return the descriptor relative path
+   */
   public String getDescriptorRelativePath(String aFullOrRelativePath) {
     String sEditorFileFullPath = getFile().getLocation().toString();
     String sFullOrRelativePath = aFullOrRelativePath.replace('\\', '/');
@@ -1938,6 +2581,13 @@ public class MultiPageEditor extends For
     return sRelativePath;
   }
 
+  /**
+   * Gets the common parent folder.
+   *
+   * @param sFile1 the s file 1
+   * @param sFile2 the s file 2
+   * @return the common parent folder
+   */
   private static String getCommonParentFolder(String sFile1, String sFile2) {
     if (sFile1 == null || sFile2 == null) {
       return ""; //$NON-NLS-1$
@@ -1961,11 +2611,23 @@ public class MultiPageEditor extends For
     return sFile1.substring(0, commonPrefixLength);
   }
 
+  /**
+   * Checks if is file in workspace.
+   *
+   * @param aFileRelPath the a file rel path
+   * @return true, if is file in workspace
+   */
   public boolean isFileInWorkspace(String aFileRelPath) {
     Object fileOrIFile = getIFileOrFile(aFileRelPath);
     return (fileOrIFile instanceof IFile && ((IFile) fileOrIFile).exists());
   }
 
+  /**
+   * Gets the full path from descriptor relative path.
+   *
+   * @param aDescRelPath the a desc rel path
+   * @return the full path from descriptor relative path
+   */
   public String getFullPathFromDescriptorRelativePath(String aDescRelPath) {
 
     if (aDescRelPath.indexOf(':') > 0) { // indicates already an absolute path on Windows, at least
@@ -2021,10 +2683,16 @@ public class MultiPageEditor extends For
             + sFinalFragment;
   }
 
+  /**
+   * Open.
+   *
+   * @param fileToOpen the file to open
+   */
   public void open(IFile fileToOpen) {
     final IFile ffile = fileToOpen;
     Shell shell = new Shell();
     shell.getDisplay().asyncExec(new Runnable() {
+      @Override
       public void run() {
         IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
         try {
@@ -2036,10 +2704,16 @@ public class MultiPageEditor extends For
     });
   }
 
+  /**
+   * Open text editor.
+   *
+   * @param fileToOpen the file to open
+   */
   public void openTextEditor(IFile fileToOpen) {
     final IFile ffile = fileToOpen;
     Shell shell = new Shell();
     shell.getDisplay().asyncExec(new Runnable() {
+      @Override
       public void run() {
         IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
         try {
@@ -2051,6 +2725,12 @@ public class MultiPageEditor extends For
     });
   }
 
+  /**
+   * Gets the i file or file.
+   *
+   * @param relOrAbsPath the rel or abs path
+   * @return the i file or file
+   */
   public Object getIFileOrFile(String relOrAbsPath) {
     String sFileFullPath = getFullPathFromDescriptorRelativePath(relOrAbsPath);
     String sWorkspacePath = TAEConfiguratorPlugin.getWorkspace().getRoot().getLocation().toString();
@@ -2063,34 +2743,62 @@ public class MultiPageEditor extends For
     return new File(sFileFullPath);
   }
 
+  /**
+   * Open.
+   *
+   * @param fullPath the full path
+   */
   public void open(String fullPath) {
     Path path = new Path(fullPath);
     IFile fileToOpen = TAEConfiguratorPlugin.getWorkspace().getRoot().getFileForLocation(path);
     open(fileToOpen);
   }
 
+  /**
+   * Open text editor.
+   *
+   * @param fullPath the full path
+   */
   public void openTextEditor(String fullPath) {
     Path path = new Path(fullPath);
     IFile fileToOpen = TAEConfiguratorPlugin.getWorkspace().getRoot().getFileForLocation(path);
     openTextEditor(fileToOpen);
   }
 
+  /**
+   * Adds the dirty type name.
+   *
+   * @param typeName the type name
+   */
   public void addDirtyTypeName(String typeName) {
     dirtyTypeNameHash.add(typeName);
     markTypeModelDirty();
   }
 
+  /**
+   * Mark type model dirty.
+   */
   private void markTypeModelDirty() {
     allTypes.markDirty();
     descriptorCAS.markDirty();
     definedTypesWithSupers.markDirty();
   }
 
+  /**
+   * Removes the dirty type name.
+   *
+   * @param typeName the type name
+   */
   public void removeDirtyTypeName(String typeName) {
     dirtyTypeNameHash.remove(typeName);
     markTypeModelDirty();
   }
 
+  /**
+   * Do J cas gen.
+   *
+   * @param monitor the monitor
+   */
   public void doJCasGen(IProgressMonitor monitor) {
     if (0 < mergedTypesAddingFeatures.size()) {
       if (Window.CANCEL == 
@@ -2115,6 +2823,7 @@ public class MultiPageEditor extends For
       final String outputDirectory = getPrimarySourceFolder().getLocation().toOSString();
       final String inputFile = file.getLocation().toOSString(); // path to descriptor file
       IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+        @Override
         public void run(IProgressMonitor progressMonitor) {
           try {
             jg.mainForCde(new MergerImpl(), new JCasGenProgressMonitor(progressMonitor),
@@ -2147,6 +2856,12 @@ public class MultiPageEditor extends For
     }
   }
 
+  /**
+   * Make merge message.
+   *
+   * @param m the m
+   * @return the string
+   */
   // message: TypeName = ".....", URLs defining this type = "xxxx", "xxxx", ....
   private String makeMergeMessage(Map m) {
     StringBuffer sb = new StringBuffer();  
@@ -2170,16 +2885,32 @@ public class MultiPageEditor extends For
     return sb.toString();
   }
 
+  /** The Constant PATH_SEPARATOR. */
   final public static String PATH_SEPARATOR = System.getProperty("path.separator"); //$NON-NLS-1$
 
+  /** The cached stamp. */
   private long cachedStamp = -1;
 
+  /** The cached class path. */
   private String cachedClassPath = null;
 
+  /**
+   * Gets the project class path.
+   *
+   * @return the project class path
+   * @throws CoreException the core exception
+   */
   public String getProjectClassPath() throws CoreException {
     return getFilteredProjectClassPath(true);
   }
   
+  /**
+   * Gets the filtered project class path.
+   *
+   * @param filterCoreResources the filter core resources
+   * @return the filtered project class path
+   * @throws CoreException the core exception
+   */
   public String getFilteredProjectClassPath(boolean filterCoreResources) throws CoreException {
     IProject project = getProject();
 
@@ -2230,6 +2961,11 @@ public class MultiPageEditor extends For
     
   }
 
+  /**
+   * Gets the primary source folder.
+   *
+   * @return the primary source folder
+   */
   public IResource getPrimarySourceFolder() {
     IProject project = getProject();
     try {
@@ -2253,38 +2989,83 @@ public class MultiPageEditor extends For
     return null;
   }
 
+  /**
+   * Sets the save as status.
+   *
+   * @param nStatus the new save as status
+   */
   public void setSaveAsStatus(int nStatus) {
     m_nSaveAsStatus = nStatus;
   }
 
+  /**
+   * Gets the type system description.
+   *
+   * @return the type system description
+   */
   public TypeSystemDescription getTypeSystemDescription() {
     return aeDescription.getAnalysisEngineMetaData().getTypeSystem();
   }
 
+  /**
+   * Gets the type priorities.
+   *
+   * @return the type priorities
+   */
   public TypePriorities getTypePriorities() {
     return aeDescription.getAnalysisEngineMetaData().getTypePriorities();
   }
 
+  /**
+   * Gets the fs index collection.
+   *
+   * @return the fs index collection
+   */
   public FsIndexCollection getFsIndexCollection() {
     return aeDescription.getAnalysisEngineMetaData().getFsIndexCollection();
   }
 
+  /**
+   * Gets the ext res and bindings.
+   *
+   * @return the ext res and bindings
+   */
   public ResourceManagerConfiguration getExtResAndBindings() {
     return aeDescription.getResourceManagerConfiguration();
   }
 
+  /** The Constant VALIDATE_INPUTS. */
   private static final boolean VALIDATE_INPUTS = true;
 
+  /**
+   * Validate inputs.
+   *
+   * @param typeNameHash the type name hash
+   * @return true, if successful
+   */
   // returns true if no inputs were removed, false otherwise
   public boolean validateInputs(Map typeNameHash) {
     return validateIOs(VALIDATE_INPUTS, typeNameHash);
   }
 
+  /**
+   * Validate outputs.
+   *
+   * @param typeNameHash the type name hash
+   * @return true, if successful
+   */
   // returns true if no outputs were removed, false otherwise
   public boolean validateOutputs(Map typeNameHash) {
     return validateIOs(!VALIDATE_INPUTS, typeNameHash);
   }
 
+  /**
+   * Validate I os.
+   *
+   * @param isValidateInputs the is validate inputs
+   * @param typeNameHash the type name hash
+   * @return true, if successful
+   */
   public boolean validateIOs(boolean isValidateInputs, Map typeNameHash) {
     boolean bRes = true;
 
@@ -2328,6 +3109,12 @@ public class MultiPageEditor extends For
     return bRes;
   }
 
+  /**
+   * Validate type priorities.
+   *
+   * @param typeNameHash the type name hash
+   * @return true, if successful
+   */
   // returns true if no type priorities were modified, false otherwise
   public boolean validateTypePriorities(Map typeNameHash) {
     boolean bRes = true;
@@ -2363,10 +3150,15 @@ public class MultiPageEditor extends For
     return bRes;
   }
 
+  /** The Constant previewSize. */
   private static final int previewSize = 1024 * 16;
   
   /**
    * Used by code to get lists of delegate components by input/output type specs.
+   *
+   * @param iFile the i file
+   * @param componentHeaders the component headers
+   * @return the delegate resource specifier
    */
   public static ResourceSpecifier getDelegateResourceSpecifier(IFile iFile,
           String[] componentHeaders) {
@@ -2431,6 +3223,12 @@ public class MultiPageEditor extends For
 
   // **************************************************
   // * Getting exception messages down to root
+  /**
+   * Gets the messages to root cause.
+   *
+   * @param e the e
+   * @return the messages to root cause
+   */
   // **************************************************
   public String getMessagesToRootCause(Throwable e) {
     boolean wantStackTrace = false;
@@ -2477,6 +3275,13 @@ public class MultiPageEditor extends For
     return b.toString();
   }
 
+  /**
+   * Format message with class.
+   *
+   * @param e the e
+   * @param b the b
+   * @param messagePart the message part
+   */
   private void formatMessageWithClass(Throwable e, StringBuffer b, String messagePart) {
     String name = e.getClass().getName();
     //because this is a message for ordinary users, and
@@ -2492,10 +3297,20 @@ public class MultiPageEditor extends For
     }
   }
   
+  /**
+   * The Class JCasGenProgressMonitor.
+   */
   public static class JCasGenProgressMonitor implements
           org.apache.uima.tools.jcasgen.IProgressMonitor {
+    
+    /** The m progress monitor. */
     IProgressMonitor m_progressMonitor;
 
+    /**
+     * Instantiates a new j cas gen progress monitor.
+     *
+     * @param progressMonitor the progress monitor
+     */
     public JCasGenProgressMonitor(IProgressMonitor progressMonitor) {
       m_progressMonitor = progressMonitor;
     }
@@ -2505,6 +3320,7 @@ public class MultiPageEditor extends For
      * 
      * @see org.apache.uima.jcas.jcasgen_gen.IProgressMonitor#done()
      */
+    @Override
     public void done() {
       m_progressMonitor.done();
     }
@@ -2514,6 +3330,7 @@ public class MultiPageEditor extends For
      * 
      * @see org.apache.uima.jcas.jcasgen_gen.IProgressMonitor#beginTask(java.lang.String, int)
      */
+    @Override
     public void beginTask(String name, int totalWorked) {
       m_progressMonitor.beginTask(name, totalWorked);
     }
@@ -2523,6 +3340,7 @@ public class MultiPageEditor extends For
      * 
      * @see org.apache.uima.jcas.jcasgen_gen.IProgressMonitor#subTask(java.lang.String)
      */
+    @Override
     public void subTask(String name) {
       m_progressMonitor.subTask(name);
     }
@@ -2532,16 +3350,22 @@ public class MultiPageEditor extends For
      * 
      * @see org.apache.uima.jcas.jcasgen_gen.IProgressMonitor#worked(int)
      */
+    @Override
     public void worked(int work) {
       m_progressMonitor.worked(work);
     }
 
   }
 
+  /**
+   * The Class JCasGenThrower.
+   */
   public static class JCasGenThrower implements IError {
 
+    /** The log levels. */
     private Level logLevels[] = { Level.INFO, Level.WARNING, Level.SEVERE };
 
+    /** The m message. */
     private String m_message = null;
 
     /*
@@ -2549,6 +3373,7 @@ public class MultiPageEditor extends For
      * 
      * @see org.apache.uima.jcas.jcasgen_gen.IError#newError(int, java.lang.String)
      */
+    @Override
     public void newError(int severity, String message, Exception ex) {
       Logger log = UIMAFramework.getLogger();
       log.log(logLevels[severity], "JCasGen: " + message); //$NON-NLS-1$
@@ -2562,11 +3387,21 @@ public class MultiPageEditor extends For
       }
     }
 
+    /**
+     * Gets the message.
+     *
+     * @return the message
+     */
     public String getMessage() {
       return m_message;
     }
   }
 
+  /**
+   * Gets the fade color.
+   *
+   * @return the fade color
+   */
   public Color getFadeColor() {
     if (null == fadeColor)
       // COLOR_WIDGET_DARK_SHADOW is the same as black on SUSE KDE
@@ -2576,15 +3411,30 @@ public class MultiPageEditor extends For
 
   // **********************
   // * Merged type system
+  /**
+   * Sets the merged type system description.
+   *
+   * @param saved the new merged type system description
+   */
   // **********************
   public void setMergedTypeSystemDescription(TypeSystemDescription saved) {
     mergedTypeSystemDescription = saved;
   }
 
+  /**
+   * Sets the imported type system description.
+   *
+   * @param saved the new imported type system description
+   */
   public void setImportedTypeSystemDescription(TypeSystemDescription saved) {
     importedTypeSystemDescription = saved;
   }
 
+  /**
+   * Sets the imported type system description.
+   *
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setImportedTypeSystemDescription() throws ResourceInitializationException {
     Collection tsdc = new ArrayList(1);
     TypeSystemDescription tsd = typeSystemDescription;
@@ -2598,6 +3448,11 @@ public class MultiPageEditor extends For
             .mergeTypeSystems(tsdc, createResourceManager());
   }
 
+  /**
+   * Sets the merged type system description.
+   *
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   public void setMergedTypeSystemDescription() throws ResourceInitializationException {
     mergedTypesAddingFeatures.clear();
     if (isAggregate())
@@ -2622,27 +3477,57 @@ public class MultiPageEditor extends For
     }
   }
 
+  /**
+   * Gets the merged type system description.
+   *
+   * @return the merged type system description
+   */
   public TypeSystemDescription getMergedTypeSystemDescription() {
     return mergedTypeSystemDescription;
   }
 
+  /**
+   * Gets the imported type system desription.
+   *
+   * @return the imported type system desription
+   */
   public TypeSystemDescription getImportedTypeSystemDesription() {
     return importedTypeSystemDescription;
   }
 
+  /**
+   * Sets the merged fs index collection.
+   *
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   public void setMergedFsIndexCollection() throws ResourceInitializationException {
     mergedFsIndexCollection = mergeDelegateAnalysisEngineFsIndexCollections(
             (AnalysisEngineDescription) aeDescription.clone(), createResourceManager());
   }
 
+  /**
+   * Sets the merged fs index collection.
+   *
+   * @param saved the new merged fs index collection
+   */
   public void setMergedFsIndexCollection(FsIndexCollection saved) {
     mergedFsIndexCollection = saved;
   }
 
+  /**
+   * Gets the merged fs index collection.
+   *
+   * @return the merged fs index collection
+   */
   public FsIndexCollection getMergedFsIndexCollection() {
     return mergedFsIndexCollection;
   }
 
+  /**
+   * Sets the merged type priorities.
+   *
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   // full merge - including locally defined and imported ones
   public void setMergedTypePriorities() throws ResourceInitializationException {
     
@@ -2650,14 +3535,29 @@ public class MultiPageEditor extends For
             (AnalysisEngineDescription) aeDescription.clone(), createResourceManager());
   }
 
+  /**
+   * Sets the merged type priorities.
+   *
+   * @param saved the new merged type priorities
+   */
   public void setMergedTypePriorities(TypePriorities saved) {
     mergedTypePriorities = saved;
   }
 
+  /**
+   * Gets the merged type priorities.
+   *
+   * @return the merged type priorities
+   */
   public TypePriorities getMergedTypePriorities() {
     return mergedTypePriorities;
   }
 
+  /**
+   * Sets the resolved flow controller declaration.
+   *
+   * @throws InvalidXMLException the invalid XML exception
+   */
   public void setResolvedFlowControllerDeclaration() throws InvalidXMLException {
     FlowControllerDeclaration fcDecl = aeDescription.getFlowControllerDeclaration();
     if (null != fcDecl) {
@@ -2667,6 +3567,11 @@ public class MultiPageEditor extends For
       resolvedFlowControllerDeclaration = null;
   }
 
+  /**
+   * Gets the resolved flow controller declaration.
+   *
+   * @return the resolved flow controller declaration
+   */
   public FlowControllerDeclaration getResolvedFlowControllerDeclaration() {
     return resolvedFlowControllerDeclaration;
   }
@@ -2687,14 +3592,29 @@ public class MultiPageEditor extends For
     resolvedExternalResourcesAndBindings = rmc;
   }
 
+  /**
+   * Sets the resolved external resources and bindings.
+   *
+   * @param saved the new resolved external resources and bindings
+   */
   public void setResolvedExternalResourcesAndBindings(ResourceManagerConfiguration saved) {
     resolvedExternalResourcesAndBindings = saved;
   }
 
+  /**
+   * Gets the resolved external resources and bindings.
+   *
+   * @return the resolved external resources and bindings
+   */
   public ResourceManagerConfiguration getResolvedExternalResourcesAndBindings() {
     return resolvedExternalResourcesAndBindings;
   }
 
+  /**
+   * Sets the imported fs index collection.
+   *
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void setImportedFsIndexCollection() throws ResourceInitializationException {
     AnalysisEngineDescription localAe = (AnalysisEngineDescription) aeDescription.clone();
     localAe.getAnalysisEngineMetaData().setFsIndexCollection(null);
@@ -2702,12 +3622,22 @@ public class MultiPageEditor extends For
             localAe, createResourceManager());
   }
 
+  /**
+   * Gets the imported fs index collection.
+   *
+   * @return the imported fs index collection
+   */
   public FsIndexCollection getImportedFsIndexCollection() {
     return importedFsIndexCollection;
   }
 
   // this is all the type priorities, except those locally defined
   // used to distinguish between locally defined and imported ones
+  /**
+   * Sets the imported type priorities.
+   *
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   // (only locally defined ones can be edited)
   private void setImportedTypePriorities() throws ResourceInitializationException {
     AnalysisEngineDescription localAe = (AnalysisEngineDescription) aeDescription.clone();
@@ -2716,6 +3646,11 @@ public class MultiPageEditor extends For
             createResourceManager());
   }
 
+  /**
+   * Gets the imported type priorities.
+   *
+   * @return the imported type priorities
+   */
   public TypePriorities getImportedTypePriorities() {
     return importedTypePriorities;
   }
@@ -2740,6 +3675,11 @@ public class MultiPageEditor extends For
   // return importedExternalResourcesAndBindings;
   // }
 
+  /**
+   * Gets the source page editor.
+   *
+   * @return the source page editor
+   */
   public ITextEditor getSourcePageEditor() {
     if (getCurrentPage() == sourceIndex) {
       return sourceTextEditor;
@@ -2747,8 +3687,14 @@ public class MultiPageEditor extends For
       return null;
   }
 
+  /** The java project. */
   private IJavaProject javaProject = null;
 
+  /**
+   * Gets the java project.
+   *
+   * @return the java project
+   */
   public IJavaProject getJavaProject() {
     if (null == javaProject && null != file) {
       javaProject = JavaCore.create(file.getProject());
@@ -2756,6 +3702,12 @@ public class MultiPageEditor extends For
     return javaProject;
   }
 
+  /**
+   * Gets the type from project.
+   *
+   * @param typename the typename
+   * @return the type from project
+   */
   public IType getTypeFromProject(String typename) {
     IJavaProject jp = getJavaProject();
     if (null != jp)
@@ -2764,74 +3716,129 @@ public class MultiPageEditor extends For
       } catch (JavaModelException e) {
         Utility.popMessage("Unexpected Exception", MessageFormat.format(
                 "Unexpected exception while getting type information for type ''{0}''. {1}",
-                new Object[] { typename, getMessagesToRootCause(e) }), Utility.ERROR);
+                new Object[] { typename, getMessagesToRootCause(e) }), MessageDialog.ERROR);
         throw new InternalErrorCDE("unexpected exception", e);
       }
     return null;
   }
 
+  /** The analysis component I type. */
   private IType analysisComponentIType = null;
 
+  /** The base annotator I type. */
   private IType baseAnnotatorIType = null;
 
+  /** The collection reader I type. */
   private IType collectionReaderIType = null;
 
+  /** The cas initializer I type. */
   private IType casInitializerIType = null;
 
+  /** The cas consumer I type. */
   private IType casConsumerIType = null;
 
+  /** The flow controller I type. */
   private IType flowControllerIType = null;
 
+  /**
+   * Gets the analysis component I type.
+   *
+   * @return the analysis component I type
+   */
   public IType getAnalysisComponentIType() {
     if (null == analysisComponentIType)
       analysisComponentIType = getTypeFromProject("org.apache.uima.analysis_component.AnalysisComponent");
     return analysisComponentIType;
   }
 
+  /**
+   * Gets the base annotator I type.
+   *
+   * @return the base annotator I type
+   */
   public IType getBaseAnnotatorIType() {
     if (null == baseAnnotatorIType)
       baseAnnotatorIType = getTypeFromProject("org.apache.uima.analysis_engine.annotator.BaseAnnotator");
     return baseAnnotatorIType;
   }
 
+  /**
+   * Gets the collection reader I type.
+   *
+   * @return the collection reader I type
+   */
   public IType getCollectionReaderIType() {
     if (null == collectionReaderIType)
       collectionReaderIType = getTypeFromProject("org.apache.uima.collection.CollectionReader");
     return collectionReaderIType;
   }
 
+  /**
+   * Gets the cas initializer I type.
+   *
+   * @return the cas initializer I type
+   */
   public IType getCasInitializerIType() {
     if (null == casInitializerIType)
       casInitializerIType = getTypeFromProject("org.apache.uima.collection.CasInitializer");
     return casInitializerIType;
   }
 
+  /**
+   * Gets the cas consumer I type.
+   *
+   * @return the cas consumer I type
+   */
   public IType getCasConsumerIType() {
     if (null == casConsumerIType)
       casConsumerIType = getTypeFromProject("org.apache.uima.collection.CasConsumer");
     return casConsumerIType;
   }
 
+  /**
+   * Gets the flow controller I type.
+   *
+   * @return the flow controller I type
+   */
   public IType getFlowControllerIType() {
     if (null == flowControllerIType)
       flowControllerIType = getTypeFromProject("org.apache.uima.flow.FlowController");
     return flowControllerIType;
   }
 
+  /**
+   * The Class CombinedHierarchyScope.
+   */
   private static class CombinedHierarchyScope implements IJavaSearchScope {
 
+    /** The sub scopes. */
     private IJavaSearchScope[] subScopes = new IJavaSearchScope[5];
 
+    /** The nbr scopes. */
     private int nbrScopes = 0;
 
+    /**
+     * Gets the scopes.
+     *
+     * @return the scopes
+     */
     public IJavaSearchScope[] getScopes() {
       return subScopes;
     }
 
+    /**
+     * Adds the scope.
+     *
+     * @param newScope the new scope
+     */
     public void addScope(IJavaSearchScope newScope) {
       subScopes[nbrScopes++] = newScope;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#encloses(java.lang.String)
+     */
+    @Override
     public boolean encloses(String resourcePath) {
       for (int i = 0; i < nbrScopes; i++) {
         if (subScopes[i].encloses(resourcePath)) {
@@ -2844,6 +3851,10 @@ public class MultiPageEditor extends For
       return false;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#encloses(org.eclipse.jdt.core.IJavaElement)
+     */
+    @Override
     public boolean encloses(IJavaElement element) {
 
       for (int i = 0; i < nbrScopes; i++) {
@@ -2853,6 +3864,10 @@ public class MultiPageEditor extends For
       return false;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#enclosingProjectsAndJars()
+     */
+    @Override
     public IPath[] enclosingProjectsAndJars() {
       ArrayList result = new ArrayList(10);
       for (int i = 0; i < nbrScopes; i++) {
@@ -2866,25 +3881,46 @@ public class MultiPageEditor extends For
       return (IPath[]) result.toArray(new IPath[result.size()]);
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#includesBinaries()
+     */
+    @Override
     public boolean includesBinaries() {
       // TODO Auto-generated method stub
       return true;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#includesClasspaths()
+     */
+    @Override
     public boolean includesClasspaths() {
       // TODO Auto-generated method stub
       return true;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#setIncludesBinaries(boolean)
+     */
+    @Override
     public void setIncludesBinaries(boolean includesBinaries) {
       // implements interface method
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.core.search.IJavaSearchScope#setIncludesClasspaths(boolean)
+     */
+    @Override
     public void setIncludesClasspaths(boolean includesClasspaths) {
       // implements interface method
     }
   }
 
+  /**
+   * Gets the search scope for descriptor type.
+   *
+   * @return the search scope for descriptor type
+   */
   public IJavaSearchScope getSearchScopeForDescriptorType() {
     try {
       switch (descriptorType) {
@@ -2910,6 +3946,15 @@ public class MultiPageEditor extends For
     return null;
   }
   
+  /**
+   * Merge delegate analysis engine type systems.
+   *
+   * @param aAeDescription the a ae description
+   * @param aResourceManager the a resource manager
+   * @param aOutputMergedTypes the a output merged types
+   * @return the type system description
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private TypeSystemDescription mergeDelegateAnalysisEngineTypeSystems(
           AnalysisEngineDescription aAeDescription, ResourceManager aResourceManager,
           Map aOutputMergedTypes) throws ResourceInitializationException {
@@ -2918,6 +3963,14 @@ public class MultiPageEditor extends For
     return CasCreationUtils.mergeTypeSystems(typeSystemsToMerge, aResourceManager, aOutputMergedTypes);
   }
   
+  /**
+   * Merge delegate analysis engine type priorities.
+   *
+   * @param aAeDescription the a ae description
+   * @param aResourceManager the a resource manager
+   * @return the type priorities
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private TypePriorities mergeDelegateAnalysisEngineTypePriorities(
           AnalysisEngineDescription aAeDescription, ResourceManager aResourceManager) 
         throws ResourceInitializationException {
@@ -2926,6 +3979,14 @@ public class MultiPageEditor extends For
     return CasCreationUtils.mergeTypePriorities(typePrioritiesToMerge, aResourceManager);
   }
 
+  /**
+   * Merge delegate analysis engine fs index collections.
+   *
+   * @param aAeDescription the a ae description
+   * @param aResourceManager the a resource manager
+   * @return the fs index collection
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private FsIndexCollection mergeDelegateAnalysisEngineFsIndexCollections(
           AnalysisEngineDescription aAeDescription, ResourceManager aResourceManager) 
             throws ResourceInitializationException {
@@ -2934,6 +3995,15 @@ public class MultiPageEditor extends For
     return CasCreationUtils.mergeFsIndexes(fsIndexesToMerge, aResourceManager);
   }
 
+  /**
+   * Creates the cas.
+   *
+   * @param aAeDescription the a ae description
+   * @param aPerformanceTuningSettings the a performance tuning settings
+   * @param aResourceManager the a resource manager
+   * @return the cas
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   public CAS createCas(AnalysisEngineDescription aAeDescription,
           Properties aPerformanceTuningSettings, ResourceManager aResourceManager)
           throws ResourceInitializationException {
@@ -2949,6 +4019,14 @@ public class MultiPageEditor extends For
             aPerformanceTuningSettings, aResourceManager);
   }
   
+  /**
+   * Gets the merge input.
+   *
+   * @param aAggregateDescription the a aggregate description
+   * @param aResourceManager the a resource manager
+   * @return the merge input
+   * @throws ResourceInitializationException the resource initialization exception
+   */
   private void getMergeInput (
           AnalysisEngineDescription aAggregateDescription, 
           ResourceManager aResourceManager) 
@@ -2977,6 +4055,9 @@ public class MultiPageEditor extends For
     }
   }
   
+  /**
+   * Maybe show remote failure.
+   */
   private void maybeShowRemoteFailure() {
     if (failedRemotes.size() == 0) {
       return;