Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

Commit

Permalink
Added special scopes for events. Added code completion for event type…
Browse files Browse the repository at this point in the history
…s. Added completions for mootools methods (basically just a prefiltered list of completions). Added escape completions for the mootools method and function names.

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript MooTools.tmbundle@8630 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
subtlegradient committed Dec 9, 2007
1 parent 84a7ed8 commit df62d2b
Show file tree
Hide file tree
Showing 6 changed files with 816 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Commands/CodeCompletion MooTools.tmCommand
Expand Up @@ -21,7 +21,7 @@ print TextmateCodeCompletion.new(TextmateCompletionsText.new(ENV['TM_COMPLETIONS
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.js.mootools</string>
<string>source.js.mootools, source.js.mootools meta.complete.event-type, source.js.mootools string.quoted.single.event-type.js.mootools, source.js.mootools string.quoted.double.event-type.js.mootools</string>
<key>uuid</key>
<string>41AEE159-DED3-459B-9B02-FCD7BB01390D</string>
</dict>
Expand Down
183 changes: 181 additions & 2 deletions Preferences/Completions.tmPreferences

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions Preferences/Event Type Completions.tmPreferences
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Event Type Completions</string>
<key>scope</key>
<string>source.js.mootools meta.complete.event-type, source.js.mootools string.quoted.single.event-type.js.mootools, source.js.mootools string.quoted.double.event-type.js.mootools</string>
<key>settings</key>
<dict>
<key>completions</key>
<array>
<string>abort</string>
<string>beforeunload</string>
<string>blur</string>
<string>change</string>
<string>click</string>
<string>contextmenu</string>
<string>dblclick</string>
<string>DOMContentLoaded</string>
<string>DOMMouseScroll</string>
<string>error</string>
<string>focus</string>
<string>keydown</string>
<string>keypress</string>
<string>keyup</string>
<string>load</string>
<string>mousedown</string>
<string>mousemove</string>
<string>mouseout</string>
<string>mouseover</string>
<string>mouseup</string>
<string>mousewheel</string>
<string>move</string>
<string>readystatechange</string>
<string>reset</string>
<string>resize</string>
<string>scroll</string>
<string>select</string>
<string>selectend</string>
<string>selectstart</string>
<string>submit</string>
<string>unload</string>
<string>domready</string>
<string>mouseenter</string>
<string>mouseleave</string>
<string>mousewheel</string>
</array>
<key>disableDefaultCompletion</key>
<integer>1</integer>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMPLETIONS</string>
<key>value</key>
<string>domreadymouseentermouseleavemousewheel-- mouse buttons --clickdblclickmouseupmousedowncontextmenu-- mouse wheel --mousewheelDOMMouseScroll-- mouse movement --mouseovermouseoutmousemoveselectstartselectend-- keyboard --keydownkeypresskeyup-- form elements --focusblurchangeresetselectsubmit-- window --loadunloadbeforeunloadresizemoveDOMContentLoadedreadystatechange-- misc --errorabortscroll</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>AA50D070-441D-482D-820A-43A00BCD32F1</string>
</dict>
</plist>
180 changes: 180 additions & 0 deletions Preferences/Method Completions.tmPreferences
@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Method Completions</string>
<key>scope</key>
<string>source.js.mootools meta.complete.method, source.js.mootools meta.function-call.method</string>
<key>settings</key>
<dict>
<key>completions</key>
<array>
<string>abs</string>
<string>acos</string>
<string>addClass</string>
<string>addEvent</string>
<string>addEvents</string>
<string>adopt</string>
<string>alt</string>
<string>appendText</string>
<string>asin</string>
<string>associate</string>
<string>atan</string>
<string>atan2</string>
<string>attempt</string>
<string>bind</string>
<string>bindWithEvent</string>
<string>camelCase</string>
<string>capitalize</string>
<string>ceil</string>
<string>clean</string>
<string>client.x</string>
<string>client.y</string>
<string>clone</string>
<string>cloneEvents</string>
<string>computePosition</string>
<string>constructor</string>
<string>contains</string>
<string>control</string>
<string>cos</string>
<string>create</string>
<string>delay</string>
<string>destroy</string>
<string>dispose</string>
<string>each</string>
<string>eliminate</string>
<string>empty</string>
<string>erase</string>
<string>escapeRegExp</string>
<string>every</string>
<string>exp</string>
<string>extend</string>
<string>fade</string>
<string>filter</string>
<string>fireEvent</string>
<string>flatten</string>
<string>floor</string>
<string>get</string>
<string>getAllNext</string>
<string>getAllPrevious</string>
<string>getChildren</string>
<string>getClean</string>
<string>getComputedStyle</string>
<string>getCoordinates</string>
<string>getDocument</string>
<string>getElement</string>
<string>getElements</string>
<string>getFirst</string>
<string>getKeys</string>
<string>getLast</string>
<string>getLength</string>
<string>getNext</string>
<string>getOffsetParent</string>
<string>getOffsetSize</string>
<string>getParent</string>
<string>getParents</string>
<string>getPosition</string>
<string>getPrevious</string>
<string>getProperties</string>
<string>getProperty</string>
<string>getRandom</string>
<string>getRelativePosition</string>
<string>getScroll</string>
<string>getScrollSize</string>
<string>getStyle</string>
<string>getStyles</string>
<string>getValues</string>
<string>getWindow</string>
<string>grab</string>
<string>has</string>
<string>hasChild</string>
<string>hasClass</string>
<string>hexToRgb</string>
<string>highlight</string>
<string>hsbToRgb</string>
<string>hyphenate</string>
<string>include</string>
<string>inject</string>
<string>key</string>
<string>keyOf</string>
<string>limit</string>
<string>link</string>
<string>load</string>
<string>log</string>
<string>makeDraggable</string>
<string>makeResizable</string>
<string>map</string>
<string>match</string>
<string>max</string>
<string>merge</string>
<string>meta</string>
<string>min</string>
<string>morph</string>
<string>newElement</string>
<string>newTextNode</string>
<string>page.x</string>
<string>page.y</string>
<string>pass</string>
<string>periodical</string>
<string>position</string>
<string>positioned</string>
<string>pow</string>
<string>preventDefault</string>
<string>relatedTarget</string>
<string>remove</string>
<string>removeClass</string>
<string>removeEvent</string>
<string>removeEvents</string>
<string>removeProperties</string>
<string>removeProperty</string>
<string>replaces</string>
<string>retrieve</string>
<string>rgbToHex</string>
<string>rgbToHsb</string>
<string>round</string>
<string>run</string>
<string>scrollTo</string>
<string>send</string>
<string>set</string>
<string>setProperties</string>
<string>setProperty</string>
<string>setStyle</string>
<string>setStyles</string>
<string>shift</string>
<string>sin</string>
<string>slide</string>
<string>some</string>
<string>sqrt</string>
<string>stop</string>
<string>stopPropagation</string>
<string>store</string>
<string>stripScripts</string>
<string>tan</string>
<string>target</string>
<string>test</string>
<string>times</string>
<string>toFloat</string>
<string>toggleClass</string>
<string>toInt</string>
<string>toJSON</string>
<string>toQueryString</string>
<string>trim</string>
<string>tween</string>
<string>wheel</string>
<string>wraps</string>
</array>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMPLETIONS</string>
<key>value</key>
<string>test(tester:mixed, '[params:string]')contains('string:string', '[separator:string]')-- modify1 --trim()clean()camelCase()hyphenate()capitalize()escapeRegExp()-- conversion1 --toInt(base)toFloat()-- colors1 --hexToRgb([array:array])rgbToHex([array:array])rgbToHsb()hsbToRgb()-- misc1 --stripScripts([eval:boolean])toJSON()-- misc1 --extend(properties:object)run(args:mixed,[ bind:mixed])-- currying1 --create(options:object)pass(args:mixed,[ bind:mixed])attempt(args:mixed,[ bind:mixed])bind(bind:mixed,[ args:mixed])bindWithEvent(bind:mixed,[ args:mixed])-- timers1 --delay(delay:number,[ bind:mixed, args:mixed])periodical(interval:number,[ bind:mixed, args:mixed])-- basic1 --include(item:mixed)remove(item:mixed)-- looping1 --each(function:function,[ bind:mixed])contains(item:mixed)map(function:function,[ bind:mixed])filter(function:function,[ bind:mixed])every(function:function,[ bind:mixed])some(function:function,[ bind:mixed])-- misc1 --empty()flatten()associate(array:array)link(object:object)getLast()getRandom()toJSON()-- augmentation1 --extend(array:array)merge(array:array)-- colors1 --hexToRgb(array:array)rgbToHex(array:array)rgbToHsb()hsbToRgb()-- utils1 --limit(min:number,[ max:number])times(function:function,[ bind:mixed])-- conversion to numbers1 --toFloat()toInt([base:number])-- math methods1 --round([precision:number])abs()acos()asin()atan()atan2()ceil()cos()exp()floor()log()max()min()pow()sin()sqrt()tan()-- misc1 --toJSON()-- values1 --contains(value:mixed)keyOf(value:mixed)-- keys1 --has('key:string')get('key:string')set('key:string', value:mixed)erase('key:string')include('key:string', value:mixed)-- looping1 --each(function:function,[ bind:mixed])map(function:function,[ bind:mixed])filter(function:function,[ bind:mixed])every(function:function,[ bind:mixed])some(function:function,[ bind:mixed])-- get arrays1 --getKeys()getValues()-- utils1 --getLength()getClean()toQueryString()toJSON()-- misc1 --empty()-- augmentation1 --extend(properties:object)merge(properties:object)getDocument()getWindow()constructor('tag:string',[ props:object])-- selectors1 --getElement('selector:string')getElements('selectors:string')match('selector:string')-- arrtibutes / custom properties1 --set('key:string', value:mixed)get('key:string')erase('key:string')-- dom1 --dispose()inject(element:element, '[where:string]')wraps(element:element, '[where:string]')grab(element:element, '[where:string]')appendText('text:string', '[where:string]')adopt(element:element, [element:element, element:element, ...])clone([contents:boolean])replaces(elelement:element)-- classNames1 --hasClass('className:string')addClass('className:string')removeClass('className:string')toggleClass('className:string')getComputedStyle('property:string')-- cleaning1 --empty()destroy()-- attributes1 --getProperty('attribute:string')getProperties('attribute:string',[ 'attribute:string', 'attribute:string', ...])setProperty('attribute:string', value:mixed)setProperties(attributes:object)removeProperty('attribute:string')removeProperties('attribute:string',[ 'attribute:string', 'attribute:string', ...])-- dom walk1 --getPrevious('[match:string]')getAllPrevious('[match:string]')getNext('[match:string]')getAllNext('[match:string]')getFirst('[match:string]')getLast('[match:string]')getParent('[match:string]')getParents('[match:string]')getChildren('[match:string]')hasChild(element:element)-- storage1 --retrieve('property:string',[ defaultValue:mixed])store('key:string', value:mixed)eliminate('key:string')-- styles1 --setStyle('property:string', value:mixed)getStyle('property:string')setStyles(styles:object)getStyles()-- events1 --addEvent('type:string', event:function)removeEvent('type:string', event:function)addEvents(events:object)removeEvents('type:string')fireEvent('type:string', args:mixed)cloneEvents(from:element, 'type:string')-- effects1 --tween('property:string',[ start:number, end:number])fade([how:mixed])highlight([color:mixed])morph(properties:object)slide([how:mixed])-- ajax1 --send('[url:string]')load('[url:string]')-- dimensions1 --positioned()getOffsetParent()getOffsetSize()getScrollSize()getScroll()getPosition()getRelativePosition()getCoordinates()scrollTo(x:number, y:number)computePosition(object:object,[ client:boolean])position(object:object,[ client:boolean])-- drag1 --makeResizable([options:object])makeDraggable([options:object])-- misc1 --toQueryString()-- properties1 --targetrelatedTargetclient.xclient.ypage.xpage.ykeyshiftcontrolaltmetawheel-- methods1 --stop()stopPropagation()preventDefault()-- misc1 --getDocument()getWindow()-- storage1 --retrieve('property:string',[ defaultValue:mixed])store('key:string', value:mixed)eliminate('key:string')-- events1 --addEvent('type:string', event:function)removeEvent('type:string', event:function)addEvents(events:object)removeEvents('type:string')fireEvent('type:string', args:mixed)cloneEvents(from:element, 'type:string')-- misc1 --getDocument()getWindow()-- new1 --newElement('tag:string',[ props:object])newTextNode('text:string')getElement('selector:string')getElements('selectors:string')-- storage1 --retrieve('property:string',[ defaultValue:mixed])store('key:string', value:mixed)eliminate('key:string')-- events1 --addEvent('type:string', event:function)removeEvent('type:string', event:function)addEvents(events:object)removeEvents('type:string')fireEvent('type:string', args:mixed)cloneEvents(from:element, 'type:string')-- dimensions1 --getOffsetSize()getScrollSize()getScroll()scrollTo(x:number, y:number)</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>2CD990D0-4B27-4FC2-9A52-F0FE538A02B0</string>
</dict>
</plist>

0 comments on commit df62d2b

Please sign in to comment.