| Summary: | [resources] Need better message for resource files with leading whitespaces | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Sven Blösl <Sven.Bloesl> |
| Component: | Resources | Assignee: | Platform-Resources-Inbox <platform-resources-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Keywords: | helpwanted |
| Version: | 2.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
|
Description
Sven Blösl
A few requests: 1. Please provide steps that reproduce this problem 2. Attach the .metadata/log file Take any project you like, put a file called " whatever.notjava" (without the quotation marks) into some java source directory, so that it will be copied into the respective build directory. Refresh the project list. -> "The project was not built. It may be inconsistent, ..." in the task list and the log contains the following stack trace: org.eclipse.core.internal.resources.ResourceException: Names cannot begin or end with whitespace. at org.eclipse.core.internal.resources.Resource.checkValidPath (Resource.java:261) at org.eclipse.core.internal.resources.Resource.checkCopyRequirements (Resource.java:122) at org.eclipse.core.internal.resources.Resource.assertCopyRequirements (Resource.java:78) at org.eclipse.core.internal.resources.Resource.copy(Resource.java:350) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder$3.visit [...] at org.eclipse.core.internal.resources.Resource.accept(Resource.java:40) org.eclipse.jdt.internal.core.builder.BatchImageBuilder.copyExtraResourcesBack (BatchImageBuilder.java:116) [...] Eclipse naming conventions do not allow leading or trailing whitespaces in resources. There is no intention to change this behavior. Okay, whitespaces are not allowed. But it should give a proper error message, which gives a hint where to find the offending file. Otherwise it is burdensome to find it, if you create an eclipse-project on foreign code. Re-opening. Investigate putting the full path name in the exception. See Workspace.checkValidPath, Workspace.validateName. |