File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 15
15
package org .eclipse .core .internal .resources ;
16
16
17
17
import java .net .URI ;
18
+ import java .text .MessageFormat ;
18
19
import java .util .Map ;
19
20
import java .util .concurrent .ConcurrentHashMap ;
20
21
import org .eclipse .core .filesystem .URIUtil ;
@@ -159,8 +160,10 @@ public IProject getProject(String name) {
159
160
Project result = projectTable .get (name );
160
161
if (result == null ) {
161
162
IPath projectPath = new Path (null , name ).makeAbsolute ();
162
- String message = "Path for project must have only one segment." ; //$NON-NLS-1$
163
- Assert .isLegal (projectPath .segmentCount () == ICoreConstants .PROJECT_SEGMENT_LENGTH , message );
163
+ int segmentCount = projectPath .segmentCount ();
164
+ String message = MessageFormat .format ("Path for project must have only one segment but has {0}: {1}" , //$NON-NLS-1$
165
+ segmentCount , projectPath );
166
+ Assert .isLegal (segmentCount == ICoreConstants .PROJECT_SEGMENT_LENGTH , message );
164
167
//try to get the project using a canonical name
165
168
String canonicalName = projectPath .lastSegment ();
166
169
result = projectTable .computeIfAbsent (canonicalName , n -> new Project (projectPath , workspace ));
You can’t perform that action at this time.
0 commit comments