Example #1
0
        private bool IsWithinScope(OraclePlSqlElement element)
        {
            var isWithinScope          = element.ScopeNode?.SourcePosition.Contains(_plSqlReference.IdentifierNode.SourcePosition) ?? true;
            var elementDefinitionIndex = element.DefinitionNode?.SourcePosition.IndexStart;

            return(isWithinScope && elementDefinitionIndex < _plSqlReference.IdentifierNode.SourcePosition.IndexStart);
        }
Example #2
0
        public void VisitPlSqlElement(OraclePlSqlElement element)
        {
            var variablePrefix = _plSqlReference.ObjectNode == null ? null : _plSqlReference.FullyQualifiedObjectName.NormalizedName;
            var isPrefixValid  = variablePrefix == null || GetScopeNames(_currentProgram).Any(n => String.Equals(variablePrefix, n));

            IsMatch = isPrefixValid && String.Equals(element.Name, _plSqlReference.NormalizedName) && IsWithinScope(element);
        }