jeremytammik / RevitLookup

Interactive Revit RFA and RVT project database exploration tool to view and navigate BIM element parameters, properties and relationships.
http://thebuildingcoder.typepad.com
MIT License
1.03k stars 294 forks source link

Add TableView support #231

Closed SergeyNefyodov closed 1 month ago

SergeyNefyodov commented 1 month ago

Summary of the Pull Request

What is this about:

I added support for all the methods of TableView. In some places code is strange, because I need TableSectionData to get know count of rows and columns, but this data locates in inheritors of table view only.

Quality Checklist

github-actions[bot] commented 1 month ago

Qodana for .NET

4 new problems were found

Inspection name Severity Problems
Convert 'if' statement into 'switch' ◽️ Notice 4

💡 Qodana analysis was run in the pull request mode: only the changed files were checked ☁️ View the detailed Qodana report

Contact Qodana team Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions
Nice3point commented 1 month ago

@SergeyNefyodov yeh, we can use casting. This is bad API implementation without base type common method. Better to use switch expression. Currently we have only 2 derived types изображение

Nice3point commented 1 month ago
            if (tableView is not ViewSchedule && tableView is not PanelScheduleView)
                return ResolveSet.Append("This view is not a schedule view");

and for this reason we can drop this check