code: public boolean execute(Canvas target, Menu menu, MenuItem item) {
  		Layer<?> selected = mapWidget.getMapModel().getSelectedLayer();
  		if (selected != null && selected instanceof VectorLayer) {
  			VectorLayer layer = (VectorLayer) selected;
  			if (layer.getLayerInfo().isCreatable()) {
  				return true;
  			}
  		}
  		return false;
  	}
docs: Implementation of the <code>MenuItemIfFunction</code> interface. This will determine if the menu action should be
  enabled or not. In essence, this action will be enabled if a vector-layer is selected that allows the creation of
  new features.