Ejemplo n.º 1
0
		public void InsertNewLine (ITextDocument editor, NewLineInsertion insertion, ref int offset)
		{
			string str = null;
			switch (insertion) {
			case NewLineInsertion.Eol:
				str = editor.GetEolMarker ();
				break;
			case NewLineInsertion.BlankLine:
				str = editor.GetEolMarker () + editor.GetEolMarker ();
				break;
			default:
				return;
		}

			editor.InsertText (offset, str);
			offset += str.Length;
		}
Ejemplo n.º 2
0
        public void InsertNewLine(ITextDocument editor, NewLineInsertion insertion, ref int offset)
        {
            string str = null;

            switch (insertion)
            {
            case NewLineInsertion.Eol:
                str = editor.GetEolMarker();
                break;

            case NewLineInsertion.BlankLine:
                str = editor.GetEolMarker() + editor.GetEolMarker();
                break;

            default:
                return;
            }

            editor.InsertText(offset, str);
            offset += str.Length;
        }
Ejemplo n.º 3
0
        public static CodeGenerator CreateGenerator(ITextDocument editor, ICompilation compilation)
        {
            MimeTypeExtensionNode node;

            if (!generators.TryGetValue(editor.MimeType, out node))
            {
                return(null);
            }

            var result = (CodeGenerator)node.CreateInstance();

            //result.UseSpaceIndent = editor.Options.TabsToSpaces;
            result.EolMarker = editor.GetEolMarker();
            //result.TabSize = editor.Options.TabSize;
            //result.Compilation = compilation;

            return(result);
        }
		public static CodeGenerator CreateGenerator (ITextDocument editor, ICompilation compilation)
		{
			MimeTypeExtensionNode node;
			if (!generators.TryGetValue (editor.MimeType, out node))
				return null;

			var result = (CodeGenerator)node.CreateInstance ();

			//result.UseSpaceIndent = editor.Options.TabsToSpaces;
			result.EolMarker = editor.GetEolMarker ();
			//result.TabSize = editor.Options.TabSize;
			//result.Compilation = compilation;

			return result;
		}