mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
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
This commit is contained in:
parent
de94789d8d
commit
cb338485bf
3 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue