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 1515package org .eclipse .core .internal .resources ;
1616
1717import java .net .URI ;
18+ import java .text .MessageFormat ;
1819import java .util .Map ;
1920import java .util .concurrent .ConcurrentHashMap ;
2021import org .eclipse .core .filesystem .URIUtil ;
@@ -159,8 +160,10 @@ public IProject getProject(String name) {
159160 Project result = projectTable .get (name );
160161 if (result == null ) {
161162 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 );
164167 //try to get the project using a canonical name
165168 String canonicalName = projectPath .lastSegment ();
166169 result = projectTable .computeIfAbsent (canonicalName , n -> new Project (projectPath , workspace ));
You can’t perform that action at this time.
0 commit comments