PageRenderTime 36ms CodeModel.GetById 32ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/google-toolbox-for-mac/XcodePlugin/Resources/opencoverage.applescript

http://macfuse.googlecode.com/
Unknown | 45 lines | 36 code | 9 blank | 0 comment | 0 complexity | 72b1da3f244e7f9b5ac7d6279148ee71 MD5 | raw file
 1(*
 2	opencoverage.applescript
 3	
 4    Copyright 2007-2009 Google Inc.
 5  
 6    Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7    use this file except in compliance with the License.  You may obtain a copy
 8    of the License at
 9   
10    http://www.apache.org/licenses/LICENSE-2.0
11   
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15    License for the specific language governing permissions and limitations under
16    the License.
17
18	Support script for using gcov with Xcode
19*)
20
21(* 
22	gets passed a list of args from Xcode
23	first arg is the path to open
24*)
25on run args
26	
27	-- check args
28	set filename to POSIX path of item 1 of args
29	
30	-- check if it exists first
31	set doesExist to false
32	tell application "System Events"
33		set doesExist to item filename exists
34	end tell
35	if doesExist then
36		-- open it in coverstory
37		do shell script "/usr/bin/open -a CoverStory " & quoted form of filename
38	else
39		-- report the error
40		tell application "Xcode"
41			display alert "The path we needed didn't exist." & return & quoted form of (filename)
42		end tell
43	end if
44	
45end run