move sections
[python/dscho.git] / Lib / plat-mac / lib-scriptpackages / CodeWarrior / CodeWarrior_suite.py
blob84b8561d65f2059f19bdd15c55e8a129b56ebb4e
1 """Suite CodeWarrior suite: Terms for scripting the CodeWarrior IDE
2 Level 0, version 0
4 Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'CWIE'
13 class CodeWarrior_suite_Events:
15 _argmap_add = {
16 'new' : 'kocl',
17 'with_data' : 'data',
18 'to_targets' : 'TTGT',
19 'to_group' : 'TGRP',
22 def add(self, _object, _attributes={}, **_arguments):
23 """add: add elements to a project or target
24 Required argument: an AE object reference
25 Keyword argument new: the class of the new element or elements to add
26 Keyword argument with_data: the initial data for the element or elements
27 Keyword argument to_targets: the targets to which the new element or elements will be added
28 Keyword argument to_group: the group to which the new element or elements will be added
29 Keyword argument _attributes: AppleEvent attribute dictionary
30 """
31 _code = 'CWIE'
32 _subcode = 'ADDF'
34 aetools.keysubst(_arguments, self._argmap_add)
35 _arguments['----'] = _object
38 _reply, _arguments, _attributes = self.send(_code, _subcode,
39 _arguments, _attributes)
40 if _arguments.get('errn', 0):
41 raise aetools.Error, aetools.decodeerror(_arguments)
42 # XXXX Optionally decode result
43 if _arguments.has_key('----'):
44 return _arguments['----']
46 def build(self, _no_object=None, _attributes={}, **_arguments):
47 """build: build a project or target (equivalent of the Make menu command)
48 Keyword argument _attributes: AppleEvent attribute dictionary
49 """
50 _code = 'CWIE'
51 _subcode = 'MAKE'
53 if _arguments: raise TypeError, 'No optional args expected'
54 if _no_object is not None: raise TypeError, 'No direct arg expected'
57 _reply, _arguments, _attributes = self.send(_code, _subcode,
58 _arguments, _attributes)
59 if _arguments.get('errn', 0):
60 raise aetools.Error, aetools.decodeerror(_arguments)
61 # XXXX Optionally decode result
62 if _arguments.has_key('----'):
63 return _arguments['----']
65 def check(self, _object=None, _attributes={}, **_arguments):
66 """check: check the syntax of a file in a project or target
67 Required argument: the file or files to be checked
68 Keyword argument _attributes: AppleEvent attribute dictionary
69 """
70 _code = 'CWIE'
71 _subcode = 'CHEK'
73 if _arguments: raise TypeError, 'No optional args expected'
74 _arguments['----'] = _object
77 _reply, _arguments, _attributes = self.send(_code, _subcode,
78 _arguments, _attributes)
79 if _arguments.get('errn', 0):
80 raise aetools.Error, aetools.decodeerror(_arguments)
81 # XXXX Optionally decode result
82 if _arguments.has_key('----'):
83 return _arguments['----']
85 def compile_file(self, _object=None, _attributes={}, **_arguments):
86 """compile file: compile a file in a project or target
87 Required argument: the file or files to be compiled
88 Keyword argument _attributes: AppleEvent attribute dictionary
89 """
90 _code = 'CWIE'
91 _subcode = 'COMP'
93 if _arguments: raise TypeError, 'No optional args expected'
94 _arguments['----'] = _object
97 _reply, _arguments, _attributes = self.send(_code, _subcode,
98 _arguments, _attributes)
99 if _arguments.get('errn', 0):
100 raise aetools.Error, aetools.decodeerror(_arguments)
101 # XXXX Optionally decode result
102 if _arguments.has_key('----'):
103 return _arguments['----']
105 def disassemble_file(self, _object=None, _attributes={}, **_arguments):
106 """disassemble file: disassemble a file in a project or target
107 Required argument: the file or files to be disassembled
108 Keyword argument _attributes: AppleEvent attribute dictionary
110 _code = 'CWIE'
111 _subcode = 'DASM'
113 if _arguments: raise TypeError, 'No optional args expected'
114 _arguments['----'] = _object
117 _reply, _arguments, _attributes = self.send(_code, _subcode,
118 _arguments, _attributes)
119 if _arguments.get('errn', 0):
120 raise aetools.Error, aetools.decodeerror(_arguments)
121 # XXXX Optionally decode result
122 if _arguments.has_key('----'):
123 return _arguments['----']
125 _argmap_export = {
126 'in_' : 'kfil',
129 def export(self, _no_object=None, _attributes={}, **_arguments):
130 """export: Export the project file as an XML file
131 Keyword argument in_: the XML file in which to export the project
132 Keyword argument _attributes: AppleEvent attribute dictionary
134 _code = 'CWIE'
135 _subcode = 'EXPT'
137 aetools.keysubst(_arguments, self._argmap_export)
138 if _no_object is not None: raise TypeError, 'No direct arg expected'
141 _reply, _arguments, _attributes = self.send(_code, _subcode,
142 _arguments, _attributes)
143 if _arguments.get('errn', 0):
144 raise aetools.Error, aetools.decodeerror(_arguments)
145 # XXXX Optionally decode result
146 if _arguments.has_key('----'):
147 return _arguments['----']
149 def remove_object_code(self, _no_object=None, _attributes={}, **_arguments):
150 """remove object code: remove object code from a project or target
151 Keyword argument _attributes: AppleEvent attribute dictionary
153 _code = 'CWIE'
154 _subcode = 'RMOB'
156 if _arguments: raise TypeError, 'No optional args expected'
157 if _no_object is not None: raise TypeError, 'No direct arg expected'
160 _reply, _arguments, _attributes = self.send(_code, _subcode,
161 _arguments, _attributes)
162 if _arguments.get('errn', 0):
163 raise aetools.Error, aetools.decodeerror(_arguments)
164 # XXXX Optionally decode result
165 if _arguments.has_key('----'):
166 return _arguments['----']
168 def remove_target_files(self, _object, _attributes={}, **_arguments):
169 """remove target files: remove files from a target
170 Required argument: an AE object reference
171 Keyword argument _attributes: AppleEvent attribute dictionary
173 _code = 'CWIE'
174 _subcode = 'RMFL'
176 if _arguments: raise TypeError, 'No optional args expected'
177 _arguments['----'] = _object
180 _reply, _arguments, _attributes = self.send(_code, _subcode,
181 _arguments, _attributes)
182 if _arguments.get('errn', 0):
183 raise aetools.Error, aetools.decodeerror(_arguments)
184 # XXXX Optionally decode result
185 if _arguments.has_key('----'):
186 return _arguments['----']
188 def run_target(self, _no_object=None, _attributes={}, **_arguments):
189 """run target: run a project or target
190 Keyword argument _attributes: AppleEvent attribute dictionary
192 _code = 'CWIE'
193 _subcode = 'RUN '
195 if _arguments: raise TypeError, 'No optional args expected'
196 if _no_object is not None: raise TypeError, 'No direct arg expected'
199 _reply, _arguments, _attributes = self.send(_code, _subcode,
200 _arguments, _attributes)
201 if _arguments.get('errn', 0):
202 raise aetools.Error, aetools.decodeerror(_arguments)
203 # XXXX Optionally decode result
204 if _arguments.has_key('----'):
205 return _arguments['----']
207 def touch_file(self, _object=None, _attributes={}, **_arguments):
208 """touch file: touch a file in a project or target for compilation
209 Required argument: the file or files to be touched
210 Keyword argument _attributes: AppleEvent attribute dictionary
212 _code = 'CWIE'
213 _subcode = 'TOCH'
215 if _arguments: raise TypeError, 'No optional args expected'
216 _arguments['----'] = _object
219 _reply, _arguments, _attributes = self.send(_code, _subcode,
220 _arguments, _attributes)
221 if _arguments.get('errn', 0):
222 raise aetools.Error, aetools.decodeerror(_arguments)
223 # XXXX Optionally decode result
224 if _arguments.has_key('----'):
225 return _arguments['----']
227 def update(self, _no_object=None, _attributes={}, **_arguments):
228 """update: bring a project or target up to date
229 Keyword argument _attributes: AppleEvent attribute dictionary
231 _code = 'CWIE'
232 _subcode = 'UP2D'
234 if _arguments: raise TypeError, 'No optional args expected'
235 if _no_object is not None: raise TypeError, 'No direct arg expected'
238 _reply, _arguments, _attributes = self.send(_code, _subcode,
239 _arguments, _attributes)
240 if _arguments.get('errn', 0):
241 raise aetools.Error, aetools.decodeerror(_arguments)
242 # XXXX Optionally decode result
243 if _arguments.has_key('----'):
244 return _arguments['----']
247 class single_class_browser(aetools.ComponentItem):
248 """single class browser - a single class browser """
249 want = '1BRW'
250 class _Prop_inherits(aetools.NProperty):
251 """inherits - all properties and elements of the given class are inherited by this class. """
252 which = 'c@#^'
253 want = 'TXTD'
255 single_class_browsers = single_class_browser
257 class single_class_hierarchy(aetools.ComponentItem):
258 """single class hierarchy - a single class hierarchy document """
259 want = '1HIR'
261 single_class_hierarchies = single_class_hierarchy
263 class class_browser(aetools.ComponentItem):
264 """class browser - a class browser """
265 want = 'BROW'
267 class_browsers = class_browser
269 class file_compare_document(aetools.ComponentItem):
270 """file compare document - a file compare document """
271 want = 'COMP'
273 file_compare_documents = file_compare_document
275 class catalog_document(aetools.ComponentItem):
276 """catalog document - a browser catalog document """
277 want = 'CTLG'
279 catalog_documents = catalog_document
281 class editor_document(aetools.ComponentItem):
282 """editor document - an editor document """
283 want = 'EDIT'
285 editor_documents = editor_document
287 class class_hierarchy(aetools.ComponentItem):
288 """class hierarchy - a class hierarchy document """
289 want = 'HIER'
291 class_hierarchies = class_hierarchy
293 class project_inspector(aetools.ComponentItem):
294 """project inspector - the project inspector """
295 want = 'INSP'
297 project_inspectors = project_inspector
299 class message_document(aetools.ComponentItem):
300 """message document - a message document """
301 want = 'MSSG'
303 message_documents = message_document
305 class build_progress_document(aetools.ComponentItem):
306 """build progress document - a build progress document """
307 want = 'PRGS'
309 build_progress_documents = build_progress_document
311 class project_document(aetools.ComponentItem):
312 """project document - a project document """
313 want = 'PRJD'
314 class _Prop_current_target(aetools.NProperty):
315 """current target - the current target """
316 which = 'CURT'
317 want = 'TRGT'
318 # element 'TRGT' as ['indx', 'name', 'test', 'rang']
320 project_documents = project_document
322 class subtarget(aetools.ComponentItem):
323 """subtarget - a target that is prerequisite for another target """
324 want = 'SBTG'
325 class _Prop_link_against_output(aetools.NProperty):
326 """link against output - is the output of this subtarget linked into its dependent target? """
327 which = 'LNKO'
328 want = 'bool'
329 class _Prop_target(aetools.NProperty):
330 """target - the target that is dependent on this subtarget """
331 which = 'TrgT'
332 want = 'TRGT'
334 subtargets = subtarget
336 class target_file(aetools.ComponentItem):
337 """target file - a source or header file in a target """
338 want = 'SRCF'
339 class _Prop_code_size(aetools.NProperty):
340 """code size - the size of the code (in bytes) produced by compiling this source file """
341 which = 'CSZE'
342 want = 'long'
343 class _Prop_compiled_date(aetools.NProperty):
344 """compiled date - the date and this source file was last compiled """
345 which = 'CMPD'
346 want = 'ldt '
347 class _Prop_data_size(aetools.NProperty):
348 """data size - the size of the date (in bytes) produced by compiling this source file """
349 which = 'DSZE'
350 want = 'long'
351 class _Prop_debug(aetools.NProperty):
352 """debug - is debugging information generated for this source file? """
353 which = 'DBUG'
354 want = 'bool'
355 class _Prop_dependents(aetools.NProperty):
356 """dependents - the source files that need this source file in order to build """
357 which = 'DPND'
358 want = 'list'
359 class _Prop_id(aetools.NProperty):
360 """id - the unique ID number of the target file """
361 which = 'ID '
362 want = 'long'
363 class _Prop_init_before(aetools.NProperty):
364 """init before - is the \xd4initialize before\xd5 flag set for this shared library? """
365 which = 'INIT'
366 want = 'bool'
367 class _Prop_link_index(aetools.NProperty):
368 """link index - the index of the source file in its target\xd5s link order (-1 if source file is not in link order) """
369 which = 'LIDX'
370 want = 'long'
371 class _Prop_linked(aetools.NProperty):
372 """linked - is the source file in the link order of its target? """
373 which = 'LINK'
374 want = 'bool'
375 class _Prop_location(aetools.NProperty):
376 """location - the location of the target file on disk """
377 which = 'FILE'
378 want = 'fss '
379 class _Prop_merge_output(aetools.NProperty):
380 """merge output - is this shared library merged into another code fragment? """
381 which = 'MRGE'
382 want = 'bool'
383 class _Prop_modified_date(aetools.NProperty):
384 """modified date - the date and time this source file was last modified """
385 which = 'MODD'
386 want = 'ldt '
387 class _Prop_path(aetools.NProperty):
388 """path - the path of the source file on disk """
389 which = 'Path'
390 want = 'itxt'
391 class _Prop_prerequisites(aetools.NProperty):
392 """prerequisites - the source files needed to build this source file """
393 which = 'PRER'
394 want = 'list'
395 class _Prop_type(aetools.NProperty):
396 """type - the type of source file """
397 which = 'FTYP'
398 want = 'FTYP'
399 class _Prop_weak_link(aetools.NProperty):
400 """weak link - is this shared library linked weakly? """
401 which = 'WEAK'
402 want = 'bool'
404 target_files = target_file
406 class symbol_browser(aetools.ComponentItem):
407 """symbol browser - a symbol browser """
408 want = 'SYMB'
410 symbol_browsers = symbol_browser
412 class ToolServer_worksheet(aetools.ComponentItem):
413 """ToolServer worksheet - a ToolServer worksheet """
414 want = 'TOOL'
416 ToolServer_worksheets = ToolServer_worksheet
418 class target(aetools.ComponentItem):
419 """target - a target in a project """
420 want = 'TRGT'
421 class _Prop_name(aetools.NProperty):
422 """name - """
423 which = 'pnam'
424 want = 'itxt'
425 class _Prop_project_document(aetools.NProperty):
426 """project document - the project document that contains this target """
427 which = 'PrjD'
428 want = 'PRJD'
429 # element 'SBTG' as ['indx', 'test', 'rang']
430 # element 'SRCF' as ['indx', 'test', 'rang']
432 targets = target
434 class text_document(aetools.ComponentItem):
435 """text document - a document that contains text """
436 want = 'TXTD'
437 class _Prop_modified(aetools.NProperty):
438 """modified - Has the document been modified since the last save? """
439 which = 'imod'
440 want = 'bool'
441 class _Prop_selection(aetools.NProperty):
442 """selection - the selection visible to the user """
443 which = 'sele'
444 want = 'csel'
445 # element 'cha ' as ['indx', 'rele', 'rang', 'test']
446 # element 'cins' as ['rele']
447 # element 'clin' as ['indx', 'rang', 'rele']
448 # element 'ctxt' as ['rang']
450 text_documents = text_document
451 single_class_browser._superclassnames = ['text_document']
452 single_class_browser._privpropdict = {
453 'inherits' : _Prop_inherits,
455 single_class_browser._privelemdict = {
457 import Standard_Suite
458 single_class_hierarchy._superclassnames = ['document']
459 single_class_hierarchy._privpropdict = {
460 'inherits' : _Prop_inherits,
462 single_class_hierarchy._privelemdict = {
464 class_browser._superclassnames = ['text_document']
465 class_browser._privpropdict = {
466 'inherits' : _Prop_inherits,
468 class_browser._privelemdict = {
470 file_compare_document._superclassnames = ['text_document']
471 file_compare_document._privpropdict = {
472 'inherits' : _Prop_inherits,
474 file_compare_document._privelemdict = {
476 catalog_document._superclassnames = ['text_document']
477 catalog_document._privpropdict = {
478 'inherits' : _Prop_inherits,
480 catalog_document._privelemdict = {
482 editor_document._superclassnames = ['text_document']
483 editor_document._privpropdict = {
484 'inherits' : _Prop_inherits,
486 editor_document._privelemdict = {
488 class_hierarchy._superclassnames = ['document']
489 class_hierarchy._privpropdict = {
490 'inherits' : _Prop_inherits,
492 class_hierarchy._privelemdict = {
494 project_inspector._superclassnames = ['document']
495 project_inspector._privpropdict = {
496 'inherits' : _Prop_inherits,
498 project_inspector._privelemdict = {
500 message_document._superclassnames = ['text_document']
501 message_document._privpropdict = {
502 'inherits' : _Prop_inherits,
504 message_document._privelemdict = {
506 build_progress_document._superclassnames = ['document']
507 build_progress_document._privpropdict = {
508 'inherits' : _Prop_inherits,
510 build_progress_document._privelemdict = {
512 project_document._superclassnames = ['document']
513 project_document._privpropdict = {
514 'current_target' : _Prop_current_target,
515 'inherits' : _Prop_inherits,
517 project_document._privelemdict = {
518 'target' : target,
520 subtarget._superclassnames = ['target']
521 subtarget._privpropdict = {
522 'inherits' : _Prop_inherits,
523 'link_against_output' : _Prop_link_against_output,
524 'target' : _Prop_target,
526 subtarget._privelemdict = {
528 target_file._superclassnames = []
529 target_file._privpropdict = {
530 'code_size' : _Prop_code_size,
531 'compiled_date' : _Prop_compiled_date,
532 'data_size' : _Prop_data_size,
533 'debug' : _Prop_debug,
534 'dependents' : _Prop_dependents,
535 'id' : _Prop_id,
536 'init_before' : _Prop_init_before,
537 'link_index' : _Prop_link_index,
538 'linked' : _Prop_linked,
539 'location' : _Prop_location,
540 'merge_output' : _Prop_merge_output,
541 'modified_date' : _Prop_modified_date,
542 'path' : _Prop_path,
543 'prerequisites' : _Prop_prerequisites,
544 'type' : _Prop_type,
545 'weak_link' : _Prop_weak_link,
547 target_file._privelemdict = {
549 symbol_browser._superclassnames = ['text_document']
550 symbol_browser._privpropdict = {
551 'inherits' : _Prop_inherits,
553 symbol_browser._privelemdict = {
555 ToolServer_worksheet._superclassnames = ['text_document']
556 ToolServer_worksheet._privpropdict = {
557 'inherits' : _Prop_inherits,
559 ToolServer_worksheet._privelemdict = {
561 target._superclassnames = []
562 target._privpropdict = {
563 'name' : _Prop_name,
564 'project_document' : _Prop_project_document,
566 target._privelemdict = {
567 'subtarget' : subtarget,
568 'target_file' : target_file,
570 text_document._superclassnames = ['document']
571 text_document._privpropdict = {
572 'inherits' : _Prop_inherits,
573 'modified' : _Prop_modified,
574 'selection' : _Prop_selection,
576 text_document._privelemdict = {
577 'character' : Standard_Suite.character,
578 'insertion_point' : Standard_Suite.insertion_point,
579 'line' : Standard_Suite.line,
580 'text' : Standard_Suite.text,
582 _Enum_DKND = {
583 'project' : 'PRJD', # a project document
584 'editor_document' : 'EDIT', # an editor document
585 'message' : 'MSSG', # a message document
586 'file_compare' : 'COMP', # a file compare document
587 'catalog_document' : 'CTLG', # a browser catalog
588 'class_browser' : 'BROW', # a class browser document
589 'single_class_browser' : '1BRW', # a single class browser document
590 'symbol_browser' : 'SYMB', # a symbol browser document
591 'class_hierarchy' : 'HIER', # a class hierarchy document
592 'single_class_hierarchy' : '1HIR', # a single class hierarchy document
593 'project_inspector' : 'INSP', # a project inspector
594 'ToolServer_worksheet' : 'TOOL', # the ToolServer worksheet
595 'build_progress_document' : 'PRGS', # the build progress window
598 _Enum_FTYP = {
599 'library_file' : 'LIBF', # a library file
600 'project_file' : 'PRJF', # a project file
601 'resource_file' : 'RESF', # a resource file
602 'text_file' : 'TXTF', # a text file
603 'unknown_file' : 'UNKN', # unknown file type
606 _Enum_Inte = {
607 'never_interact' : 'eNvr', # never allow user interactions
608 'interact_with_self' : 'eInS', # allow user interaction only when an AppleEvent is sent from within CodeWarrior
609 'interact_with_local' : 'eInL', # allow user interaction when AppleEvents are sent from applications on the same machine (default)
610 'interact_with_all' : 'eInA', # allow user interaction from both local and remote AppleEvents
613 _Enum_PERM = {
614 'read_write' : 'RdWr', # the file is open with read/write permission
615 'read_only' : 'Read', # the file is open with read/only permission
616 'checked_out_read_write' : 'CkRW', # the file is checked out with read/write permission
617 'checked_out_read_only' : 'CkRO', # the file is checked out with read/only permission
618 'checked_out_read_modify' : 'CkRM', # the file is checked out with read/modify permission
619 'locked' : 'Lock', # the file is locked on disk
620 'none' : 'LNNO', # the file is new
625 # Indices of types declared in this module
627 _classdeclarations = {
628 '1BRW' : single_class_browser,
629 '1HIR' : single_class_hierarchy,
630 'BROW' : class_browser,
631 'COMP' : file_compare_document,
632 'CTLG' : catalog_document,
633 'EDIT' : editor_document,
634 'HIER' : class_hierarchy,
635 'INSP' : project_inspector,
636 'MSSG' : message_document,
637 'PRGS' : build_progress_document,
638 'PRJD' : project_document,
639 'SBTG' : subtarget,
640 'SRCF' : target_file,
641 'SYMB' : symbol_browser,
642 'TOOL' : ToolServer_worksheet,
643 'TRGT' : target,
644 'TXTD' : text_document,
647 _propdeclarations = {
648 'CMPD' : _Prop_compiled_date,
649 'CSZE' : _Prop_code_size,
650 'CURT' : _Prop_current_target,
651 'DBUG' : _Prop_debug,
652 'DPND' : _Prop_dependents,
653 'DSZE' : _Prop_data_size,
654 'FILE' : _Prop_location,
655 'FTYP' : _Prop_type,
656 'ID ' : _Prop_id,
657 'INIT' : _Prop_init_before,
658 'LIDX' : _Prop_link_index,
659 'LINK' : _Prop_linked,
660 'LNKO' : _Prop_link_against_output,
661 'MODD' : _Prop_modified_date,
662 'MRGE' : _Prop_merge_output,
663 'PRER' : _Prop_prerequisites,
664 'Path' : _Prop_path,
665 'PrjD' : _Prop_project_document,
666 'TrgT' : _Prop_target,
667 'WEAK' : _Prop_weak_link,
668 'c@#^' : _Prop_inherits,
669 'imod' : _Prop_modified,
670 'pnam' : _Prop_name,
671 'sele' : _Prop_selection,
674 _compdeclarations = {
677 _enumdeclarations = {
678 'DKND' : _Enum_DKND,
679 'FTYP' : _Enum_FTYP,
680 'Inte' : _Enum_Inte,
681 'PERM' : _Enum_PERM,