// TODO: Refactor with respect of Item.Action generalization void InvokeActionOnItem(Item item) { if (item.Entity.IsTable) { StudioController.EditTableData(SelectedServer, item.Entity); } else if (item.Entity.IsProcedure) { StudioController.ExecuteProcedure(SelectedServer, item.Entity); } else if (item.Entity.IsFunction) { StudioController.ExecuteFunction(SelectedServer, item.Entity); } }