Revision 12210

View differences:

trunk/applications/appgvSIG/src/com/iver/cit/gvsig/InfoToolExtension.java
55 55
import com.iver.cit.gvsig.fmap.layers.FLayer;
56 56
import com.iver.cit.gvsig.project.documents.ProjectDocument;
57 57
import com.iver.cit.gvsig.project.documents.view.IProjectView;
58
import com.iver.cit.gvsig.project.documents.view.gui.BaseView;
58 59
import com.iver.cit.gvsig.project.documents.view.gui.View;
59 60

  
60 61

  
......
66 67
	private static Logger logger = Logger.getLogger(InfoToolExtension.class.getName());
67 68

  
68 69
	public void execute(String s) {
69
		View vista = (View) PluginServices.getMDIManager().getActiveWindow();
70
		BaseView vista = (BaseView) PluginServices.getMDIManager().getActiveWindow();
70 71
		MapControl mapCtrl = vista.getMapControl();
71 72
		logger.debug("Comand : " + s);
72 73

  
......
88 89
			return false;
89 90
		}
90 91

  
91
		if (f.getClass() == View.class) {
92
			View vista = (View) f;
92
		if (f instanceof BaseView) {
93
			BaseView vista = (BaseView) f;
93 94
			IProjectView model = vista.getModel();
94 95
			MapContext mapa = model.getMapContext();
95 96

  
......
116 117
		if (f == null) {
117 118
			return false;
118 119
		}
119

  
120
		if (f instanceof View) {
121
			View vista = (View) f;
120
		
121
		if (f instanceof BaseView) {
122
			BaseView vista = (BaseView) f;
122 123
			IProjectView model = vista.getModel();
123 124
			MapContext mapa = model.getMapContext();
124 125
			return mapa.getLayers().getLayersCount() > 0;

Also available in: Unified diff