blob: 521957b85751fd975ac7a029080971e8ca526263 [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 *
Stephan Herrmannee87a8c2014-04-24 15:13:53 +020019 * Copyright 2006, 2014 Fraunhofer Gesellschaft, Munich, Germany,
Stephan Herrmann01664412010-04-01 20:28:43 +000020 * 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
Stephan Herrmann01664412010-04-01 20:28:43 +000028 *
29 * Please visit http://www.eclipse.org/objectteams for updates and contact.
30 *
31 * Contributors:
32 * Fraunhofer FIRST - Initial API and implementation
33 * Technical University Berlin - Initial API and implementation
34 **********************************************************************/
Stephan Herrmann6c3cbc12010-11-28 02:26:10 +000035package org.eclipse.objectteams.otdt.debug.internal.breakpoints;
Stephan Herrmann01664412010-04-01 20:28:43 +000036
37/**
38 * Do not edit: This interface is auto-generated from org/objectteams/Team.java
39 * using ${PROG}
40 *
41 * Purpose: make specific line numbers of Team.java available for the debugger.
42 */
43public interface IOOTBreakPoints
44{"
45
46
47# INPUT:
48OTRE=$1
49if [ ! -d ${OTRE} ]; then
Stephan Herrmann6c3cbc12010-11-28 02:26:10 +000050 echo "Project root of org.eclipse.objectteams.runtime not found at ${OTRE}".
51 echo "Perhaps you don't have project org.eclipse.objectteams.runtime in your workspace?"
Stephan Herrmann01664412010-04-01 20:28:43 +000052 exit
53fi
54TEAM=${OTRE}/src/org/objectteams/Team.java
55if [ ! -f ${TEAM} ]; then
56 echo "Team.java not found at ${TEAM}."
57 exit
58fi
59
60# OUTPUT:
Stephan Herrmann6c3cbc12010-11-28 02:26:10 +000061OUT=src/org/eclipse/objectteams/otdt/debug/internal/breakpoints/IOOTBreakPoints.java
Stephan Herrmann01664412010-04-01 20:28:43 +000062
63if [ "$2" != "RUN" ]
64then
65 # fetch stdin from Team.java, write to IOOTBreakPoints.java and restart:
66 $0 $1 RUN 0<"$TEAM" | tee $OUT
67 echo ">>>> Please refresh the source folder. <<<<"
68 exit
69else
70
71 echo "${HEADER}"
72 i=0
Stephan Herrmann0330e032010-04-11 18:19:11 +000073 while read REPLY
Stephan Herrmann01664412010-04-01 20:28:43 +000074 do
75 i=`expr $i + 1`
76 l=`echo "$REPLY" | sed -e "s/^.*[$]Debug(\(.*\))/\1/"`
77 if [ "$REPLY" != "$l" ]
78 then
79 echo " int LINE_$l = $i;"
80 fi
81 done
82 echo "}"
83fi
84
85