11/*******************************************************************************
2- * Copyright (c) 2000, 2018 IBM Corporation and others.
2+ * Copyright (c) 2000, 2025 IBM Corporation and others.
33 *
44 * This program and the accompanying materials
55 * are made available under the terms of the Eclipse Public License 2.0
@@ -126,7 +126,7 @@ class StringVariableNotifier implements ISafeRunnable {
126126 */
127127 @ Override
128128 public void handleException (Throwable exception ) {
129- IStatus status = new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), VariablesPlugin .INTERNAL_ERROR , "An exception occurred during string variable change notification" , exception ); //$NON-NLS-1$
129+ IStatus status = new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), VariablesPlugin .INTERNAL_ERROR , VariablesMessages . StringVarExceptionOnChange , exception );
130130 VariablesPlugin .log (status );
131131 }
132132
@@ -223,15 +223,15 @@ private void loadDynamicVariables() {
223223 for (IConfigurationElement element : elements ) {
224224 String name = element .getAttribute (ATTR_NAME );
225225 if (name == null ) {
226- VariablesPlugin .logMessage (NLS .bind ("Variable extension missing required 'name' attribute: {0}" , element .getDeclaringExtension ().getLabel ()), null ); //$NON-NLS-1$
226+ VariablesPlugin .logMessage (NLS .bind (VariablesMessages . StringVarMissingNameExt , element .getDeclaringExtension ().getLabel ()), null );
227227 continue ;
228228 }
229229 String description = element .getAttribute (ATTR_DESCRIPTION );
230230 DynamicVariable variable = new DynamicVariable (name , description , element );
231231 Object old = fDynamicVariables .put (variable .getName (), variable );
232232 if (old != null ) {
233233 DynamicVariable oldVariable = (DynamicVariable )old ;
234- VariablesPlugin .logMessage (NLS .bind ("Dynamic variable extension from bundle ''{0}'' overrides existing extension variable ''{1}'' from bundle ''{2}''" , //$NON-NLS-1$
234+ VariablesPlugin .logMessage (NLS .bind (VariablesMessages . StringVarExtOverridesOnBundles ,
235235 element .getDeclaringExtension ().getContributor ().getName (), oldVariable .getName (), oldVariable .getConfigurationElement ().getDeclaringExtension ().getContributor ().getName ()), null );
236236 }
237237 }
@@ -246,7 +246,7 @@ private void loadContributedValueVariables() {
246246 for (IConfigurationElement element : elements ) {
247247 String name = element .getAttribute (ATTR_NAME );
248248 if (name == null ) {
249- VariablesPlugin .logMessage (NLS .bind ("Variable extension missing required 'name' attribute: {0}" , element .getDeclaringExtension ().getLabel ()), null ); //$NON-NLS-1$
249+ VariablesPlugin .logMessage (NLS .bind (VariablesMessages . StringVarMissingNameExt , element .getDeclaringExtension ().getLabel ()), null );
250250 continue ;
251251 }
252252 String description = element .getAttribute (ATTR_DESCRIPTION );
@@ -256,7 +256,7 @@ private void loadContributedValueVariables() {
256256 Object old = fValueVariables .put (name , variable );
257257 if (old != null ) {
258258 StringVariable oldVariable = (StringVariable )old ;
259- VariablesPlugin .logMessage (NLS .bind ("Contributed variable extension from bundle ''{0}'' overrides existing extension variable ''{1}'' from bundle ''{2}''" , //$NON-NLS-1$
259+ VariablesPlugin .logMessage (NLS .bind (VariablesMessages . StringVarContExtOverridesOnBundles ,
260260 element .getDeclaringExtension ().getContributor ().getName (), oldVariable .getName (), oldVariable .getConfigurationElement ().getDeclaringExtension ().getContributor ().getName ()), null );
261261 }
262262 }
@@ -282,11 +282,11 @@ private void loadPersistedValueVariables() {
282282 parser .setErrorHandler (new DefaultHandler ());
283283 root = parser .parse (stream ).getDocumentElement ();
284284 } catch (Exception e ) {
285- VariablesPlugin .logMessage ("An exception occurred while loading persisted value variables." , e ); //$NON-NLS-1$
285+ VariablesPlugin .logMessage (VariablesMessages . StringVarExceptionOnLoad , e );
286286 return ;
287287 }
288288 if (!root .getNodeName ().equals (VALUE_VARIABLES_TAG )) {
289- VariablesPlugin .logMessage ("Invalid format encountered while loading persisted value variables." , null ); //$NON-NLS-1$
289+ VariablesPlugin .logMessage (VariablesMessages . StringVarInvalidFormat , null );
290290 return ;
291291 }
292292 NodeList list = root .getChildNodes ();
@@ -295,7 +295,7 @@ private void loadPersistedValueVariables() {
295295 if (node .getNodeType () == Node .ELEMENT_NODE ) {
296296 Element element = (Element ) node ;
297297 if (!element .getNodeName ().equals (VALUE_VARIABLE_TAG )) {
298- VariablesPlugin .logMessage (NLS .bind ("Invalid XML element encountered while loading value variables: {0}" , node .getNodeName ()), null ); //$NON-NLS-1$
298+ VariablesPlugin .logMessage (NLS .bind (VariablesMessages . StringVarInvalidXML , node .getNodeName ()), null );
299299 continue ;
300300 }
301301 String name = element .getAttribute (NAME_TAG );
@@ -312,7 +312,7 @@ private void loadPersistedValueVariables() {
312312 existing .setValue (value );
313313 }
314314 } else {
315- VariablesPlugin .logMessage ("Invalid variable entry encountered while loading value variables. Variable name is null." , null ); //$NON-NLS-1$
315+ VariablesPlugin .logMessage (VariablesMessages . StringVarNameNull , null );
316316 }
317317 }
318318 }
@@ -489,13 +489,13 @@ private synchronized void storeValueVariables() {
489489 try {
490490 variableString = getValueVariablesAsXML ();
491491 } catch (IOException e ) {
492- VariablesPlugin .log (new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), IStatus .ERROR , "An exception occurred while storing launch configuration variables." , e )); //$NON-NLS-1$
492+ VariablesPlugin .log (new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), IStatus .ERROR , VariablesMessages . StringVarLaunchExcep , e ));
493493 return ;
494494 } catch (ParserConfigurationException e ) {
495- VariablesPlugin .log (new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), IStatus .ERROR , "An exception occurred while storing launch configuration variables." , e )); //$NON-NLS-1$
495+ VariablesPlugin .log (new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), IStatus .ERROR , VariablesMessages . StringVarLaunchExcep , e ));
496496 return ;
497497 } catch (TransformerException e ) {
498- VariablesPlugin .log (new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), IStatus .ERROR , "An exception occurred while storing launch configuration variables." , e )); //$NON-NLS-1$
498+ VariablesPlugin .log (new Status (IStatus .ERROR , VariablesPlugin .getUniqueIdentifier (), IStatus .ERROR , VariablesMessages . StringVarLaunchExcep , e ));
499499 return ;
500500 }
501501 }
0 commit comments