You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the SketchupSuggestions/ToolDrawingBounds cop catches tools that has a draw method but no getExtents method. However, tools that only draw in 2D have no use of a setting any 3D extents to draw to.
Perhaps the cop could also check what View draw methods are called inside the draw method? If only draw2d was called, there is no need for a getExtents.
This may not be reliable if the view draw calls are wrapped in other methods that in turn are called from the Tool interface draw method.
The text was updated successfully, but these errors were encountered:
The cops in SketchupSuggestion category is likely to be more noisy. Some of them are there mostly to be part of the learning process and developers can simply mute it once they don't feel they don't need it.
What we see in reviews is that a lot of the times people don't use getExtents at all. We could check for draw2d directly in the draw callback - but it'll add complexity that only cover a small set of scenarios. It won't catch drawing helper methods.
We can expand the documentation to be a bit more explicit about the cases of drawing only 2d - like suggesting the cop be disabled completely for the project, per file, or even just for that given tool class.
Currently the SketchupSuggestions/ToolDrawingBounds cop catches tools that has a draw method but no getExtents method. However, tools that only draw in 2D have no use of a setting any 3D extents to draw to.
Perhaps the cop could also check what View draw methods are called inside the draw method? If only draw2d was called, there is no need for a getExtents.
This may not be reliable if the view draw calls are wrapped in other methods that in turn are called from the Tool interface draw method.
The text was updated successfully, but these errors were encountered: