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; } } }
public override void Dispose() { HaxeCompilerManager.StopServer(); base.Dispose(); }
protected override bool OnGetCanExecute(ExecutionContext context, ConfigurationSelector configurationSelector) { HaxeProjectConfiguration haxeConfig = (HaxeProjectConfiguration)GetConfiguration(configurationSelector); return(HaxeCompilerManager.CanRun(this, haxeConfig, context)); }
protected override BuildResult DoBuild(IProgressMonitor monitor, ConfigurationSelector configurationSelector) { HaxeProjectConfiguration haxeConfig = (HaxeProjectConfiguration)GetConfiguration(configurationSelector); return(HaxeCompilerManager.Compile(this, haxeConfig, monitor)); }
protected override void DoExecute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configurationSelector) { HaxeProjectConfiguration haxeConfig = (HaxeProjectConfiguration)GetConfiguration(configurationSelector); HaxeCompilerManager.Run(this, haxeConfig, monitor, context); }