Changeset 12506 for trunk/sources
- Timestamp:
- 06/25/15 11:51:04 (9 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Attributes/CreatableAttribute.cs
r12504 r12506 27 27 #region Predefined Categories 28 28 public static class Categories { 29 public const string Splitter = "###"; 29 public const string SplitToken = "###"; 30 public const string OrderToken = "$$$"; 30 31 31 public const string Algorithms = " Algorithms";32 public const string PopulationBasedAlgorithms = Algorithms + Split ter+ "Population Based";33 public const string SingleSolutionAlgorithms = Algorithms + Split ter+ "Single Solution";32 public const string Algorithms = "1" + OrderToken + "Algorithms"; 33 public const string PopulationBasedAlgorithms = Algorithms + SplitToken + "1" + OrderToken + "Population Based"; 34 public const string SingleSolutionAlgorithms = Algorithms + SplitToken + "2" + OrderToken + "Single Solution"; 34 35 35 public const string Problems = " Problems";36 public const string CombinatorialProblems = Problems + Split ter+ "Combinatorial";37 public const string GeneticProgrammingProblems = Problems + Split ter+ "Genetic Programming";38 public const string ExternalEvaluationProblems = Problems + Split ter+ "External Evaluation";36 public const string Problems = "2" + OrderToken + "Problems"; 37 public const string CombinatorialProblems = Problems + SplitToken + "1" + OrderToken + "Combinatorial"; 38 public const string GeneticProgrammingProblems = Problems + SplitToken + "2" + OrderToken + "Genetic Programming"; 39 public const string ExternalEvaluationProblems = Problems + SplitToken + "3" + OrderToken + "External Evaluation"; 39 40 40 public const string DataAnalysis = " Data Analysis";41 public const string DataAnalysis Classification = DataAnalysis + Splitter + "Classification";42 public const string DataAnalysis Regression = DataAnalysis + Splitter + "Regression";43 public const string DataAnalysisEnsembles = DataAnalysis + Split ter+ "Ensembles";41 public const string DataAnalysis = "3" + OrderToken + "Data Analysis"; 42 public const string DataAnalysisRegression = DataAnalysis + SplitToken + "1" + OrderToken + "Regression"; 43 public const string DataAnalysisClassification = DataAnalysis + SplitToken + "2" + OrderToken + "Classification"; 44 public const string DataAnalysisEnsembles = DataAnalysis + SplitToken + "3" + OrderToken + "Ensembles"; 44 45 45 public const string TestingAndAnalysis = " Testing & Analysis";46 public const string TestingAndAnalysisOKB = TestingAndAnalysis + Split ter+ "OKB";46 public const string TestingAndAnalysis = "4" + OrderToken + "Testing & Analysis"; 47 public const string TestingAndAnalysisOKB = TestingAndAnalysis + SplitToken + "1" + OrderToken + "OKB"; 47 48 48 public const string Scripts = "5 - Scripts"; 49 public const string Scripts = "5" + OrderToken + "Scripts"; 50 51 49 52 } 50 53 #endregion -
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r12504 r12506 96 96 foreach (var category in categories) { 97 97 var fullName = category.Key; 98 var tokens = fullName.Split(new[] { CreatableAttribute.Categories.Splitter }, StringSplitOptions.RemoveEmptyEntries); 98 var tokensWithOrdering = fullName.Split(new[] { CreatableAttribute.Categories.SplitToken }, StringSplitOptions.RemoveEmptyEntries); 99 var tokens = tokensWithOrdering.Select(t => t.Split(new[] { CreatableAttribute.Categories.OrderToken }, StringSplitOptions.RemoveEmptyEntries).Last()).ToList(); 99 100 var name = tokens.Last(); 100 var parents = tokens .Take(tokens.Length- 1);101 var parents = tokensWithOrdering.Take(tokens.Count - 1); 101 102 102 103 var categoryNode = new TreeNode(name, imageIndex: 1, selectedImageIndex: 1) { … … 118 119 string fullName = null; 119 120 foreach (string parentCategory in parentCategories) { 120 fullName = fullName == null ? parentCategory : fullName + "#"+ parentCategory;121 fullName = fullName == null ? parentCategory : fullName + CreatableAttribute.Categories.SplitToken + parentCategory; 121 122 parentNode = node.Nodes.Find(fullName, searchAllChildren: false).SingleOrDefault(); 122 123 if (parentNode == null) {
Note: See TracChangeset
for help on using the changeset viewer.