Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1f28b8a6466812827db600c93ebf13f22b4cca0b (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*******************************************************************************
 * Copyright (c) 2011, 2013 Wind River Systems, Inc. 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:
 * Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tcf.te.ui.controls.nls;

import java.lang.reflect.Field;

import org.eclipse.osgi.util.NLS;

/**
 * Common Controls plug-in externalized strings management.
 */
public class Messages extends NLS {

	// The plug-in resource bundle name
	private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.controls.nls.Messages"; //$NON-NLS-1$

	/**
	 * Static constructor.
	 */
	static {
		// Load message values from bundle file
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
	}

	/**
	 * Returns if or if not this NLS manager contains a constant for
	 * the given externalized strings key.
	 *
	 * @param key The externalized strings key or <code>null</code>.
	 * @return <code>True</code> if a constant for the given key exists, <code>false</code> otherwise.
	 */
	public static boolean hasString(String key) {
		if (key != null) {
			try {
				Field field = Messages.class.getDeclaredField(key);
				return field != null;
			} catch (NoSuchFieldException e) { /* ignored on purpose */ }
		}

		return false;
	}

	/**
	 * Returns the corresponding string for the given externalized strings
	 * key or <code>null</code> if the key does not exist.
	 *
	 * @param key The externalized strings key or <code>null</code>.
	 * @return The corresponding string or <code>null</code>.
	 */
	public static String getString(String key) {
		if (key != null) {
			try {
				Field field = Messages.class.getDeclaredField(key);
				return (String)field.get(null);
			} catch (Exception e) { /* ignored on purpose */ }
		}

		return null;
	}

	// **** Declare externalized string id's down here *****

	public static String BaseEditBrowseTextControl_button_label;
	public static String BaseEditBrowseTextControl_validationJob_name;

	public static String AbstractDecoratedDialogPageControl_contentAssist_message;

	public static String DirectorySelectionControl_title;
	public static String DirectorySelectionControl_group_label;
	public static String DirectorySelectionControl_editfield_label;

	public static String FileSelectionControl_title_open;
	public static String FileSelectionControl_title_save;
	public static String FileSelectionControl_group_label;
	public static String FileSelectionControl_editfield_label;

	public static String RemoteHostAddressControl_label;
	public static String RemoteHostAddressControl_button_label;
	public static String RemoteHostAddressControl_information_checkNameAddressUserInformation;
	public static String RemoteHostAddressControl_information_checkNameAddressField;
	public static String RemoteHostAddressControl_information_checkNameAddressFieldOk;
	public static String RemoteHostAddressControl_information_missingTargetNameAddress;
	public static String RemoteHostAddressControl_error_invalidTargetNameAddress;
	public static String RemoteHostAddressControl_error_invalidTargetIpAddress;
	public static String RemoteHostAddressControl_error_targetNameNotResolveable;

	public static String RemoteHostPortControl_label;

	public static String NameOrIPValidator_Information_MissingNameOrIP;
	public static String NameOrIPValidator_Information_MissingName;
	public static String NameOrIPValidator_Information_MissingIP;
	public static String NameOrIPValidator_Information_CheckName;
	public static String NameOrIPValidator_Error_InvalidNameOrIP;
	public static String NameOrIPValidator_Error_InvalidName;
	public static String NameOrIPValidator_Error_InvalidIP;

	public static String PortNumberValidator_Information_MissingPortNumber;
	public static String PortNumberValidator_Error_InvalidPortNumber;
	public static String PortNumberValidator_Error_PortNumberNotInRange;

	public static String FileNameValidator_Information_MissingName;
	public static String FileNameValidator_Error_InvalidName;
	public static String FileNameValidator_Error_IsDirectory;
	public static String FileNameValidator_Error_MustExist;
	public static String FileNameValidator_Error_ReadOnly;
	public static String FileNameValidator_Error_NoAccess;
	public static String FileNameValidator_Error_IsRelativ;
	public static String FileNameValidator_Error_IsAbsolut;
	public static String FileNameValidator_Error_HasSpaces;
	public static String FileNameValidator_Error_NotRelativToWorkspace;

	public static String DirectoryNameValidator_Information_MissingName;
	public static String DirectoryNameValidator_Error_IsFile;
	public static String DirectoryNameValidator_Error_MustExist;
	public static String DirectoryNameValidator_Error_ReadOnly;
	public static String DirectoryNameValidator_Error_NoAccess;
	public static String DirectoryNameValidator_Error_IsRelativ;
	public static String DirectoryNameValidator_Error_IsAbsolut;

	public static String TargetPathValidator_Information_MissingTargetPath;
	public static String TargetPathValidator_Error_InvalidTargetPath;

	public static String RegexValidator_Information_MissingValue;
	public static String RegexValidator_Error_InvalidValue;

	public static String HexValidator_Error_InvalidValueRange;

	public static String WorkspaceContainerValidator_Information_MissingValue;
	public static String WorkspaceContainerValidator_Error_InvalidValue;

	public static String NumberValidator_Error_InvalidRange;

	public static String TextValidator_Information_MissingName;

	public static String NameControl_label;
	public static String NameControl_info_missingValue;

	public static String WireTypeControl_label;
	public static String WireTypeControl_networkType_label;
	public static String WireTypeControl_serialType_label;

	public static String NetworkCablePanel_section;
	public static String NetworkCablePanel_addressControl_label;

	public static String SerialLinePanel_section;
	public static String SerialLinePanel_hostTTYDevice_label;
	public static String SerialLinePanel_hostTTYDevice_label_terminalMode;
	public static String SerialLinePanel_hostTTYSpeed_label;
	public static String SerialLinePanel_hostTTYSpeed_label_terminalMode;
	public static String SerialLinePanel_hostTTYDatabits_label;
	public static String SerialLinePanel_hostTTYParity_label;
	public static String SerialLinePanel_hostTTYStopbits_label;
	public static String SerialLinePanel_hostTTYFlowControl_label;
	public static String SerialLinePanel_hostTTYTimeout_label;
	public static String SerialLinePanel_customSerialDevice_title;
	public static String SerialLinePanel_customSerialDevice_message;
	public static String SerialLinePanel_customSerialBaudRate_title;
	public static String SerialLinePanel_customSerialBaudRate_message;
	public static String SerialLinePanel_error_invalidCharactes;
	public static String SerialLinePanel_error_invalidCharactesBaudRate;
	public static String SerialLinePanel_error_emptyHostTTYDevice;
	public static String SerialLinePanel_error_emptyHostTTYSpeedRate;
	public static String SerialLinePanel_error_emptyHostTTYDatabits;
	public static String SerialLinePanel_error_emptyHostTTYParity;
	public static String SerialLinePanel_error_emptyHostTTYStopbits;
	public static String SerialLinePanel_error_emptyHostTTYFlowControl;
	public static String SerialLinePanel_error_emptyHostTTYTimeout;
	public static String SerialLinePanel_info_editableTTYDeviceSelected;
	public static String SerialLinePanel_info_editableTTYBaudRateSelected;
	public static String SerialLinePanel_warning_FailedToLoadSerialPorts;
	public static String SerialLinePanel_task_queryAvailableSerialDevices;

	public static String SerialPortAddressDialog_port;
	public static String SerialPortAddressDialog_Information_MissingPort;
	public static String SerialPortAddressDialog_Error_InvalidPort;
	public static String SerialPortAddressDialog_Error_InvalidPortRange;
}

Back to the top