From d72a8b3f5d1e09e392eff2f909bdd9852854846a Mon Sep 17 00:00:00 2001 From: John Camelon Date: Tue, 20 Apr 2004 20:38:20 +0000 Subject: [PATCH] Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58717 --- .../parser/ChangeLog-parser | 3 +++ .../core/parser/scanner/ScannerUtility.java | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog-parser b/core/org.eclipse.cdt.core/parser/ChangeLog-parser index 9f39d66de62..78fa9551984 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog-parser +++ b/core/org.eclipse.cdt.core/parser/ChangeLog-parser @@ -1,3 +1,6 @@ +2004-04-20 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58717 + 2004-04-20 John Camelon Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=59134 Partially fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58858 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerUtility.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerUtility.java index 86c795ad435..6383766de8a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerUtility.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerUtility.java @@ -36,6 +36,8 @@ public class ScannerUtility { */ static String reconcilePath(String originalPath ) { if( originalPath == null ) return null; + originalPath = removeQuotes( originalPath ); + String [] segments = originalPath.split( "[/\\\\]" ); //$NON-NLS-1$ if( segments.length == 1 ) return originalPath; Vector results = new Vector(); @@ -63,6 +65,21 @@ public class ScannerUtility { } + /** + * @param originalPath + * @return + */ + private static String removeQuotes(String originalPath) { + String [] segments = originalPath.split( "\""); + if( segments.length == 1 ) return originalPath; + StringBuffer result = new StringBuffer(); + for( int i = 0; i < segments.length; ++ i ) + if( segments[i] != null ) + result.append( segments[i]); + return result.toString(); + } + + static CodeReader createReaderDuple( String path, String fileName, ISourceElementRequestor requestor, Iterator workingCopies ) { String finalPath = createReconciledPath(path, fileName);