Skip to main content
summaryrefslogtreecommitdiffstats
blob: 98edf9869813a5981db968fa8a8f5eb33863a987 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**********************************************************************
 * This file is part of "Object Teams Development Tooling"-Software
 * 
 * Copyright 2010 GK Software AG
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * $Id$
 * 
 * Please visit http://www.eclipse.org/objectteams for updates and contact.
 * 
 * Contributors:
 * 	  Stephan Herrmann - Initial API and implementation
 **********************************************************************/
package org.eclipse.objectteams.otdt.tests;

import java.io.File;

import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.objectteams.otdt.core.ext.OTDTPlugin;
import org.eclipse.objectteams.otdt.core.ext.OTREContainer;
import org.eclipse.objectteams.otdt.internal.core.compiler.mappings.CallinImplementorDyn;

/** Constants for the classpath of OT/J Projects.*/
public class ClasspathUtil {

	// === OT Paths: ===
	public static final String OTRE_PATH		 = new OTREContainer().getClasspathEntries()[0].getPath().toOSString();
	public static final String OTDT_PATH 		 = JavaCore.getClasspathVariable(OTDTPlugin.OTDT_INSTALLDIR).toOSString();
	public static final String OTRE_MIN_JAR_PATH; 
	public static final String OTAGENT_JAR_PATH; 
	public static final IPath  BYTECODE_LIB_JAR_PATH = OTREContainer.BYTECODE_LIBRARY_PATH;

	static {
		if (CallinImplementorDyn.DYNAMIC_WEAVING) {
			OTRE_MIN_JAR_PATH 		= getOTDTJarPath("otredyn_min");
			OTAGENT_JAR_PATH  		= getOTDTJarPath("otredyn_agent");
		} else {
			OTRE_MIN_JAR_PATH 		= getOTDTJarPath("otre_min");
			OTAGENT_JAR_PATH  		= getOTDTJarPath("otre_agent");
		}
	}
	
	private static String getOTDTJarPath(String jarName) {
		return OTDT_PATH + File.separator + "lib" + File.separator + jarName + ".jar";
	}

}

Back to the top