Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2010-02-01 09:05:31 +0000
committerMarkus Schorn2010-02-01 09:05:31 +0000
commitc8b415d0d5d57a5cc6b0b3ba749c09f2935b892b (patch)
treee3d421802202e75b768ecf207895b4f9146b0e8e
parenta079cdccdbeeced71b97cbf1d8a37cfd3e2a20fb (diff)
downloadorg.eclipse.cdt-c8b415d0d5d57a5cc6b0b3ba749c09f2935b892b.tar.gz
org.eclipse.cdt-c8b415d0d5d57a5cc6b0b3ba749c09f2935b892b.tar.xz
org.eclipse.cdt-c8b415d0d5d57a5cc6b0b3ba749c09f2935b892b.zip
Bug 300371: Improve error message.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties1
2 files changed, 5 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java
index 0090acfa1c5..8fcec290274 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java
@@ -1219,6 +1219,10 @@ public class PDOMManager implements IWritableIndexManager, IListener {
version= (version << 8) + (b & 0xff);
out.write(b);
}
+ if (version > PDOM.getMaxSupportedVersion()) {
+ final IStatus status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, 0, CCorePlugin.getResourceString("PDOMManager.unsupportedHigherVersion"), null); //$NON-NLS-1$
+ throw new CoreException(status);
+ }
if ( !PDOM.isSupportedVersion( version ) ) {
final IStatus status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, 0, CCorePlugin.getResourceString("PDOMManager.unsupportedVersion"), null); //$NON-NLS-1$
throw new CoreException(status);
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties
index e187a76d9b0..b1f5fe462ef 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties
@@ -80,6 +80,7 @@ pdom.indexer.name=C/C++ Indexer
pdom.indexer.task=Indexing
PDOMIndexerJob.updateMonitorJob=Update Monitor
PDOMManager.unsupportedVersion=The team-shared index cannot be imported, its format is no longer supported.
+PDOMManager.unsupportedHigherVersion=The team-shared index cannot be imported, it has been created with a more recent version of CDT.
ProjectDescription.ProjectNotAccessible=Project: {0} is closed or inaccessible\!
CCoreInternals.savePreferencesJob=Save preferences
CConfigBasedDescriptorManager.0=the project is not a CDT project

Back to the top