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 2011/04/04 13:28:22 UTC
svn commit: r1088559 - in
/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor:
./ editview/ fsview/ outline/
Author: joern
Date: Mon Apr 4 11:28:21 2011
New Revision: 1088559
URL: http://svn.apache.org/viewvc?rev=1088559&view=rev
Log:
UIMA-572 Added view switching support to the Annotation Editor and surrounding views
Modified:
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AbstractDocument.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationDocument.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DocumentUimaImpl.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocument.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocumentListener.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/editview/FeatureStructureContentProvider.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/FeatureStructureBrowserViewPage.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/ModeSensitiveContentProvider.java
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AbstractDocument.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AbstractDocument.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AbstractDocument.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AbstractDocument.java Mon Apr 4 11:28:21 2011
@@ -132,6 +132,12 @@ public abstract class AbstractDocument i
}
}
+ protected void fireViewChanged(String oldViewName, String newViewName) {
+ for (ICasDocumentListener listener : mListener) {
+ listener.viewChanged(oldViewName, newViewName);
+ }
+ }
+
/**
* Retrieves the view map.
*/
@@ -169,7 +175,6 @@ public abstract class AbstractDocument i
}
annotations.addLast(annotation);
-
}
TreeSet<AnnotationFS> set = new TreeSet<AnnotationFS>();
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationDocument.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationDocument.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationDocument.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationDocument.java Mon Apr 4 11:28:21 2011
@@ -42,6 +42,14 @@ public class AnnotationDocument extends
private int lineLengthHint = 80;
+ private String transformText(String text) {
+ if (lineLengthHint != 0) {
+ return wrapWords(text, lineLengthHint);
+ } else {
+ return text;
+ }
+ }
+
/**
* Call is forwarded to the set document.
*
@@ -50,12 +58,7 @@ public class AnnotationDocument extends
private String getText() {
String text = getCAS().getDocumentText();
-
- if (lineLengthHint != 0) {
- return wrapWords(text, lineLengthHint);
- } else {
- return text;
- }
+ return transformText(text);
}
/**
* Notifies listener about a document change.
@@ -259,4 +262,23 @@ public class AnnotationDocument extends
public Type getType(String type) {
return mDocument.getType(type);
}
+
+ public void switchView(String viewName) {
+
+ // TODO: Optimize the text retrieval and update notification handling
+ // Currently the text must be changed before switchView is called ...
+
+ // HACK:
+ // Replace the text like set() would do,
+ // but without sending out notifications.
+ // The stop and resume notification methods do not yield
+ // the desired effect
+ String text = transformText(getCAS().getView(viewName).getDocumentText());
+ getStore().set(text);
+ getTracker().set(text);
+
+ // Note: Sends out view update notification
+ ((DocumentUimaImpl) mDocument).switchView(viewName);
+
+ }
}
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java Mon Apr 4 11:28:21 2011
@@ -57,6 +57,7 @@ import org.eclipse.core.resources.Resour
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
@@ -66,13 +67,13 @@ import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.information.InformationPresenter;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.AnnotationPainter;
+import org.eclipse.jface.text.source.AnnotationPainter.IDrawingStrategy;
import org.eclipse.jface.text.source.IAnnotationAccess;
import org.eclipse.jface.text.source.IAnnotationAccessExtension;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModelExtension;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.AnnotationPainter.IDrawingStrategy;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -97,13 +98,15 @@ import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -116,12 +119,10 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.PageBookView;
-import org.eclipse.ui.texteditor.IDocumentProviderExtension;
import org.eclipse.ui.texteditor.IStatusField;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
-import org.eclipse.ui.texteditor.InfoForm;
import org.eclipse.ui.texteditor.StatusTextEditor;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
@@ -336,6 +337,10 @@ public final class AnnotationEditor exte
syncAnnotations();
}
+
+ public void viewChanged(String oldViewName, String newViewName) {
+ syncAnnotations();
+ }
}
/**
@@ -519,6 +524,55 @@ public final class AnnotationEditor exte
}
}
+ // TODO: Move to external class
+ static class CasViewMenu extends ContributionItem {
+
+ private AnnotationEditor casEditor;
+
+ public CasViewMenu(AnnotationEditor casEditor) {
+ this.casEditor = casEditor;
+ }
+
+ @Override
+ public void fill(Menu parentMenu, int index) {
+
+ CAS cas = casEditor.getDocument().getCAS();
+
+ for (Iterator<CAS> it = cas.getViewIterator(); it.hasNext(); ) {
+
+ CAS casView = it.next();
+ final String viewName = casView.getViewName();
+
+ final MenuItem actionItem = new MenuItem(parentMenu, SWT.CHECK);
+ actionItem.setText(viewName);
+
+ // TODO: Disable non-text views, check mime-type
+ try {
+ actionItem.setEnabled(cas.getDocumentText() != null);
+ } catch (Throwable t) {
+ // TODO: Not nice, discuss better solution on ml
+ actionItem.setEnabled(false);
+ }
+
+ // TODO: Add support for non text views, editor has
+ // to display some error message
+
+ // TODO: move this to an action
+ actionItem.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event e) {
+ // Trigger only if view is really changed
+ // TODO: Move this check to the document itself ...
+ if(!casEditor.getDocument().getCAS().getViewName().equals(viewName)) {
+ casEditor.showView(viewName);
+ }
+ // TODO: update selection accordingly,
+ // why does setSelection does not work here?
+ }
+ });
+ }
+ }
+ }
+
private Type mAnnotationMode;
/**
@@ -858,6 +912,12 @@ public final class AnnotationEditor exte
MenuManager showAnnotationMenu = new MenuManager("Show Annotations");
menu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, showAnnotationMenu);
showAnnotationMenu.add(mShowAnnotationsMenu);
+
+ // view menu
+ MenuManager casViewMenuManager = new MenuManager("CAS Views");
+ menu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, casViewMenuManager);
+ CasViewMenu casViewMenu = new CasViewMenu(this);
+ casViewMenuManager.add(casViewMenu);
}
/**
@@ -1008,11 +1068,20 @@ public final class AnnotationEditor exte
mPainter.paint(IPainter.CONFIGURATION);
}
+ private void removeAllAnnotations() {
+ // Remove all annotation from the model
+ IAnnotationModel annotationModel = getDocumentProvider().getAnnotationModel(getEditorInput());
+ ((IAnnotationModelExtension) annotationModel).removeAllAnnotations();
+ }
+
private void syncAnnotations() {
+
+ removeAllAnnotations();
+
// Remove all annotation from the model
IAnnotationModel annotationModel = getDocumentProvider().getAnnotationModel(getEditorInput());
((IAnnotationModelExtension) annotationModel).removeAllAnnotations();
-
+
// Add all annotation to the model
// copy annotations into annotation model
final Iterator<AnnotationFS> mAnnotations = getDocument().getCAS().getAnnotationIndex()
@@ -1060,6 +1129,7 @@ public final class AnnotationEditor exte
mCurrentStyleRange.length, null, null);
text.setStyleRange(resetedStyleRange);
+ mCurrentStyleRange = null;
}
if (length != 0) {
@@ -1109,7 +1179,40 @@ public final class AnnotationEditor exte
return selection;
}
-
+
+ public void showView(String viewName) {
+
+ // TODO: Consider to clear selection if this is called in the
+ // selectionChanged method, is that the right place?!
+
+ // Clear all old selections, references FSes of current view
+ mFeatureStructureSelectionProvider.clearSelection();
+
+ // Move the caret before the first char, otherwise it
+ // might be placed on an index which is out of bounds in
+ // the changed text
+ getSourceViewer().getTextWidget().setCaretOffset(0);
+
+ // De-highlight the text in the editor, because the highlight
+ // method has to remember the highlighted text area
+ // After the text changed the offsets might be out of bound
+ highlight(0, 0);
+
+ // Remove all editor annotations
+ // Changing the text with annotations might fail, because the
+ // bounds might be invalid in the new text
+ removeAllAnnotations();
+
+ // Change the view in the input document
+ // TODO: Add support for this to the interface
+ ((AnnotationDocument) getDocument()).switchView(viewName);
+
+ // Refresh the source viewer to retrieve the new document text
+ getSourceViewer().invalidateTextPresentation();
+
+ // All annotations will be synchronized in the document listener
+ }
+
/**
* Text is not editable, cause of the nature of the annotation editor. This does not mean, that
* the annotations are not editable.
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DocumentUimaImpl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DocumentUimaImpl.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DocumentUimaImpl.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DocumentUimaImpl.java Mon Apr 4 11:28:21 2011
@@ -74,7 +74,7 @@ public class DocumentUimaImpl extends Ab
// TODO: Remove field not needed anymore
private final TypeSystem mTypeSystem;
- private final CAS mCAS;
+ private CAS mCAS;
private final DocumentFormat format;
@@ -240,6 +240,14 @@ public class DocumentUimaImpl extends Ab
return getCAS().getTypeSystem().getType(type);
}
+ public void switchView(String viewName) {
+ String oldViewName = mCAS.getViewName();
+
+ mCAS = mCAS.getView(viewName);
+
+ fireViewChanged(oldViewName, viewName);
+ }
+
/**
* Sets the content. The XCAS {@link InputStream} gets parsed.
*/
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocument.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocument.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocument.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocument.java Mon Apr 4 11:28:21 2011
@@ -132,6 +132,14 @@ public interface ICasDocument {
Map<Integer, AnnotationFS> getView(Type annotationType);
/**
+ * Switches the view of the underlying CAS to the provided
+ * view name.
+ *
+ * @param viewName
+ */
+ void switchView(String viewName);
+
+ /**
* Retrieves the annotations of the given type inside the given span.
*
* @param type
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocumentListener.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocumentListener.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocumentListener.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ICasDocumentListener.java Mon Apr 4 11:28:21 2011
@@ -80,4 +80,15 @@ public interface ICasDocumentListener {
* Note: The text can not be changed
*/
void changed();
+
+ /**
+ * This method is called when the currently active view is changed in
+ * the document. A view changed does not indicate a structural change,
+ * but usually feature structures must be completely synchronized afterward.
+ *
+ * @param oldViewName
+ * @param newViewName
+ * @return
+ */
+ void viewChanged(String oldViewName, String newViewName);
}
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/editview/FeatureStructureContentProvider.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/editview/FeatureStructureContentProvider.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/editview/FeatureStructureContentProvider.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/editview/FeatureStructureContentProvider.java Mon Apr 4 11:28:21 2011
@@ -134,6 +134,10 @@ final class FeatureStructureContentProvi
public void added(Collection<FeatureStructure> newFeatureStructure) {
}
+ public void viewChanged(String oldViewName, String newViewName) {
+ changed();
+ }
+
public void changed() {
Display.getDefault().syncExec(new Runnable() {
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/FeatureStructureBrowserViewPage.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/FeatureStructureBrowserViewPage.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/FeatureStructureBrowserViewPage.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/FeatureStructureBrowserViewPage.java Mon Apr 4 11:28:21 2011
@@ -68,12 +68,10 @@ public final class FeatureStructureBrows
private ICasDocument mDocument;
- private CAS mCAS;
private Type mCurrentType;
- FeatureStructureTreeContentProvider(ICasDocument document, CAS tcas) {
- mCAS = tcas;
+ FeatureStructureTreeContentProvider(ICasDocument document) {
mDocument = document;
}
@@ -84,8 +82,8 @@ public final class FeatureStructureBrows
StrictTypeConstraint typeConstrain = new StrictTypeConstraint(mCurrentType);
- FSIterator<FeatureStructure> strictTypeIterator = mCAS.createFilteredIterator(
- mCAS.getIndexRepository().getAllIndexedFS(mCurrentType), typeConstrain);
+ FSIterator<FeatureStructure> strictTypeIterator =mDocument.getCAS().createFilteredIterator(
+ mDocument.getCAS().getIndexRepository().getAllIndexedFS(mCurrentType), typeConstrain);
LinkedList<ModelFeatureStructure> featureStrucutreList = new LinkedList<ModelFeatureStructure>();
@@ -281,6 +279,10 @@ public final class FeatureStructureBrows
// ignore
}
+ public void viewChanged(String oldViewName, String newViewName) {
+ changed();
+ }
+
public void changed() {
mFSList.refresh();
}
@@ -298,7 +300,7 @@ public final class FeatureStructureBrows
return;
}
- FeatureStructure newFeatureStructure = mCAS.createFS(mCurrentType);
+ FeatureStructure newFeatureStructure = mDocument.getCAS().createFS(mCurrentType);
mDocument.addFeatureStructure(newFeatureStructure);
@@ -316,8 +318,6 @@ public final class FeatureStructureBrows
private ICasDocument mDocument;
- private CAS mCAS;
-
private ListViewer mFSList;
private Composite mInstanceComposite;
@@ -340,14 +340,13 @@ public final class FeatureStructureBrows
if (document == null)
throw new IllegalArgumentException("document parameter must not be null!");
- mCAS = document.getCAS();
mDocument = document;
mDeleteAction = new DeleteFeatureStructureAction(this.mDocument);
mSelectAllAction = new SelectAllAction();
- TypeSystem ts = mCAS.getTypeSystem();
+ TypeSystem ts = mDocument.getCAS().getTypeSystem();
filterTypes = new HashSet<Type>();
filterTypes.add(ts.getType(CAS.TYPE_NAME_ARRAY_BASE));
@@ -417,7 +416,8 @@ public final class FeatureStructureBrows
typeLabel.setLayoutData(typeLabelData);
TypeCombo typeCombo = new TypeCombo(typePanel,
- mCAS.getTypeSystem().getType(CAS.TYPE_NAME_TOP),mCAS.getTypeSystem(), filterTypes);
+ mDocument.getCAS().getTypeSystem().getType(CAS.TYPE_NAME_TOP),
+ mDocument.getCAS().getTypeSystem(), filterTypes);
GridData typeComboData = new GridData();
typeComboData.horizontalAlignment = SWT.FILL;
typeComboData.grabExcessHorizontalSpace = true;
@@ -431,7 +431,7 @@ public final class FeatureStructureBrows
instanceListData.verticalAlignment = SWT.FILL;
mFSList.getList().setLayoutData(instanceListData);
mFSList
- .setContentProvider(new FeatureStructureTreeContentProvider(mDocument, mCAS));
+ .setContentProvider(new FeatureStructureTreeContentProvider(mDocument));
mFSList.setLabelProvider(new FeatureStructureLabelProvider());
mFSList.setUseHashlookup(true);
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/ModeSensitiveContentProvider.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/ModeSensitiveContentProvider.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/ModeSensitiveContentProvider.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/ModeSensitiveContentProvider.java Mon Apr 4 11:28:21 2011
@@ -96,6 +96,10 @@ import org.eclipse.swt.widgets.Display;
});
}
+ public void viewChanged(String oldViewName, String newViewName) {
+ changed();
+ }
+
public void changed() {
Collection<AnnotationFS> annotations = mEditor.getDocument().getAnnotations(
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java?rev=1088559&r1=1088558&r2=1088559&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java Mon Apr 4 11:28:21 2011
@@ -143,7 +143,10 @@ public class TypeGroupedContentProvider
return typeNode.getAnnotations();
}
-
+ public void viewChanged(String oldViewName, String newViewName) {
+ changed();
+ }
+
public void changed() {
nameAnnotationTypeNodeMap.clear();