/// <summary> /// Loads the plugin settings /// </summary> public void LoadSettings() { settingObject = new LoomSettings(); if (!File.Exists(this.settingFilename)) { this.SaveSettings(); } else { Object obj = ObjectSerializer.Deserialize(this.settingFilename, settingObject); settingObject = (LoomSettings)obj; } ProjectManager.Helpers.ProjectCreator.AppendProjectType("project.lsproj", typeof(LoomProject)); }
public Context(LoomSettings initSettings) { loomSettings = initSettings; /* DESCRIBE LANGUAGE FEATURES */ mxmlEnabled = false; // language constructs features.hasPackages = true; features.hasNamespaces = false; features.hasImports = true; features.hasImportsWildcard = true; features.hasClasses = true; features.hasExtends = true; features.hasImplements = true; features.hasInterfaces = true; features.hasEnums = true; features.hasStructs = true; features.hasDelegates = true; features.hasGenerics = true; features.hasEcmaTyping = true; features.hasInference = true; features.hasVars = true; features.hasConsts = true; features.hasMethods = true; features.hasStatics = true; features.hasOverride = true; features.hasTryCatch = true; features.hasE4X = false; features.hasStaticInheritance = true; features.checkFileName = false; features.hasMultipleDefs = true; // allowed declarations access modifiers Visibility all = Visibility.Public | Visibility.Internal | Visibility.Protected | Visibility.Private; features.classModifiers = all; features.varModifiers = all; features.constModifiers = all; features.methodModifiers = all; features.enumModifiers = all; // default declarations access modifiers features.classModifierDefault = Visibility.Internal; features.varModifierDefault = Visibility.Internal; features.methodModifierDefault = Visibility.Internal; features.enumModifierDefault = Visibility.Internal; // keywords features.dot = "."; features.voidKey = "void"; features.objectKey = "Object"; features.booleanKey = "Boolean"; features.numberKey = "Number"; features.stringKey = "String"; features.arrayKey = "Array"; features.importKey = "import"; features.typesPreKeys = new string[] { "import", "new", "typeof", "is", "as", "extends", "implements" }; features.codeKeywords = new string[] { "var", "function", "const", "new", "delete", "typeof", "is", "as", "return", "break", "continue", "if", "else", "for", "each", "in", "while", "do", "switch", "case", "default", "with", "null", "true", "false", "try", "catch", "finally", "throw" }; features.accessKeywords = new string[] { "extern", "dynamic", "inline", "final", "public", "private", "protected", "internal", "static", "override" }; features.declKeywords = new string[] { "var", "function", "const", "get", "set" }; features.typesKeywords = new string[] { "import", "class", "interface", "delegate", "struct", "enum" }; features.varKey = "var"; features.constKey = "const"; features.functionKey = "function"; features.getKey = "get"; features.setKey = "set"; features.staticKey = "static"; features.finalKey = "final"; features.overrideKey = "override"; features.publicKey = "public"; features.internalKey = "internal"; features.protectedKey = "protected"; features.privateKey = "private"; features.intrinsicKey = "native"; /* INITIALIZATION */ settings = initSettings; //BuildClassPath(); // defered to first use }
public Context(LoomSettings initSettings) { loomSettings = initSettings; /* DESCRIBE LANGUAGE FEATURES */ mxmlEnabled = false; // language constructs features.hasPackages = true; features.hasNamespaces = false; features.hasImports = true; features.hasImportsWildcard = true; features.hasClasses = true; features.hasExtends = true; features.hasImplements = true; features.hasInterfaces = true; features.hasEnums = true; features.hasStructs = true; features.hasDelegates = true; features.hasGenerics = true; features.hasEcmaTyping = true; features.hasInference = true; features.hasVars = true; features.hasConsts = true; features.hasMethods = true; features.hasStatics = true; features.hasOverride = true; features.hasTryCatch = true; features.hasE4X = false; features.hasStaticInheritance = true; features.checkFileName = false; features.hasMultipleDefs = true; // allowed declarations access modifiers Visibility all = Visibility.Public | Visibility.Internal | Visibility.Protected | Visibility.Private; features.classModifiers = all; features.varModifiers = all; features.constModifiers = all; features.methodModifiers = all; features.enumModifiers = all; // default declarations access modifiers features.classModifierDefault = Visibility.Internal; features.varModifierDefault = Visibility.Internal; features.methodModifierDefault = Visibility.Internal; features.enumModifierDefault = Visibility.Internal; // keywords features.dot = "."; features.voidKey = "void"; features.objectKey = "Object"; features.booleanKey = "Boolean"; features.numberKey = "Number"; features.arrayKey = "Array"; features.importKey = "import"; features.typesPreKeys = new string[] { "import", "new", "typeof", "is", "as", "extends", "implements" }; features.codeKeywords = new string[] { "var", "function", "const", "new", "delete", "typeof", "is", "as", "return", "break", "continue", "if", "else", "for", "each", "in", "while", "do", "switch", "case", "default", "with", "null", "true", "false", "try", "catch", "finally", "throw" }; features.accessKeywords = new string[] { "extern", "dynamic", "inline", "final", "public", "private", "protected", "internal", "static", "override" }; features.declKeywords = new string[] { "var", "function", "const", "get", "set" }; features.typesKeywords = new string[] { "import", "class", "interface", "delegate", "struct", "enum" }; features.varKey = "var"; features.constKey = "const"; features.functionKey = "function"; features.getKey = "get"; features.setKey = "set"; features.staticKey = "static"; features.finalKey = "final"; features.overrideKey = "override"; features.publicKey = "public"; features.internalKey = "internal"; features.protectedKey = "protected"; features.privateKey = "private"; features.intrinsicKey = "native"; /* INITIALIZATION */ settings = initSettings; //BuildClassPath(); // defered to first use }
/// <summary> /// Loads the plugin settings /// </summary> public void LoadSettings() { settingObject = new LoomSettings(); if (!File.Exists(this.settingFilename)) this.SaveSettings(); else { Object obj = ObjectSerializer.Deserialize(this.settingFilename, settingObject); settingObject = (LoomSettings)obj; } ProjectCreator.AppendProjectType("project.lsproj", typeof(LoomProject)); }