rubocop-sketchup 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2641cf07a13c7fa7c33f484a10bcfcb22f8daa4f
4
- data.tar.gz: a235e082f106d088b245768d5f639d503b75a4db
3
+ metadata.gz: 9e87c5eb2f0e9d6ebeeac8f7b83686e40eb5357f
4
+ data.tar.gz: 51f64f97d094f38df5a730aa22677dcda3741617
5
5
  SHA512:
6
- metadata.gz: 55caaf069752bc471b957b034b7c62702639be84596f21745a21ecd4e06b66bc5091ffdf13c30fd72aa9144f70bc53affecf8b410f904496a7b483908fcd230c
7
- data.tar.gz: 96327fe0f81942432a3bf4895e4256f69d9b7ba978e3c98c9087bf356cec06788498633f72ac54c78957a27c0d5bd8ce40ce46f4ca5d5d2e73868a30d3c22d67
6
+ metadata.gz: bc99a7230d75286b26ae86c6029458782b53b7ad841fa2863ee762ffaa4731a91122cc57361768b9201f9f6bc98da202e693c106f5bd31f8a68d02df4b119f04
7
+ data.tar.gz: e0b6b2b2f2a7fb8117f1e20830d4d56b3cb9667530012b13e0580c30f779d26eacd4b8dc20533a3ac668682163cde24785ba10966fe8cf71a87f0432c9334c2c
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :test do
6
+ gem "appveyor-worker", '~> 0.2', require: false
6
7
  gem 'rake', '~> 12.0', require: false
7
8
  gem 'rspec', '~> 3.7', require: false
8
9
  end
data/config/default.yml CHANGED
@@ -2,6 +2,7 @@
2
2
  AllCops:
3
3
  SketchUp:
4
4
  SourcePath: src
5
+ TargetSketchUpVersion: 2016
5
6
 
6
7
  SketchupDeprecations/AddSeparatorToMenu:
7
8
  Description: The method `add_separator_to_menu` is deprecated.
@@ -91,6 +92,7 @@ SketchupRequirements/ExtensionNamespace:
91
92
  To avoid clashing with other extensions a single root namespace
92
93
  should all the extension's code.
93
94
  Enabled: true
95
+ Exceptions: []
94
96
 
95
97
  SketchupRequirements/FileStructure:
96
98
  Description: Expected extension file structure not found.
@@ -103,6 +105,10 @@ SketchupRequirements/GlobalConstants:
103
105
  Description: Do not introduce global constants.
104
106
  Enabled: true
105
107
 
108
+ SketchupRequirements/GlobalInclude:
109
+ Description: Do not include modules into global namespace.
110
+ Enabled: true
111
+
106
112
  SketchupRequirements/GlobalMethods:
107
113
  Description: Extensions should not define global methods.
108
114
  Enabled: true
@@ -133,6 +139,13 @@ SketchupRequirements/MinimalRegistration:
133
139
  it's disabled.
134
140
  Enabled: true
135
141
 
142
+ SketchupRequirements/ObserversStartOperation:
143
+ Description: Observers should create transparent operations.
144
+ Details: >-
145
+ When making model changes within an observer event, start a
146
+ transparent operation to ensure a clean undo-stack.
147
+ Enabled: true
148
+
136
149
  SketchupRequirements/RegisterExtension:
137
150
  Description: >-
138
151
  Always register extensions to load by default. Otherwise it
@@ -193,6 +206,15 @@ SketchupSuggestions/ModelEntities:
193
206
  model root.
194
207
  Enabled: true
195
208
 
209
+ SketchupSuggestions/MonkeyPatchedApi:
210
+ Description: >-
211
+ Avoid using monkey-patched methods from SketchUp's shipped
212
+ extensions.
213
+ Details: >-
214
+ These methods stops working when the extensions are disabled and
215
+ may change or be removed.
216
+ Enabled: true
217
+
196
218
  SketchupSuggestions/OperationName:
197
219
  Description: >-
198
220
  Check that operation names are human friendly and consistent
@@ -6,10 +6,13 @@ require 'rubocop/sketchup/inject'
6
6
  require 'rubocop/sketchup/formatter/extension_review'
7
7
  require 'rubocop/sketchup/config'
8
8
  require 'rubocop/sketchup/dc_globals'
9
+ require 'rubocop/sketchup/dc_methods'
9
10
  require 'rubocop/sketchup/extension_project'
11
+ require 'rubocop/sketchup/features'
10
12
  require 'rubocop/sketchup/namespace'
11
13
  require 'rubocop/sketchup/namespace_checker'
12
14
  require 'rubocop/sketchup/no_comment_disable'
15
+ require 'rubocop/sketchup/sketchup_version'
13
16
 
14
17
  RuboCop::SketchUp::Inject.defaults!
15
18
 
@@ -17,6 +17,7 @@ module RuboCop
17
17
  config.for_all_cops.fetch('SketchUp', DEFAULT_CONFIGURATION)
18
18
  end
19
19
 
20
+
20
21
  def sketchup_source_path_config?
21
22
  return unless all_cops_config.key?('SketchUp')
