Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2014-08-04 14:01:19 -0400
committerSergey Prigogin2014-08-04 14:15:40 -0400
commit5cc7505a1271a0aae1c0939b7090b99365ee2ba5 (patch)
treebd824768b3c6b0e4aae93e45ef0bc20e1f93e4f5
parent914dc65ffb3268c75aa042280a82f6e10f0b98ef (diff)
downloadorg.eclipse.cdt-5cc7505a1271a0aae1c0939b7090b99365ee2ba5.tar.gz
org.eclipse.cdt-5cc7505a1271a0aae1c0939b7090b99365ee2ba5.tar.xz
org.eclipse.cdt-5cc7505a1271a0aae1c0939b7090b99365ee2ba5.zip
Cleanup of Messages.properties and Messages.java files.
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.java25
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.properties11
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java3
-rw-r--r--core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java6
-rw-r--r--core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties (renamed from core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/.settings/.api_filters19
-rw-r--r--core/org.eclipse.cdt.core/.settings/org.eclipse.core.resources.prefs9
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/messages.properties)10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java40
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.properties (renamed from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties)2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.java25
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.properties (renamed from core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/messages.properties)2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.java9
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.properties (renamed from core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.java8
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.properties (renamed from core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.java25
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.properties11
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceExclusion.java55
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.java25
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.properties11
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java8
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java7
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java5
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Messages.java (renamed from core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineMessages.java)17
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Messages.properties (renamed from core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/messages.properties)4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java15
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java5
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunner.java18
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.java8
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.properties (renamed from core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.java7
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.properties (renamed from core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/messages.properties)0
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/Messages.java12
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.java8
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.properties (renamed from core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/messages.properties)2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateEngineUIUtil.java11
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java6
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties (renamed from cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/messages.properties)0
51 files changed, 263 insertions, 220 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.java
new file mode 100644
index 0000000000..8229bfd2c1
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2014 Google, 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:
+ * Sergey Prigogin (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.templateengine;
+
+import org.eclipse.osgi.util.NLS;
+
+class Messages extends NLS {
+ public static String ProjectCreatedActions_insufficient_information;
+
+ static {
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.properties b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.properties
new file mode 100644
index 0000000000..bfe3f76bd3
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/Messages.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# Copyright (c) 2014 Google, 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:
+# Sergey Prigogin (Google) - initial API and implementation
+###############################################################################
+ProjectCreatedActions_insufficient_information=Insufficient information to create new project
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java
index 9e69e74a9b..d566497590 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java
@@ -23,7 +23,6 @@ import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
-import org.eclipse.cdt.core.templateengine.TemplateEngineMessages;
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
import org.eclipse.cdt.managedbuilder.core.BuildException;
import org.eclipse.cdt.managedbuilder.core.IBuilder;
@@ -81,7 +80,7 @@ public class ProjectCreatedActions {
*/
public IManagedBuildInfo createProject(IProgressMonitor monitor, String indexerId, boolean isCProject) throws CoreException, BuildException {
if(!areFieldsValid()) {
- throw new IllegalArgumentException(TemplateEngineMessages.getString("ProjectCreatedActions.InsufficientInformation")); //$NON-NLS-1$
+ throw new IllegalArgumentException(Messages.ProjectCreatedActions_insufficient_information);
}
IWorkspace workspace = ResourcesPlugin.getWorkspace();
diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java
index ae5b834be9..cd406359b4 100644
--- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java
+++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java
@@ -13,14 +13,14 @@ package org.eclipse.cdt.internal.core.natives;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.natives.messages"; //$NON-NLS-1$
public static String Util_exception_cannotCreatePty;
public static String Util_exception_cannotSetTerminalSize;
public static String Util_error_cannotRun;
public static String Util_exception_closeError;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/messages.properties b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties
index e1ab7f1ac4..e1ab7f1ac4 100644
--- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/messages.properties
+++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties
diff --git a/core/org.eclipse.cdt.core/.settings/.api_filters b/core/org.eclipse.cdt.core/.settings/.api_filters
new file mode 100644
index 0000000000..ac2945a73c
--- /dev/null
+++ b/core/org.eclipse.cdt.core/.settings/.api_filters
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.cdt.core" version="2">
+ <resource path="src/org/eclipse/cdt/core/resources/Messages.java" type="org.eclipse.cdt.core.resources.Messages">
+ <filter id="305365105">
+ <message_arguments>
+ <message_argument value="org.eclipse.cdt.core.resources.Messages"/>
+ <message_argument value="org.eclipse.cdt.core_5.8.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineMessages.java" type="org.eclipse.cdt.core.templateengine.TemplateEngineMessages">
+ <filter id="305365105">
+ <message_arguments>
+ <message_argument value="org.eclipse.cdt.core.templateengine.TemplateEngineMessages"/>
+ <message_argument value="org.eclipse.cdt.core_5.8.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/core/org.eclipse.cdt.core/.settings/org.eclipse.core.resources.prefs b/core/org.eclipse.cdt.core/.settings/org.eclipse.core.resources.prefs
index a40361e2f5..a297482b44 100644
--- a/core/org.eclipse.cdt.core/.settings/org.eclipse.core.resources.prefs
+++ b/core/org.eclipse.cdt.core/.settings/org.eclipse.core.resources.prefs
@@ -1,6 +1,5 @@
-#Thu Nov 09 15:08:09 CET 2006
eclipse.preferences.version=1
-encoding//parser/org/eclipse/cdt/internal/core/index/messages.properties=8859_1
-encoding//parser/org/eclipse/cdt/internal/core/pdom/db/messages.properties=8859_1
-encoding//parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties=8859_1
-encoding//parser/org/eclipse/cdt/internal/core/pdom/messages.properties=8859_1
+encoding//parser/org/eclipse/cdt/internal/core/index/Messages.properties=8859_1
+encoding//parser/org/eclipse/cdt/internal/core/pdom/Messages.properties=8859_1
+encoding//parser/org/eclipse/cdt/internal/core/pdom/db/Messages.properties=8859_1
+encoding//parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.properties=8859_1
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.java
index e64a045a8c..4637c2825f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.java
@@ -8,18 +8,17 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.index;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.index.messages"; //$NON-NLS-1$
public static String CIndex_FindBindingsTask_label;
public static String IndexFactory_errorNoSuchPDOM0;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.properties
index 8fbf58f4a0..8fbf58f4a0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/Messages.properties
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.java
index 005d5b5f62..d3ba9dd200 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.java
@@ -13,14 +13,12 @@ package org.eclipse.cdt.internal.core.index.provider;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.index.provider.messages"; //$NON-NLS-1$
-
public static String IndexProviderManager_InvalidIndexProvider;
public static String IndexProviderManager_NoCompatibleFragmentsAvailable;
static {
- // Initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.properties
index 8f46615636..8f46615636 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/Messages.properties
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.java
index d88a5293a5..31a517cdda 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.java
@@ -6,15 +6,16 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.pdom.messages"; //$NON-NLS-1$
public static String Checksums_taskComputeChecksums;
+ public static String PDOMImportTask_errorInvalidArchive;
+ public static String PDOMImportTask_errorInvalidPDOMVersion;
public static String PDOMManager_ClosePDOMJob;
public static String PDOMManager_creationOfIndexInterrupted;
public static String PDOMManager_ExistingFileCollides;
@@ -31,9 +32,10 @@ public class Messages extends NLS {
public static String AbstractIndexerTask_parsingFileTask;
public static String AbstractIndexerTask_errorWhileParsing;
public static String AbstractIndexerTask_tooManyIndexProblems;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.properties
index 9788e7dfce..6977d7751b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Messages.properties
@@ -8,19 +8,21 @@
# Contributors:
# Markus Schorn (Wind River Systems)
###############################################################################
+Checksums_taskComputeChecksums=Computing checksums
+PDOMImportTask_errorInvalidArchive=Invalid Archive: {0}
+PDOMImportTask_errorInvalidPDOMVersion=The version of the {0} to import for project {1} does not match
PDOMManager_notifyJob_label=Notify Index Change Listeners
PDOMManager_StartJob_name=Setting up indexer
PDOMManager_ClosePDOMJob=Close database
PDOMManager_notifyTask_message=Notify Listeners
PDOMManager_indexMonitorDetail={0}/{1} sources, {2} headers
-PDOMManager_ExistingFileCollides=A pdom already exists at location {0}
+PDOMManager_ExistingFileCollides=A PDOM file already exists at location {0}
PDOMManager_creationOfIndexInterrupted=Creation of index was interrupted
PDOMWriter_errorResolvingName=Error resolving ''{0}'' in {1}.
PDOMWriter_errorWhileParsing=Error while parsing {0}.
-Checksums_taskComputeChecksums=Computing checksums
-TeamPDOMExportOperation_errorCreatingTempFile=Cannot create temp file
+TeamPDOMExportOperation_errorCreatingTempFile=Cannot create a temporary file
TeamPDOMExportOperation_taskExportIndex=Export team shared index
-TeamPDOMExportOperation_errorWriteTempFile=Cannot write to temporary file
+TeamPDOMExportOperation_errorWriteTempFile=Cannot write to a temporary file
TeamPDOMExportOperation_errorCreateArchive=Error creating archive
AbstractIndexerTask_parsingFileTask=parsing {0} ({1})
AbstractIndexerTask_errorWhileParsing=Error while parsing {0}.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java
index 62a126a556..40020941a9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java
@@ -23,7 +23,6 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import org.eclipse.cdt.core.CCorePlugin;
@@ -35,7 +34,6 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.core.CCoreInternals;
import org.eclipse.cdt.internal.core.index.IIndexFragmentFile;
import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
-import org.eclipse.cdt.internal.core.pdom.indexer.Messages;
import org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -95,17 +93,9 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
doImportIndex(importFile, pm);
fSuccess= true;
}
- }
- catch (InterruptedException e) {
+ } catch (InterruptedException e) {
throw new OperationCanceledException();
- }
- catch (ZipException e) {
- ex= e;
- }
- catch (IOException e) {
- ex= e;
- }
- catch (CoreException e) {
+ } catch (IOException | CoreException e) {
ex= e;
}
@@ -149,8 +139,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
try {
importIndex(zip, monitor);
checksums= getChecksums(zip);
- }
- finally {
+ } finally {
try {
zip.close();
} catch (IOException e) {
@@ -181,12 +170,10 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
if (obj instanceof Map<?, ?>) {
return (Map<?,?>) obj;
}
- }
- finally {
+ } finally {
input.close();
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
CCorePlugin.log(e);
}
}
@@ -202,10 +189,10 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
WritablePDOM pdom= (WritablePDOM) obj;
pdom.acquireReadLock();
try {
- List<FileAndChecksum> filesToCheck= new ArrayList<FileAndChecksum>();
+ List<FileAndChecksum> filesToCheck= new ArrayList<>();
if (!pdom.isSupportedVersion()) {
throw new CoreException(CCorePlugin.createStatus(
- NLS.bind(Messages.PDOMImportTask_errorInvalidPDOMVersion, fProject.getElementName())));
+ NLS.bind(Messages.PDOMImportTask_errorInvalidPDOMVersion, INDEX_NAME, fProject.getElementName())));
}
final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
@@ -246,8 +233,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
List<FileAndChecksum> updateTimestamps= getUnchangedWithDifferentTimestamp(checksums, filesToCheck, monitor);
updateIndex(pdom, 1, filesToDelete, updateTimestamps, monitor);
- }
- finally {
+ } finally {
pdom.releaseReadLock();
}
}
@@ -279,8 +265,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
}
}
}
- }
- finally {
+ } finally {
pdom.releaseWriteLock(giveupReadlocks, true);
}
}
@@ -294,7 +279,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
return Collections.emptyList();
}
- List<FileAndChecksum> result= new ArrayList<TeamPDOMImportOperation.FileAndChecksum>();
+ List<FileAndChecksum> result= new ArrayList<>();
for (FileAndChecksum cs : filesToCheck) {
checkMonitor(monitor);
@@ -313,10 +298,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
}
}
}
- } catch (IOException e) {
- CCorePlugin.log(e);
- result.add(cs);
- } catch (CoreException e) {
+ } catch (IOException | CoreException e) {
CCorePlugin.log(e);
result.add(cs);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.java
index 3f7e8bd1f9..569c256927 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.java
@@ -14,9 +14,8 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.pdom.db.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+ private static final ResourceBundle RESOURCE_BUNDLE =
+ ResourceBundle.getBundle(Messages.class.getName());
private Messages() {
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.properties
index e3e7e208ab..e3e7e208ab 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Messages.properties
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.java
index b60d1492fd..517f792477 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.java
@@ -14,10 +14,8 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.pdom.dom.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ private static final ResourceBundle RESOURCE_BUNDLE =
+ ResourceBundle.getBundle(Messages.class.getName());
private Messages() {
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.properties
index 61a18cbe4d..61a18cbe4d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/Messages.properties
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.java
index bfef8e1d6f..15a15d58dc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.java
@@ -6,14 +6,13 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Andrew Ferguson (Symbian) - Initial implementation
+ * Andrew Ferguson (Symbian) - Initial implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.export;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.pdom.export.messages"; //$NON-NLS-1$
public static String GeneratePDOM_GenericGenerationFailed;
public static String GeneratePDOM_Incomplete;
public static String GeneratePDOM_NullLocationConverter;
@@ -25,9 +24,10 @@ public class Messages extends NLS {
public static String GeneratePDOMApplication_Initializing;
public static String GeneratePDOMApplication_InvalidIndexerID;
public static String GeneratePDOMApplication_UsingDefaultProjectProvider;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.properties
index c85c83b9d6..c85c83b9d6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/Messages.properties
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.java
index a5d3b250c8..dc80accb7d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.java
@@ -6,17 +6,13 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.pdom.indexer;
import org.eclipse.osgi.util.NLS;
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.pdom.indexer.messages"; //$NON-NLS-1$
- public static String PDOMImportTask_errorInvalidArchive;
- public static String PDOMImportTask_errorInvalidPDOMVersion;
+class Messages extends NLS {
public static String PDOMIndexerTask_collectingFilesTask;
public static String PDOMIndexerTask_indexerInfo;
public static String TodoTaskUpdater_DeleteJob;
@@ -31,8 +27,8 @@ public class Messages extends NLS {
public static String PDOMRebuildTask_0;
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.properties
index ee53c7bba7..59007ba92d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/Messages.properties
@@ -10,8 +10,6 @@
###############################################################################
PDOMIndexerTask_collectingFilesTask=Collecting files (project ''{0}'')
PDOMIndexerTask_indexerInfo=Indexed ''{0}'' ({1} sources, {2} headers) in {3} sec: {4} declarations; {5} references; {6} unresolved inclusions; {7} syntax errors; {8} unresolved names ({9})
-PDOMImportTask_errorInvalidPDOMVersion=The version of the cdt-index to import for project {0} does not match
-PDOMImportTask_errorInvalidArchive=Invalid Archive: {0}
PDOMImportTask_readingIndexJob_Name=Reading Index from archive
PDOMImportTask_readingChecksumsJob_Name=Reading checksums from archive
PDOMImportTask_checkingFilesJob_Name=Checking files in project
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.java
index 150cd3de09..dd1ffe493b 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.java
@@ -1,33 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011 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
+ * Copyright (c) 2011 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:
+ * Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.core.resources;
import org.eclipse.osgi.util.NLS;
-/**
- * @since 5.3
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.core.resources.messages"; //$NON-NLS-1$
+class Messages extends NLS {
public static String RefreshExclusion_0;
public static String RefreshScopeManager_0;
public static String RefreshScopeManager_1;
public static String RefreshScopeManager_2;
public static String RefreshScopeManager_3;
public static String RefreshScopeManager_4;
- public static String ResourceExclusion_name;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/messages.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.properties
index 744d1b5cfa..0001fae623 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/messages.properties
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/Messages.properties
@@ -14,5 +14,3 @@ RefreshScopeManager_1=Error instantiating XML transformer.
RefreshScopeManager_2=Error transforming XML.
RefreshScopeManager_3=Error parsing refresh settings from project {0}
RefreshScopeManager_4=Error loading refresh settings: no project description for project {0}
-
-ResourceExclusion_name=Resource Exclusions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.java
index 632d8e4ed2..4309f1d761 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.java
@@ -12,13 +12,12 @@ package org.eclipse.cdt.internal.core.cdtvariables;
import org.eclipse.osgi.util.NLS;
-public class Messages extends NLS {
- private static final String BUNDLE_NAME= "org.eclipse.cdt.internal.core.cdtvariables.messages"; //$NON-NLS-1$
-
+class Messages extends NLS {
public static String EclipseVariablesVariableSupplier_illegal_variable;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/messages.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.properties
index d76745c8e9..d76745c8e9 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/messages.properties
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/Messages.properties
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.java
index bf3517e40b..037b49abfa 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.java
@@ -13,11 +13,9 @@ package org.eclipse.cdt.internal.core.envvar;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.envvar.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+class Messages {
+ private static final ResourceBundle RESOURCE_BUNDLE =
+ ResourceBundle.getBundle(Messages.class.getName());
private Messages() {
}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/messages.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.properties
index 4830735bf9..4830735bf9 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/messages.properties
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/Messages.properties
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.java
new file mode 100644
index 0000000000..498546bcfe
--- /dev/null
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.internal.core.resources;
+
+import org.eclipse.osgi.util.NLS;
+
+class Messages extends NLS {
+ public static String ResourceExclusion_name;
+
+ static {
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.properties
new file mode 100644
index 0000000000..c40fc1598e
--- /dev/null
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/Messages.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# Copyright (c) 2011 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
+###############################################################################
+ResourceExclusion_name=Resource Exclusions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceExclusion.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceExclusion.java
index b2e1503a2d..a7226036b5 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceExclusion.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceExclusion.java
@@ -1,42 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 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
+ * Copyright (c) 2011, 2012 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:
+ * Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.resources;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.cdt.core.resources.ExclusionInstance;
-import org.eclipse.cdt.core.resources.Messages;
import org.eclipse.cdt.core.resources.RefreshExclusion;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
/**
- *
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part of a work in progress. There
- * is no guarantee that this API will work or that it will remain the same. Please do not use this API without
- * consulting with the CDT team.
- *
* @author vkong
- * @since 5.3
- *
*/
public class ResourceExclusion extends RefreshExclusion {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.core.resources.RefreshExclusion#getName()
- */
@Override
public synchronized String getName() {
return Messages.ResourceExclusion_name;
@@ -47,16 +32,9 @@ public class ResourceExclusion extends RefreshExclusion {
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.cdt.core.resources.RefreshExclusion#testExclusion(org.eclipse.core.resources.IResource)
- */
@Override
public synchronized boolean testExclusion(IResource resource) {
-
- // Populate the resources to be excluded by this exclusion
+ // Populate the resources to be excluded by this exclusion.
List<IResource> excludedResources = new LinkedList<IResource>();
List<ExclusionInstance> exclusionInstances = getExclusionInstances();
@@ -66,15 +44,15 @@ public class ResourceExclusion extends RefreshExclusion {
if (excludedResources.contains(resource)) {
return true;
- } else { // check to see if the given resource is part of this exclusion
+ }
- for (IResource excludedResource : excludedResources) {
- // TODO: need to update this for Phase 2 implementation
- if (excludedResource instanceof IContainer) {
- IContainer container = (IContainer) excludedResource;
- if (container.getFullPath().isPrefixOf(resource.getFullPath())) {
- return true;
- }
+ // Check to see if the given resource is part of this exclusion.
+ for (IResource excludedResource : excludedResources) {
+ // TODO: need to update this for Phase 2 implementation
+ if (excludedResource instanceof IContainer) {
+ IContainer container = (IContainer) excludedResource;
+ if (container.getFullPath().isPrefixOf(resource.getFullPath())) {
+ return true;
}
}
}
@@ -84,10 +62,7 @@ public class ResourceExclusion extends RefreshExclusion {
@Override
public Object clone() {
ResourceExclusion clone = new ResourceExclusion();
-
copyTo(clone);
-
return clone;
}
-
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.java
new file mode 100644
index 0000000000..24c31e6c20
--- /dev/null
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited 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:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.templateengine;
+
+import org.eclipse.osgi.util.NLS;
+
+class Messages extends NLS {
+ public static String TemplateCore_init_failed;
+
+ static {
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.properties b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.properties
new file mode 100644
index 0000000000..86908a2e2d
--- /dev/null
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/Messages.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# Copyright (c) 2007 Symbian Software Limited 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:
+# Bala Torati (Symbian) - Initial API and implementation
+###############################################################################
+TemplateCore_init_failed=Failed to initialize: {0}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java
index 3f90c106e9..eaee4c8a00 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java
@@ -26,9 +26,7 @@ import org.eclipse.cdt.core.templateengine.process.TemplateProcessHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-
-import com.ibm.icu.text.MessageFormat;
-
+import org.eclipse.osgi.util.NLS;
/**
* TemplateCore class is responsible providing the non-UI part of template and
@@ -44,7 +42,7 @@ public class TemplateCore {
private static final String ID = "id"; //$NON-NLS-1$
private static final String TYPE = "type"; //$NON-NLS-1$
- private static Map<TemplateInfo, TemplateCore> templateCache = new HashMap<TemplateInfo, TemplateCore>();
+ private static Map<TemplateInfo, TemplateCore> templateCache = new HashMap<>();
public static final Comparator<TemplateCore> TEMPLATE_ID_CASE_INSENSITIVE_COMPARATOR = new Comparator<TemplateCore>() {
@Override
@@ -74,7 +72,7 @@ public class TemplateCore {
try {
descriptorURL= TemplateEngineHelper.getTemplateResourceURL(templateInfo.getPluginId(), templateInfo.getTemplatePath());
} catch(IOException ioe) {
- String msg= MessageFormat.format(TemplateEngineMessages.getString("TemplateCore.InitFailed"), new Object[]{templateInfo.getTemplatePath()}); //$NON-NLS-1$
+ String msg= NLS.bind(Messages.TemplateCore_init_failed, templateInfo.getTemplatePath());
throw new TemplateInitializationException(msg);
}
if(descriptorURL==null)
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
index 10f658ebbb..61451ea013 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
@@ -6,13 +6,12 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Bala Torati (Symbian) - Initial API and implementation
+ * Bala Torati (Symbian) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.templateengine;
import java.io.IOException;
import java.net.URL;
-import com.ibm.icu.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -21,11 +20,11 @@ import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import org.eclipse.osgi.util.NLS;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
-
/**
* This class contains methods to get first process block element, next process block
* element and checks for next process block element.
@@ -50,7 +49,7 @@ public class TemplateDescriptor {
* @throws TemplateInitializationException
*/
public TemplateDescriptor(URL descriptorURL, String pluginId) throws TemplateInitializationException {
- String msg= MessageFormat.format(TemplateEngineMessages.getString("TemplateCore.InitFailed"), new Object[]{descriptorURL}); //$NON-NLS-1$
+ String msg= NLS.bind(Messages.TemplateCore_init_failed, descriptorURL.toString());
try {
this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(descriptorURL.openStream());
} catch(ParserConfigurationException pce) {
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
index a05e8f8dad..6b934b81c6 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
@@ -22,7 +22,6 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.TemplateCore;
import org.eclipse.cdt.core.templateengine.TemplateDescriptor;
import org.eclipse.cdt.core.templateengine.TemplateEngine;
-import org.eclipse.cdt.core.templateengine.TemplateEngineMessages;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -211,7 +210,7 @@ public class ConditionalProcessGroup {
}
if (!isConditionValueTrue()) {
List<IStatus> statuses = new ArrayList<IStatus>(1);
- statuses.add(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.INFO, TemplateEngineMessages.getString("ConditionalProcessGroup.notExecuting") + id, null)); //$NON-NLS-1$
+ statuses.add(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.INFO, Messages.getString("ConditionalProcessGroup.notExecuting") + id, null)); //$NON-NLS-1$
return statuses;
}
List<IStatus> statuses = new ArrayList<IStatus>(processes.size());
@@ -234,7 +233,7 @@ public class ConditionalProcessGroup {
Map<String, String> valueStore = template.getValueStore();
for(String value : macros) {
if (valueStore.get(value) == null) {
- return TemplateEngineMessages.getString("ConditionalProcessGroup.unexpandableMacro") + value; //$NON-NLS-1$
+ return Messages.getString("ConditionalProcessGroup.unexpandableMacro") + value; //$NON-NLS-1$
}
}
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineMessages.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Messages.java
index 4f790d9790..c77c46e9b1 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineMessages.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Messages.java
@@ -6,25 +6,20 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Bala Torati (Symbian) - Initial API and implementation
+ * Bala Torati (Symbian) - Initial API and implementation
*******************************************************************************/
-package org.eclipse.cdt.core.templateengine;
+package org.eclipse.cdt.core.templateengine.process;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-public class TemplateEngineMessages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.core.templateengine.messages"; //$NON-NLS-1$
+class Messages {
+ private static final ResourceBundle RESOURCE_BUNDLE =
+ ResourceBundle.getBundle(Messages.class.getName());
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- /**
- * @since 5.6
- */
public static String ProcessRunner_missingArg;
- private TemplateEngineMessages() {
+ private Messages() {
}
public static String getString(String key) {
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/messages.properties b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Messages.properties
index 43bd4b7692..b75a191cb9 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/messages.properties
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Messages.properties
@@ -6,11 +6,9 @@
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
-# Bala Torati (Symbian) - Initial API and implementation
+# Bala Torati (Symbian) - Initial API and implementation
###############################################################################
-
TemplateEngine.internalError=Internal Error:
-TemplateCore.InitFailed=Failed to initialize: {0}
TemplateEngine.templateEngine=Template Engine
ProjectCreatedActions.InsufficientInformation=Insufficient information to create new project
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
index 156b8e5da5..c0190dd6bc 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
@@ -19,7 +19,6 @@ import java.util.Set;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.TemplateCore;
import org.eclipse.cdt.core.templateengine.TemplateEngine;
-import org.eclipse.cdt.core.templateengine.TemplateEngineMessages;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -119,8 +118,8 @@ public class Process {
for (int i= 0; i < args.length; i++) {
ProcessArgument arg = args[i];
if ((macro = arg.getFirstNonExpandableMacro()) != null) {
- return TemplateEngineMessages.getString("Process.argument") + arg.getName() + //$NON-NLS-1$
- TemplateEngineMessages.getString("Process.expandableMacro") + macro; //$NON-NLS-1$
+ return Messages.getString("Process.argument") + arg.getName() + //$NON-NLS-1$
+ Messages.getString("Process.expandableMacro") + macro; //$NON-NLS-1$
}
}
}
@@ -136,11 +135,11 @@ public class Process {
private String getProcessMessage(int code, String msg) {
switch (code) {
case IStatus.ERROR:
- return id + TemplateEngineMessages.getString("Process.error") + msg; //$NON-NLS-1$
+ return id + Messages.getString("Process.error") + msg; //$NON-NLS-1$
case IStatus.OK:
- return id + TemplateEngineMessages.getString("Process.success") + msg; //$NON-NLS-1$
+ return id + Messages.getString("Process.success") + msg; //$NON-NLS-1$
default:
- return id + TemplateEngineMessages.getString("Process.info") + msg; //$NON-NLS-1$
+ return id + Messages.getString("Process.info") + msg; //$NON-NLS-1$
}
}
@@ -152,7 +151,7 @@ public class Process {
*/
public IStatus process(IProgressMonitor monitor) throws ProcessFailureException {
if (processRunner == null) {
- throw new ProcessFailureException(TemplateEngineMessages.getString("Process.unknownProcess") + processType); //$NON-NLS-1$
+ throw new ProcessFailureException(Messages.getString("Process.unknownProcess") + processType); //$NON-NLS-1$
}
if (!processRunner.areArgumentsMatchingRequiredParameters(args)) {
throw new ProcessFailureException(processRunner.getArgumentsMismatchMessage(args));
@@ -162,7 +161,7 @@ public class Process {
}
resolve();
processRunner.process(template, args, id, monitor);
- return new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, IStatus.OK, getProcessMessage(IStatus.OK, TemplateEngineMessages.getString("Process.executedSuccessfully") + Arrays.asList(args)), null); //$NON-NLS-1$
+ return new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, IStatus.OK, getProcessMessage(IStatus.OK, Messages.getString("Process.executedSuccessfully") + Arrays.asList(args)), null); //$NON-NLS-1$
}
private void resolve() {
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java
index 44c779f40e..c82a573576 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java
@@ -25,7 +25,6 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import org.eclipse.cdt.core.templateengine.TemplateEngineMessages;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -54,7 +53,7 @@ public class ProcessHelper {
RandomAccessFile raf = null;
if (!toFile.exists()) {
throw new FileNotFoundException(MessageFormat.format(
- TemplateEngineMessages.getString("ProcessHelper.fileNotFound"), //$NON-NLS-1$
+ Messages.getString("ProcessHelper.fileNotFound"), //$NON-NLS-1$
toFile.getPath()));
} else {
try {
@@ -121,7 +120,7 @@ public class ProcessHelper {
StringBuilder buffer = new StringBuilder();
if (!new java.io.File(source.getFile()).exists()) {
throw new FileNotFoundException(MessageFormat.format(
- TemplateEngineMessages.getString("ProcessHelper.fileNotFound"), //$NON-NLS-1$
+ Messages.getString("ProcessHelper.fileNotFound"), //$NON-NLS-1$
source.getFile()));
} else {
contentsReader = new InputStreamReader(source.openStream());
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunner.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunner.java
index b2742a9bf4..6045968f8b 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunner.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunner.java
@@ -11,7 +11,6 @@
package org.eclipse.cdt.core.templateengine.process;
import org.eclipse.cdt.core.templateengine.TemplateCore;
-import org.eclipse.cdt.core.templateengine.TemplateEngineMessages;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -21,7 +20,6 @@ import com.ibm.icu.text.MessageFormat;
* Abstract ProcessRunner class provides the methods to implement for processes.
*/
public abstract class ProcessRunner {
-
private ProcessParameter[] params = new ProcessParameter[0];
void setProcessParameters(ProcessParameter[] params) {
@@ -39,7 +37,7 @@ public abstract class ProcessRunner {
* @since 5.6
*/
protected ProcessFailureException missingArgException(String processId, String varname) {
- String msg = MessageFormat.format(TemplateEngineMessages.ProcessRunner_missingArg, varname);
+ String msg = MessageFormat.format(Messages.ProcessRunner_missingArg, varname);
return new ProcessFailureException(getProcessMessage(processId, IStatus.ERROR, msg));
}
@@ -70,22 +68,22 @@ public abstract class ProcessRunner {
*/
public String getArgumentsMismatchMessage(ProcessArgument[] args) {
if (params == null && args != null) {
- return TemplateEngineMessages.getString("ProcessRunner.unexpectedArguments"); //$NON-NLS-1$
+ return Messages.getString("ProcessRunner.unexpectedArguments"); //$NON-NLS-1$
}
if (params != null && args == null) {
- return TemplateEngineMessages.getString("ProcessRunner.missingArguments"); //$NON-NLS-1$
+ return Messages.getString("ProcessRunner.missingArguments"); //$NON-NLS-1$
}
if (params == null && args == null) {
return null;
}
if (params.length != args.length) {
- return TemplateEngineMessages.getString("ProcessRunner.missingArguments"); //$NON-NLS-1$
+ return Messages.getString("ProcessRunner.missingArguments"); //$NON-NLS-1$
}
for (int i = 0; i < params.length; i++) {
ProcessParameter param = params[i];
ProcessArgument arg = args[i];
if (!arg.isOfParameterType(param)) {
- return TemplateEngineMessages.getString("ProcessRunner.argumentsMismatch") + arg.getName(); //$NON-NLS-1$
+ return Messages.getString("ProcessRunner.argumentsMismatch") + arg.getName(); //$NON-NLS-1$
}
}
return null;
@@ -97,11 +95,11 @@ public abstract class ProcessRunner {
protected final String getProcessMessage(String processId, int code, String msg) {
switch (code) {
case IStatus.ERROR:
- return processId + TemplateEngineMessages.getString("ProcessRunner.error") + msg; //$NON-NLS-1$
+ return processId + Messages.getString("ProcessRunner.error") + msg; //$NON-NLS-1$
case IStatus.OK:
- return processId + TemplateEngineMessages.getString("ProcessRunner.success") + msg; //$NON-NLS-1$
+ return processId + Messages.getString("ProcessRunner.success") + msg; //$NON-NLS-1$
default:
- return processId + TemplateEngineMessages.getString("ProcessRunner.info") + msg; //$NON-NLS-1$
+ return processId + Messages.getString("ProcessRunner.info") + msg; //$NON-NLS-1$
}
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.java
index 863aaef9f1..6c54bab818 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Bala Torati (Symbian) - Initial API and implementation
+ * Bala Torati (Symbian) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.templateengine.process.processes;
@@ -14,10 +14,8 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.core.templateengine.process.processes.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ private static final ResourceBundle RESOURCE_BUNDLE =
+ ResourceBundle.getBundle(Messages.class.getName());
private Messages() {
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/messages.properties b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.properties
index ad8ca201f2..ad8ca201f2 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/messages.properties
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/Messages.properties
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.java
index c63c806cec..f67a92d8b3 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.java
@@ -6,14 +6,13 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.messages"; //$NON-NLS-1$
public static String Util_unexpectedError;
public static String Addr_valueOutOfRange;
public static String CommandLauncher_CommandCancelled;
@@ -57,8 +56,8 @@ public class Messages extends NLS {
public static String XmlUtil_InternalErrorSerializing;
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/messages.properties b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.properties
index 0dcb682ba7..0dcb682ba7 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/messages.properties
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Messages.properties
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/Messages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/Messages.java
index 704f586929..600dd55267 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/Messages.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/Messages.java
@@ -6,18 +6,16 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
- * Sergey Prigogin (Google)
+ * Markus Schorn - initial API and implementation
+ * Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.internal.ui.util;
-import com.ibm.icu.text.MessageFormat;
-
import org.eclipse.osgi.util.NLS;
-public class Messages extends NLS {
- private static final String BUNDLE_NAME= Messages.class.getName();
+import com.ibm.icu.text.MessageFormat;
+public class Messages extends NLS {
public static String EditorUtility_calculatingChangedRegions_message;
public static String EditorUtility_error_calculatingChangedRegions;
@@ -34,6 +32,6 @@ public class Messages extends NLS {
}
static {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
}
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.java
index f79224e291..3983d6b6d9 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Bala Torati (Symbian) - Initial API and implementation
+ * Bala Torati (Symbian) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.templateengine;
@@ -14,10 +14,8 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.ui.templateengine.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ private static final ResourceBundle RESOURCE_BUNDLE =
+ ResourceBundle.getBundle(Messages.class.getName());
private Messages() {
}
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/messages.properties b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.properties
index 865733a189..d10fe987dc 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/messages.properties
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Messages.properties
@@ -43,4 +43,6 @@ UISelectWidget_ErrorNoneSelected0=Please choose a value for {0}
UITextWidget.0=\ Project already exists in workspace.
SimpleElementException.0=This Operation not supported on InputUIElement
TemplateEngineMessage.Error=CDT New Project Wizard Template Engine Error
+TemplateEngine.internalError=Internal Error:
+TemplateEngine.templateEngine=Template Engine
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateEngineUIUtil.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateEngineUIUtil.java
index 8771769970..f51c3ebce6 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateEngineUIUtil.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateEngineUIUtil.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Bala Torati (Symbian) - Initial API and implementation
+ * Bala Torati (Symbian) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.templateengine;
@@ -20,7 +20,6 @@ import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.cdt.core.templateengine.TemplateEngineMessages;
import org.eclipse.cdt.core.templateengine.TemplateEngineUtil;
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
import org.eclipse.cdt.ui.CUIPlugin;
@@ -61,17 +60,17 @@ public class TemplateEngineUIUtil {
message = null;
}
} else {
- status = new Status(IStatus.ERROR, CUIPlugin.getPluginId(), -1, TemplateEngineMessages.getString("TemplateEngine.internalError") + message, t); //$NON-NLS-1$
+ status = new Status(IStatus.ERROR, CUIPlugin.getPluginId(), -1, Messages.getString("TemplateEngine.internalError") + message, t); //$NON-NLS-1$
}
} else {
- status = new Status(IStatus.ERROR, CUIPlugin.getPluginId(), -1, TemplateEngineMessages.getString("TemplateEngine.internalError") + message, null); //$NON-NLS-1$
+ status = new Status(IStatus.ERROR, CUIPlugin.getPluginId(), -1, Messages.getString("TemplateEngine.internalError") + message, null); //$NON-NLS-1$
}
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if(window == null){
IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows();
window = windows[0];
}
- ErrorDialog.openError(window.getShell(), TemplateEngineMessages.getString("TemplateEngine.templateEngine"), message, status); //$NON-NLS-1$
+ ErrorDialog.openError(window.getShell(), Messages.getString("TemplateEngine.templateEngine"), message, status); //$NON-NLS-1$
}
/**
@@ -87,7 +86,7 @@ public class TemplateEngineUIUtil {
IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows();
window = windows[0];
}
- ErrorDialog.openError(window.getShell(), TemplateEngineMessages.getString("TemplateEngine.templateEngine"), message, status); //$NON-NLS-1$
+ ErrorDialog.openError(window.getShell(), Messages.getString("TemplateEngine.templateEngine"), message, status); //$NON-NLS-1$
}
}
diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java
index 86a6afad40..135539f648 100644
--- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java
+++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java
@@ -13,16 +13,16 @@ package org.eclipse.cdt.internal.build.crossgcc;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.build.crossgcc.messages"; //$NON-NLS-1$
public static String SetCrossCommandWizardPage_browse;
public static String SetCrossCommandWizardPage_description;
public static String SetCrossCommandWizardPage_name;
public static String SetCrossCommandWizardPage_path;
public static String SetCrossCommandWizardPage_prefix;
public static String SetCrossCommandWizardPage_title;
+
static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ // Initialize resource bundle.
+ NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/messages.properties b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties
index aed22f3dc2..aed22f3dc2 100644
--- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/messages.properties
+++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties

Back to the top