Revision 45227 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/FeatureAttributeTreeModel.java
FeatureAttributeTreeModel.java | ||
---|---|---|
230 | 230 |
private final Predicate<FeatureAttributeDescriptor> filterByDataType; |
231 | 231 |
private boolean showRelations; |
232 | 232 |
|
233 |
public FeatureAttributeTreeModel(FeatureStore store, boolean showRelations, Predicate<FeatureAttributeDescriptor> filterByDataType) { |
|
233 |
public FeatureAttributeTreeModel(FeatureStore store, FeatureType featureType, boolean showRelations, Predicate<FeatureAttributeDescriptor> filterByDataType) {
|
|
234 | 234 |
if (filterByDataType == null) { |
235 | 235 |
this.filterByDataType = Search.ALL_FILTER; |
236 | 236 |
} else { |
237 | 237 |
this.filterByDataType = filterByDataType; |
238 | 238 |
} |
239 |
FeatureType featureType; |
|
240 |
try { |
|
241 |
featureType = store.getDefaultFeatureType(); |
|
242 |
} catch (Exception ex) { |
|
243 |
throw new RuntimeException("Can't access attributes of store", ex); |
|
239 |
if (featureType==null) { |
|
240 |
featureType = store.getDefaultFeatureTypeQuietly(); |
|
244 | 241 |
} |
242 |
|
|
245 | 243 |
Search featureTypeSearch = (Search) ToolsLocator.getComplementsManager().get( |
246 | 244 |
Search.COMPLEMENT_MANE, featureType |
247 | 245 |
); |
Also available in: Unified diff