Пример #1
0
        public override IParameterDataProvider HandleParameterCompletion(CodeCompletionContext completionContext, char completionChar)
        {
            if (mCanRunCompletion)
            {
                if (mCacheIsObject || completionContext.TriggerOffset < mCacheTriggerOffset || completionContext.TriggerLine != mCacheTriggerLine)
                {
                    if (parameterDataProvider != null)
                    {
                        //parameterDataProvider.Clear ();
                        parameterDataProvider = null;
                    }
                }

                if (mCompletionEnabled)
                {
                    // HandleCodeCompletion is always called first, so we don't need to fetch completion data

                    if (completionChar == ')')
                    {
                        // invalidate cached completion
                        //mCacheXML = null;
                        mCacheIsObject = true;
                        if (parameterDataProvider != null)
                        {
                            //parameterDataProvider.Clear ();
                            parameterDataProvider = null;
                        }
                        //return null;
                    }

                    if (!mCacheIsObject && mCacheXML != null && completionContext.TriggerLine == mCacheTriggerLine)
                    {
                        if (parameterDataProvider == null)
                        {
                            parameterDataProvider = new HaxeParameterDataProvider();
                            parameterDataProvider.Update(completionContext, mCacheXML);
                            return(parameterDataProvider);
                        }
                    }
                    else
                    {
                        if (parameterDataProvider != null)
                        {
                            //parameterDataProvider.Clear ();
                            //parameterDataProvider = null;
                        }
                    }
                }
            }

            return(parameterDataProvider);
            //return null;
        }
		public override ParameterDataProvider HandleParameterCompletion (CodeCompletionContext completionContext, char completionChar)
		{
			//MonoDevelop.Ide.MessageService.ShowError ("HandleParameterCompletion");
			if (mCanRunCompletion)
			{
				if (mCacheIsObject || completionContext.TriggerOffset < mCacheTriggerOffset || completionContext.TriggerLine != mCacheTriggerLine)
				{
					if (parameterDataProvider != null)
					{
						//parameterDataProvider.Clear ();
						parameterDataProvider = null;
					}
				}
				
				if (mCompletionEnabled)
				{
					// HandleCodeCompletion is always called first, so we don't need to fetch completion data
					
					if (completionChar == ')')
					{
						// invalidate cached completion
						//mCacheXML = null;
						mCacheIsObject = true;
						if (parameterDataProvider != null)
						{
							//parameterDataProvider.Clear ();
							parameterDataProvider = null;
						}
						//return null;
					}
					
					if (!mCacheIsObject && mCacheXML != null && completionContext.TriggerLine == mCacheTriggerLine)
					{
						if (parameterDataProvider == null)
						{
							//MonoDevelop.Ide.MessageService.ShowError ("Create Data Provider");
							parameterDataProvider = new HaxeParameterDataProvider (completionContext.TriggerOffset);
							parameterDataProvider.Update (completionContext, mCacheXML);
							return parameterDataProvider;
						}
					}
					else
					{
						if (parameterDataProvider != null)
						{
							//parameterDataProvider.Clear ();
							//parameterDataProvider = null;
						}
					}
				}
			}
			
			return parameterDataProvider;
			//return null;
		}
        public override IParameterDataProvider HandleParameterCompletion(CodeCompletionContext completionContext, char completionChar)
        {
            if (mCompletionEnabled)
            {
                // HandleCodeCompletion is always called first, so we don't need to fetch completion data

                if (completionChar == ')' || completionContext.TriggerLine != mCacheTriggerLine)
                {
                    // invalidate cached completion
                    mCacheXML = null;
                }

                if (!mCacheIsObject && mCacheXML != null)
                {
                    if (parameterDataProvider == null)
                    {
                        parameterDataProvider = new HaxeParameterDataProvider ();
                        parameterDataProvider.Update (completionContext, mCacheXML);
                        return parameterDataProvider;
                    }
                }
                else
                {
                    if (parameterDataProvider != null)
                    {
                        parameterDataProvider.Clear ();
                        parameterDataProvider = null;
                    }
                }
            }

            return null;
        }