01: /**
02: *
03: */package net.refractions.udig.project.command.provider;
04:
05: import net.refractions.udig.core.IBlockingProvider;
06: import net.refractions.udig.project.IMap;
07: import net.refractions.udig.project.command.MapCommand;
08:
09: import org.eclipse.core.runtime.IProgressMonitor;
10: import org.geotools.feature.Feature;
11:
12: public class EditFeatureProvider implements IBlockingProvider<Feature> {
13: private MapCommand command;
14: private IMap map;
15:
16: public EditFeatureProvider(MapCommand command2) {
17: this .command = command2;
18: }
19:
20: public EditFeatureProvider(IMap map) {
21: this .map = map;
22: }
23:
24: public Feature get(IProgressMonitor monitor) {
25: if (map != null)
26: return map.getEditManager().getEditFeature();
27: return command.getMap().getEditManager().getEditFeature();
28: }
29: }
|