Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2015-06-08 14:21:38 +0000
committerVincent Lorenzo2015-06-08 14:43:15 +0000
commit0cf497f7fb13e6eb3f36835379480c31c9faa134 (patch)
treeefbff42cbf008de2621684c7c9bddab190c25f68 /plugins
parentd3693b697b473c72b169618f8668e78e09664ee9 (diff)
downloadorg.eclipse.papyrus-0cf497f7fb13e6eb3f36835379480c31c9faa134.tar.gz
org.eclipse.papyrus-0cf497f7fb13e6eb3f36835379480c31c9faa134.tar.xz
org.eclipse.papyrus-0cf497f7fb13e6eb3f36835379480c31c9faa134.zip
468051: [Tree table] Error applying String filter
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/filter/StringMatcherEditorFactory.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/filter/StringMatcherEditorFactory.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/filter/StringMatcherEditorFactory.java
index 17322bb0bc1..9fdc0725ca0 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/filter/StringMatcherEditorFactory.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/filter/StringMatcherEditorFactory.java
@@ -38,6 +38,8 @@ import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import org.eclipse.papyrus.infra.nattable.layerstack.BodyLayerStack;
import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
import ca.odell.glazedlists.BasicEventList;
@@ -297,10 +299,18 @@ public class StringMatcherEditorFactory<T> implements IPapyrusMatcherEditorFacto
return new TextFilterator<T>() {
@Override
public void getFilterStrings(List<String> objectAsListOfStrings, T rowObject) {
+ Object representedObject = AxisUtils.getRepresentedElement(rowObject);
+ if(representedObject instanceof TreeFillingConfiguration){
+ return ;
+ }
INattableModelManager manager = configRegistry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
int index = manager.getRowElementsList().indexOf(rowObject);
BodyLayerStack stack = manager.getBodyLayerStack();
ILayerCell cell = stack.getBodyDataLayer().getCellByPosition(columnIndex, index);
+ if(cell==null){
+ //we probably have a problem
+ return;
+ }
Object value = CellManagerFactory.INSTANCE.getCrossValue(manager.getColumnElement(columnIndex), rowObject, manager);
final IDisplayConverter displayConverter = configRegistry.getConfigAttribute(FILTER_DISPLAY_CONVERTER, NORMAL, FILTER_ROW_COLUMN_LABEL_PREFIX + columnIndex);
Object res = displayConverter.canonicalToDisplayValue(cell, configRegistry, value);

Back to the top