blob: 551e32d96f34094129bffd3e9359cb7edf659ad4 (
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
|
/*******************************************************************************
* Copyright (c) 2007, 2009 IBM Corporation and others.
* 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
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.xlc.ui.preferences;
import org.eclipse.cdt.managedbuilder.xlc.ui.Messages;
/**
* Constant definitions for plug-in preferences
*/
public class PreferenceConstants {
public static final String P_XL_COMPILER_ROOT = "XL_compilerRoot"; //$NON-NLS-1$
public static final String P_XLC_COMPILER_VERSION = "XLC_compilerVersion"; //$NON-NLS-1$
public static final String P_XL_COMPILER_VERSION_8 = "v8.0"; //$NON-NLS-1$
public static final String P_XL_COMPILER_VERSION_9 = "v9.0"; //$NON-NLS-1$
public static final String P_XL_COMPILER_VERSION_10 = "v10.1"; //$NON-NLS-1$
public static final String P_XL_COMPILER_VERSION_8_NAME = Messages.XLCompiler_v8;
public static final String P_XL_COMPILER_VERSION_9_NAME = Messages.XLCompiler_v9;
public static final String P_XL_COMPILER_VERSION_10_NAME = Messages.XLCompiler_v10;
public static String getVersion (String label) {
if (label.equalsIgnoreCase(P_XL_COMPILER_VERSION_10_NAME))
return P_XL_COMPILER_VERSION_10;
else if (label.equalsIgnoreCase(P_XL_COMPILER_VERSION_9_NAME))
return P_XL_COMPILER_VERSION_9;
else
return P_XL_COMPILER_VERSION_8;
}
public static String getVersionLabel (String version) {
if (version.equalsIgnoreCase(P_XL_COMPILER_VERSION_10))
return P_XL_COMPILER_VERSION_10_NAME;
else if (version.equalsIgnoreCase(P_XL_COMPILER_VERSION_9))
return P_XL_COMPILER_VERSION_9_NAME;
else
return P_XL_COMPILER_VERSION_8_NAME;
}
}
|