Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3822


Ignore:
Timestamp:
05/17/10 02:38:32 (15 years ago)
Author:
swagner
Message:

Implemented reviewers' comments (#863)

  • adapted item names of generic items to reflect the type of their generic parameters
Location:
trunk/sources
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs

    r3728 r3822  
    5050    public static string GetName(Type type) {
    5151      object[] attribs = type.GetCustomAttributes(typeof(ItemAttribute), false);
    52       if (attribs.Length > 0) return ((ItemAttribute)attribs[0]).Name;
    53       else return type.GetPrettyName();
     52      if (attribs.Length > 0) {
     53        string name = ((ItemAttribute)attribs[0]).Name;
     54        if (type.IsGenericType) {
     55          name += "<";
     56          Type[] typeParams = type.GetGenericArguments();
     57          if (typeParams.Length > 0) {
     58            name += GetName(typeParams[0]);
     59            for (int i = 1; i < typeParams.Length; i++)
     60              name += ", " + GetName(typeParams[i]);
     61          }
     62          name += ">";
     63        }
     64        return name;
     65      } else {
     66        return type.GetPrettyName();
     67      }
    5468    }
    5569    public static string GetDescription(Type type) {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs

    r3798 r3822  
    3535  /// <typeparam name="T">The element type (base type IItem)</typeparam>
    3636  [StorableClass]
    37   [Item("CheckedItemCollection<T>", "Represents a collection of items that can be checked or unchecked.")]
     37  [Item("CheckedItemCollection", "Represents a collection of items that can be checked or unchecked.")]
    3838  public class CheckedItemCollection<T> : ItemCollection<T>, ICheckedItemCollection<T> where T : class, IItem {
    3939    [Storable]
  • trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs

    r3798 r3822  
    3838  /// <typeparam name="T">The element type (base type is IItem)</typeparam>
    3939  [StorableClass]
    40   [Item("CheckedItemList<T>", "Represents a list of items that can be checked or unchecked.")]
     40  [Item("CheckedItemList", "Represents a list of items that can be checked or unchecked.")]
    4141  public class CheckedItemList<T> : ItemList<T>, ICheckedItemList<T> where T : class, IItem {
    4242    [Storable]
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs

    r3728 r3822  
    3434namespace HeuristicLab.Core {
    3535  [StorableClass]
    36   [Item("ItemArray<T>", "Represents an array of items.")]
     36  [Item("ItemArray", "Represents an array of items.")]
    3737  public class ItemArray<T> : ObservableArray<T>, IItemArray<T> where T : class, IItem {
    3838    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemCollection.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ItemCollection<T>", "Represents a collection of items.")]
     33  [Item("ItemCollection", "Represents a collection of items.")]
    3434  public class ItemCollection<T> : ObservableCollection<T>, IItemCollection<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ItemDictionary<TKey, TValue>", "Represents a dictionary of items.")]
     33  [Item("ItemDictionary", "Represents a dictionary of items.")]
    3434  public class ItemDictionary<TKey, TValue> : ObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs

    r3728 r3822  
    3434namespace HeuristicLab.Core {
    3535  [StorableClass]
    36   [Item("ItemList<T>", "Represents a list of items.")]
     36  [Item("ItemList", "Represents a list of items.")]
    3737  public class ItemList<T> : ObservableList<T>, IItemList<T> where T : class, IItem {
    3838    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs

    r3728 r3822  
    3434namespace HeuristicLab.Core {
    3535  [StorableClass]
    36   [Item("ItemSet<T>", "Represents a set of items.")]
     36  [Item("ItemSet", "Represents a set of items.")]
    3737  public class ItemSet<T> : ObservableSet<T>, IItemSet<T> where T : class, IItem {
    3838    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs

    r3728 r3822  
    2929
    3030namespace HeuristicLab.Core {
    31   [Item("KeyedItemCollection<TKey, TItem>", "Represents a keyed collection of items.")]
     31  [Item("KeyedItemCollection", "Represents a keyed collection of items.")]
    3232  [StorableClass]
    3333  public abstract class KeyedItemCollection<TKey, TItem> : ObservableKeyedCollection<TKey, TItem>, IKeyedItemCollection<TKey, TItem> where TItem : class, IItem {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/NamedItemCollection.cs

    r3560 r3822  
    2929
    3030namespace HeuristicLab.Core {
    31   [Item("NamedItemCollection<T>", "Represents a collection of named items.")]
     31  [Item("NamedItemCollection", "Represents a collection of named items.")]
    3232  [StorableClass]
    3333  public class NamedItemCollection<T> : KeyedItemCollection<string, T> where T : class, INamedItem {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemCollection.cs

    r3628 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyCheckedItemCollection<T>", "Represents a read-only collection of checked items.")]
     33  [Item("ReadOnlyCheckedItemCollection", "Represents a read-only collection of checked items.")]
    3434  public class ReadOnlyCheckedItemCollection<T> : ReadOnlyItemCollection<T>, ICheckedItemCollection<T> where T : class, IItem {
    3535    private CheckedItemCollection<T> CheckedItemCollection {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemList.cs

    r3628 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyCheckedItemList<T>", "Represents a read-only list of checked items.")]
     33  [Item("ReadOnlyCheckedItemList", "Represents a read-only list of checked items.")]
    3434  public class ReadOnlyCheckedItemList<T> : ReadOnlyItemList<T>, ICheckedItemList<T> where T : class, IItem {
    3535    private CheckedItemList<T> CheckedItemList {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemArray<T>", "Represents a read-only array of items.")]
     33  [Item("ReadOnlyItemArray", "Represents a read-only array of items.")]
    3434  public class ReadOnlyItemArray<T> : ReadOnlyObservableArray<T>, IItemArray<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemCollection<T>", "Represents a read-only collection of items.")]
     33  [Item("ReadOnlyItemCollection", "Represents a read-only collection of items.")]
    3434  public class ReadOnlyItemCollection<T> : ReadOnlyObservableCollection<T>, IItemCollection<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemDictionary<TKey, TValue>", "Represents a read-only dictionary of items.")]
     33  [Item("ReadOnlyItemDictionary", "Represents a read-only dictionary of items.")]
    3434  public class ReadOnlyItemDictionary<TKey, TValue> : ReadOnlyObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemList<T>", "Represents a read-only list of items.")]
     33  [Item("ReadOnlyItemList", "Represents a read-only list of items.")]
    3434  public class ReadOnlyItemList<T> : ReadOnlyObservableList<T>, IItemList<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemSet<T>", "Represents a read-only set of items.")]
     33  [Item("ReadOnlyItemSet", "Represents a read-only set of items.")]
    3434  public class ReadOnlyItemSet<T> : ReadOnlyObservableSet<T>, IItemSet<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyKeyedItemCollection<TKey, TItem>", "Represents a read-only keyed collection of items.")]
     33  [Item("ReadOnlyKeyedItemCollection", "Represents a read-only keyed collection of items.")]
    3434  public class ReadOnlyKeyedItemCollection<TKey, TItem> : ReadOnlyObservableKeyedCollection<TKey, TItem>, IKeyedItemCollection<TKey, TItem> where TItem : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs

    r3430 r3822  
    3131
    3232namespace HeuristicLab.Data {
    33   [Item("ValueTypeArray<T>", "An abstract base class for representing arrays of value types.")]
     33  [Item("ValueTypeArray", "An abstract base class for representing arrays of value types.")]
    3434  [StorableClass]
    3535  public abstract class ValueTypeArray<T> : Item, IEnumerable<T> where T : struct {
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs

    r3430 r3822  
    3131
    3232namespace HeuristicLab.Data {
    33   [Item("ValueTypeMatrix<T>", "An abstract base class for representing matrices of value types.")]
     33  [Item("ValueTypeMatrix", "An abstract base class for representing matrices of value types.")]
    3434  [StorableClass]
    3535  public abstract class ValueTypeMatrix<T> : Item, IEnumerable<T> where T : struct {
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeValue.cs

    r3430 r3822  
    2727
    2828namespace HeuristicLab.Data {
    29   [Item("ValueTypeValue<T>", "An abstract base class for representing values of value types.")]
     29  [Item("ValueTypeValue", "An abstract base class for representing values of value types.")]
    3030  [StorableClass]
    3131  public abstract class ValueTypeValue<T> : Item where T : struct {
  • trunk/sources/HeuristicLab.Operators/3.3/CheckedMultiOperator.cs

    r3616 r3822  
    3333  /// A base class for operators which apply arbitrary many other operators of a specific type that can be checked or unchecked.
    3434  /// </summary>
    35   [Item("CheckedMultiOperator<T>", "A base class for operators which apply arbitrary many other operators of a specific type that can be checked or unchecked.")]
     35  [Item("CheckedMultiOperator", "A base class for operators which apply arbitrary many other operators of a specific type that can be checked or unchecked.")]
    3636  [StorableClass]
    3737  public abstract class CheckedMultiOperator<T> : MultiOperator<T> where T : class, IOperator {
  • trunk/sources/HeuristicLab.Operators/3.3/MultiOperator.cs

    r3729 r3822  
    3333  /// A base class for operators which apply arbitrary many other operators of a specific type.
    3434  /// </summary>
    35   [Item("MultiOperator<T>", "A base class for operators which apply arbitrary many other operators of a specific type.")]
     35  [Item("MultiOperator", "A base class for operators which apply arbitrary many other operators of a specific type.")]
    3636  [StorableClass]
    3737  public abstract class MultiOperator<T> : SingleSuccessorOperator where T : class, IOperator {
  • trunk/sources/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs

    r3817 r3822  
    3434  /// Selects one of its branches (if there are any) given a list of relative probabilities.
    3535  /// </summary>
    36   [Item("StochasticMultiBranch<T>", "Selects one of its branches (if there are any) given a list of relative probabilities.")]
     36  [Item("StochasticMultiBranch", "Selects one of its branches (if there are any) given a list of relative probabilities.")]
    3737  [StorableClass]
    3838  public abstract class StochasticMultiBranch<T> : CheckedMultiOperator<T> where T : class, IOperator {
  • trunk/sources/HeuristicLab.Parameters/3.3/ConstrainedValueParameter.cs

    r3376 r3822  
    3131  /// A parameter whose value has to be chosen from a set of valid values.
    3232  /// </summary>
    33   [Item("ConstrainedValueParameter<T>", "A parameter whose value has to be chosen from a set of valid values.")]
     33  [Item("ConstrainedValueParameter", "A parameter whose value has to be chosen from a set of valid values.")]
    3434  [StorableClass]
    3535  public class ConstrainedValueParameter<T> : OptionalConstrainedValueParameter<T> where T : class, IItem {
  • trunk/sources/HeuristicLab.Parameters/3.3/LookupParameter.cs

    r3688 r3822  
    2929  /// A parameter whose value is retrieved from the scope.
    3030  /// </summary>
    31   [Item("LookupParameter<T>", "A parameter whose value is retrieved from or written to a scope.")]
     31  [Item("LookupParameter", "A parameter whose value is retrieved from or written to a scope.")]
    3232  [StorableClass]
    3333  public class LookupParameter<T> : Parameter, ILookupParameter<T> where T : class, IItem {
  • trunk/sources/HeuristicLab.Parameters/3.3/OptionalConstrainedValueParameter.cs

    r3688 r3822  
    3131  /// A parameter whose value has to be chosen from a set of valid values or is null.
    3232  /// </summary>
    33   [Item("OptionalConstrainedValueParameter<T>", "A parameter whose value has to be chosen from a set of valid values or is null.")]
     33  [Item("OptionalConstrainedValueParameter", "A parameter whose value has to be chosen from a set of valid values or is null.")]
    3434  [StorableClass]
    3535  public class OptionalConstrainedValueParameter<T> : Parameter, IValueParameter<T> where T : class, IItem {
  • trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs

    r3688 r3822  
    3030  /// A parameter whose value is defined in the parameter itself or is null.
    3131  /// </summary>
    32   [Item("OptionalValueParameter<T>", "A parameter whose value is defined in the parameter itself or is null.")]
     32  [Item("OptionalValueParameter", "A parameter whose value is defined in the parameter itself or is null.")]
    3333  [StorableClass]
    3434  public class OptionalValueParameter<T> : Parameter, IValueParameter<T> where T : class, IItem {
  • trunk/sources/HeuristicLab.Parameters/3.3/ScopeTreeLookupParameter.cs

    r3740 r3822  
    3131  /// A generic parameter representing instances of type T which are collected from or written to scope tree.
    3232  /// </summary>
    33   [Item("ScopeTreeLookupParameter<T>", "A generic parameter representing instances of type T which are collected from or written to scope tree.")]
     33  [Item("ScopeTreeLookupParameter", "A generic parameter representing instances of type T which are collected from or written to scope tree.")]
    3434  [StorableClass]
    3535  public class ScopeTreeLookupParameter<T> : LookupParameter<ItemArray<T>>, IScopeTreeLookupParameter<T> where T : class, IItem {
  • trunk/sources/HeuristicLab.Parameters/3.3/ValueLookupParameter.cs

    r3688 r3822  
    3030  /// A parameter whose value is either defined in the parameter itself or is retrieved from the scope.
    3131  /// </summary>
    32   [Item("ValueLookupParameter<T>", "A parameter whose value is either defined in the parameter itself or is retrieved from or written to a scope.")]
     32  [Item("ValueLookupParameter", "A parameter whose value is either defined in the parameter itself or is retrieved from or written to a scope.")]
    3333  [StorableClass]
    3434  public class ValueLookupParameter<T> : LookupParameter<T>, IValueLookupParameter<T> where T : class, IItem {
  • trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs

    r3017 r3822  
    2929  /// A parameter whose value is defined in the parameter itself.
    3030  /// </summary>
    31   [Item("ValueParameter<T>", "A parameter whose value is defined in the parameter itself.")]
     31  [Item("ValueParameter", "A parameter whose value is defined in the parameter itself.")]
    3232  [StorableClass]
    3333  public class ValueParameter<T> : OptionalValueParameter<T> where T : class, IItem {
Note: See TracChangeset for help on using the changeset viewer.