/// <summary> /// Loads the plugin settings /// </summary> public void LoadSettings() { this.settingObject = new ContextSettings(); if (!File.Exists(this.settingFilename)) { this.SaveSettings(); } else { Object obj = ObjectSerializer.Deserialize(this.settingFilename, this.settingObject); this.settingObject = (ContextSettings)obj; } if (this.settingObject.LanguageDefinitions == null) { this.settingObject.LanguageDefinitions = @"Library\PHP\intrinsic"; } this.settingObject.OnClasspathChanged += SettingObjectOnClasspathChanged; }
/// <summary> /// Loads the plugin settings /// </summary> public void LoadSettings() { this.settingObject = new ContextSettings(); if (!File.Exists(this.settingFilename)) this.SaveSettings(); else { Object obj = ObjectSerializer.Deserialize(this.settingFilename, this.settingObject); this.settingObject = (ContextSettings)obj; } if (this.settingObject.LanguageDefinitions == null) this.settingObject.LanguageDefinitions = @"Library\PHP\intrinsic"; this.settingObject.OnClasspathChanged += SettingObjectOnClasspathChanged; }
private List<InlineRange> phpRanges; // inlined PHP ranges in HTML public Context(ContextSettings initSettings) { langSettings = initSettings; /* AS-LIKE OPTIONS */ hasLevels = false; docType = "void"; /* DESCRIBE LANGUAGE FEATURES */ // language constructs features.hasPackages = false; features.hasImports = false; features.hasImportsWildcard = false; features.hasClasses = true; features.hasExtends = true; features.hasImplements = true; features.hasInterfaces = true; features.hasEnums = false; features.hasGenerics = false; features.hasEcmaTyping = false; features.hasVars = true; features.hasConsts = true; features.hasMethods = true; features.hasStatics = true; features.hasTryCatch = true; features.checkFileName = false; // allowed declarations access modifiers Visibility all = Visibility.Public | Visibility.Protected | Visibility.Private; features.classModifiers = all; features.varModifiers = all; features.methodModifiers = all; // default declarations access modifiers features.classModifierDefault = Visibility.Public; features.varModifierDefault = Visibility.Public; features.methodModifierDefault = Visibility.Public; // keywords features.dot = "->"; features.voidKey = "void"; features.objectKey = "Object"; features.typesPreKeys = new string[] { "namespace", "new", "extends", "implements", "as" }; features.codeKeywords = new string[] { "and", "or", "xor", "exception", "as", "break", "case", "continue", "declare", "default", "do", "else", "elseif", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", "for", "foreach", "global", "if", "new", "switch", "use", "while", "try", "catch", "throw" }; features.varKey = "var"; features.functionKey = "function"; features.staticKey = "static"; features.publicKey = "public"; features.privateKey = "private"; features.intrinsicKey = "extern"; /* INITIALIZATION */ settings = initSettings; //BuildClassPath(); // defered to first use }
private List <InlineRange> phpRanges; // inlined PHP ranges in HTML public Context(ContextSettings initSettings) { langSettings = initSettings; /* AS-LIKE OPTIONS */ hasLevels = false; docType = "void"; /* DESCRIBE LANGUAGE FEATURES */ // language constructs features.hasPackages = false; features.hasImports = false; features.hasImportsWildcard = false; features.hasClasses = true; features.hasExtends = true; features.hasImplements = true; features.hasInterfaces = true; features.hasEnums = false; features.hasGenerics = false; features.hasEcmaTyping = false; features.hasVars = true; features.hasConsts = true; features.hasMethods = true; features.hasStatics = true; features.hasTryCatch = true; features.checkFileName = false; // allowed declarations access modifiers Visibility all = Visibility.Public | Visibility.Protected | Visibility.Private; features.classModifiers = all; features.varModifiers = all; features.methodModifiers = all; // default declarations access modifiers features.classModifierDefault = Visibility.Public; features.varModifierDefault = Visibility.Public; features.methodModifierDefault = Visibility.Public; // keywords features.dot = "->"; features.voidKey = "void"; features.objectKey = "Object"; features.typesPreKeys = new string[] { "namespace", "new", "extends", "implements", "as" }; features.codeKeywords = new string[] { "and", "or", "xor", "exception", "as", "break", "case", "continue", "declare", "default", "do", "else", "elseif", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", "for", "foreach", "global", "if", "new", "switch", "use", "while", "try", "catch", "throw" }; features.varKey = "var"; features.functionKey = "function"; features.staticKey = "static"; features.publicKey = "public"; features.privateKey = "private"; features.intrinsicKey = "extern"; /* INITIALIZATION */ settings = initSettings; //BuildClassPath(); // defered to first use }