public virtual SourcePoint PaintPrefix(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint)
        {
            SourcePoint result = startPointToPaint;
            if (Settings.Enabled && MeetsLengthRquirement(block)) 
            {
                args.AddForegroundAdornment( new BlockPrefixDocumentAdornment(startPointToPaint, Settings));

                result = startPointToPaint.OffsetPoint(0, Settings.PrefixText.Length + 1);
            }
            return result;
        }
        public virtual SourcePoint PaintPrefix(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint)
        {
            SourcePoint result = startPointToPaint;

            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                args.AddForegroundAdornment(new BlockPrefixDocumentAdornment(startPointToPaint, Settings));

                result = startPointToPaint.OffsetPoint(0, Settings.PrefixText.Length + 1);
            }
            return(result);
        }
        public override SourcePoint PaintBlock(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint, bool multipleBlocksOnLine)
        {
            SourcePoint result = startPointToPaint;
            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                string customMetaString = String.Format("{0} '{1}'", Settings.BlockTypeName, (block as Struct).Name);
                
                args.AddForegroundAdornment(
                    new BlockMetaDataDocumentAdornment(startPointToPaint, Settings, customMetaString));

                result.OffsetPoint(0, customMetaString.Length);
            }
            return result;
        }
        public override SourcePoint PaintBlock(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint, bool multipleBlocksOnLine)
        {
            SourcePoint result = startPointToPaint;

            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                string customMetaString = GetMethodMetaString(block as Method);

                args.AddForegroundAdornment(new BlockMetaDataDocumentAdornment(startPointToPaint, Settings, customMetaString));

                result = startPointToPaint.OffsetPoint(0, customMetaString.Length);
            }

            return(result);
        }
        public override SourcePoint PaintBlock(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint, bool multipleBlocksOnLine)
        {
            SourcePoint result = startPointToPaint;
            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                StringBuilder customMetaBuilder = new StringBuilder();
                customMetaBuilder.Append(String.Format("{0} '{1}'", Settings.BlockTypeName, (block as Class).Name));
                GenericBlock.AppendGenericTypes(block as AccessSpecifiedElement, customMetaBuilder);
                GenericBlock.AppendGenericTemplate(block as AccessSpecifiedElement, customMetaBuilder);

                args.AddForegroundAdornment(
                    new BlockMetaDataDocumentAdornment(startPointToPaint, Settings, customMetaBuilder.ToString()));

                result = startPointToPaint.OffsetPoint(0, customMetaBuilder.Length);
            }
            return result;
        }
Beispiel #6
0
        public override SourcePoint PaintBlock(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint, bool multipleBlocksOnLine)
        {
            SourcePoint result = startPointToPaint;

            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                StringBuilder customMetaBuilder = new StringBuilder();
                customMetaBuilder.Append(String.Format("{0} '{1}'", Settings.BlockTypeName, (block as Class).Name));
                GenericBlock.AppendGenericTypes(block as AccessSpecifiedElement, customMetaBuilder);
                GenericBlock.AppendGenericTemplate(block as AccessSpecifiedElement, customMetaBuilder);

                args.AddForegroundAdornment(
                    new BlockMetaDataDocumentAdornment(startPointToPaint, Settings, customMetaBuilder.ToString()));

                result = startPointToPaint.OffsetPoint(0, customMetaBuilder.Length);
            }
            return(result);
        }
        public virtual SourcePoint PaintBlock(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint, bool multipleBlocksOnLine)
        {
            SourcePoint result = startPointToPaint;
            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                StringBuilder metaDataBuilder = new StringBuilder();
                metaDataBuilder.Append(Settings.BlockTypeName);

                if(Settings.ShowDetailedBlockMetaData)
                {
                    DetailedBlockMetaData.AppendDetailedBlockMetaData(block,multipleBlocksOnLine,metaDataBuilder);
                }

                args.AddForegroundAdornment( new BlockMetaDataDocumentAdornment(startPointToPaint, Settings, metaDataBuilder.ToString()));

                result = new SourcePoint(block.EndLine,  startPointToPaint.Offset + Settings.BlockTypeName.Length);
            }

            return result;
        }
        public virtual SourcePoint PaintBlock(DelimiterCapableBlock block, DecorateLanguageElementEventArgs args, SourcePoint startPointToPaint, bool multipleBlocksOnLine)
        {
            SourcePoint result = startPointToPaint;

            if (Settings.Enabled && MeetsLengthRquirement(block))
            {
                StringBuilder metaDataBuilder = new StringBuilder();
                metaDataBuilder.Append(Settings.BlockTypeName);

                if (Settings.ShowDetailedBlockMetaData)
                {
                    DetailedBlockMetaData.AppendDetailedBlockMetaData(block, multipleBlocksOnLine, metaDataBuilder);
                }

                args.AddForegroundAdornment(new BlockMetaDataDocumentAdornment(startPointToPaint, Settings, metaDataBuilder.ToString()));

                result = new SourcePoint(block.EndLine, startPointToPaint.Offset + Settings.BlockTypeName.Length);
            }

            return(result);
        }