Removed TextMate and Xcode files since the ones being used now have their own repos. Linked to them in the README.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I
2009-12-23 19:31:51 -08:00
parent 5352d062d5
commit 2571b24f22
35 changed files with 5 additions and 3418 deletions
+5
View File
@@ -48,6 +48,11 @@ install it and all of its dependencies:
$ sudo ./bootstrap.sh
Editors
------------
The Cappuccino TextMate Bundle: http://github.com/malkomalko/Cappuccino.tmbundle
The Cappuccino Xcode Plugin: http://github.com/rbartolome/xcode-cappuccino
Getting Help
------------
If you need help with Cappuccino, you can get help from the following sources:
@@ -1 +0,0 @@
.svn
@@ -1,70 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby
proto_re = /
^\s* # Start of the line and optional space
[+-]\s* # a plus or minus for method specifier
\([^)]+\) # the return type in brackets
((?:\n|[^{])*)
(?m:.*?)
\{
/x
previous_lines = STDIN.readlines[1..ENV['TM_LINE_NUMBER'].to_i - 1]
invocation_line = previous_lines[-1]
proto = previous_lines.join.scan(proto_re)[-1]
exit if proto.nil? or proto.empty?
last_proto_sel_with_types = proto[0].strip.sub(/^\s+/, '').sub(%r{\s*//.*$}, '').gsub(/\n\s*/, ' ')
params = []
params = last_proto_sel_with_types.scan(/(.+?):\((.+?)\)(\w+)/)
def format_specifier_for_type(type)
%w[int bool BOOL long].each { |t| return('%d') if type.include? t }
return '%c' if type == 'char'
return '%C' if type == 'unichar'
return '%s' if type == 'char*'
'%@'
end
def transformer_for(type, name)
return "CPStringFromRect(#{name})" if type == 'CPRect'
return "CPStringFromPoint(#{name})" if type == 'CPPoint'
return "CPStringFromSize(#{name})" if type == 'CPSize'
return "CPStringFromSelector(#{name})" if type == 'SEL'
name
end
print 'CPLog("[%@ '
if params.empty?
print last_proto_sel_with_types
else
print params.map { |param, type, name| param + ':' + format_specifier_for_type(type) }.join
end
print ']", [self class]'
print ', ' + params.map { |param, type, name| transformer_for(type, name) }.join(', ') unless params.empty?
print ");"
</string>
<key>input</key>
<string>document</string>
<key>name</key>
<string>CPLog() for Current Method</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.js.objj meta.scope.implementation</string>
<key>tabTrigger</key>
<string>logm</string>
<key>uuid</key>
<string>F220FEE6-6522-4281-8091-CF8C66AED44F</string>
</dict>
</plist>
@@ -1,29 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
html_header "Objective-J Bundle Help" "Objective-J"
"$TM_SUPPORT_PATH/lib/markdown_to_help.rb" "$TM_BUNDLE_SUPPORT/help/help.markdown"
html_footer</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string></string>
<key>name</key>
<string>Help</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>AF27A8B3-C87F-410A-915B-D83271FDDC00</string>
</dict>
</plist>
@@ -1,320 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>bundleUUID</key>
<string>4679484F-6227-11D9-BFB1-000D93589AF6</string>
<key>command</key>
<string>#!/usr/bin/env ruby
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape"
require ENV['TM_SUPPORT_PATH'] + "/lib/exit_codes"
class Lexer
include Enumerable
def initialize
@label = nil
@pattern = nil
@handler = nil
@input = nil
reset
yield self if block_given?
end
def input(&amp;reader)
if @input.is_a? self.class
@input.input(&amp;reader)
else
class &lt;&lt; reader
alias_method :next, :call
end
@input = reader
end
end
def add_token(label, pattern, &amp;handler)
unless @label.nil?
@input = clone
end
@label = label
@pattern = /(#{pattern})/
@handler = handler || lambda { |label, match| [label, match] }
reset
end
def next(peek = false)
while @tokens.empty? and not @finished
new_input = @input.next
if new_input.nil? or new_input.is_a? String
@buffer += new_input unless new_input.nil?
new_tokens = @buffer.split(@pattern)
while new_tokens.size &gt; 2 or (new_input.nil? and not new_tokens.empty?)
@tokens &lt;&lt; new_tokens.shift
@tokens &lt;&lt; @handler[@label, new_tokens.shift] unless new_tokens.empty?
end
@buffer = new_tokens.join
@finished = true if new_input.nil?
else
separator, new_token = @buffer.split(@pattern)
new_token = @handler[@label, new_token] unless new_token.nil?
@tokens.push( *[ separator,
new_token,
new_input ].select { |t| not t.nil? and t != "" } )
reset(:buffer)
end
end
peek ? @tokens.first : @tokens.shift
end
def peek
self.next(true)
end
def each
while token = self.next
yield token
end
end
private
def reset(*attrs)
@buffer = String.new if attrs.empty? or attrs.include? :buffer
@tokens = Array.new if attrs.empty? or attrs.include? :tokens
@finished = false if attrs.empty? or attrs.include? :finished
end
end
class ObjcParser
attr_reader :list
def initialize(args)
@list = args
end
def get_position
return nil,nil if @list.empty?
has_message = true
a = @list.pop
endings = [:close,:post_op,:at_string,:at_selector,:identifier]
openings = [:open,:return,:control]
if a.tt == :identifier &amp;&amp; !@list.empty? &amp;&amp; endings.include?(@list[-1].tt)
insert_point = find_object_start
else
@list &lt;&lt; a
has_message = false unless methodList
insert_point = find_object_start
end
return insert_point, has_message
end
def methodList
old = Array.new(@list)
a = selector_loop(@list)
if !a.nil? &amp;&amp; a.tt == :selector
if file_contains_selector? a.text
return true
else
internal = Array.new(@list)
b = a.text
until internal.empty?
tmp = selector_loop(internal)
return true if tmp.nil?
b = tmp.text + b
if file_contains_selector? b
@list = internal
return true
end
end
end
else
end
@list = old
return false
end
def file_contains_selector?(methodName)
fileNames = ["#{ENV['TM_BUNDLE_SUPPORT']}/cocoa.txt.gz"]
userMethods = "#{ENV['TM_PROJECT_DIRECTORY']}/.methods.TM_Completions.txt.gz"
fileNames += [userMethods] if File.exists? userMethods
candidates = []
fileNames.each do |fileName|
zGrepped = %x{zgrep ^#{e_sh methodName }[[:space:]] #{e_sh fileName }}
candidates += zGrepped.split("\n")
end
return !candidates.empty?
end
def selector_loop(l)
until l.empty?
obj = l.pop
case obj.tt
when :selector
return obj
when :close
return nil if match_bracket(obj.text,l).nil?
when :open
return nil
end
end
return nil
end
def match_bracket(type,l)
partner = {"]"=&gt;"[",")"=&gt;"(","}"=&gt;"{"}[type]
up = 1
until l.empty?
obj = l.pop
case obj.text
when type
up +=1
when partner
up -=1
end
return obj.beg if up == 0
end
end
def find_object_start
openings = [:operator,:selector,:open,:return,:control]
until @list.empty? || openings.include?(@list[-1].tt)
obj = @list.pop
case obj.tt
when :close
tmp = match_bracket(obj.text, @list)
b = tmp unless tmp.nil?
when :star
b, ate = eat_star(b,obj.beg)
return b unless ate
when :nil
b = nil
else
b = obj.beg
end
end
return b
end
def eat_star(prev, curr)
openings = [:operator,:selector,:open,:return,:control,:star]
if @list.empty? || openings.include?(@list[-1].tt)
return curr, true
else
return prev, false
end
end
end
if __FILE__ == $PROGRAM_NAME
require "stringio"
line = ENV['TM_CURRENT_LINE']
caret_placement =ENV['TM_LINE_INDEX'].to_i - 1
up = 0
pat = /"(?:\\.|[^"\\])*"|\[|\]/
line.scan(pat).each do |item|
case item
when "["
up+=1
when "]"
up -=1
end
end
if caret_placement ==-1
print "]$0" + e_sn(line[caret_placement+1..-1])
TextMate.exit_insert_snippet
end
if up != 0
print e_sn(line[0..caret_placement])+"]$0"+e_sn(line[caret_placement+1..-1])
TextMate.exit_insert_snippet
end
to_parse = StringIO.new(line[0..caret_placement])
lexer = Lexer.new do |l|
l.add_token(:return, /\breturn\b/)
l.add_token(:nil, /\bnil\b/)
l.add_token(:control, /\b(?:if|while|for|do)(?:\s*)\(/)# /\bif|while|for|do(?:\s*)\(/)
l.add_token(:at_string, /"(?:\\.|[^"\\])*"/)
l.add_token(:selector, /\b[A-Za-z_0-9]+:/)
l.add_token(:identifier, /\b[A-Za-z_0-9]+\b/)
l.add_token(:bind, /(?:-&gt;)|\./)
l.add_token(:post_op, /\+\+|\-\-/)
l.add_token(:at, /@/)
l.add_token(:star, /\*/)
l.add_token(:close, /\)|\]|\}/)
l.add_token(:open, /\(|\[|\{/)
l.add_token(:operator, /[&amp;-+\/=%!:\,\?;&lt;&gt;\|\~\^]/)
l.add_token(:terminator, /;\n*|\n+/)
l.add_token(:whitespace, /\s+/)
l.add_token(:unknown, /./)
l.input { to_parse.gets }
#l.input {STDIN.read}
end
offset = 0
tokenList = []
A = Struct.new(:tt, :text, :beg)
lexer.each do |token|
tokenList &lt;&lt; A.new(*(token&lt;&lt;offset)) unless [:whitespace,:terminator].include? token[0]
offset +=token[1].length
end
if tokenList.empty?
print e_sn(line[0..caret_placement])+"]$0"+e_sn(line[caret_placement+1..-1])
TextMate.exit_insert_snippet
end
par = ObjcParser.new(tokenList)
b, has_message = par.get_position
if !line[caret_placement+1].nil? &amp;&amp; line[caret_placement+1].chr == "]"
if b.nil? || par.list.empty? || par.list[-1].text == "["
print e_sn(line[0..caret_placement])+"]$0"+e_sn(line[caret_placement+2..-1])
TextMate.exit_insert_snippet
end
end
if b.nil?
print e_sn(line[0..caret_placement])+"]$0"+e_sn(line[caret_placement+1..-1])
elsif !has_message &amp;&amp; (b &lt; caret_placement )
print e_sn(line[0..b-1]) unless b == 0
ins = (/\s/ =~ line[caret_placement].chr ? "$0]" : " $0]")
print "[" +e_sn(line[b..caret_placement]) + ins +e_sn(line[caret_placement+1..-1])
elsif b &lt; caret_placement
print e_sn(line[0..b-1]) unless b == 0
print "[" +e_sn(line[b..caret_placement]) +"]$0"+e_sn(line[caret_placement+1..-1])
else
print e_sn(line[0..caret_placement])+"]$0"+e_sn(line[caret_placement+1..-1])
end
end
</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>]</string>
<key>name</key>
<string>Insert Matching Start Bracket</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>CD025B3E-36B9-4E16-A81E-8DB6E8466CD1</string>
</dict>
</plist>
@@ -1,42 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby
def e (str); str.gsub(/[$`\\]/, '\\\\\0'); end
line = STDIN.read
col = ENV['TM_LINE_INDEX'].to_i
left, right = line[0...col], line[col..-1]
if left =~ /(.*?)(\[)?(\w+)\s+$/ then
lead, bracket, cl = $1, $2, $3
right = line[col+1..-1] unless bracket.nil?
print "#{e lead}${1/.+/[/}[[#{e cl} alloc] init$0]"
print right.empty? ? ";" : "#{e right}"
else
# this is only if we were not able to interpret the line
print "#{e left}$0#{e right}"
end
</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>selection</string>
<key>name</key>
<string>Insert [[… alloc] init]</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>alloc</string>
<key>uuid</key>
<string>DF55A80D-E733-4CE2-A318-D56789B18406</string>
</dict>
</plist>
@@ -1,67 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby -wKU
#
# Open Document in Running Browser(s)
# v3 - November 22, 2007
#
# Now supports multiple running versions of a single browser along
# with a range of new/old browsers. Bring back support for Firefox.
#
# Options: Set TM_PROJECT_SITEURL in your TM Project Window Info Button
# in the following form: "http://example.com/"
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"
if ENV['TM_PROJECT_SITEURL']
url = "#{ENV['TM_PROJECT_SITEURL']}" + ENV['TM_FILEPATH'].sub(/^#{Regexp.escape(ENV['TM_PROJECT_DIRECTORY'])}\//, '')
else
url = "file://#{ENV['TM_PROJECT_DIRECTORY']}/index.html"
end
proclist = `ps -x -o command`
active = []
os = `defaults read /System/Library/CoreServices/SystemVersion ProductVersion`
browsers = %w[ Safari OmniWeb Camino Shiira firefox-bin Xyle\ scope Opera Internet\ Explorer flock-bin iCab Sunrise seamonkey-bin navigator-bin ].join('|')
# Build paths to each active browser
#
# Notes:
# - 'WebKit' look ahead is to rule it out so we can use the working
# rule below.
# - 'LaunchCFMApp' portion is so iCab works.
active = proclist.scan(%r{^(?:/.*LaunchCFMApp )?(/.*\.app)(?=/Contents/MacOS/(?:#{browsers})\b(?!\s-WebKit))})
# Special check for WebKit as it appears as Safari
# Note: Only supports one running instance of WebKit, picked at random.
if proclist =~ %r{/Contents/MacOS/Safari.*-WebKit(DeveloperExtras|ScriptDebuggerEnabled)}
active &lt;&lt; "WebKit"
end
# TODO: Change when Leopard Only
# On Leopard use the -g option to open in background.
if os =~ /^10\.(5|6)/
active.each {|p| `open -g -a #{e_sh(p)} #{e_sh(url)}` }
else
active.each {|p| `open -a #{e_sh(p)} #{e_sh(url)}` }
end</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>@R</string>
<key>name</key>
<string>Run in Browsers</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>36FD3695-1051-401E-8536-89FB9CEEEAB4</string>
</dict>
</plist>
@@ -1,49 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>### Refresh All Active Browsers - OmniWeb, Safari, Firefox &amp; IE
### v1.0. 2005-03-29
###
# Check if Internet Explorer is running, if so refresh
ps -xc|grep -sq "Internet Explorer" &amp;&amp; osascript -e 'tell app "Internet Explorer"' -e 'activate' -e 'OpenURL "JavaScript:window.location.reload();" toWindow -1' -e 'end tell'
# Check if OmniWeb is running, if so refresh
ps -xc|grep -sq OmniWeb &amp;&amp; osascript -e 'tell app "OmniWeb"' -e 'activate' -e 'reload first browser' -e 'end tell'
# Check if Firefox is running, if so refresh
ps -xc|grep -sqi firefox &amp;&amp; osascript &lt;&lt;'APPLESCRIPT'
tell app "Firefox" to activate
tell app "System Events"
if UI elements enabled then
keystroke "r" using command down
-- Fails if System Preferences &gt; Universal access &gt; "Enable access for assistive devices" is not on
else
tell app "Firefox" to Get URL "JavaScript:window.location.reload();" inside window 1
-- Fails if Firefox is set to open URLs from external apps in new tabs.
end if
end tell
APPLESCRIPT
# Check if Safari is running, if so refresh
ps -xc|grep -sq Safari &amp;&amp; osascript -e 'tell app "Safari"' -e 'activate' -e 'do JavaScript "window.location.reload();" in first document' -e 'end tell'
# Check if Camino is running, if so refresh
ps -xc|grep -sq Camino &amp;&amp; osascript -e 'tell app "Camino"' -e 'activate' -e 'tell app "System Events" to keystroke "r" using {command down}' -e 'end tell'
</string>
<key>input</key>
<string>none</string>
<key>name</key>
<string>Refresh Running Browser(s)</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>033BC36A-97DA-4F48-9ACB-B58C80D1A689</string>
</dict>
</plist>
@@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>
[[ ! -z $TM_OBJJ_MASTER_FILE ]] &amp;&amp; INDEXFILE="$TM_OBJJ_MASTER_FILE"
[[ ! -z $TM_PROJECT_DIRECTORY ]] &amp;&amp; INDEXFILE="$TM_PROJECT_DIRECTORY/index.html"
[[ ! -z $TM_DIRECTORY ]] &amp;&amp; INDEXFILE="$TM_DIRECTORY/index.html"
if [ -z "$INDEXFILE" ]; then
D=`dirname "$TM_FILEPATH"`
while [ -z `find "$D" -name index.html` ]; do
D=`dirname "$D"`
done
INDEXFILE="${D}/index.html"
fi
[[ -z $INDEXFILE ]] &amp;&amp; echo "No start file found. Please set the shell variable 'OBJJ_MASTER_FILE'" &amp;&amp; exit 206
cat &lt;&lt;-HTML
&lt;script type="text/javascript" charset="utf-8"&gt;
try {
if (TextMate.system("", function (task) { })) {
var __TM_confirm_Status;
alert = function(s){TextMate.system("\"$DIALOG\" -e -p '{messageTitle=\"JavaScript\";informativeText=\""+s.toString().replace(/\x27/g,"").replace(/\"/g,'\\\"')+"\";}'",null);};
confirm = function(s){TextMate.system("\"$DIALOG\" -e -p '{messageTitle=\"JavaScript\";informativeText=\""+s.toString().replace(/\x27/g,"").replace(/\"/g,'\\\"')+"\";buttonTitles=(\"OK\",\"Cancel\");}'",null).onreadoutput=function(s){__TM_confirm_Status = s != 1;};return(__TM_confirm_Status)};
}
} catch(e) {}
&lt;/script&gt;
&lt;base href="file://${INDEXFILE// /%20}"&gt;
HTML
cat "$INDEXFILE"
[[ ! -z $(grep 'objj_exception_setOutputStream' "$INDEXFILE") ]] &amp;&amp; exit 205
cat &lt;&lt;-JS
&lt;script type="text/javascript" charset="utf-8"&gt;
objj_exception_setOutputStream(function(aString) { console.log(aString);alert(aString) });
&lt;/script&gt;
JS
exit 205
</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Run</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>0C55A19B-3B2D-418F-B7FD-7E64B736F379</string>
</dict>
</plist>
@@ -1,27 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cat &lt;&lt;-HTM
&lt;body onload='javascript:window.location.href="http://cappuccino.org/learn/documentation/"'&gt;
&lt;/body&gt;
HTM
exit 205
</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>^H</string>
<key>name</key>
<string>Show Documentation</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>344244D8-67A3-4F23-8270-397BD1696AC4</string>
</dict>
</plist>
@@ -1,214 +0,0 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>[[ -z $OBJJ_HOME ]] &amp;&amp; echo "OBJJ_HOME wasn't set!" &amp;&amp; exit 206
[[ ! -d "$OBJJ_HOME/Documentation" ]] &amp;&amp; echo "Please copy the folder Documentation to $OBJJ_HOME" &amp;&amp; exit 206
function showUpClassPage {
cat &lt;&lt;-HTM
&lt;body onload='javascript:window.location.href="tm-file://$OBJJ_HOME/Documentation/class$1"'&gt;
&lt;/body&gt;
HTM
exit 205
}
function showUpPage {
cat &lt;&lt;-HTM
&lt;body onload='javascript:window.location.href="tm-file://$1"'&gt;
&lt;/body&gt;
HTM
exit 205
}
DOCHEAD=$(perl -e '
#$line_nr = defined($ENV{"TM_INPUT_START_LINE"}) ? $ENV{"TM_INPUT_START_LINE"} : 1;
$line_nr = 1;
$cur_line_nr = $ENV{"TM_LINE_NUMBER"};
$header = "";
while($cur_line_nr--&gt;$line_nr) {$header.=&lt;&gt;;}
$tail = &lt;&gt;;
$header .= substr($tail,0,$ENV{"TM_LINE_INDEX"});
print $header;
')
# caret is inside of a class name
if [ `echo $TM_SCOPE | grep -c 'support.class.cappuccino'` -gt 0 ]; then
n=$(echo $TM_CURRENT_WORD | perl -pe 's/(.)(.)(.*)/_$1_$2_$3/;s/(?&lt;!_)([A-Z])(?!_)/_$1/g;s/_{2,}/_/g')
showUpClassPage "$n.html"
fi
# caret is inside of a foundation class name
if [ `echo $TM_SCOPE | grep -c 'support.variable.cappuccino.foundation'` -gt 0 ]; then
[[ "$TM_CURRENT_WORD" == "CPApp" ]] &amp;&amp; showUpClassPage "_C_P_Application.html"
fi
# caret is inside of a objj function
if [ `echo $TM_SCOPE | grep -c 'support.function.cappuccino'` -gt 0 ]; then
FILE=$(ruby -e '
require File.join(ENV["TM_SUPPORT_PATH"], "lib/ui.rb")
require File.join(ENV["TM_SUPPORT_PATH"], "lib/exit_codes.rb")
cur_word = ""
cur_word &lt;&lt; ENV["TM_CURRENT_WORD"]
cur_word.sub!("CG", "C[GP]") if cur_word[0..1] == "CG" or cur_word[0..1] == "CP"
lg = %x{egrep -rl "C[GP]RectMake" '$OBJJ_HOME/Documentation'}
urls = lg.split(/\n/).sort
if urls.length == 1
print urls.first
else
display = urls.map{|x| x.split("/").last.sub!(".html","")}
index=TextMate::UI.menu(display)
if index != nil
print urls[index]
else
TextMate.exit_discard()
end
end
')
FUNC=$(echo -en $TM_CURRENT_WORD | perl -pe 's/^(C[PG])(.*)/C[PG]$2/')
ANKER=`cat "$FILE" | egrep -o "\"#$FUNC.*?\"" | sed -e 's/^"//;s/".*//' | head -n 1`
[[ ! -z "$ANKER" ]] &amp;&amp; showUpPage "$FILE$ANKER"
[[ ! -z $FILE ]] &amp;&amp; showUpPage "$FILE" &amp;&amp; exit 206
fi
# caret is inside of a constant
if [ `echo $TM_SCOPE | grep -c 'support.constant.cappuccino'` -gt 0 ]; then
FILE=$(ruby -e '
require File.join(ENV["TM_SUPPORT_PATH"], "lib/ui.rb")
require File.join(ENV["TM_SUPPORT_PATH"], "lib/exit_codes.rb")
lg = %x{egrep -rl #{ENV["TM_CURRENT_WORD"]} '$OBJJ_HOME/Documentation'}
urls = lg.split(/\n/).sort
if urls.length == 1
print urls.first
else
display = urls.map{|x| x.split("/").last.sub!(".html","")}
index=TextMate::UI.menu(display)
if index != nil
print urls[index]
else
TextMate.exit_discard()
end
end
')
[[ ! -z $FILE ]] &amp;&amp; showUpPage "$FILE" &amp;&amp; exit 206
fi
# caret is inside of [method]
if [ `echo $TM_SCOPE | grep -c 'meta.bracketed.js.objj'` -gt 0 ]; then
# find []
DECL=$(echo -en "$DOCHEAD" | perl -e '
undef $/;
$header = &lt;&gt;;
$header=~s/\n/ /g;
@arr=split(//,$header);$c=0;
for($i=$#arr;$i&gt;-1;$i--){$c-- if($arr[$i] eq "]");$c++ if($arr[$i] eq "[");last if $c&gt;0;}
if($i==-1) {
print "";
} else {
print substr($header,$i+1);
}
')
# find the class for a method
CLASS=$(echo -en "$DECL" | perl -e '
undef $/;
$header = &lt;&gt;;
substr($header,0) =~ m/^\s*(\w+).*/;
$f = $1;
if (defined($f)) {
if($f=~m/CPApp/) {
print "CPApplication";
} else {
print $f;
}
} else {
substr($header,1) =~ m/^\s*(\w+).*/;
$f = $1;
if(defined($f)) {
if($f=~m/CPApp/) {
print "CPApplication";
} else {
print $f;
}
}
}
')
if [ ! -e "$OBJJ_HOME/Documentation/classes/$CLASS.html" ]; then
CLASS=$(echo -en "$DOCHEAD" | ruby -e '
require File.join(ENV["TM_SUPPORT_PATH"], "lib/ui.rb")
require File.join(ENV["TM_SUPPORT_PATH"], "lib/exit_codes.rb")
known_classes = []
classes = []
lg = %x{cd '$OBJJ_HOME/Documentation/classes'; egrep -rl #{ENV["TM_CURRENT_WORD"]} .}
known_classes = lg.split(/\n/).map{|x| x.sub("\.html","").sub("./","") }.sort
if known_classes.empty?
lg = %x{ls '$OBJJ_HOME/Documentation/classes'}
known_classes = lg.split(/\n/).map{|x| x.sub("\.html","").sub("./","") }.sort
end
STDIN.read().scan(/\b[_]{0,2}[NC][APS]\w+(?=[^\.])\b/) {|c| classes &lt;&lt; c if ! classes.include?(c) &amp;&amp; known_classes.include?(c)}
classes.sort!
if classes != known_classes
classes &lt;&lt; "--"
classes += known_classes
end
if classes.length == 1
if classes.first != "--"
print classes.first
else
TextMate.exit_discard()
end
else
index=TextMate::UI.menu(classes)
if index != nil
print classes[index]
else
TextMate.exit_discard()
end
end
')
fi
[[ -z $CLASS ]] &amp;&amp; exit 200
[[ ! -e "$OBJJ_HOME/Documentation/classes/$CLASS.html" ]] &amp;&amp; echo "Nothing for '$CLASS'!" &amp;&amp; exit 206
# tries to find only the first method for 'method1: method2: etc'
FIRSTMETHOD=$(echo -en "$DECL" | perl -e '
undef $/;$d = &lt;&gt;;
$d=~m/\s*(\w+):/m;
print $1;
')
METHOD=${FIRSTMETHOD:-$TM_CURRENT_WORD}
# find the correct anker within CLASS.html
ANKER=`cat "$OBJJ_HOME/Documentation/classes/$CLASS.html" | egrep -o "\"#$METHOD.*?\"" | sed -e 's/^"//;s/".*//' | head -n 1`
[[ ! -z "$ANKER" ]] &amp;&amp; showUpClassPage "$CLASS.html$ANKER"
# check for inherited methods
ANKER=`cat "$OBJJ_HOME/Documentation/classes/$CLASS.html" | egrep -o "[^#\"]+?html#$METHOD" | head -n 1`
# echo $CLASS; echo $METHOD; echo $ANKER; exit 206
CLASS=$(echo -en "$ANKER" | perl -pe 's/(.*?)\.html.*/$1/;')
# find the correct anker within the new CLASS.html
ANKER=`cat "$OBJJ_HOME/Documentation/classes/$CLASS.html" | egrep -o "\"#$METHOD.*?\"" | sed -e 's/^"//;s/".*//' | head -n 1`
[[ ! -z "$ANKER" ]] &amp;&amp; showUpClassPage "$CLASS.html$ANKER"
# [[ ! -z "$ANKER" ]] &amp;&amp; showUpClassPage "$ANKER"
fi
exit 205</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>^h</string>
<key>name</key>
<string>Documentation for Word</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
<string>support.class.cappuccino, support.variable.cappuccino.foundation, meta.bracketed.js.objj, support.function.cappuccino</string>
<key>uuid</key>
<string>2D05A28A-2ED7-4A9A-9A5C-8625466BC77C</string>
</dict>
</plist>
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List: Method</string>
<key>scope</key>
<string>meta.function.js.objj</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>
s/^([-+])\s*\(.*?\)\s*/$1 /; # strip result type
s/:\s*\(.*?\)\s*\w+\s*/:/g; # strip argument variables
s/\s*;?$//g; # strip terminating ws + semi-colon
</string>
</dict>
<key>uuid</key>
<string>E65A721C-192D-4BCC-AD35-5ED5CB0DA5BE</string>
</dict>
</plist>
@@ -1,16 +0,0 @@
<?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>content</key>
<string>@selector(${1:method}:)</string>
<key>name</key>
<string>@selector(…)</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>sel</string>
<key>uuid</key>
<string>13D9F280-A78F-4A4C-BE99-0DE13235738D</string>
</dict>
</plist>
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>- (${1:id})${2:thing}
{
return $2;
}
- (void)set${2/./\u$0/}:($1)aValue
{
$2 = aValue;
}</string>
<key>name</key>
<string>Accessors</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>acc</string>
<key>uuid</key>
<string>AA41BEF8-5F81-4A5A-85DE-2E81A112778B</string>
</dict>
</plist>
@@ -1,31 +0,0 @@
<?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>content</key>
<string>@implementation ${1:CLASS} (CPCoding)
- (id)initWithCoder:(CPCoder)aCoder
{
if (self = [super initWithCoder:aCoder])
{
${2:IVAR} = [aCoder decodeObjectForKey:${3:KEY}];
}
return self;
}
- (void)encodeWithCoder:(CPCoder)aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObject:${2:IVAR} forKey:${3:KEY}];
}
@end
</string>
<key>name</key>
<string>Archiving</string>
<key>uuid</key>
<string>A840A98A-0C5B-49CB-8235-2CCD1BF7AFC1</string>
</dict>
</plist>
@@ -1,16 +0,0 @@
<?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>content</key>
<string>CPLog("$1"${1/[^%]*(%)?.*/(?1:, :\);)/}$2${1/[^%]*(%)?.*/(?1:\);)/}</string>
<key>name</key>
<string>CPLog(…)</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>log</string>
<key>uuid</key>
<string>C268A928-5C8E-4284-9BAB-4FDFB07B983A</string>
</dict>
</plist>
@@ -1,21 +0,0 @@
<?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>content</key>
<string>@interface ${1:NSObject} (${2:Category})
@end
@implementation ${1:NSObject} (${2:Category})
$0
@end</string>
<key>name</key>
<string>Category</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>cat</string>
<key>uuid</key>
<string>8C001067-8A50-4BAB-9A88-BA957A84E8CF</string>
</dict>
</plist>
@@ -1,29 +0,0 @@
<?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>content</key>
<string>@implementation ${1:class} : ${2:CPObject}
{
}
- (id)init
{
if(self = [super init])
{$0
}
return self;
}
@end
</string>
<key>name</key>
<string>Class</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>objj</string>
<key>uuid</key>
<string>96C39647-4346-4750-9F96-58070F24EDE6</string>
</dict>
</plist>
@@ -1,18 +0,0 @@
<?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>content</key>
<string>if([${1:[self delegate]} respondsToSelector:@selector(${2:selfDidSomething:})])
[$1 ${3:${2/((^\s*([A-Za-z0-9_]*:)\s*)|(:\s*$)|(:\s*))/(?2:$2self :\:&lt;&gt;)(?4::)(?5: :)/g}}];
</string>
<key>name</key>
<string>Delegate Responds to Selector</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>delegate</string>
<key>uuid</key>
<string>3B5B858C-645E-499C-813B-BBEEED943E9B</string>
</dict>
</plist>
@@ -1,24 +0,0 @@
<?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>content</key>
<string>- (id)delegate
{
return $1;
}
- (void)setDelegate:(id)aDelegate
{
${1:delegate} = aDelegate;
}</string>
<key>name</key>
<string>Delegate</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>delacc</string>
<key>uuid</key>
<string>0B3D4C4C-7D75-49E6-9CEC-E4BF4069223A</string>
</dict>
</plist>
@@ -1,21 +0,0 @@
<?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>content</key>
<string>${1:name} = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
[$1 setStringValue:${2:@"${3:string}"}];
${4:[$1 setEditable:${5:YES}];
}${6:[$1 setFont:[CPFont systemFontOfSize:${7:12.0}]];
}${8:[$1 sizeToFit];
}${0:}</string>
<key>name</key>
<string>New CPTextField</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>textf</string>
<key>uuid</key>
<string>C7340B17-F9EC-403F-9781-E2487023ED01</string>
</dict>
</plist>
@@ -1,20 +0,0 @@
<?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>content</key>
<string>${TM_COMMENT_START} ${4:Send $2 to $1, if $1 supports it}${TM_COMMENT_END}
if ([${1:self} respondsToSelector:@selector(${2:someSelector:})])
{
[$1 ${3:${2/((:\s*$)|(:\s*))/:&lt;&gt;(?3: )/g}}];
}</string>
<key>name</key>
<string>Responds to Selector</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>responds</string>
<key>uuid</key>
<string>D79EC699-9839-406E-AF60-DE51F78153CB</string>
</dict>
</plist>
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>- (${1:id})${2:thing}
{
return _$2;
}
- (void)set${2/./\u$0/}:($1)aValue
{
_$2 = aValue;
}</string>
<key>name</key>
<string>_Accessors</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>_acc</string>
<key>uuid</key>
<string>85B0746B-AE1C-47B3-8B9A-2B9A95F4C71E</string>
</dict>
</plist>
@@ -1,17 +0,0 @@
<?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>content</key>
<string>@import &lt;${1:`"$DIALOG" -u -p "{menuItems=({title=Foundation;},{title=AppKit;});}" | perl -e 'undef $/;$a=&lt;&gt;;$a=~m/&lt;key&gt;title(.|\n)+?&lt;string&gt;(.*?)&lt;/;print $2;'`}/${2:CP}$3.j&gt;
</string>
<key>name</key>
<string>import &lt;…&gt;</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>Imp</string>
<key>uuid</key>
<string>BE0553C0-B73B-4160-814C-840FC2B84C32</string>
</dict>
</plist>
@@ -1,17 +0,0 @@
<?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>content</key>
<string>@import "${1:`"$TM_BUNDLE_SUPPORT/bin/import_FileMenu.sh" ".j"`}"
</string>
<key>name</key>
<string>import "…" (with File Menu)</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>impp</string>
<key>uuid</key>
<string>9BABD784-3DBE-4DA3-8A70-4E32FC7FDBB8</string>
</dict>
</plist>
@@ -1,17 +0,0 @@
<?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>content</key>
<string>@import "${1:}"
</string>
<key>name</key>
<string>import "…"</string>
<key>scope</key>
<string>source.js.objj</string>
<key>tabTrigger</key>
<string>imp</string>
<key>uuid</key>
<string>686B995F-3183-418B-A15F-CA517DFEFE2E</string>
</dict>
</plist>
@@ -1,36 +0,0 @@
EXTENSION="$1"
CURRENTDIR=`dirname $TM_FILEPATH`
if [ -z $TM_PROJECT_DIRECTORY ]; then
L=$((${#CURRENTDIR}+1))
MENUITEMS=$(find -s "$CURRENTDIR" -name "*$EXTENSION" | perl -pe "s/^.{$L}(.*?)$/{title=\"\$1\";}/" | paste -sd ',' -)
[[ -z $MENUITEMS ]] && exit 200
"$DIALOG" -u -p "{menuItems=($MENUITEMS);}" | perl -e 'undef $/;$a=<>;$a=~m/<key>title(.|\n)+?<string>(.*?)</;print $2;'
else
FILES=$(find -s "$TM_PROJECT_DIRECTORY" -name "*$EXTENSION")
FILES=$(echo "$FILES" | perl -pe "s!$CURRENTDIR/!!")
if [ "$CURRENTDIR" != "$TM_PROJECT_DIRECTORY" ]; then
CURRENTDIR=$(dirname $CURRENTDIR)
REPLACE=""
while [ "$CURRENTDIR" != "$TM_PROJECT_DIRECTORY" ]; do
REPLACE="$REPLACE../"
FILES=$(echo "$FILES" | perl -pe "s!$CURRENTDIR/!$REPLACE!")
CURRENTDIR=$(dirname $CURRENTDIR)
done
REPLACE="$REPLACE../"
FILES=$(echo "$FILES" | perl -pe "s!$CURRENTDIR/!$REPLACE!")
fi
MENUITEMS=$(echo "$FILES" | perl -pe "s/^(.*?)$/{title=\"\$1\";}/" | paste -sd ',' -)
[[ -z $MENUITEMS ]] && exit 200
"$DIALOG" -u -p "{menuItems=($MENUITEMS);}" | perl -e 'undef $/;$a=<>;$a=~m/<key>title(.|\n)+?<string>(.*?)</;print $2;'
fi
@@ -1,41 +0,0 @@
<center><font color=red>Any feedback about bugs or improvements is highly welcomed!</font></center>
# Introduction
Cappuccino <a href="http://cappuccino.org">cappuccino.org</a> is an open source framework that makes it easy to build desktop-caliber applications that run in a web browser.
# Commands
## Run
<button>&#x2318;R&nbsp;</button>
Run the current cappuccino web application in TextMate's HTML output window.
If you are inside of an Objective-J file (file extension .j) this command will look for a file `index.html` starting at the current folder and upwards within the file hierarchy or if you are working with a project it will look for it at the project's root path.
If the start HTML site differs you can set the shell variable `TM_OBJJ_MASTER_FILE` within a project.
## Run in Browser
<button>&#x21E7;&#x2318;R&nbsp;</button>
Run the current cappuccino web application in the default web browser.
If you are inside of an Objective-J file (file extension .j) this command will look for a file `index.html` starting at the current folder and upwards within the file hierarchy or if you are working with a project it will look for it at the project's root path.
If the start HTML site differs you can set the shell variable `TM_OBJJ_MASTER_FILE` within a project.
# Shell Variables #
## TM&#95;OBJJ&#95;MASTER&#95;FILE ##
This variable contains the path to the application's start HTML site.
# Main Bundle Maintainer
***Date: Sep 7 2009***
<pre>
- Tom Robinson&nbsp;<a href="mailto:tom@280north.com">tom@280north.com</a>
- Hans-Jörg Bibiko&nbsp;&nbsp;<a href="mailto:bibiko@eva.mpg.de">bibiko@eva.mpg.de</a>
</pre>
File diff suppressed because one or more lines are too long
@@ -1,142 +0,0 @@
<?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>contactEmailRot13</key>
<string>gbz@280abegu.pbz</string>
<key>contactName</key>
<string>Tom Robinson</string>
<key>deleted</key>
<array>
<string>4689ADD7-C88A-4235-B69A-84C720034296</string>
</array>
<key>description</key>
<string>&lt;a href="http://cappuccino.org/"&gt;Cappuccino&lt;/a&gt; is an open source framework that makes it easy to build desktop-caliber applications that run in a web browser.</string>
<key>mainMenu</key>
<dict>
<key>excludedItems</key>
<array>
<string>CD025B3E-36B9-4E16-A81E-8DB6E8466CD1</string>
<string>2D05A28A-2ED7-4A9A-9A5C-8625466BC77C</string>
</array>
<key>items</key>
<array>
<string>0C55A19B-3B2D-418F-B7FD-7E64B736F379</string>
<string>36FD3695-1051-401E-8536-89FB9CEEEAB4</string>
<string>033BC36A-97DA-4F48-9ACB-B58C80D1A689</string>
<string>------------------------------------</string>
<string>------------------------------------</string>
<string>AF27A8B3-C87F-410A-915B-D83271FDDC00</string>
<string>344244D8-67A3-4F23-8270-397BD1696AC4</string>
<string>------------------------------------</string>
<string>9BC0151E-82E8-4F2C-8AC1-7D4E6EC8FC80</string>
<string>3ABE883F-3236-4876-91E0-E899F5DE9B29</string>
<string>B226514A-4024-49EA-B4BD-4307C72F7EE3</string>
<string>A4BB7CC7-B06B-4034-B125-A646A22C0813</string>
<string>94B213AC-4DB1-400F-B78A-8FBCF3F93E44</string>
<string>28C6F02F-13D0-4B5B-AB6A-6F23E2CFBD5B</string>
<string>------------------------------------</string>
</array>
<key>submenus</key>
<dict>
<key>28C6F02F-13D0-4B5B-AB6A-6F23E2CFBD5B</key>
<dict>
<key>items</key>
<array>
<string>C7340B17-F9EC-403F-9781-E2487023ED01</string>
</array>
<key>name</key>
<string>UI</string>
</dict>
<key>3ABE883F-3236-4876-91E0-E899F5DE9B29</key>
<dict>
<key>items</key>
<array>
<string>AA41BEF8-5F81-4A5A-85DE-2E81A112778B</string>
<string>85B0746B-AE1C-47B3-8B9A-2B9A95F4C71E</string>
<string>0B3D4C4C-7D75-49E6-9CEC-E4BF4069223A</string>
</array>
<key>name</key>
<string>Accessor Methods For</string>
</dict>
<key>94B213AC-4DB1-400F-B78A-8FBCF3F93E44</key>
<dict>
<key>items</key>
<array>
<string>13D9F280-A78F-4A4C-BE99-0DE13235738D</string>
<string>DF55A80D-E733-4CE2-A318-D56789B18406</string>
</array>
<key>name</key>
<string>Misc</string>
</dict>
<key>9BC0151E-82E8-4F2C-8AC1-7D4E6EC8FC80</key>
<dict>
<key>items</key>
<array>
<string>BE0553C0-B73B-4160-814C-840FC2B84C32</string>
<string>686B995F-3183-418B-A15F-CA517DFEFE2E</string>
<string>9BABD784-3DBE-4DA3-8A70-4E32FC7FDBB8</string>
<string>------------------------------------</string>
<string>96C39647-4346-4750-9F96-58070F24EDE6</string>
<string>8C001067-8A50-4BAB-9A88-BA957A84E8CF</string>
<string>A840A98A-0C5B-49CB-8235-2CCD1BF7AFC1</string>
</array>
<key>name</key>
<string>Language Boilerplate</string>
</dict>
<key>A4BB7CC7-B06B-4034-B125-A646A22C0813</key>
<dict>
<key>items</key>
<array>
<string>D79EC699-9839-406E-AF60-DE51F78153CB</string>
<string>3B5B858C-645E-499C-813B-BBEEED943E9B</string>
</array>
<key>name</key>
<string>Idioms</string>
</dict>
<key>B226514A-4024-49EA-B4BD-4307C72F7EE3</key>
<dict>
<key>items</key>
<array>
<string>C268A928-5C8E-4284-9BAB-4FDFB07B983A</string>
<string>F220FEE6-6522-4281-8091-CF8C66AED44F</string>
</array>
<key>name</key>
<string>Common Method Calls</string>
</dict>
</dict>
</dict>
<key>name</key>
<string>JavaScript Objective-J</string>
<key>ordering</key>
<array>
<string>0C55A19B-3B2D-418F-B7FD-7E64B736F379</string>
<string>36FD3695-1051-401E-8536-89FB9CEEEAB4</string>
<string>033BC36A-97DA-4F48-9ACB-B58C80D1A689</string>
<string>AF27A8B3-C87F-410A-915B-D83271FDDC00</string>
<string>344244D8-67A3-4F23-8270-397BD1696AC4</string>
<string>2D05A28A-2ED7-4A9A-9A5C-8625466BC77C</string>
<string>BE0553C0-B73B-4160-814C-840FC2B84C32</string>
<string>686B995F-3183-418B-A15F-CA517DFEFE2E</string>
<string>9BABD784-3DBE-4DA3-8A70-4E32FC7FDBB8</string>
<string>96C39647-4346-4750-9F96-58070F24EDE6</string>
<string>8C001067-8A50-4BAB-9A88-BA957A84E8CF</string>
<string>AA41BEF8-5F81-4A5A-85DE-2E81A112778B</string>
<string>85B0746B-AE1C-47B3-8B9A-2B9A95F4C71E</string>
<string>0B3D4C4C-7D75-49E6-9CEC-E4BF4069223A</string>
<string>A840A98A-0C5B-49CB-8235-2CCD1BF7AFC1</string>
<string>C268A928-5C8E-4284-9BAB-4FDFB07B983A</string>
<string>F220FEE6-6522-4281-8091-CF8C66AED44F</string>
<string>D79EC699-9839-406E-AF60-DE51F78153CB</string>
<string>3B5B858C-645E-499C-813B-BBEEED943E9B</string>
<string>C7340B17-F9EC-403F-9781-E2487023ED01</string>
<string>13D9F280-A78F-4A4C-BE99-0DE13235738D</string>
<string>CD025B3E-36B9-4E16-A81E-8DB6E8466CD1</string>
<string>DF55A80D-E733-4CE2-A318-D56789B18406</string>
<string>58D4B98A-2110-423E-9C80-CC9E202816E7</string>
<string>E65A721C-192D-4BCC-AD35-5ED5CB0DA5BE</string>
</array>
<key>uuid</key>
<string>1FB3D538-84E1-4002-AA46-5705529A27E1</string>
</dict>
</plist>
-752
View File
@@ -1,752 +0,0 @@
// Objective-J language
(
/****************************************************************************/
// MARK: Strings and Characters
/****************************************************************************/
{
Identifier = "xcode.lang.string.objj";
Syntax = {
Start = "@\"";
EscapeChar = "\\";
End = "\"";
Type = "xcode.syntax.string";
};
},
/****************************************************************************/
// MARK: Objective-J keywords
/****************************************************************************/
{
Identifier = "xcode.lang.objj.identifier";
Syntax = {
StartChars = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";
Words = (
// keywords from JavaScript
"break",
"case",
"catch",
"continue",
"default",
"delete",
"do",
"else",
"false",
"finally",
"for",
"function",
"if",
"in",
"instanceof",
"new",
"null",
"return",
"switch",
"this",
"throw",
"true",
"try",
"typeof",
"var",
"void",
"while",
"with",
"class",
"window",
"document",
// Select keywords from Objective-C
"@end",
"@implementation",
"@import",
"@private",
"@property",
"@protected",
"@protocol",
"@public",
"@selector",
"@accessors",
"@action",
"@outlet",
"in",
"inout",
"oneway",
"out",
"BOOL",
"IBAction",
"IBOutlet",
"IMP",
"NO",
"Nil",
"SEL",
"YES",
"id",
"nil",
"self",
"super",
);
Type = "xcode.syntax.keyword";
AltType = "xcode.syntax.identifier"; // non-keywords are identifiers
};
},
/****************************************************************************/
// MARK: Objective-J Top-Level
/****************************************************************************/
{
Identifier = "xcode.lang.objj";
Description = "Objective-J Coloring";
BasedOn = "xcode.lang.javascript";
IncludeInMenu = YES;
Name = "Objective-J";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.toplevel";
IncludeRules = (
"xcode.lang.objj.block",
"xcode.lang.objj.bracketexpr",
"xcode.lang.objj.parenexpr",
"xcode.lang.objj.interface",
"xcode.lang.objj.implementation",
"xcode.lang.objj.protocol.declaration",
"xcode.lang.objj.protocol",
"xcode.lang.objj.function.declaration",
"xcode.lang.objj.function.definition",
"xcode.lang.objj.initializer",
);
Type = "xcode.syntax.plain";
};
},
/****************************************************************************/
// MARK: Lexers
/****************************************************************************/
// The following rule returns tokens to the other rules
{
Identifier = "xcode.lang.objj.lexer";
Syntax = {
IncludeRules = (
"xcode.lang.comment.headerdoc",
"xcode.lang.comment",
"xcode.lang.comment.singleline",
"xcode.lang.c.preprocessor",
"xcode.lang.string.objj",
"xcode.lang.string",
"xcode.lang.character",
"xcode.lang.completionplaceholder",
"xcode.lang.objj.identifier",
"xcode.lang.number",
);
};
},
{
Identifier = "xcode.lang.objj.lexer.toplevel";
Syntax = {
IncludeRules = (
"xcode.lang.comment.headerdoc",
"xcode.lang.comment",
"xcode.lang.comment.singleline",
"xcode.lang.c.preprocessor",
"xcode.lang.string.objj",
"xcode.lang.string",
"xcode.lang.character",
"xcode.lang.completionplaceholder",
"xcode.lang.objj.interface.declarator",
"xcode.lang.objj.implementation.declarator",
"xcode.lang.objj.protocol.declarator",
"xcode.lang.objj.property.declarator",
"xcode.lang.objj.identifier",
"xcode.lang.number",
);
};
},
{
Identifier = "xcode.lang.objj.lexer.attribute";
Syntax = {
IncludeRules = (
"xcode.lang.comment.headerdoc",
"xcode.lang.comment",
"xcode.lang.comment.singleline",
"xcode.lang.c.preprocessor",
"xcode.lang.string.objj",
"xcode.lang.string",
"xcode.lang.character",
"xcode.lang.completionplaceholder",
"xcode.lang.objj.identifier",
"xcode.lang.number",
);
};
},
{
Identifier = "xcode.lang.objj.parenexpr.attribute";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.attribute";
Start = "(";
End = ")";
Recursive = YES;
};
},
{
Identifier = "xcode.lang.objj.implementation.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"@implementation",
"xcode.lang.objj.classnameclause",
);
Type = "xcode.syntax.name.tree";
};
},
{
Identifier = "xcode.lang.objj.interface.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"@interface",
"xcode.lang.objj.classnameclause",
":?",
"xcode.lang.objj.classname?",
"xcode.lang.objj.protocolclause?",
);
Type = "xcode.syntax.name.tree";
};
},
{
Identifier = "xcode.lang.objj.protocol.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"@protocol",
"xcode.lang.objj.protocolname",
);
Type = "xcode.syntax.name.tree";
};
},
{
Identifier = "xcode.lang.objj.classnameclause";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.classname",
"xcode.lang.objj.categoryclause?",
);
Type = "xcode.syntax.name.tree";
};
},
{
Identifier = "xcode.lang.objj.classname";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.identifier",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.protocolname";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.identifier",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.protocol.openangle";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"<",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.protocol.closeangle";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
">",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.protocolclause";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.protocol.openangle",
"xcode.lang.objj.protocolname",
"xcode.lang.objj.protocol.protocollist*",
"xcode.lang.objj.protocol.closeangle",
);
};
},
{
Identifier = "xcode.lang.objj.categoryname";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.identifier",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.category.openparen";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"(",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.category.closeparen";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
")",
);
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.categoryclause";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.category.openparen",
"xcode.lang.objj.categoryname",
"xcode.lang.objj.category.closeparen"
);
};
},
/****************************************************************************/
// MARK: Interfaces/Implementations
/****************************************************************************/
{
Identifier = "xcode.lang.objj.protocol.declaration";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.toplevel";
Rules = (
"xcode.lang.objj.protocol.declarator",
"xcode.lang.objj.protocol.protocolclause*",
";",
);
Type = "xcode.syntax.declaration.objj.protocol";
};
},
{
Identifier = "xcode.lang.objj.protocol.protocollist";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
",",
"xcode.lang.objj.protocolname",
);
};
},
{
Identifier = "xcode.lang.objj.protocol";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.toplevel";
Start = "xcode.lang.objj.protocol.declarator";
End = "@end";
Foldable = YES;
IncludeRules = (
"xcode.lang.objj.function.declaration",
"xcode.lang.objj.method.declaration",
"xcode.lang.objj.classmethod.declaration",
"xcode.lang.objj.property.declaration",
"xcode.lang.objj.block",
"xcode.lang.objj.bracketexpr",
"xcode.lang.objj.parenexpr",
);
Type = "xcode.syntax.declaration.objj.protocol";
};
},
{
Identifier = "xcode.lang.objj.interface";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.toplevel";
Start = "xcode.lang.objj.interface.declarator";
End = "@end";
Foldable = YES;
IncludeRules = (
"xcode.lang.objj.function.declaration",
"xcode.lang.objj.method.declaration",
"xcode.lang.objj.classmethod.declaration",
"xcode.lang.objj.property.declaration",
"xcode.lang.objj.block",
"xcode.lang.objj.bracketexpr",
"xcode.lang.objj.parenexpr",
);
Type = "xcode.syntax.declaration.objj.interface";
};
},
{
Identifier = "xcode.lang.objj.implementation";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.toplevel";
Start = "xcode.lang.objj.implementation.declarator";
End = "@end";
Foldable = YES;
IncludeRules = (
"xcode.lang.objj.function.declaration",
"xcode.lang.objj.function.definition",
"xcode.lang.objj.method.definition",
"xcode.lang.objj.classmethod.definition",
"xcode.lang.objj.block",
"xcode.lang.objj.bracketexpr",
"xcode.lang.objj.parenexpr",
"xcode.lang.objj.initializer",
);
Type = "xcode.syntax.definition.objj.implementation";
};
},
/****************************************************************************/
// MARK: Methods
/****************************************************************************/
{
Identifier = "xcode.lang.objj.method.minus";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = ( "-", );
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.method.plus";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = ( "+", );
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.method.colon";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = ( ":", );
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.partialname";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = ( "xcode.lang.objj.identifier", );
Type = "xcode.syntax.name.partial";
};
},
{
Identifier = "xcode.lang.objj.method.declaration";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.method.declarator",
"xcode.lang.objj.identifier?",
";",
);
Type = "xcode.syntax.declaration.method";
};
},
{
Identifier = "xcode.lang.objj.method.definition";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.method.declarator",
";?",
"xcode.lang.objj.block",
);
Type = "xcode.syntax.definition.method";
};
},
{
Identifier = "xcode.lang.objj.method.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.method.minus",
"xcode.lang.objj.parenexpr?",
"xcode.lang.objj.partialname",
"xcode.lang.objj.method.declarator.args?",
);
Type = "xcode.syntax.method.declarator";
};
},
{
Identifier = "xcode.lang.objj.classmethod.declaration";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.classmethod.declarator",
"xcode.lang.objj.identifier?",
";",
);
Type = "xcode.syntax.declaration.method";
};
},
{
Identifier = "xcode.lang.objj.classmethod.definition";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.classmethod.declarator",
";?",
"xcode.lang.objj.block",
);
Type = "xcode.syntax.definition.method";
};
},
{
Identifier = "xcode.lang.objj.classmethod.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.method.plus",
"xcode.lang.objj.parenexpr?",
"xcode.lang.objj.partialname",
"xcode.lang.objj.method.declarator.args?",
);
Type = "xcode.syntax.method.declarator";
};
},
{
Identifier = "xcode.lang.objj.method.declarator.args";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.method.colon",
"xcode.lang.objj.parenexpr?",
"xcode.lang.objj.identifier",
"xcode.lang.objj.method.declarator.moreargs*",
"xcode.lang.objj.method.declarator.varargs?",
);
};
},
{
Identifier = "xcode.lang.objj.method.declarator.moreargs";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.partialname?",
"xcode.lang.objj.method.colon",
"xcode.lang.objj.parenexpr?",
"xcode.lang.objj.identifier"
);
};
},
{
Identifier = "xcode.lang.objj.method.declarator.varargs";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
",",
"...",
);
};
},
/****************************************************************************/
// MARK: Functions
/****************************************************************************/
{
Identifier = "xcode.lang.objj.function.definition";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.function.declarator",
"xcode.lang.objj.block",
);
Type = "xcode.syntax.definition.c.function";
};
},
{
Identifier = "xcode.lang.objj.function.declaration";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.function.declarator",
"xcode.lang.objj.identifier?",
";"
);
Type = "xcode.syntax.declaration.c.function";
};
},
{
Identifier = "xcode.lang.objj.function.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.function.name",
"xcode.lang.objj.parenexpr",
);
};
},
{
Identifier = "xcode.lang.objj.function.name";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"xcode.lang.objj.identifier",
);
Type = "xcode.syntax.name.partial";
};
},
/****************************************************************************/
// MARK: Properties
/****************************************************************************/
{
Identifier = "xcode.lang.objj.property.declaration";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Start = "xcode.lang.objj.property.declarator";
End = ";";
Type = "xcode.syntax.declaration.property";
};
},
{
Identifier = "xcode.lang.objj.property.declarator";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Rules = (
"@property",
"xcode.lang.objj.property.options?",
);
};
},
{
Identifier = "xcode.lang.objj.property.options";
Syntax = {
Tokenizer = "xcode.lang.objj.property.options.lexer";
Start = "(";
End = ")";
Recursive = YES;
};
},
{
Identifier = "xcode.lang.objj.property.options.lexer";
Syntax = {
IncludeRules = (
"xcode.lang.comment.headerdoc",
"xcode.lang.comment",
"xcode.lang.comment.singleline",
"xcode.lang.c.preprocessor",
"xcode.lang.string.objj",
"xcode.lang.string",
"xcode.lang.character",
"xcode.lang.completionplaceholder",
"xcode.lang.objj.property.options.identifier",
"xcode.lang.objj.identifier",
"xcode.lang.number",
);
};
},
{
Identifier = "xcode.lang.objj.property.options.identifier";
Syntax = {
Words = (
"setter",
"getter",
"readonly",
"readwrite",
"assign",
"retain",
"copy",
"nonatomic",
);
Type = "xcode.syntax.keyword";
};
},
/****************************************************************************/
// MARK: Blocks
/****************************************************************************/
{
Identifier = "xcode.lang.objj.block";
BasedOn = "xcode.lang.javascript.block"; // for text macros
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Start = "{";
End = "}";
Foldable = YES;
Recursive = YES;
IncludeRules = (
"xcode.lang.objj.bracketexpr",
"xcode.lang.objj.parenexpr",
);
};
},
{
Identifier = "xcode.lang.objj.parenexpr";
BasedOn = "xcode.lang.javascript.parenexpr";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Start = "(";
End = ")";
Recursive = YES;
IncludeRules = (
"xcode.lang.objj.bracketexpr",
"xcode.lang.objj.block",
);
};
},
{
Identifier = "xcode.lang.objj.bracketexpr";
BasedOn = "xcode.lang.javascript.bracketexpr";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer";
Start = "[";
End = "]";
Recursive = YES;
IncludeRules = (
"xcode.lang.objj.parenexpr",
"xcode.lang.objj.block",
);
};
},
{
Identifier = "xcode.lang.objj.initializer";
Syntax = {
Tokenizer = "xcode.lang.objj.lexer.toplevel";
Start = "=";
End = ";";
Recursive = NO;
IncludeRules = (
"xcode.lang.objj.parenexpr",
"xcode.lang.objj.bracketexpr",
);
};
},
)
-15
View File
@@ -1,15 +0,0 @@
/*
* ObjectiveJ.xcspec: Xcode file type for Objective-J
*
*/
(
{
Type = FileType;
Identifier = sourcecode.objj;
BasedOn = sourcecode;
Name = "Objective-J file";
Extensions = ( j );
Language = "xcode.lang.objj";
}
)
-541
View File
@@ -1,541 +0,0 @@
/**
Objective J text macro specifications derived from
Objective C text macro specifications and C text macro specifications which are
Copyright © 2004-2007 Apple Inc. All rights reserved.
*/
(
//
// Objective-J language macros
//
{
Identifier = objj;
Name = "Objective J";
IsMenu = YES;
// Can be set (for all languages) with the XCCodeSenseFormattingOptions user default
// DefaultSettings = {
// PreExpressionsSpacing = " ";
// InExpressionsSpacing = "";
// BlockSeparator = " ";
// PostBlockSeparator = "\n";
// };
IncludeContexts = ( "xcode.lang.objj");
ExcludeContexts = ( "xcode.lang.string", "xcode.lang.character", "xcode.lang.comment", "xcode.lang.c.preprocessor" );
},
{
Identifier = objj.try;
BasedOn = objj;
IsMenuItem = YES;
Name = "Try / Catch Block";
TextString = "@try$(BlockSeparator){\n\t<#!statements!#>\n}$(PostBlockSeparator)@catch$(PreExpressionsSpacing)($(InExpressionsSpacing)CPException * e$(InExpressionsSpacing))$(BlockSeparator){\n\t<#handler#>\n}$(PostBlockSeparator)@finally$(BlockSeparator){\n\t<#statements#>\n}";
CompletionPrefix = "@try";
IncludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.catch;
BasedOn = objj;
IsMenuItem = YES;
Name = "Catch Block";
TextString = "@catch$(PreExpressionsSpacing)($(InExpressionsSpacing)<#exception#>$(InExpressionsSpacing))$(BlockSeparator){\n\t<#!handler!#>\n}";
CompletionPrefix = "@catch";
IncludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.finally;
BasedOn = objj;
IsMenuItem = YES;
Name = "Finally Block";
TextString = "@finally$(BlockSeparator){\n\t<#!handler!#>\n}";
CompletionPrefix = "@finally";
IncludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.log;
BasedOn = objj;
IsMenuItem = YES;
Name = "CPLog() Call";
TextString = "CPLog$(PreFunctionArgsSpacing)($(InFunctionArgsSpacing)@\"<#message#>\"$(InFunctionArgsSpacing));";
CompletionPrefix = log;
IncludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.bracket;
BasedOn = objj;
IsMenuItem = YES;
Name = "Bracket Expression";
TextString = "[<#!expression!#> ]";
CompletionPrefix = "[";
},
{
Identifier = objj.allocinit;
BasedOn = objj;
IsMenuItem = YES;
Name = "Alloc / Init Call";
TextString = "[[<#!class!#> alloc] init]";
CompletionPrefix = a;
},
{
Identifier = objj.array;
BasedOn = objj;
IsMenuItem = YES;
Name = "Array Declaration";
TextString = "CPArray * array;";
CompletionPrefix = aa;
},
{
Identifier = objj.mutablearray;
BasedOn = objj;
IsMenuItem = YES;
Name = "Mutable Array Declaration";
TextString = "CPMutableArray * array;";
CompletionPrefix = ma;
},
{
Identifier = objj.arrayiteration;
BasedOn = objj;
IsMenuItem = YES;
Name = "Array For Loop";
TextString = "CPUInteger i, count = [<#array#> count];\nfor$(PreExpressionsSpacing)($(InExpressionsSpacing)i = 0; i < count; i++$(InExpressionsSpacing))$(BlockSeparator){\n\tCPObject * obj = [<#array#> objectAtIndex:i];\n\t<#!statements!#>\n}";
CompletionPrefix = fora;
IncludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.arrayiteration.foreach;
BasedOn = objj;
IsMenuItem = YES;
Name = "Array Foreach Loop";
TextString = "for$(PreExpressionsSpacing)($(InExpressionsSpacing)<#object#> in <#array#>$(InExpressionsSpacing))$(BlockSeparator){\n\t<#!statements!#>\n}";
CompletionPrefix = fore;
IncludeContexts = ( "xcode.lang.objj.block" );
},
// MARK: Block Statements
{
Identifier = objj.block;
BasedOn = objj;
TextString = "$(Statement)$(BlockSeparator){\n\t<#!statements!#>\n}";
Statement = "$(Command)$(PreExpressionsSpacing)($(InExpressionsSpacing)$(Expressions)$(InExpressionsSpacing))";
IncludeContexts = ( "xcode.lang.objj.block", "xcode.lang.java.block" ); // these all work in Java too
ExcludeContexts = ( "xcode.lang.string", "xcode.lang.character", "xcode.lang.comment", "xcode.lang.c.preprocessor", "xcode.lang.objj.parenexpr", "xcode.lang.objj.bracketexpr" );
},
{
Identifier = objj.block.if;
BasedOn = objj.block;
Name = "If Block";
IsMenuItem = YES;
Command = "if";
Expressions = "<#condition#>";
CompletionPrefix = if;
CycleList = (
objj.block.if,
objj.block.ifelse,
);
},
{
Identifier = objj.block.ifelse;
BasedOn = objj.block;
Name = "If / Else Block";
IsMenuItem = NO;
Command = "if";
Expressions = "<#condition#>";
TextString = "$(Statement)$(BlockSeparator){\n\t<#!statements!#>\n}$(PostBlockSeparator)else$(BlockSeparator){\n\t<#statements#>\n}";
CompletionPrefix = ifelse;
},
{
Identifier = objj.block.elseif;
BasedOn = objj.block;
Name = "Else If Block";
IsMenuItem = NO;
Command = "else if";
Expressions = "<#condition#>";
CompletionPrefix = elseif;
},
{
Identifier = objj.block.for;
BasedOn = objj.block;
Name = "For Loop";
IsMenuItem = YES;
Command = "for";
Expressions = "<#initial#>; <#condition#>; <#increment#>";
CompletionPrefix = for;
CycleList = (
objj.block.for,
objj.block.for.i,
);
},
{
Identifier = objj.block.for.i;
BasedOn = objj.block;
Name = "For i Loop";
IsMenuItem = NO;
Command = "for";
Expressions = "int i = 0; i < <#limit#>; i++";
CompletionPrefix = fori;
},
{
Identifier = objj.block.while;
BasedOn = objj.block;
Name = "While Loop";
IsMenuItem = YES;
Command = "while";
Expressions = "<#condition#>";
CompletionPrefix = while;
},
{
Identifier = objj.block.dowhile;
BasedOn = objj.block;
Name = "Do While Loop";
IsMenuItem = YES;
Command = "while";
TextString = "do$(BlockSeparator){\n\t<#!statements!#>\n}$(PreExpressionsSpacing)$(Statement)";
Expressions = "<#condition#>";
CompletionPrefix = do;
},
{
Identifier = objj.block.switch;
BasedOn = objj.block;
Name = "Switch Block";
IsMenuItem = YES;
Command = "switch";
TextString = "$(Statement)$(BlockSeparator){\n$(CaseStatementSpacing)case <#constant#>:\n$(CaseStatementSpacing)\t<#!statements!#>\n$(CaseStatementSpacing)\tbreak;\n$(CaseStatementSpacing)default:\n$(CaseStatementSpacing)\tbreak;\n}";
Expressions = "<#expression#>";
CompletionPrefix = switch;
},
{
Identifier = objj.caseblock;
BasedOn = objj;
IsMenuItem = YES;
Name = "Case Block";
TextString = "case <#constant#>:\n\t<#!statements!#>\n\tbreak;\n";
CompletionPrefix = case;
IncludeContexts = ( "xcode.lang.objj.block", "xcode.lang.java.block" ); // this works in Java too
ExcludeContexts = ( "xcode.lang.string", "xcode.lang.character", "xcode.lang.comment", "xcode.lang.c.preprocessor", "xcode.lang.objj.parenexpr", "xcode.lang.objj.bracketexpr" );
},
{
Identifier = objj.elseblock;
BasedOn = objj;
IsMenuItem = YES;
Name = "Else Block";
TextString = "else$(BlockSeparator){\n\t<#!statements!#>\n}\n";
CompletionPrefix = else;
IncludeContexts = ( "xcode.lang.objj.block", "xcode.lang.java.block" ); // this works in Java too
ExcludeContexts = ( "xcode.lang.string", "xcode.lang.character", "xcode.lang.comment", "xcode.lang.c.preprocessor", "xcode.lang.objj.parenexpr", "xcode.lang.objj.bracketexpr" );
CycleList = (
objj.elseblock,
objj.block.elseif,
);
},
{
Identifier = objj.paren;
BasedOn = objj;
IsMenuItem = YES;
Name = "Parenthesize Selection";
TextString = "($(InExpressionsSpacing)<#!expression!#>$(InExpressionsSpacing))";
IncludeContexts = ( "xcode.lang.objj");
},
{
Identifier = objj.quote;
BasedOn = objj;
IsMenuItem = YES;
Name = "Quote Selection";
TextString = "\"<#!text!#>\"";
IncludeContexts = ( "xcode.lang.objj");
},
{
Identifier = objj.pragmamark;
BasedOn = objj;
IsMenuItem = YES;
Name = "#Pragma Mark";
TextString = "#pragma mark <#!label!#>";
CompletionPrefix = pm;
},
{
Identifier = objj.pp.pragmamark;
BasedOn = objj;
IsMenuItem = NO;
Name = "Pragma Mark";
TextString = "pragma mark <#!label!#>";
CompletionPrefix = pragma;
IncludeContexts = ( "xcode.lang.c.preprocessor" );
},
{
Identifier = objj.import;
BasedOn = objj;
IsMenuItem = YES;
Name = "#Import Statement";
TextString = "#import \"<#!file!#>\"";
CompletionPrefix = pim;
CycleList = (
objj.import,
objj.import.sys,
objj.import.fw
);
ExcludeContexts = ( "xcode.lang.objj.block", "xcode.lang.string", "xcode.lang.character", "xcode.lang.comment", "xcode.lang.c.preprocessor" );
},
{
Identifier = objj.import.sys;
BasedOn = objj.import;
IsMenuItem = NO;
Name = "#Import Statement (System)";
TextString = "#import <<#!file!#>>";
CompletionPrefix = pims;
},
{
Identifier = objj.import.fw;
BasedOn = objj.import;
IsMenuItem = NO;
Name = "#Import Statement (Framework)";
TextString = "#import <<#framework#>/<#!file!#>>";
CompletionPrefix = pimf;
},
{
Identifier = objj.pif;
BasedOn = objj;
IsMenuItem = YES;
Name = "#If Block";
IfText = "if";
TextString = "#$(IfText) $(Expression)\n<#!statements!#>\n#endif";
Expression = "<#expression#>";
CompletionPrefix = pif;
CycleList = (
objj.pif,
objj.pifzero,
objj.pifdef,
objj.pifelse,
objj.pifdefelse
);
},
{
Identifier = objj.pifdef;
BasedOn = objj.pif;
IsMenuItem = NO;
Name = "#Ifdef Block";
IfText = "ifdef";
CompletionPrefix = pifd;
},
{
Identifier = objj.pifelse;
BasedOn = objj.pif;
IsMenuItem = NO;
Name = "#If / Else Block";
TextString = "#$(IfText) $(Expression)\n<#!statements!#>\n#else\n<#statements#>\n#endif";
CompletionPrefix = pife;
},
{
Identifier = objj.pifdefelse;
BasedOn = objj.pifelse;
IsMenuItem = NO;
IfText = "ifdef";
Name = "#Ifdef / Else Block";
CompletionPrefix = pifde;
},
{
Identifier = objj.pifzero;
BasedOn = objj.pif;
IsMenuItem = NO;
Name = "#If 0 Block";
Expression = "0";
CompletionPrefix = pifz;
},
{
Identifier = objj.copyright;
BasedOn = objj;
IsMenuItem = YES;
Name = "Copyright Comment";
TextString = "//\n// Copyright (c) $(YEAR), $(ORGANIZATIONNAME)\n// All rights reserved.\n//\n";
CompletionPrefix = copyright;
IncludeContexts = ( "xcode.lang.objj");
},
{
Identifier = objj.comment;
BasedOn = objj;
IsMenuItem = YES;
Name = "Comment Selection";
TextString = "/* <#!comment!#> */";
CompletionPrefix = comment;
IncludeContexts = ( "xcode.lang.objj");
},
{
Identifier = objj.separatorcomment;
BasedOn = objj;
IsMenuItem = YES;
Name = "Separator Comment";
TextString = "/****************************************************************************/\n";
CompletionPrefix = cseparator;
IncludeContexts = ( "xcode.lang.objj");
},
// MARK: methods templates
{
Identifier = objj.init;
BasedOn = objj;
IsMenuItem = YES;
Name = "init Definition";
TextString = "-$(PreMethodTypeSpacing)(id)$(PreMethodDeclSpacing)init$(FunctionBlockSeparator){\n\tself = [super init];\n\tif$(PreExpressionsSpacing)($(InExpressionsSpacing)self != nil$(InExpressionsSpacing))$(BlockSeparator){\n\t\t<#!initializations!#>\n\t}\n\treturn self;\n}\n";
CompletionPrefix = init;
IncludeContexts = ( "xcode.lang.objj.implementation" );
ExcludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.dealloc;
BasedOn = objj;
IsMenuItem = YES;
Name = "dealloc Definition";
TextString = "-$(PreMethodTypeSpacing)(void)$(PreMethodDeclSpacing)dealloc$(FunctionBlockSeparator){\n\t<#!deallocations!#>\n\t[super dealloc];\n}\n";
CompletionPrefix = dealloc;
IncludeContexts = ( "xcode.lang.objj.implementation" );
ExcludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.observe;
BasedOn = objj;
IsMenuItem = YES;
Name = "observeValueForKeyPath: Definition";
TextString =
"-$(PreMethodTypeSpacing)(void)$(PreMethodDeclSpacing)observeValueForKeyPath$(PreColonSpacing):$(PostColonSpacing)(CPString *)$(MessageArgSpacing)keyPath ofObject$(PreColonSpacing):$(PostColonSpacing)(id)$(MessageArgSpacing)object change$(PreColonSpacing):$(PostColonSpacing)(CPDictionary *)$(MessageArgSpacing)change context$(PreColonSpacing):$(PostColonSpacing)(void *)$(MessageArgSpacing)context$(FunctionBlockSeparator){
if$(PreExpressionsSpacing)($(InExpressionsSpacing)context == <#context#>$(InExpressionsSpacing))$(BlockSeparator){
<#work#>
}$(PostBlockSeparator)\telse$(BlockSeparator){
[$(InMessageSpacing)super observeValueForKeyPath$(PreColonSpacing):$(PostColonSpacing)keyPath ofObject$(PreColonSpacing):$(PostColonSpacing)object change$(PreColonSpacing):$(PostColonSpacing)change context$(PreColonSpacing):$(PostColonSpacing)context$(InMessageSpacing)];
}
}
";
CompletionPrefix = observeValueForKeyPath;
IncludeContexts = ( "xcode.lang.objj.implementation" );
ExcludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.observe.decl;
BasedOn = objj;
IsMenuItem = YES;
Name = "observeValueForKeyPath: Declaration";
TextString = "-$(PreMethodTypeSpacing)(void)$(PreMethodDeclSpacing)observeValueForKeyPath$(PreColonSpacing):$(PostColonSpacing)(CPString *)$(MessageArgSpacing)keyPath ofObject$(PreColonSpacing):$(PostColonSpacing)(id)$(MessageArgSpacing)object change$(PreColonSpacing):$(PostColonSpacing)(CPDictionary *)$(MessageArgSpacing)change context$(PreColonSpacing):$(PostColonSpacing)(void *)$(MessageArgSpacing)context;\n";
CompletionPrefix = observeValueForKeyPath;
IncludeContexts = ( "xcode.lang.objj.interface" );
ExcludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.bind;
BasedOn = objj;
IsMenuItem = YES;
Name = "bind: Definition";
TextString =
"-$(PreMethodTypeSpacing)(void)$(PreMethodDeclSpacing)bind$(PreColonSpacing):$(PostColonSpacing)(CPString *)$(MessageArgSpacing)binding toObject$(PreColonSpacing):$(PostColonSpacing)(id)$(MessageArgSpacing)observable withKeyPath$(PreColonSpacing):$(PostColonSpacing)(CPString *)$(MessageArgSpacing)keyPath options$(PreColonSpacing):$(PostColonSpacing)(CPDictionary *)$(MessageArgSpacing)options$(FunctionBlockSeparator){
if$(PreExpressionsSpacing)($(InExpressionsSpacing)[$(InMessageSpacing)binding isEqualToString$(PreColonSpacing):$(PostColonSpacing)<#bindingName#>$(InMessageSpacing)]$(InExpressionsSpacing))$(BlockSeparator){
[$(InMessageSpacing)observable addObserver$(PreColonSpacing):$(PostColonSpacing)self forKeyPath$(PreColonSpacing):$(PostColonSpacing)keyPath options$(PreColonSpacing):$(PostColonSpacing)0 context$(PreColonSpacing):$(PostColonSpacing)<#context#>$(InMessageSpacing)];
<#store binding info#>
}$(PostBlockSeparator)\telse$(BlockSeparator){
[$(InMessageSpacing)super bind$(PreColonSpacing):$(PostColonSpacing)binding toObject$(PreColonSpacing):$(PostColonSpacing)observable withKeyPath$(PreColonSpacing):$(PostColonSpacing)keyPath options$(PreColonSpacing):$(PostColonSpacing)options$(InMessageSpacing)];
}
}
";
CompletionPrefix = bind;
IncludeContexts = ( "xcode.lang.objj.implementation" );
ExcludeContexts = ( "xcode.lang.objj.block" );
},
{
Identifier = objj.observe.bind;
BasedOn = objj;
IsMenuItem = YES;
Name = "bind: Declaration";
TextString = "-$(PreMethodTypeSpacing)(void)$(PreMethodDeclSpacing)bind$(PreColonSpacing):$(PostColonSpacing)(CPString *)$(MessageArgSpacing)binding toObject$(PreColonSpacing):$(PostColonSpacing)(id)$(MessageArgSpacing)observable withKeyPath$(PreColonSpacing):$(PostColonSpacing)(CPString *)$(MessageArgSpacing)keyPath options$(PreColonSpacing):$(PostColonSpacing)(CPDictionary *)$(MessageArgSpacing)options;\n";
CompletionPrefix = bind;
IncludeContexts = ( "xcode.lang.objj.interface" );
ExcludeContexts = ( "xcode.lang.objj.block" );
},
// MARK: classes and protocols
{
Identifier = objj.interface;
BasedOn = objj;
IsMenuItem = YES;
Name = "@interface Definition";
TextString = "@interface <#class#> : <#superclass#>$(FunctionBlockSeparator){\n\t<#ivars#>\n}\n\n<#methods#>\n\n@end\n";
CompletionPrefix = "@interface";
ExcludeContexts = ( "xcode.lang.objj.implementation", "xcode.lang.objj.interface", "xcode.lang.objj.protocol" );
},
{
Identifier = objj.implementation;
BasedOn = objj;
IsMenuItem = YES;
Name = "@implementation Definition";
TextString = "@implementation <#class#>\n\n<#methods#>\n\n@end\n";
CompletionPrefix = "@implementation";
ExcludeContexts = ( "xcode.lang.objj.implementation", "xcode.lang.objj.interface", "xcode.lang.objj.protocol" );
},
{
Identifier = objj.protocol;
BasedOn = objj;
IsMenuItem = YES;
Name = "@protocol Definition";
TextString = "@protocol <#protocol#>\n\n<#methods#>\n\n@end\n";
CompletionPrefix = "@protocol";
ExcludeContexts = ( "xcode.lang.objj.implementation", "xcode.lang.objj.interface", "xcode.lang.objj.protocol" );
},
// MARK: Common Class shorthands
{
Identifier = objj.cps;
BasedOn = objj;
IsMenuItem = NO;
Name = "CPString";
TextString = "CPString";
CompletionPrefix = cps;
},
{
Identifier = objj.cpa;
BasedOn = objj;
IsMenuItem = NO;
Name = "CPArray";
TextString = "CPArray";
CompletionPrefix = cpa;
},
{
Identifier = objj.cpma;
BasedOn = objj;
IsMenuItem = NO;
Name = "CPMutableArray";
TextString = "CPMutableArray";
CompletionPrefix = cpma;
},
{
Identifier = objj.cpd;
BasedOn = objj;
IsMenuItem = NO;
Name = "CPDictionary";
TextString = "CPDictionary";
CompletionPrefix = cpd;
},
)
-47
View File
@@ -1,47 +0,0 @@
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww15700\viewh12860\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\f0\fs24 \cf0 The following files provide support for Objective-J syntax coloring and text completion in Xcode version 3 and above\
\
\fs26
\b ObjectiveJ.xcspec
\b0 \
\b ObjectiveJ.xclangspec
\b0 \
\b ObjectiveJ.xctxtmacro
\b0 \
\fs24 \
The above files were derived from the Apple Objective-C and JavaScript files located at\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\i\fs26 \cf0 /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources
\i0\fs24 \
\i
\fs26 /Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources\
\pard\tx580\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\i0 \cf0 (
\fs20 some files are Copyright \'a9 2004-2007 Apple Inc. and copyright text has been preserved
\fs26 )
\i\fs24 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\i0 \cf0 \
To install the files, double click on \
\
\b\fs26 install.command
\b0\fs24 \
\
This will create a "
\i\fs26 ~/Library/Application Support/Developer/Shared/Xcode/Specifications
\i0\fs24 " directory if it does not already exist and copy the ObjectiveJ.* files to that directory. You will need to restart Xcode for the changes to take effect.}
-5
View File
@@ -1,5 +0,0 @@
#~/bin/bash
echo Creating destination directory..
mkdir -pv ~/Library/Application\ Support/Developer/Shared/Xcode/Specifications
echo Copying files...
cp -v ${0%/*}/ObjectiveJ.* ~/Library/Application\ Support/Developer/Shared/Xcode/Specifications