Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Analysis and solutions for Open Declaration/Definition: incorrect editor opened #2

Title: Analysis and solutions for Open Declaration/Definition: incorrect editor opened #2

* Oops, this is also part of that fix.  In order to make ExternalEditor files work better when navigation leads back to them, I had to override #getPath(), #getResource(), and #getUnderlyingResource() for CFileElementWorkingCopy to return the ITranslationUnit's versions of this:

        public IPath getPath() {
                return unit.getPath();
        }
       
        public IResource getResource() {
                return unit.getResource();
        }
       
        public IResource getUnderlyingResource() {
                return unit.getUnderlyingResource();
        }

Similarly for ExternalTranslationUnit, it should implement #getUnderlyingResource() to return null, otherwise it returns the project, which has all sorts of problematic results.

I'm unsure of these two changes -- do they have other ramifications? 

-- Ed


Back to the top