Example #1
0
        public void Run(string[] args)
        {
            var currentDir = Directory.GetCurrentDirectory();
            var path       = currentDir + Path.DirectorySeparatorChar + args.GetPropertiesPath();

            if (args.isForce() || !File.Exists(path))
            {
                var preferences = new Preferences(path, Preferences.DEFAULT_USER_PROPERTIES_PATH);
                preferences.Reset();
                preferences.AddProperties(new CodeGeneratorConfig().defaultProperties, true);
                preferences.AddProperties(new CLIConfig().defaultProperties, true);
                preferences.Save();

                fabl.Info("Created " + preferences.propertiesPath);
                fabl.Info("Created " + preferences.userPropertiesPath);
                fabl.Info("👍");
                fabl.Debug(preferences.ToString());

                new EditConfig().Run(args);
            }
            else
            {
                fabl.Warn(path + " already exists!");
                fabl.Info("Use entitas new -f to overwrite the exiting file.");
                fabl.Info("Use entitas edit to open the exiting file.");
            }
        }
        public override void Initialize(Preferences preferences)
        {
            _gentitasConfig = new GentitasConfig();
            preferences.AddProperties(_gentitasConfig.defaultProperties, false);
            preferences.userProperties.AddProperties(_gentitasConfig.defaultUserProperties, false);
            _gentitasConfig.Configure(preferences);

            _enablePingCSProj = _gentitasConfig.enablePingCSPorj;
        }
        public override void Initialize(Preferences preferences)
        {
            _visualDebuggingConfig = new VisualDebuggingConfig();
            preferences.AddProperties(_visualDebuggingConfig.defaultProperties, false);
            _visualDebuggingConfig.Configure(preferences);

            _scriptingDefineSymbols = new ScriptingDefineSymbols();
            _enableVisualDebugging  = !_scriptingDefineSymbols.buildTargetToDefSymbol.Values
                                      .All <string>(defs => defs.Contains(ENTITAS_DISABLE_VISUAL_DEBUGGING));
        }
Example #4
0
        void drawConfigurables()
        {
            var configurables = getConfigurables();

            _preferences.AddProperties(configurables, false);

            foreach (var kv in configurables.OrderBy(kv => kv.Key))
            {
                _preferences[kv.Key] = EditorGUILayout.TextField(kv.Key.ShortTypeName().ToSpacedCamelCase(), _preferences[kv.Key]);
            }
        }
Example #5
0
        void drawConfigurables()
        {
            var defaultProperties = CodeGeneratorUtil.GetDefaultProperties(_types, _codeGeneratorConfig);

            _preferences.AddProperties(defaultProperties, false);

            foreach (var kv in defaultProperties.OrderBy(kv => kv.Key))
            {
                _preferences[kv.Key] = EditorGUILayout.TextField(kv.Key.ShortTypeName().ToSpacedCamelCase(), _preferences[kv.Key]);
            }
        }
Example #6
0
        public override void Initialize(Preferences preferences)
        {
            _preferences         = preferences;
            _codeGeneratorConfig = new CodeGeneratorConfig();
            preferences.AddProperties(_codeGeneratorConfig.defaultProperties, false);
            _codeGeneratorConfig.Configure(preferences);

            _types = CodeGeneratorUtil.LoadTypesFromPlugins(preferences);

            initPhase <ICodeGeneratorDataProvider>(_types, out _availableDataProviderTypes, out _availableDataProviderNames);
            initPhase <ICodeGenerator>(_types, out _availableGeneratorTypes, out _availableGeneratorNames);
            initPhase <ICodeGenFilePostProcessor>(_types, out _availablePostProcessorTypes, out _availablePostProcessorNames);

            _preferences.AddProperties(getConfigurables(), false);
        }