X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.selectionview%2Fsrc%2Forg%2Fsimantics%2Fselectionview%2FCategoryNodeLabelRule.java;h=7ebc2ef99bfb4f3319e1e4622840759ba001ad5c;hb=HEAD;hp=5654c01a51cb578bfa8a134f79c559560c22258c;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/CategoryNodeLabelRule.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/CategoryNodeLabelRule.java index 5654c01a5..7ebc2ef99 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/CategoryNodeLabelRule.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/CategoryNodeLabelRule.java @@ -1,29 +1,29 @@ -package org.simantics.selectionview; - -import java.util.Map; - -import org.simantics.browsing.ui.common.ColumnKeys; -import org.simantics.browsing.ui.model.labels.LabelRule; -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.utils.datastructures.ArrayMap; - -public class CategoryNodeLabelRule implements LabelRule { - - private static final String[] COLS = new String[] { ColumnKeys.DISPLAY_PROPERTY }; - - @Override - public boolean isCompatible(Class contentType) { - return contentType.equals(CategoryNode.class); - } - - @Override - public Map getLabel(ReadGraph graph, Object content) - throws DatabaseException { - - String[] result = new String[] { ((CategoryNode)content).getName() }; - return new ArrayMap(COLS, result); - - } - -} +package org.simantics.selectionview; + +import java.util.Map; + +import org.simantics.browsing.ui.common.ColumnKeys; +import org.simantics.browsing.ui.model.labels.LabelRule; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.utils.datastructures.ArrayMap; + +public class CategoryNodeLabelRule implements LabelRule { + + private static final String[] COLS = new String[] { ColumnKeys.DISPLAY_PROPERTY }; + + @Override + public boolean isCompatible(Class contentType) { + return contentType.equals(CategoryNode.class); + } + + @Override + public Map getLabel(ReadGraph graph, Object content) + throws DatabaseException { + + String[] result = new String[] { ((CategoryNode)content).getName() }; + return new ArrayMap(COLS, result); + + } + +}