Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Linked Resource Bug with class CSearchResultPage

If you use WinCVS or CVSNT you can access the repository via HTTP proxy.
Or, you could use CVSGrab via HTTP as well, but be forewarned that it is
sloooooooow.

Apparently the HTTP proxy functionality was finally accepted into the
mainline CVS a few months ago so in the future it ought to be easier to
find an HTTP capable CVS.  Now if only the Team plugins knew how to use
it...

___________________________________________
 
Chris Recoskie
Software Designer
IDE Frameworks Group
Texas Instruments, Toronto
 
 

> -----Original Message-----
> From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On
> Behalf Of cebarne2@xxxxxxxxxxxxxxxxxxx
> Sent: Monday, October 11, 2004 11:49 AM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] Linked Resource Bug with class CSearchResultPage
> 
> CDT Devs,
> 
> I think I found an issue with the CSearchResultPage class that is
making
> it
> troublesome for us to navigate throughout our source code (all of
which is
> in linked resources).  The method I believe is causing the problem is
> below:
> 
> private IFile getCanonicalFile(IFile originalFile){
> 
>       if (originalFile == null)
>             return null;
> 
>       File tempFile = originalFile.getRawLocation().toFile();
>       String canonicalPath = null;
>       try {
>             canonicalPath = tempFile.getCanonicalPath();
>       } catch (IOException e1) {}
> 
>       if (canonicalPath != null && (!(originalFile.isLinked()))){
>             IPath path = new Path(canonicalPath);
>             originalFile =
> CUIPlugin.getWorkspace().getRoot().getFileForLocation(path);
>       }
>       return originalFile;
> }
> 
> In my case, the search result is a child of a linked resource.  I can
get
> the result, but if I double-click it (to open it), an exception
occurs.
> The cause of the exception is that this method returns null.
> Specifically,
> "getFileForLocation(path)" returns null because the "path" is the
child of
> a linked resource (this is documented behavior in the javaDoc).
Perhaps
> this should be replaced with "findFilesForLocation(path)", and return
the
> first match?
> 
> Note that "isLinked()" returns false for this result because it is the
> child of a linked resource, not the linked resource itself.  Maybe we
> shouldn't even be entering this if-statement...
> 
> I wanted to try to fix this myself, but come to realize I do not have
> access to the CVS repository from behind my company's firewall.  Is
there
> an alternate way to get the CDT projects?
> 
> Chad Barnes
> Rockwell Collins Inc.
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top