--- CodeWarriorɃRpCAG[
--- CfbNXEChEɈꗗ\܂B
tell application "~~JLGfBbg2.0(PPC)"
	deactivate
	set targetfile to file of document 1
end tell
tell application "CodeWarrior IDE 3.0"
	activate
	set projname to name of first project document
	set errmes to (run targetfile with ExternalEditor)
	set filespec to {}
	set ln to {}
	set com to {}
	set errs to 0
	repeat with anerr in errmes
		try
			set filespec to filespec & file of anerr
		on error
			set filespec to filespec & "nofile"
		end try
		try
			set ln to ln & lineNumber of anerr
		on error
			set ln to ln & 0
		end try
		try
			set com to com & message of anerr
		on error
			set com to com & "G["
		end try
		set errs to errs + 1
	end repeat
end tell
if errs > 0 then
	tell application "~~JLGfBbg2.0(PPC)"
		set hyperlist to {}
		repeat with n from 1 to errs
			set hyperrec to 
				{{file:item n of filespec, paragraph:item n of ln, comment:item n of com}}
			set hyperlist to hyperlist & hyperrec
		end repeat
		if (indexwindow "CWG[" exists) is false then
			make new indexwindow with properties 
				{name:"CWG[", fileorder:1, paragraphorder:2, selectionorder:3, commentorder:4, paragraphwidth:40, selectionwidth:200, filewidth:100, commentwidth:200, positionwidth:0}
			set asksaving of indexwindow "CWG[" to false
		end if
		make new indexgroup at before first indexgroup of indexwindow 
			"CWG[" with properties {comment:"G[ : " & projname & " : " & (current date), contents:hyperlist}
		repeat with i from 2 to (count indexgroup of indexwindow "CWG[")
			collapse indexgroup i of indexwindow "CWG["
			if comment of indexgroup i of indexwindow "CWG[" is "O[v" then
				delete indexgroup i of indexwindow "CWG["
			end if
		end repeat
		select indexwindow "CWG["
	end tell
end if

tell application "~~JLGfBbg2.0(PPC)"
	activate
end tell
