Revision 31496 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/StartEditing.java
StartEditing.java | ||
---|---|---|
8 | 8 |
import org.gvsig.andami.messages.NotificationManager; |
9 | 9 |
import org.gvsig.andami.plugins.Extension; |
10 | 10 |
import org.gvsig.app.extension.ProjectExtension; |
11 |
import org.gvsig.app.project.documents.table.FeatureTableDocument;
|
|
12 |
import org.gvsig.app.project.documents.view.IProjectView;
|
|
13 |
import org.gvsig.app.project.documents.view.gui.View;
|
|
11 |
import org.gvsig.app.project.documents.table.TableDocument; |
|
12 |
import org.gvsig.app.project.documents.view.ViewDocument;
|
|
13 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
|
|
14 | 14 |
import org.gvsig.editing.gui.cad.CADTool; |
15 | 15 |
import org.gvsig.editing.gui.tokenmarker.ConsoleToken; |
16 | 16 |
import org.gvsig.fmap.dal.exception.ReadException; |
... | ... | |
54 | 54 |
org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager() |
55 | 55 |
.getActiveWindow(); |
56 | 56 |
|
57 |
if (f instanceof View) {
|
|
58 |
View vista = (View) f;
|
|
57 |
if (f instanceof DefaultViewPanel) {
|
|
58 |
DefaultViewPanel vista = (DefaultViewPanel) f;
|
|
59 | 59 |
|
60 | 60 |
MapControl mapControl = vista.getMapControl(); |
61 |
IProjectView model = vista.getModel();
|
|
61 |
ViewDocument model = vista.getModel();
|
|
62 | 62 |
FLayer[] actives = model.getMapContext().getLayers().getActives(); |
63 | 63 |
|
64 | 64 |
boolean bEditingStarted = false; |
... | ... | |
105 | 105 |
// modelo por el VectorialEditableAdapter. |
106 | 106 |
ProjectExtension pe = (ProjectExtension) PluginServices |
107 | 107 |
.getExtension(ProjectExtension.class); |
108 |
FeatureTableDocument pt = pe.getProject().getTable(lv);
|
|
108 |
TableDocument pt = pe.getProject().getTable(lv); |
|
109 | 109 |
if (pt != null){ |
110 | 110 |
pt.setStore(lv.getFeatureStore()); |
111 | 111 |
// changeModelTable(pt,vea); |
... | ... | |
164 | 164 |
// |
165 | 165 |
// } |
166 | 166 |
|
167 |
public static void startCommandsApplicable(View vista,FLyrVect lv) {
|
|
167 |
public static void startCommandsApplicable(DefaultViewPanel vista,FLyrVect lv) {
|
|
168 | 168 |
if (vista==null) |
169 |
vista=(View)PluginServices.getMDIManager().getActiveWindow();
|
|
169 |
vista=(DefaultViewPanel)PluginServices.getMDIManager().getActiveWindow();
|
|
170 | 170 |
CADTool[] cadtools = CADExtension.getCADTools(); |
171 | 171 |
KeywordMap keywordMap = new KeywordMap(true); |
172 | 172 |
for (int i = 0; i < cadtools.length; i++) { |
... | ... | |
216 | 216 |
if (f == null) { |
217 | 217 |
return false; |
218 | 218 |
} |
219 |
if (f instanceof View){
|
|
220 |
View view=(View)f;
|
|
219 |
if (f instanceof DefaultViewPanel){
|
|
220 |
DefaultViewPanel view=(DefaultViewPanel)f;
|
|
221 | 221 |
FLayer[] selected = view.getModel().getMapContext().getLayers() |
222 | 222 |
.getActives(); |
223 | 223 |
if (selected.length == 1 && selected[0].isAvailable() && selected[0] instanceof FLyrVect) { |
Also available in: Unified diff