diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index b012b83ef1d..668a5ec480e 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,10 @@ +2004-09-22 Chris Wiebe + + show warnings instead of errors for invalid filenames + workaround for bug#24152 + * index/org/eclipse/cdt/internal/core/messages.properties + * src/org/eclipse/cdt/core/CConventions.java + 2004-09-22 Chris Wiebe added file naming conventions diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/messages.properties b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/messages.properties index 4725c5de4e7..15a76441be2 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/messages.properties +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/messages.properties @@ -44,6 +44,7 @@ convention.namespace.invalidName= Namespace is invalid convention.filename.nullName=File name is blank convention.filename.invalid=File name contains illegal characters +convention.filename.possiblyInvalid=File name contains non-standard or illegal characters convention.filename.nameWithBlanks=File name contains spaces convention.headerFilename.filetype=File extension does not correspond to known header file types convention.sourceFilename.filetype=File extension does not correspond to known source file types diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CConventions.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CConventions.java index 4dafb90c47b..e622cfe0ae1 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CConventions.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CConventions.java @@ -326,6 +326,8 @@ public class CConventions { return false; } + //TODO we need platform-independent validation, see bug#24152 + int len = name.length(); // if (Character.isWhitespace(name.charAt(0)) || Character.isWhitespace(name.charAt(len - 1))) { // return false; @@ -358,7 +360,9 @@ public class CConventions { return new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, Util.bind("convention.filename.nullName"), null); //$NON-NLS-1$ } if (!isLegalFilename(name)) { - return new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, Util.bind("convention.filename.invalid"), null); //$NON-NLS-1$ + //TODO we need platform-independent validation, see bug#24152 + //return new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, Util.bind("convention.filename.invalid"), null); //$NON-NLS-1$ + return new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, -1, Util.bind("convention.filename.possiblyInvalid"), null); //$NON-NLS-1$ } String trimmed = name.trim();