Esempio n. 1
0
        private void FetchCompletionData(CodeCompletionContext completionContext)
        {
            if (completionContext != null && completionContext.TriggerOffset != mCacheTriggerOffset)
            {
                mCacheTriggerOffset = completionContext.TriggerOffset;
                File.WriteAllText(mTempFileName, Document.Editor.Text);

                string data = HaxeCompilerManager.GetCompletionData(Document.Project, mTempBaseDirectory, mTempFileName, mCacheTriggerOffset);

                //MonoDevelop.Ide.MessageService.ShowMessage (data);

                try
                {
                    var xml = new XmlDocument();
                    xml.LoadXml(data);

                    if (xml.HasChildNodes)
                    {
                        if (xml.FirstChild.Name == "type")
                        {
                            mCacheIsObject = false;
                        }
                        else
                        {
                            mCacheIsObject = true;
                        }

                        mCacheXML         = xml;
                        mCacheXMLCurrent  = true;
                        mCacheTriggerLine = completionContext.TriggerLine;
                    }

                    return;
                }
                catch (Exception ex)
                {
                    ex.ToString();
                }

                mCacheXMLCurrent = false;
                //mCacheXML = null;
                return;
            }
            else
            {
                // temp hack to reset the cacheIsObject value for method completion
                if (mCacheXML != null && mCacheXML.FirstChild.Name == "type")
                {
                    mCacheIsObject = false;
                }
                else
                {
                    mCacheIsObject = true;
                }
            }
        }
Esempio n. 2
0
 public override void Dispose()
 {
     HaxeCompilerManager.StopServer();
     base.Dispose();
 }
Esempio n. 3
0
        protected override bool OnGetCanExecute(ExecutionContext context, ConfigurationSelector configurationSelector)
        {
            HaxeProjectConfiguration haxeConfig = (HaxeProjectConfiguration)GetConfiguration(configurationSelector);

            return(HaxeCompilerManager.CanRun(this, haxeConfig, context));
        }
Esempio n. 4
0
        protected override BuildResult DoBuild(IProgressMonitor monitor, ConfigurationSelector configurationSelector)
        {
            HaxeProjectConfiguration haxeConfig = (HaxeProjectConfiguration)GetConfiguration(configurationSelector);

            return(HaxeCompilerManager.Compile(this, haxeConfig, monitor));
        }
Esempio n. 5
0
        protected override void DoExecute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configurationSelector)
        {
            HaxeProjectConfiguration haxeConfig = (HaxeProjectConfiguration)GetConfiguration(configurationSelector);

            HaxeCompilerManager.Run(this, haxeConfig, monitor, context);
        }