Revision 44435 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureReferenceSelection.java
DefaultFeatureReferenceSelection.java | ||
---|---|---|
38 | 38 |
import org.gvsig.fmap.dal.feature.FeatureReferenceSelection; |
39 | 39 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
40 | 40 |
import org.gvsig.fmap.dal.feature.FeatureStoreNotification; |
41 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
41 | 42 |
import org.gvsig.fmap.dal.feature.impl.undo.FeatureCommandsStack; |
42 | 43 |
import org.gvsig.tools.ToolsLocator; |
43 | 44 |
import org.gvsig.tools.dispose.impl.AbstractDisposable; |
... | ... | |
65 | 66 |
public static final String DYNCLASS_PERSISTENT_NAME = |
66 | 67 |
"DefaultFeatureReferenceSelection"; |
67 | 68 |
|
69 |
private Boolean available = null; |
|
70 |
|
|
68 | 71 |
protected SelectionData selectionData = null; |
69 | 72 |
|
70 | 73 |
private FeatureStore featureStore; |
... | ... | |
612 | 615 |
// featureStore and helper are already swallow cloned by our parent |
613 | 616 |
return clone; |
614 | 617 |
} |
618 |
|
|
619 |
@Override |
|
620 |
public boolean isAvailable() { |
|
621 |
if( this.available==null ) { |
|
622 |
try { |
|
623 |
FeatureType type = this.featureStore.getDefaultFeatureType(); |
|
624 |
this.available = type.supportReferences(); |
|
625 |
} catch (DataException ex) { |
|
626 |
this.available = false; |
|
627 |
} |
|
628 |
} |
|
629 |
return this.available; |
|
630 |
} |
|
631 |
|
|
632 |
|
|
615 | 633 |
} |
Also available in: Unified diff