public ReplacingAllowedPrefixCharsScopePoint(ITemplateScopePoint innerScopePoint, IDocument document, int caretOffset, char[] allowedPrefixChars)
            : base(innerScopePoint)
        {
            this.allowedPrefixChars = allowedPrefixChars;

            Prefix = CalcPrefix(document, caretOffset);
        }
        public ReplacingAllowedPrefixCharsScopePoint(ITemplateScopePoint innerScopePoint, DocumentOffset caretOffset, char[] allowedPrefixChars)
            : base(innerScopePoint)
        {
            this.allowedPrefixChars = allowedPrefixChars;

            Prefix = CalcPrefix(caretOffset);
        }
示例#3
0
 public override string Present(ITemplateScopePoint point)
 {
     if (point is InUnityShaderLabFile)
     {
         return("Anywhere in Unity ShaderLab file");
     }
     return(base.Present(point));
 }
 public override string Present(ITemplateScopePoint point)
 {
     if (point is InGodotCSharpProject)
     {
         return("In Godot project");
     }
     return(base.Present(point));
 }
        public ReplacingAllowedPrefixCharsScopePoint(ITemplateScopePoint innerScopePoint, IDocument document, int caretOffset, char[] allowedPrefixChars)
            : base(innerScopePoint)
        {
            this.allowedPrefixChars = allowedPrefixChars;

            // ReSharper disable DoNotCallOverridableMethodsInConstructor
            Prefix = CalcPrefix(document, caretOffset);
            // ReSharper restore DoNotCallOverridableMethodsInConstructor
        }
        public ReplacingAllowedPrefixCharsScopePoint(ITemplateScopePoint innerScopePoint, IDocument document, int caretOffset, char[] allowedPrefixChars)
            : base(innerScopePoint)
        {
            this.allowedPrefixChars = allowedPrefixChars;

// ReSharper disable DoNotCallOverridableMethodsInConstructor
            Prefix = CalcPrefix(document, caretOffset);
// ReSharper restore DoNotCallOverridableMethodsInConstructor
        }
示例#7
0
 public override string Present(ITemplateScopePoint point)
 {
     if (point is MustBeInUnityType)
     {
         return("In Unity type where type members are allowed");
     }
     if (point is InUnityShaderLabFile)
     {
         return("Anywhere in Unity ShaderLab file");
     }
     return(base.Present(point));
 }
        // The real scope point is called, and passed in the allowed scope point from the template definition
        public override bool IsSubsetOf(ITemplateScopePoint allowed)
        {
            if (!base.IsSubsetOf(allowed))
            {
                return(false);
            }

            if (allowed is MustBeInProjectWithUnityVersion allowedScopePoint)
            {
                var allowedVersion = allowedScopePoint.myActualVersion;
                return(allowedVersion <= myActualVersion);
            }

            return(true);
        }
示例#9
0
 public override string Present(ITemplateScopePoint point)
 {
     if (point is IsAvailableForClassAttribute)
     {
         return("In C# file where class attribute is available");
     }
     if (point is InUnityCSharpProject)
     {
         return("In Unity project");
     }
     if (point is MustBeInUnityType)
     {
         return("In Unity type where type members are allowed");
     }
     if (point is InUnityShaderLabFile)
     {
         return("In Unity ShaderLab file");
     }
     return(base.Present(point));
 }
示例#10
0
        public override string Present(ITemplateScopePoint point)
        {
            switch (point)
            {
            case InUnityCSharpProject _:
                return("In Unity project");

            case MustBeInUnityCSharpFile _:
                return("In Unity C# file");

            case MustBeInUnityType _:
                return("In Unity type where type members are allowed");

            case MustBeInUnitySerializableType _:
                return("In Unity serializable type where type members are allowed");

            case InUnityShaderLabFile _:
                return("In Unity ShaderLab file");

            default:
                return(base.Present(point));
            }
        }
示例#11
0
 public virtual bool IsSubsetOf(ITemplateScopePoint other)
 {
     return(innerScopePoint.IsSubsetOf(other));
 }
示例#12
0
 protected DelegatingScopePoint(ITemplateScopePoint innerScopePoint)
 {
     this.innerScopePoint = innerScopePoint;
 }
 public bool IsSubsetOf(ITemplateScopePoint other)
 {
     return innerScopePoint.IsSubsetOf(other);
 }
        public DelegatingScopePoint(ITemplateScopePoint innerScopePoint, IDocument document, int caretOffset)
        {
            this.innerScopePoint = innerScopePoint;

            Prefix = CalcPrefix(document, caretOffset);
        }
 protected DelegatingScopePoint(ITemplateScopePoint innerScopePoint)
 {
     this.innerScopePoint = innerScopePoint;
 }
        public DelegatingScopePoint(ITemplateScopePoint innerScopePoint, IDocument document, int caretOffset)
        {
            this.innerScopePoint = innerScopePoint;

            Prefix = CalcPrefix(document, caretOffset);
        }