Ejemplo n.º 1
0
            /// <inheritdoc />
            public string GetText(object item)
            {
                ProblemsViewItemCollection itemCollection = item as ProblemsViewItemCollection;

                if (itemCollection == null)
                {
                    return(null);
                }

                EProblemsViewItemType itemType = itemCollection.Kind;

                if (itemType == EProblemsViewItemType.Error)
                {
                    return(Messages.ProblemsViewItemType_Error);
                }
                if (itemType == EProblemsViewItemType.Warning)
                {
                    return(Messages.ProblemsViewItemType_Warning);
                }
                if (itemType == EProblemsViewItemType.Info)
                {
                    return(Messages.ProblemsViewItemType_Info);
                }

                return(itemType.ToString());
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new instance with the given arguments.
 /// </summary>
 /// <param name="itemType">Item type</param>
 /// <param name="description">Item description</param>
 /// <param name="workspaceArtefact">Affected workspace artefact</param>
 /// <param name="line">Line number that is associated with the item</param>
 /// <param name="column">Column number that is assocated with the item</param>
 public ProblemsViewItem(EProblemsViewItemType itemType, string description, IWorkspaceArtefact workspaceArtefact, uint line, uint column)
 {
     ItemType          = itemType;
     Description       = description;
     WorkspaceArtefact = workspaceArtefact;
     Line   = line;
     Column = column;
 }
Ejemplo n.º 3
0
 /// <summary> Creates a new instance with the given kind. </summary>
 /// <param name="kind"></param>
 public ProblemsViewItemCollection(EProblemsViewItemType kind)
 {
     Kind = kind;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance with the given arguments and 1 as line and column value.
 /// </summary>
 /// <param name="itemType">Item type</param>
 /// <param name="description">Item description</param>
 /// <param name="workspaceArtefact">Affected workspace artefact</param>
 public ProblemsViewItem(EProblemsViewItemType itemType, string description, IWorkspaceArtefact workspaceArtefact)
     : this(itemType, description, workspaceArtefact, 1, 1)
 {
     // Nothing to do here
 }