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); }
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 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); }
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)); }
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)); } }
public virtual bool IsSubsetOf(ITemplateScopePoint other) { return(innerScopePoint.IsSubsetOf(other)); }
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); }