private static void AddPlugins() { mPlugins.Clear(); mPlugins.Add(new ImportExportPlugin()); mPlugins.Add(new TemplateInstantiationPlugin()); mPlugins.Add(new CodeReplicationPlugin()); mPlugins.Add(new ImportExportGroupsPlugin()); mPlugins.Add(ScopeBlock.GetInstance()); }
public override void CacheForProcessing() { if (LoopDetection == true) { mError = true; Console.WriteLine("ERROR: Circular Reference detected within ScopeBlocks"); return; } mLabels.CacheForProcessing(); mTypes.CacheForProcessing(); LoopDetection = true; foreach (var lTag in mScopes) { mScopeBodies.Add(ScopeBlock.GetInstance().GetScopeFromTag(lTag)); } LoopDetection = false; }
public void ImportSubScopes() { ScopeBlock lAllScopes = ScopeBlock.GetInstance(); foreach (string lSubScope in mScopes) { lAllScopes.GetScopeFromTag(lSubScope).ImportSubScopes(); var currScope = lAllScopes.GetScopeFromTag(lSubScope); foreach (var ltemptype in currScope.mTypes.templateType) { if (!mTypes.templateType.Contains(ltemptype)) { mTypes.templateType.Add(ltemptype); } } if (mLabels.templateLabels == null) { mLabels.templateLabels = new List <string>(); } if (currScope.mLabels.templateLabels != null) { foreach (var lTempLabel in currScope.mLabels.templateLabels) { if (!mLabels.templateLabels.Contains(lTempLabel)) { mLabels.templateLabels.Add(lTempLabel); } foreach (var lLabelsets in currScope.mLabels.templateLabelSets) { if (!mLabels.templateLabelSets.Contains(lLabelsets)) { mLabels.templateLabelSets.Add(lLabelsets); } } } } } }