private void setVarDynamism(AST.AstNode node) { var IdNode = node as AST.IdDeclaration; if (IdNode == null) { return; } var varpath = new VarPath(); varpath.VarName = IdNode.Identifier; varpath.NamespaceName = currentNamespace == null ? "": currentNamespace; varpath.ClassName = currentClassName; varpath.MethodName = currentMethodName; varpath.InterfaceName = currentInterfaceName; if (this.dynamicBehaviour == DynamicBehaviour.EVERYTHINGDYNAMIC) { //Set dynamic only if its not dynamic allready if (!this.dynVarManager.IsDynamic(varpath)) { dynVarManager.SetDynamic(varpath); } } else { if (this.dynVarManager.IsDynamic(varpath)) { dynVarManager.SetStatic(varpath); } } }
public void makeVarStatic(string varName, int line, int column, SourceFile ast) { VarPath varpath = this.getVarPath(varName, line, column, ast); DynVarManager dynVarManager = new DynVarManager(); string filename = Path.ChangeExtension(ast.Location.FileName, DynVarManagement.DynVarManager.DynVarFileExt); dynVarManager.LoadOrCreate(filename); dynVarManager.SetStatic(varpath); dynVarManager.Save(); }