public override int GuessBestMethodOverload(CodeCompletion.ParameterHintingResult provider, int currentOverload)
 {
     if (!IsActiveExtension())
     {
         return(-1);
     }
     return(completionTextEditorExtension.GuessBestMethodOverload(provider, currentOverload));
 }
コード例 #2
0
 public override Task <int> GuessBestMethodOverload(CodeCompletion.ParameterHintingResult provider, int currentOverload, System.Threading.CancellationToken token)
 {
     if (!IsActiveExtension())
     {
         return(Task.FromResult(-1));
     }
     return(completionTextEditorExtension.GuessBestMethodOverload(provider, currentOverload, token));
 }
コード例 #3
0
        static async void UpdateOverload(CompletionTextEditorExtension ext, ICompletionWidget widget, CancellationToken token)
        {
            if (currentMethodGroup == null || window == null)
            {
                return;
            }

            // If the user enters more parameters than the current overload has,
            // look for another overload with more parameters.

            int bestOverload = await ext.GuessBestMethodOverload(currentMethodGroup.MethodProvider, currentMethodGroup.CurrentOverload, token);

            if (bestOverload != -1)
            {
                currentMethodGroup.CurrentOverload = bestOverload;
                window.ChangeOverload();
                UpdateWindow(ext, widget);
            }
        }
コード例 #4
0
        static void UpdateOverload(CompletionTextEditorExtension ext, ICompletionWidget widget)
        {
            if (methods.Count == 0 || window == null)
            {
                return;
            }

            // If the user enters more parameters than the current overload has,
            // look for another overload with more parameters.
            MethodData md = methods [methods.Count - 1];

            int bestOverload = ext.GuessBestMethodOverload(md.MethodProvider, md.CurrentOverload);

            if (bestOverload != -1)
            {
                md.CurrentOverload = bestOverload;
                window.ChangeOverload();
                UpdateWindow(ext, widget);
            }
        }
コード例 #5
0
		static void UpdateOverload (CompletionTextEditorExtension ext, ICompletionWidget widget)
		{
			if (currentMethodGroup == null || window == null)
				return;

			// If the user enters more parameters than the current overload has,
			// look for another overload with more parameters.

			int bestOverload = ext.GuessBestMethodOverload (currentMethodGroup.MethodProvider, currentMethodGroup.CurrentOverload);
			if (bestOverload != -1) {
				currentMethodGroup.CurrentOverload = bestOverload;
				window.ChangeOverload ();
				UpdateWindow (ext, widget);
			}
		}
コード例 #6
0
		static void UpdateOverload (CompletionTextEditorExtension ext, ICompletionWidget widget)
		{
			if (methods.Count == 0 || window == null)
				return;
			
			// If the user enters more parameters than the current overload has,
			// look for another overload with more parameters.
			MethodData md = methods [methods.Count - 1];

			int bestOverload = ext.GuessBestMethodOverload (md.MethodProvider, md.CurrentOverload);
			if (bestOverload != -1) {
				md.CurrentOverload = bestOverload;
				window.ChangeOverload ();
				UpdateWindow (ext, widget);
			}
		}