コード例 #1
0
        public static void AddChangesToBounds(
            PreprocessedTextLocationMap map,
            List <PreprocessingTextChange> changes,
            PreprocessedData data,
            PreprocessedTextType type)
        {
            if (data == null)
            {
                return;
            }

            foreach (var change in changes)
            {
                if (change.RemoveCharsCount == 0)
                {
                    continue;
                }

                var start = change.Index;
                var end   = change.Index + change.RemoveCharsCount - 1;

                if (map != null)
                {
                    start = map.GetOriginalPosition(start, PositionRounding.Up);
                    end   = map.GetOriginalPosition(end, PositionRounding.Down);
                }

                data.PreprocessedTextBounds.Add(
                    new PreprocessedTextBound(
                        type, start, end));
            }
        }
コード例 #2
0
        public static void AddChangesToBounds(
            PreprocessedTextLocationMap map,
            List<PreprocessingTextChange> changes,
            PreprocessedData data,
            PreprocessedTextType type)
        {
            if (data == null)
            {
                return;
            }

            foreach (var change in changes)
            {
                if (change.RemoveCharsCount == 0)
                {
                    continue;
                }

                var start = change.Index;
                var end = change.Index + change.RemoveCharsCount - 1;

                if(map != null)
                {
                    start = map.GetOriginalPosition(start, PositionRounding.Up);
                    end = map.GetOriginalPosition(end, PositionRounding.Down);
                }

                data.PreprocessedTextBounds.Add(
                    new PreprocessedTextBound(
                        type, start, end));
            }
        }
コード例 #3
0
        public PreprocessedTextBound(PreprocessedTextType type, int start, int end)
        {
            Interval bound;

            bound.Start = start;
            bound.End   = end;

            Bound = bound;
            Type  = type;
        }
コード例 #4
0
        public PreprocessedTextBound(PreprocessedTextType type, int start, int end)
        {
            Interval bound;

            bound.Start = start;
            bound.End = end;

            Bound = bound;
            Type = type;
        }
コード例 #5
0
ファイル: Classifier.cs プロジェクト: xiangyuan/Unreal4
 string GetClassificationStringForPreprocessedText(PreprocessedTextType type)
 {
     switch (type)
     {
         case PreprocessedTextType.Comment:
             return "markdown.htmlcomment";
         case PreprocessedTextType.FilteredOut:
             return null;
         case PreprocessedTextType.Metadata:
             return "markdown.metadata";
         case PreprocessedTextType.Reference:
             return "markdown.url.definition";
         default:
             return null;
     }
 }
コード例 #6
0
        string GetClassificationStringForPreprocessedText(PreprocessedTextType type)
        {
            switch (type)
            {
            case PreprocessedTextType.Comment:
                return("markdown.htmlcomment");

            case PreprocessedTextType.FilteredOut:
                return(null);

            case PreprocessedTextType.Metadata:
                return("markdown.metadata");

            case PreprocessedTextType.Reference:
                return("markdown.url.definition");

            default:
                return(null);
            }
        }
コード例 #7
0
 public PreprocessedTextBound(PreprocessedTextType type, Interval bound)
 {
     Bound = bound;
     Type  = type;
 }
コード例 #8
0
 public PreprocessedTextBound(PreprocessedTextType type, Interval bound)
 {
     Bound = bound;
     Type = type;
 }