Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # This script is inteded to be invoked from within eclipse |
| 4 | # using the launch configuration genIOOTBreakPoints.launch |
| 5 | # in the same directory. |
| 6 | # Prerequisite: |
| 7 | # You must have the project OTRE within the same workspace. |
| 8 | # |
| 9 | # author: stephan@cs.tu-berlin.de |
| 10 | |
| 11 | |
| 12 | # Let's identify ourselves: |
| 13 | CWD=`pwd` |
| 14 | PROG=`echo $0 | sed "s|${CWD}/||"` |
| 15 | |
| 16 | HEADER="/********************************************************************** |
| 17 | * This file is part of \"Object Teams Development Tooling\"-Software |
| 18 | * |
| 19 | * Copyright 2006, 2010 Fraunhofer Gesellschaft, Munich, Germany, |
| 20 | * for its Fraunhofer Institute for Computer Architecture and Software |
| 21 | * Technology (FIRST), Berlin, Germany and Technical University Berlin, |
| 22 | * Germany. |
| 23 | * |
| 24 | * All rights reserved. This program and the accompanying materials |
| 25 | * are made available under the terms of the Eclipse Public License v1.0 |
| 26 | * which accompanies this distribution, and is available at |
| 27 | * http://www.eclipse.org/legal/epl-v10.html |
| 28 | * \$Id\$ |
| 29 | * |
| 30 | * Please visit http://www.eclipse.org/objectteams for updates and contact. |
| 31 | * |
| 32 | * Contributors: |
| 33 | * Fraunhofer FIRST - Initial API and implementation |
| 34 | * Technical University Berlin - Initial API and implementation |
| 35 | **********************************************************************/ |
Stephan Herrmann | 6c3cbc1 | 2010-11-28 02:26:10 +0000 | [diff] [blame^] | 36 | package org.eclipse.objectteams.otdt.debug.internal.breakpoints; |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 37 | |
| 38 | /** |
| 39 | * Do not edit: This interface is auto-generated from org/objectteams/Team.java |
| 40 | * using ${PROG} |
| 41 | * |
| 42 | * Purpose: make specific line numbers of Team.java available for the debugger. |
| 43 | */ |
| 44 | public interface IOOTBreakPoints |
| 45 | {" |
| 46 | |
| 47 | |
| 48 | # INPUT: |
| 49 | OTRE=$1 |
| 50 | if [ ! -d ${OTRE} ]; then |
Stephan Herrmann | 6c3cbc1 | 2010-11-28 02:26:10 +0000 | [diff] [blame^] | 51 | echo "Project root of org.eclipse.objectteams.runtime not found at ${OTRE}". |
| 52 | echo "Perhaps you don't have project org.eclipse.objectteams.runtime in your workspace?" |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 53 | exit |
| 54 | fi |
| 55 | TEAM=${OTRE}/src/org/objectteams/Team.java |
| 56 | if [ ! -f ${TEAM} ]; then |
| 57 | echo "Team.java not found at ${TEAM}." |
| 58 | exit |
| 59 | fi |
| 60 | |
| 61 | # OUTPUT: |
Stephan Herrmann | 6c3cbc1 | 2010-11-28 02:26:10 +0000 | [diff] [blame^] | 62 | OUT=src/org/eclipse/objectteams/otdt/debug/internal/breakpoints/IOOTBreakPoints.java |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 63 | |
| 64 | if [ "$2" != "RUN" ] |
| 65 | then |
| 66 | # fetch stdin from Team.java, write to IOOTBreakPoints.java and restart: |
| 67 | $0 $1 RUN 0<"$TEAM" | tee $OUT |
| 68 | echo ">>>> Please refresh the source folder. <<<<" |
| 69 | exit |
| 70 | else |
| 71 | |
| 72 | echo "${HEADER}" |
| 73 | i=0 |
Stephan Herrmann | 0330e03 | 2010-04-11 18:19:11 +0000 | [diff] [blame] | 74 | while read REPLY |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 75 | do |
| 76 | i=`expr $i + 1` |
| 77 | l=`echo "$REPLY" | sed -e "s/^.*[$]Debug(\(.*\))/\1/"` |
| 78 | if [ "$REPLY" != "$l" ] |
| 79 | then |
| 80 | echo " int LINE_$l = $i;" |
| 81 | fi |
| 82 | done |
| 83 | echo "}" |
| 84 | fi |
| 85 | |
| 86 | |