Example #1
0
        private static FileSystemPath GetBasePathBeforeMapping(IQualifiableReferenceWithGlobalSymbolTable pathReference)
        {
            IQualifier qualifier = pathReference.GetQualifier();

            if (qualifier == null)
            {
                IProjectFile file = pathReference.GetTreeNode().GetSourceFile().ToProjectFile();
                Assertion.AssertNotNull(file, "fileFullName == null");
                return(file.Location.Directory);
            }

            var reference = qualifier as IReference;

            if (reference != null)
            {
                ResolveResultWithInfo resolveResultWithInfo = (reference).Resolve();
                var pathDeclaredElement = resolveResultWithInfo.DeclaredElement as IPathDeclaredElement;
                if (pathDeclaredElement == null)
                {
                    return(FileSystemPath.Empty);
                }

                return(pathDeclaredElement.Path);
            }

            var pathQualifier = qualifier as IPathQualifier;

            if (pathQualifier != null)
            {
                return(pathQualifier.Path);
            }

            return(FileSystemPath.Empty);
        }
 public bool PreferQualifiedReference(IQualifiableReferenceWithGlobalSymbolTable reference)
 {
     return(true);
 }
 public bool PreferQualifiedReference(IQualifiableReferenceWithGlobalSymbolTable reference)
 {
     return reference.GetTreeNode().GetSettingsStore().GetValue(CSharpUsingSettingsAccessor.PreferQualifiedReference);
 }
 public bool PreferQualifiedReference(IQualifiableReferenceWithGlobalSymbolTable reference)
 {
     // TODO: use settings
     return false;
 }
Example #5
0
 public bool PreferQualifiedReference(IQualifiableReferenceWithGlobalSymbolTable reference)
 {
     // TODO: use settings
     return(false);
 }