コード例 #1
0
        public override IEnumerable <CodeAction> GetActions(Ide.Gui.Document document, object refactoringContext, ICSharpCode.NRefactory.TextLocation loc, System.Threading.CancellationToken cancellationToken)
        {
            if (!DLanguageBinding.IsDFile(document.FileName))
            {
                yield break;
            }

            var imports = GetSolutions(document); //it may be a bit too slow

            foreach (var i in imports)
            {
                yield return(new InnerAction(i));
            }
        }
コード例 #2
0
 public override void Run(Ide.Gui.Document document, ICSharpCode.NRefactory.TextLocation loc)
 {
     ApplySolution(Title, document);
 }
コード例 #3
0
 public static Location AsLocation(this ICSharpCode.NRefactory.TextLocation location)
 {
     return(new Location(location.Line - 1, location.Column - 1));
 }
コード例 #4
0
        /// </summary>
        /// <param name="textBox"></param>
        /// <param name="location"></param>
        /// <returns></returns>/////////////////////////////////////////////////////////////////////////////////////////////////////



        int GetOffset(RichTextBox textBox, ICSharpCode.NRefactory.TextLocation location)  /*Get Node From Here*/
        {
            return(textBox.GetFirstCharIndexFromLine(location.Line - 1) + location.Column - 1);
        }
コード例 #5
0
        /*************************************END OF USE CASE*************************************************/

        int GetOffset(RichTextBox textBox, ICSharpCode.NRefactory.TextLocation location)  //////////////Get Node From Here
        {
            // TextBox uses 0-based coordinates, TextLocation is 1-based
            return(textBox.GetFirstCharIndexFromLine(location.Line - 1) + location.Column - 1);
        }
コード例 #6
0
 public int GetOffset(ICSharpCode.NRefactory.TextLocation location)
 {
     throw new NotImplementedException();
 }