22
23
  all_cops_config.fetch('SketchUp').key?('SourcePath')
@@ -26,6 +27,17 @@ module RuboCop
26
27
  sketchup_cops_config.fetch('SourcePath')
27
28
  end
28
29
 
30
+
31
+ def sketchup_target_version?
32
+ return unless all_cops_config.key?('SketchUp')
33
+ all_cops_config.fetch('SketchUp').key?('TargetSketchUpVersion')
34
+ end
35
+
36
+ def sketchup_target_version
37
+ version = sketchup_cops_config.fetch('TargetSketchUpVersion')
38
+ version ? SketchUpVersion.new(version) : nil
39
+ end
40
+
29
41
  end
30
42
  end
31
43
  end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module SketchUp
5
+ module DynamicComponentMethods
6
+
7
+ DC_METHODS = [
8
+ {
9
+ name: :rotx,
10
+ path: 'Geom::Transformation'
11
+ },
12
+ {
13
+ name: :roty,
14
+ path: 'Geom::Transformation'
15
+ },
16
+ {
17
+ name: :rotz,
18
+ path: 'Geom::Transformation'
19
+ },
20
+ {
21
+ name: :xscale,
22
+ path: 'Geom::Transformation'
23
+ },
24
+ {
25
+ name: :yscale,
26
+ path: 'Geom::Transformation'
27
+ },
28
+ {
29
+ name: :zscale,
30
+ path: 'Geom::Transformation'
31
+ },
32
+
33
+ {
34
+ name: :copy,
35
+ path: 'Sketchup::Camera',
36
+ variables: [:camera, :cam]
37
+ },
38
+ {
39
+ name: :update,
40
+ path: 'Sketchup::Camera',
41
+ variables: [:camera, :cam]
42
+ },
43
+ {
44
+ name: :same_camera_params?,
45
+ path: 'Sketchup::Camera'
46
+ },
47
+
48
+ {
49
+ name: :copy,
50
+ path: 'Sketchup::ComponentInstance',
51
+ variables: [:instance, :inst]
52
+ },
53
+ {
54
+ name: :description,
55
+ path: 'Sketchup::ComponentInstance',
56
+ variables: [:instance, :inst]
57
+ },
58
+
59
+ {
60
+ name: :local_transformation,
61
+ path: 'Sketchup::Drawingelement'
62
+ },
63
+ {
64
+ name: :scaled_size,
65
+ path: 'Sketchup::Drawingelement'
66
+ },
67
+ {
68
+ name: :unscaled_size,
69
+ path: 'Sketchup::Drawingelement'
70
+ },
71
+ {
72
+ name: :set_last_size,
73
+ path: 'Sketchup::Drawingelement'
74
+ },
75
+ {
76
+ name: :last_scaling_factors,
77
+ path: 'Sketchup::Drawingelement'
78
+ },
79
+
80
+ {
81
+ name: :get_attributes,
82
+ path: 'Sketchup::Entity'
83
+ },
84
+ {
85
+ name: :has_attributes?,
86
+ path: 'Sketchup::Entity'
87
+ },
88
+
89
+ {
90
+ name: :typename,
91
+ path: 'Sketchup::Model',
92
+ variables: [:model, :mod]
93
+ },
94
+ {
95
+ name: :entityID,
96
+ path: 'Sketchup::Model',
97
+ variables: [:model, :mod]
98
+ },
99
+ {
100
+ name: :delete_attribute,
101
+ path: 'Sketchup::Model',
102
+ variables: [:model, :mod]
103
+ },
104
+ {
105
+ name: :layer,
106
+ path: 'Sketchup::Model',
107
+ variables: [:model, :mod]
108
+ },
109
+
110
+ {
111
+ name: :last_width=,
112
+ path: 'UI::WebDialog'
113
+ },
114
+ {
115
+ name: :last_height=,
116
+ path: 'UI::WebDialog'
117
+ },
118
+ {
119
+ name: :last_width,
120
+ path: 'UI::WebDialog'
121
+ },
122
+ {
123
+ name: :last_height,
124
+ path: 'UI::WebDialog'
125
+ },
126
+ ]
127
+
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,738 @@
1
+ # frozen_string_literal: true
2
+
3
+ # How to update this file:
4
+ #
5
+ # FEATURES constant:
6
+ #
7
+ # 1. Run the `rubocop-changelog` YARD template:
8
+ # (https://github.com/SketchUp/rubocop-sketchup/issues/4#issuecomment-370753043)
9
+ #
10
+ # yardoc -c -t rubocop-changelog -f text > rubocop-changelog.txt
11
+ #
12
+ # 2. Prune out any unreleased versions.
13
+ #
14
+ # TODO(thomthom): Push the rubocop-changelog template to the API stubs
15
+ # repository.
16
+ #
17
+ #
18
+ # INSTANCE_METHODS constant:
19
+ #
20
+ # Manually curated list of method names which are believed to yield few false
21
+ # positives. The method names should be names that are not commonly used in
22
+ # general context.
23
+ #
24
+ # When a new version is released and FEATURES is updated the new methods from
25
+ # the new version should be considered for this list.
26
+ #
27
+ #
28
+ # OBSERVER_METHODS constant:
29
+ #
30
+ # Currently manually curated.
31
+ #
32
+ # TODO(thomthom): Tag observer methods in YARD for automatic extraction.
33
+
34
+ module RuboCop
35
+ module SketchUp
36
+ module Features
37
+
38
+ FEATURES = [
39
+
40
+ {
41
+ version: 'LayOut 2018',
42
+ types: {
43
+ class: [
44
+ 'Geom::Bounds2d',
45
+ 'Geom::OrientedBounds2d',
46
+ 'Geom::Point2d',
47
+ 'Geom::Transformation2d',
48
+ 'Geom::Vector2d',
49
+ 'Layout::AngularDimension',
50
+ 'Layout::AutoTextDefinition',
51
+ 'Layout::AutoTextDefinitions',
52
+ 'Layout::ConnectionPoint',
53
+ 'Layout::Document',
54
+ 'Layout::Ellipse',
55
+ 'Layout::Entities',
56
+ 'Layout::Entity',
57
+ 'Layout::FormattedText',
58
+ 'Layout::Grid',
59
+ 'Layout::Group',
60
+ 'Layout::Image',
61
+ 'Layout::Label',
62
+ 'Layout::Layer',
63
+ 'Layout::LayerInstance',
64
+ 'Layout::Layers',
65
+ 'Layout::LinearDimension',
66
+ 'Layout::LockedEntityError',
67
+ 'Layout::LockedLayerError',
68
+ 'Layout::Page',
69
+ 'Layout::PageInfo',
70
+ 'Layout::Pages',
71
+ 'Layout::Path',
72
+ 'Layout::Rectangle',
73
+ 'Layout::SketchUpModel',
74
+ 'Layout::Style',
75
+ 'Layout::Table',
76
+ 'Layout::TableCell',
77
+ 'Layout::TableColumn',
78
+ 'Layout::TableRow',
79
+ ],
80
+ method: [
81
+ 'Geom::Bounds2d#==',
82
+ 'Geom::Bounds2d#height',
83
+ 'Geom::Bounds2d#initialize',
84
+ 'Geom::Bounds2d#lower_right',
85
+ 'Geom::Bounds2d#set!',
86
+ 'Geom::Bounds2d#to_a',
87
+ 'Geom::Bounds2d#upper_left',
88
+ 'Geom::Bounds2d#width',
89
+ 'Geom::OrientedBounds2d#==',
90
+ 'Geom::OrientedBounds2d#lower_left',
91
+ 'Geom::OrientedBounds2d#lower_right',
92
+ 'Geom::OrientedBounds2d#to_a',
93
+ 'Geom::OrientedBounds2d#upper_left',
94
+ 'Geom::OrientedBounds2d#upper_right',
95
+ 'Geom::Point2d#+',
96
+ 'Geom::Point2d#-',
97
+ 'Geom::Point2d#==',
98
+ 'Geom::Point2d#[]',
99
+ 'Geom::Point2d#[]=',
100
+ 'Geom::Point2d#clone',
101
+ 'Geom::Point2d#distance',
102
+ 'Geom::Point2d#initialize',
103
+ 'Geom::Point2d#inspect',
104
+ 'Geom::Point2d#offset',
105
+ 'Geom::Point2d#offset!',
106
+ 'Geom::Point2d#set!',
107
+ 'Geom::Point2d#to_a',
108
+ 'Geom::Point2d#to_s',
109
+ 'Geom::Point2d#vector_to',
110
+ 'Geom::Point2d#x',
111
+ 'Geom::Point2d#x=',
112
+ 'Geom::Point2d#y',
113
+ 'Geom::Point2d#y=',
114
+ 'Geom::Transformation2d#==',
115
+ 'Geom::Transformation2d#clone',
116
+ 'Geom::Transformation2d#identity?',
117
+ 'Geom::Transformation2d#initialize',
118
+ 'Geom::Transformation2d#set!',
119
+ 'Geom::Transformation2d#to_a',
120
+ 'Geom::Vector2d#%',
121
+ 'Geom::Vector2d#*',
122
+ 'Geom::Vector2d#+',
123
+ 'Geom::Vector2d#-',
124
+ 'Geom::Vector2d#==',
125
+ 'Geom::Vector2d#[]',
126
+ 'Geom::Vector2d#[]=',
127
+ 'Geom::Vector2d#angle_between',
128
+ 'Geom::Vector2d#clone',
129
+ 'Geom::Vector2d#cross',
130
+ 'Geom::Vector2d#dot',
131
+ 'Geom::Vector2d#initialize',
132
+ 'Geom::Vector2d#inspect',
133
+ 'Geom::Vector2d#length',
134
+ 'Geom::Vector2d#length=',
135
+ 'Geom::Vector2d#normalize',
136
+ 'Geom::Vector2d#normalize!',
137
+ 'Geom::Vector2d#parallel?',
138
+ 'Geom::Vector2d#perpendicular?',
139
+ 'Geom::Vector2d#reverse',
140
+ 'Geom::Vector2d#reverse!',
141
+ 'Geom::Vector2d#same_direction?',
142
+ 'Geom::Vector2d#set!',
143
+ 'Geom::Vector2d#to_a',
144
+ 'Geom::Vector2d#to_s',
145
+ 'Geom::Vector2d#unit_vector?',
146
+ 'Geom::Vector2d#valid?',
147
+ 'Geom::Vector2d#x',
148
+ 'Geom::Vector2d#x=',
149
+ 'Geom::Vector2d#y',
150
+ 'Geom::Vector2d#y=',
151
+ ],
152
+ module: [
153
+ 'Layout',
154
+ ],
155
+ },
156
+ },
157
+
158
+ {
159
+ version: 'SketchUp 2018',
160
+ types: {
161
+ class: [
162
+ 'Sketchup::ImageRep',
163
+ ],
164
+ constant: [
165
+ 'Geom::PolygonMesh::MESH_NORMALS',
166
+ 'Geom::PolygonMesh::MESH_POINTS',
167
+ 'Geom::PolygonMesh::MESH_UVQ_BACK',
168
+ 'Geom::PolygonMesh::MESH_UVQ_FRONT',
169
+ ],
170
+ method: [
171
+ 'Sketchup.send_to_layout',
172
+ 'Sketchup::Color#==',
173
+ 'Sketchup::DefinitionList#remove',
174
+ 'Sketchup::Image#image_rep',
175
+ 'Sketchup::Materials#unique_name',
176
+ 'Sketchup::Page#include_in_animation=',
177
+ 'Sketchup::Page#include_in_animation?',
178
+ 'Sketchup::SectionPlane#name',
179
+ 'Sketchup::SectionPlane#name=',
180
+ 'Sketchup::SectionPlane#symbol',
181
+ 'Sketchup::SectionPlane#symbol=',
182
+ 'Sketchup::Texture#image_rep',
183
+ 'UI.refresh_toolbars',
184
+ ],
185
+ },
186
+ },
187
+
188
+ {
189
+ version: 'SketchUp 2017',
190
+ types: {
191
+ class: [
192
+ 'Sketchup::Http::Request',
193
+ 'Sketchup::Http::Response',
194
+ 'Sketchup::InstancePath',
195
+ 'UI::HtmlDialog',
196
+ 'UI::Notification',
197
+ ],
198
+ constant: [
199
+ 'UI::HtmlDialog::STYLE_WINDOW',
200
+ ],
201
+ method: [
202
+ 'Sketchup::Entity#persistent_id',
203
+ 'Sketchup::Http::Request#body',
204
+ 'Sketchup::Http::Request#body=',
205
+ 'Sketchup::Http::Request#cancel',
206
+ 'Sketchup::Http::Request#headers',
207
+ 'Sketchup::Http::Request#headers=',
208
+ 'Sketchup::Http::Request#initialize',
209
+ 'Sketchup::Http::Request#method',
210
+ 'Sketchup::Http::Request#method=',
211
+ 'Sketchup::Http::Request#set_download_progress_callback',
212
+ 'Sketchup::Http::Request#set_upload_progress_callback',
213
+ 'Sketchup::Http::Request#start',
214
+ 'Sketchup::Http::Request#status',
215
+ 'Sketchup::Http::Request#url',
216
+ 'Sketchup::Http::Response#body',
217
+ 'Sketchup::Http::Response#headers',
218
+ 'Sketchup::Http::Response#status_code',
219
+ 'Sketchup::InputPoint#instance_path',
220
+ 'Sketchup::InstancePath#==',
221
+ 'Sketchup::InstancePath#[]',
222
+ 'Sketchup::InstancePath#each',
223
+ 'Sketchup::InstancePath#empty?',
224
+ 'Sketchup::InstancePath#include?',
225
+ 'Sketchup::InstancePath#initialize',
226
+ 'Sketchup::InstancePath#leaf',
227
+ 'Sketchup::InstancePath#length',
228
+ 'Sketchup::InstancePath#persistent_id_path',
229
+ 'Sketchup::InstancePath#root',
230
+ 'Sketchup::InstancePath#size',
231
+ 'Sketchup::InstancePath#to_a',
232
+ 'Sketchup::InstancePath#transformation',
233
+ 'Sketchup::InstancePath#valid?',
234
+ 'Sketchup::Material#save_as',
235
+ 'Sketchup::Materials#load',
236
+ 'Sketchup::Model#find_entity_by_persistent_id',
237
+ 'Sketchup::Model#instance_path_from_pid_path',
238
+ 'Sketchup::ModelObserver#onPidChanged',
239
+ 'UI.scale_factor',
240
+ 'UI.show_extension_manager',
241
+ 'UI::HtmlDialog#add_action_callback',
242
+ 'UI::HtmlDialog#bring_to_front',
243
+ 'UI::HtmlDialog#center',
244
+ 'UI::HtmlDialog#close',
245
+ 'UI::HtmlDialog#execute_script',
246
+ 'UI::HtmlDialog#initialize',
247
+ 'UI::HtmlDialog#set_can_close',
248
+ 'UI::HtmlDialog#set_file',
249
+ 'UI::HtmlDialog#set_html',
250
+ 'UI::HtmlDialog#set_on_closed',
251
+ 'UI::HtmlDialog#set_position',
252
+ 'UI::HtmlDialog#set_size',
253
+ 'UI::HtmlDialog#set_url',
254
+ 'UI::HtmlDialog#show',
255
+ 'UI::HtmlDialog#show_modal',
256
+ 'UI::HtmlDialog#visible?',
257
+ 'UI::Notification#icon_name',
258
+ 'UI::Notification#icon_name=',
259
+ 'UI::Notification#icon_tooltip',
260
+ 'UI::Notification#icon_tooltip=',
261
+ 'UI::Notification#initialize',
262
+ 'UI::Notification#message',
263
+ 'UI::Notification#message=',
264
+ 'UI::Notification#on_accept',
265
+ 'UI::Notification#on_accept_title',
266
+ 'UI::Notification#on_dismiss',
267
+ 'UI::Notification#on_dismiss_title',
268
+ 'UI::Notification#show',
269
+ ],
270
+ module: [
271
+ 'Sketchup::Http',
272
+ ],
273
+ },
274
+ },
275
+
276
+ {
277
+ version: 'SketchUp 2016 M1',
278
+ types: {
279
+ method: [
280
+ 'Sketchup::RegionalSettings.decimal_separator',
281
+ 'Sketchup::RegionalSettings.list_separator',
282
+ ],
283
+ module: [
284
+ 'Sketchup::RegionalSettings',
285
+ ],
286
+ },
287
+ },
288
+
289
+ {
290
+ version: 'SketchUp 2016',
291
+ types: {
292
+ class: [
293
+ 'Sketchup::Axes',
294
+ ],
295
+ method: [
296
+ 'Sketchup.debug_mode=',
297
+ 'Sketchup.debug_mode?',
298
+ 'Sketchup::Axes#axes',
299
+ 'Sketchup::Axes#origin',
300
+ 'Sketchup::Axes#set',
301
+ 'Sketchup::Axes#sketch_plane',
302
+ 'Sketchup::Axes#to_a',
303
+ 'Sketchup::Axes#transformation',
304
+ 'Sketchup::Axes#xaxis',
305
+ 'Sketchup::Axes#yaxis',
306
+ 'Sketchup::Axes#zaxis',
307
+ 'Sketchup::ComponentDefinition#count_used_instances',
308
+ 'Sketchup::Model#axes',
309
+ 'Sketchup::Page#axes',
310
+ 'Sketchup::PickHelper#boundingbox_pick',
311
+ 'Sketchup::PickHelper#window_pick',
312
+ 'Sketchup::Texture#write',
313
+ ],
314
+ },
315
+ },
316
+
317
+ {
318
+ version: 'SketchUp 2015',
319
+ types: {
320
+ class: [
321
+ 'Sketchup::ClassificationSchema',
322
+ 'Sketchup::Classifications',
323
+ 'Sketchup::Licensing::ExtensionLicense',
324
+ ],
325
+ method: [
326
+ 'Sketchup.is_64bit?',
327
+ 'Sketchup::AppObserver#onActivateModel',
328
+ 'Sketchup::Camera#center_2d',
329
+ 'Sketchup::Camera#fov_is_height?',
330
+ 'Sketchup::Camera#is_2d?',
331
+ 'Sketchup::Camera#scale_2d',
332
+ 'Sketchup::ClassificationSchema#<=>',
333
+ 'Sketchup::ClassificationSchema#name',
334
+ 'Sketchup::ClassificationSchema#namespace',
335
+ 'Sketchup::Classifications#[]',
336
+ 'Sketchup::Classifications#each',
337
+ 'Sketchup::Classifications#keys',
338
+ 'Sketchup::Classifications#length',
339
+ 'Sketchup::Classifications#load_schema',
340
+ 'Sketchup::Classifications#size',
341
+ 'Sketchup::Classifications#unload_schema',
342
+ 'Sketchup::ComponentDefinition#add_classification',
343
+ 'Sketchup::ComponentDefinition#get_classification_value',
344
+ 'Sketchup::ComponentDefinition#remove_classification',
345
+ 'Sketchup::ComponentDefinition#set_classification_value',
346
+ 'Sketchup::Group#definition',
347
+ 'Sketchup::Layers#remove',
348
+ 'Sketchup::Licensing.get_extension_license',
349
+ 'Sketchup::Licensing::ExtensionLicense#days_remaining',
350
+ 'Sketchup::Licensing::ExtensionLicense#error_description',
351
+ 'Sketchup::Licensing::ExtensionLicense#licensed?',
352
+ 'Sketchup::Licensing::ExtensionLicense#state',
353
+ 'Sketchup::Material#colorize_deltas',
354
+ 'Sketchup::Material#colorize_type',
355
+ 'Sketchup::Material#colorize_type=',
356
+ 'Sketchup::Model#classifications',
357
+ 'Sketchup::Model#close',
358
+ 'Sketchup::Model#find_entity_by_id',
359
+ 'UI.select_directory',
360
+ ],
361
+ module: [
362
+ 'Sketchup::Licensing',
363
+ ],
364
+ },
365
+ },
366
+
367
+ {
368
+ version: 'SketchUp 2014',
369
+ types: {
370
+ class: [
371
+ 'LanguageHandler',
372
+ 'Sketchup::Console',
373
+ 'Sketchup::Dimension',
374
+ 'Sketchup::DimensionLinear',
375
+ 'Sketchup::DimensionObserver',
376
+ 'Sketchup::DimensionRadial',
377
+ ],
378
+ constant: [
379
+ 'Geom::PolygonMesh::AUTO_SOFTEN',
380
+ 'Geom::PolygonMesh::HIDE_BASED_ON_INDEX',
381
+ 'Geom::PolygonMesh::NO_SMOOTH_OR_HIDE',
382
+ 'Geom::PolygonMesh::SMOOTH_SOFT_EDGES',
383
+ 'Geom::PolygonMesh::SOFTEN_BASED_ON_INDEX',
384
+ ],
385
+ method: [
386
+ 'Geom::PolygonMesh#set_uv',
387
+ 'LanguageHandler#[]',
388
+ 'LanguageHandler#initialize',
389
+ 'LanguageHandler#resource_path',
390
+ 'LanguageHandler#strings',
391
+ 'Sketchup.platform',
392
+ 'Sketchup.quit',
393
+ 'Sketchup.temp_dir',
394
+ 'Sketchup::AppObserver#expectsStartupModelNotifications',
395
+ 'Sketchup::AttributeDictionaries#count',
396
+ 'Sketchup::AttributeDictionaries#length',
397
+ 'Sketchup::AttributeDictionaries#size',
398
+ 'Sketchup::AttributeDictionary#count',
399
+ 'Sketchup::ComponentInstance#guid',
400
+ 'Sketchup::Console#clear',
401
+ 'Sketchup::Console#hide',
402
+ 'Sketchup::Console#show',
403
+ 'Sketchup::Console#visible?',
404
+ 'Sketchup::DefinitionList#size',
405
+ 'Sketchup::Dimension#add_observer',
406
+ 'Sketchup::Dimension#arrow_type',
407
+ 'Sketchup::Dimension#arrow_type=',
408
+ 'Sketchup::Dimension#has_aligned_text=',
409
+ 'Sketchup::Dimension#has_aligned_text?',
410
+ 'Sketchup::Dimension#plane',
411
+ 'Sketchup::Dimension#remove_observer',
412
+ 'Sketchup::Dimension#text',
413
+ 'Sketchup::Dimension#text=',
414
+ 'Sketchup::DimensionLinear#aligned_text_position',
415
+ 'Sketchup::DimensionLinear#aligned_text_position=',
416
+ 'Sketchup::DimensionLinear#end',
417
+ 'Sketchup::DimensionLinear#end=',
418
+ 'Sketchup::DimensionLinear#offset_vector',
419
+ 'Sketchup::DimensionLinear#offset_vector=',
420
+ 'Sketchup::DimensionLinear#start',
421
+ 'Sketchup::DimensionLinear#start=',
422
+ 'Sketchup::DimensionLinear#text_position',
423
+ 'Sketchup::DimensionLinear#text_position=',
424
+ 'Sketchup::DimensionObserver#onTextChanged',
425
+ 'Sketchup::DimensionRadial#arc_curve',
426
+ 'Sketchup::DimensionRadial#arc_curve=',
427
+ 'Sketchup::DimensionRadial#leader_break_point',
428
+ 'Sketchup::DimensionRadial#leader_break_point=',
429
+ 'Sketchup::DimensionRadial#leader_points',
430
+ 'Sketchup::Entities#active_section_plane',
431
+ 'Sketchup::Entities#active_section_plane=',
432
+ 'Sketchup::Entities#add_dimension_linear',
433
+ 'Sketchup::Entities#add_dimension_radial',
434
+ 'Sketchup::Entities#add_section_plane',
435
+ 'Sketchup::Entities#size',
436
+ 'Sketchup::EntitiesObserver#onActiveSectionPlaneChanged',
437
+ 'Sketchup::Face#get_texture_projection',
438
+ 'Sketchup::Face#set_texture_projection',
439
+ 'Sketchup::Group#guid',
440
+ 'Sketchup::Image#transformation',
441
+ 'Sketchup::Image#transformation=',
442
+ 'Sketchup::Layer#color',
443
+ 'Sketchup::Layer#color=',
444
+ 'Sketchup::Layers#size',
445
+ 'Sketchup::LayersObserver#onLayerChanged',
446
+ 'Sketchup::Materials#size',
447
+ 'Sketchup::Model#save_copy',
448
+ 'Sketchup::OptionsManager#length',
449
+ 'Sketchup::OptionsProvider#length',
450
+ 'Sketchup::Pages#length',
451
+ 'Sketchup::RenderingOptions#count',
452
+ 'Sketchup::RenderingOptions#length',
453
+ 'Sketchup::RenderingOptions#size',
454
+ 'Sketchup::SectionPlane#activate',
455
+ 'Sketchup::SectionPlane#active?',
456
+ 'Sketchup::Selection#size',
457
+ 'Sketchup::ShadowInfo#count',
458
+ 'Sketchup::ShadowInfo#length',
459
+ 'Sketchup::ShadowInfo#size',
460
+ 'Sketchup::Styles#length',
461
+ 'UI::Toolbar#count',
462
+ 'UI::Toolbar#length',
463
+ 'UI::Toolbar#size',
464
+ 'UI::WebDialog#screen_scale_factor',
465
+ ],
466
+ },
467
+ },
468
+
469
+ {
470
+ version: 'SketchUp 2013',
471
+ types: {
472
+ method: [
473
+ 'SketchupExtension#extension_path',
474
+ 'SketchupExtension#id',
475
+ 'SketchupExtension#version_id',
476
+ ],
477
+ },
478
+ },
479
+
480
+ {
481
+ version: 'SketchUp 8.0 M2',
482
+ types: {
483
+ class: [
484
+ 'Sketchup::ExtensionsManager',
485
+ ],
486
+ method: [
487
+ 'Sketchup.extensions',
488
+ 'Sketchup.install_from_archive',
489
+ 'Sketchup.plugins_disabled=',
490
+ 'Sketchup.plugins_disabled?',
491
+ 'Sketchup::ExtensionsManager#[]',
492
+ 'Sketchup::ExtensionsManager#count',
493
+ 'Sketchup::ExtensionsManager#each',
494
+ 'Sketchup::ExtensionsManager#keys',
495
+ 'Sketchup::ExtensionsManager#length',
496
+ 'Sketchup::ExtensionsManager#size',
497
+ 'SketchupExtension#check',
498
+ 'SketchupExtension#load_on_start?',
499
+ 'SketchupExtension#loaded?',
500
+ 'SketchupExtension#registered?',
501
+ 'SketchupExtension#uncheck',
502
+ ],
503
+ },
504
+ },
505
+
506
+ {
507
+ version: 'SketchUp 8.0 M1',
508
+ types: {
509
+ method: [
510
+ 'Sketchup.fix_shadow_strings=',
511
+ 'Sketchup.fix_shadow_strings?',
512
+ 'Sketchup::Color#alpha=',
513
+ 'Sketchup::Material#name=',
514
+ 'Sketchup::Material#write_thumbnail',
515
+ 'Sketchup::Materials#remove',
516
+ 'UI::Command#large_icon',
517
+ 'UI::Command#menu_text',
518
+ 'UI::Command#small_icon',
519
+ 'UI::Command#status_bar_text',
520
+ 'UI::Command#tooltip',
521
+ 'UI::Toolbar#each',
522
+ 'UI::Toolbar#name',
523
+ ],
524
+ },
525
+ },
526
+
527
+ {
528
+ version: 'SketchUp 8.0',
529
+ types: {
530
+ method: [
531
+ 'Sketchup::ComponentInstance#equals?',
532
+ 'Sketchup::ComponentInstance#intersect',
533
+ 'Sketchup::ComponentInstance#manifold?',
534
+ 'Sketchup::ComponentInstance#outer_shell',
535
+ 'Sketchup::ComponentInstance#show_differences',
536
+ 'Sketchup::ComponentInstance#split',
537
+ 'Sketchup::ComponentInstance#subtract',
538
+ 'Sketchup::ComponentInstance#trim',
539
+ 'Sketchup::ComponentInstance#union',
540
+ 'Sketchup::ComponentInstance#volume',
541
+ 'Sketchup::EntitiesObserver#onElementModified',
542
+ 'Sketchup::Group#equals?',
543
+ 'Sketchup::Group#intersect',
544
+ 'Sketchup::Group#manifold?',
545
+ 'Sketchup::Group#outer_shell',
546
+ 'Sketchup::Group#show_differences',
547
+ 'Sketchup::Group#split',
548
+ 'Sketchup::Group#subtract',
549
+ 'Sketchup::Group#trim',
550
+ 'Sketchup::Group#union',
551
+ 'Sketchup::Group#volume',
552
+ 'Sketchup::ModelObserver#onPostSaveModel',
553
+ 'Sketchup::ModelObserver#onPreSaveModel',
554
+ ],
555
+ },
556
+ },
557
+
558
+ {
559
+ version: 'SketchUp 7.1 M1',
560
+ types: {
561
+ method: [
562
+ 'Sketchup::Curve#is_polygon?',
563
+ ],
564
+ },
565
+ },
566
+
567
+ {
568
+ version: 'SketchUp 7.1',
569
+ types: {
570
+ method: [
571
+ 'Sketchup::Model#georeferenced?',
572
+ 'Sketchup::Model#number_faces',
573
+ 'Sketchup::View#refresh',
574
+ 'UI::WebDialog#write_image',
575
+ ],
576
+ },
577
+ },
578
+
579
+ {
580
+ version: 'SketchUp 7.0 M1',
581
+ types: {
582
+ method: [
583
+ 'Sketchup::Face#get_glued_instances',
584
+ ],
585
+ },
586
+ },
587
+
588
+ {
589
+ version: 'SketchUp 7.0',
590
+ types: {
591
+ method: [
592
+ 'Sketchup.break_edges=',
593
+ 'Sketchup.break_edges?',
594
+ 'Sketchup.is_pro?',
595
+ 'Sketchup::AppObserver#onUnloadExtension',
596
+ 'Sketchup::Behavior#no_scale_mask=',
597
+ 'Sketchup::Behavior#no_scale_mask?',
598
+ 'Sketchup::ComponentDefinition#refresh_thumbnail',
599
+ 'Sketchup::ComponentDefinition#save_as',
600
+ 'Sketchup::ComponentDefinition#save_thumbnail',
601
+ 'Sketchup::DefinitionList#load_from_url',
602
+ 'Sketchup::Group#local_bounds',
603
+ 'Sketchup::Model#active_path',
604
+ 'Sketchup::Model#edit_transform',
605
+ 'Sketchup::Model#mipmapping=',
606
+ 'Sketchup::Model#mipmapping?',
607
+ 'Sketchup::ModelObserver#onAfterComponentSaveAs',
608
+ 'Sketchup::ModelObserver#onBeforeComponentSaveAs',
609
+ 'Sketchup::ModelObserver#onExplode',
610
+ 'Sketchup::ModelObserver#onPlaceComponent',
611
+ 'Sketchup::Pages#add_matchphoto_page',
612
+ 'UI.refresh_inspectors',
613
+ 'UI::WebDialog#max_height',
614
+ 'UI::WebDialog#max_height=',
615
+ 'UI::WebDialog#max_width',
616
+ 'UI::WebDialog#max_width=',
617
+ 'UI::WebDialog#min_height',
618
+ 'UI::WebDialog#min_height=',
619
+ 'UI::WebDialog#min_width',
620
+ 'UI::WebDialog#min_width=',
621
+ 'UI::WebDialog#navigation_buttons_enabled=',
622
+ 'UI::WebDialog#navigation_buttons_enabled?',
623
+ 'UI::WebDialog#set_full_security',
624
+ ],
625
+ },
626
+ },
627
+ ].freeze
628
+
629
+ INSTANCE_METHODS = %i[
630
+ active_path
631
+ active_section_plane
632
+ active_section_plane=
633
+ add_classification
634
+ add_dimension_linear
635
+ add_dimension_radial
636
+ add_matchphoto_page
637
+ add_section_plane
638
+ aligned_text_position
639
+ aligned_text_position=
640
+ arc_curve
641
+ arc_curve=
642
+ boundingbox_pick
643
+ center_2d
644
+ classifications
645
+ colorize_deltas
646
+ colorize_type
647
+ colorize_type=
648
+ count_used_instances
649
+ days_remaining
650
+ edit_transform
651
+ error_description
652
+ expectsStartupModelNotifications
653
+ extension_path
654
+ find_entity_by_id
655
+ find_entity_by_persistent_id
656
+ fov_is_height?
657
+ georeferenced?
658
+ get_classification_value
659
+ get_glued_instances
660
+ get_texture_projection
661
+ has_aligned_text?
662
+ has_aligned_text=
663
+ icon_name
664
+ icon_name=
665
+ icon_tooltip
666
+ icon_tooltip=
667
+ image_rep
668
+ include_in_animation?
669
+ include_in_animation=
670
+ instance_path
671
+ instance_path_from_pid_path
672
+ is_polygon?
673
+ large_icon
674
+ leader_break_point
675
+ leader_break_point=
676
+ leader_points
677
+ load_from_url
678
+ load_on_start?
679
+ load_schema
680
+ local_bounds
681
+ lower_left
682
+ lower_right
683
+ menu_text
684
+ mipmapping?
685
+ mipmapping=
686
+ navigation_buttons_enabled?
687
+ navigation_buttons_enabled=
688
+ no_scale_mask?
689
+ no_scale_mask=
690
+ number_faces
691
+ offset_vector
692
+ offset_vector=
693
+ outer_shell
694
+ persistent_id
695
+ persistent_id_path
696
+ refresh_thumbnail
697
+ remove_classification
698
+ same_direction?
699
+ scale_2d
700
+ screen_scale_factor
701
+ set_can_close
702
+ set_classification_value
703
+ set_download_progress_callback
704
+ set_full_security
705
+ set_on_closed
706
+ set_texture_projection
707
+ set_upload_progress_callback
708
+ set_uv
709
+ show_differences
710
+ sketch_plane
711
+ small_icon
712
+ status_bar_text
713
+ unit_vector?
714
+ unload_schema
715
+ upper_left
716
+ upper_right
717
+ window_pick
718
+ ].freeze
719
+
720
+ OBSERVER_METHODS = %i[
721
+ onActivateModel
722
+ onActiveSectionPlaneChanged
723
+ onAfterComponentSaveAs
724
+ onBeforeComponentSaveAs
725
+ onElementModified
726
+ onExplode
727
+ onLayerChanged
728
+ onPidChanged
729
+ onPlaceComponent
730
+ onPostSaveModel
731
+ onPreSaveModel
732
+ onTextChanged
733
+ onUnloadExtension
734
+ ].freeze
735
+
736
+ end
737
+ end
738
+ end