blob: 6050c71140537011d6218daa8ba391da5f70588f [file] [log] [blame]
Stephan Herrmann01664412010-04-01 20:28:43 +00001#!/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:
13CWD=`pwd`
14PROG=`echo $0 | sed "s|${CWD}/||"`
15
16HEADER="/**********************************************************************
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 Herrmann6c3cbc12010-11-28 02:26:10 +000036package org.eclipse.objectteams.otdt.debug.internal.breakpoints;
Stephan Herrmann01664412010-04-01 20:28:43 +000037
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 */
44public interface IOOTBreakPoints
45{"
46
47
48# INPUT:
49OTRE=$1
50if [ ! -d ${OTRE} ]; then
Stephan Herrmann6c3cbc12010-11-28 02:26:10 +000051 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 Herrmann01664412010-04-01 20:28:43 +000053 exit
54fi
55TEAM=${OTRE}/src/org/objectteams/Team.java
56if [ ! -f ${TEAM} ]; then
57 echo "Team.java not found at ${TEAM}."
58 exit
59fi
60
61# OUTPUT:
Stephan Herrmann6c3cbc12010-11-28 02:26:10 +000062OUT=src/org/eclipse/objectteams/otdt/debug/internal/breakpoints/IOOTBreakPoints.java
Stephan Herrmann01664412010-04-01 20:28:43 +000063
64if [ "$2" != "RUN" ]
65then
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
70else
71
72 echo "${HEADER}"
73 i=0
Stephan Herrmann0330e032010-04-11 18:19:11 +000074 while read REPLY
Stephan Herrmann01664412010-04-01 20:28:43 +000075 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 "}"
84fi
85
86