private string GetDisplayText(uint index, VSTREETEXTOPTIONS textOptions) { var listItem = GetListItem(index); switch (textOptions) { case VSTREETEXTOPTIONS.TTO_SORTTEXT: case VSTREETEXTOPTIONS.TTO_DISPLAYTEXT: switch (_kind) { case ObjectListKind.BaseTypes: case ObjectListKind.Hierarchy: case ObjectListKind.Members: case ObjectListKind.Namespaces: case ObjectListKind.Projects: case ObjectListKind.References: case ObjectListKind.Types: return(listItem.DisplayText); } break; } return(listItem.DisplayText); }
protected override string GetTextWithOwnership(VSTREETEXTOPTIONS tto) { //if(tto == VSTREETEXTOPTIONS.TTO_DEFAULT) // return string.Format("{0} {1} - ({2}, {3}) : {4}", Name, _gotoInfo.FilePath, _gotoInfo.Line, _gotoInfo.Column, Text); return null; }
protected override void Text(VSTREETEXTOPTIONS tto, out string pbstrText) { string descText = this.Name; switch (tto) { case VSTREETEXTOPTIONS.TTO_PREFIX2: // descText = nameSpace; break; case VSTREETEXTOPTIONS.TTO_PREFIX: // descText = className; break; default: if (nodeText != null) { descText = nodeText; // No description for Project if ((tto == VSTREETEXTOPTIONS.TTO_SEARCHTEXT) && (this.NodeType == LibraryNodeType.Package)) { descText = ""; } } break; } pbstrText = descText; }
/// <summary> /// Get a pointer to the main text for the list item. /// </summary> /// <param name="index"></param> /// <param name="tto"></param> /// <param name="pbstrText"></param> /// <returns></returns> public int GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { ArgumentValidation.CheckForOutOfRangeException(index, 0, _changeList.Count - 1); ppszText = _changeList[(int)index].DisplayText; return(VSConstants.S_OK); }
public string GetTextRepresentation(VSTREETEXTOPTIONS options) { switch(options) { case VSTREETEXTOPTIONS.TTO_DISPLAYTEXT: return _name; } return null; }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { if (options == VSTREETEXTOPTIONS.TTO_DEFAULT) { return(_pathText + _lineText.Trim()); } return(String.Empty); }
protected override string GetTextWithOwnership(VSTREETEXTOPTIONS tto) { if (tto == VSTREETEXTOPTIONS.TTO_DEFAULT) { return(string.Format("{0} {1} - ({2}, {3}) : {4}", Name, _gotoInfo.FilePath, _gotoInfo.Line, _gotoInfo.Column, Text)); } return(null); }
protected override void Text(VSTREETEXTOPTIONS tto, out string pbstrText) { string descText = this.Name; // ClassName & Namespace string nameSp = ""; string className = ""; if (member != null) { if (member.Parent is XTypeDefinition) { nameSp = ((XTypeDefinition)member.Parent).Namespace; className = ((XTypeDefinition)member.Parent).Name; } // switch (tto) { case VSTREETEXTOPTIONS.TTO_PREFIX2: // descText = nameSp; break; case VSTREETEXTOPTIONS.TTO_PREFIX: // descText = className; break; default: descText = member.Name; if (member is XMemberDefinition) { var tm = member as XMemberDefinition; if (tm.Kind == Kind.Constructor) { descText = "Constructor"; } else { descText = member.Name; } if (tm.HasParameters) { // descText += "( " + tm.ParameterList + ")"; } } // No description for Project if ((tto == VSTREETEXTOPTIONS.TTO_SEARCHTEXT) && (this.NodeType == LibraryNodeType.Package)) { descText = ""; } break; } } pbstrText = descText; }
int IVsSimpleObjectList2.GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { // TODO: make use of the text option. if (index >= (uint)children.Count) { throw new ArgumentOutOfRangeException("index"); } pbstrText = children[(int)index].name; return(VSConstants.S_OK); }
int IVsSimpleObjectList2.GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { if (index >= GetItemCount()) { pbstrText = null; return(VSConstants.E_INVALIDARG); } pbstrText = GetText(index, tto); return(VSConstants.S_OK); }
protected override string GetTextWithOwnership(VSTREETEXTOPTIONS tto) { if (tto == VSTREETEXTOPTIONS.TTO_DEFAULT) { var r = _location.Range; // TODO: use SpanshotSpan if Spanshot avalable. return $"{Name} {Path} - ({r.StartLine}, {r.StartColumn}) : {Text}"; } return null; }
int IVsSimpleObjectList2.GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { // TODO: make use of the text option. if (index >= (uint)_children.Count) { throw new ArgumentOutOfRangeException(nameof(index)); } pbstrText = _children[(int)index].GetTextWithOwnership(tto); return(pbstrText != null ? VSConstants.S_OK : VSConstants.E_NOTIMPL); }
protected override string GetTextWithOwnership(VSTREETEXTOPTIONS tto) { if (tto == VSTREETEXTOPTIONS.TTO_DEFAULT) { var r = _location.Range; // TODO: use SpanshotSpan if Spanshot avalable. return($"{Name} {Path} - ({r.StartLine}, {r.StartColumn}) : {Text}"); } return(null); }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; if (funcScope != null) { StringBuilder sb = new StringBuilder(); GetFunctionDescription(funcScope.Definition, (text, kind, arg) => { sb.Append(text); }); return sb.ToString(); } return Name; }
int IVsObjectList2.GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { if (index == NullIndex) { ppszText = this.UniqueName; } else { ppszText = children[(int)index].UniqueName; } return(VSConstants.S_OK); }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { /* * FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; * if (funcScope != null) { * StringBuilder sb = new StringBuilder(); * GetFunctionDescription(funcScope.Definition, (text, kind, arg) => { * sb.Append(text); * }); * return sb.ToString(); * } */ return(Name); }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { // TODO: //FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; //if (funcScope != null) { // StringBuilder sb = new StringBuilder(); // GetFunctionDescription(funcScope.Definition, (text, kind, arg) => { // sb.Append(text); // }); // return sb.ToString(); //} return(Name); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { var displayText = GetDisplayText(); if (IsAddedReference) { pbstrText = ServicesVSResources.bracket_plus_bracket + displayText; } else { pbstrText = ServicesVSResources.bracket_bracket + displayText; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return VSConstants.S_OK; }
protected override string GetText(uint index, VSTREETEXTOPTIONS tto) { var item = _items[(int)index]; switch (tto) { case VSTREETEXTOPTIONS.TTO_DISPLAYTEXT: return(item.DisplayText); case VSTREETEXTOPTIONS.TTO_SORTTEXT: return(index.ToString("D5")); } return(string.Empty); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { var displayText = GetDisplayText(); if (IsAddedReference) { pbstrText = ServicesVSResources.PreviewChangesAddedPrefix + displayText; } else { pbstrText = ServicesVSResources.PreviewChangesDeletedPrefix + displayText; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return VSConstants.S_OK; }
int IVsSimpleObjectList2.GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { SQObjectLibraryNode node; if (GetChild(index, out node) && node._declaration != null) { pbstrText = node.Name; return(VSConstants.S_OK); } else { pbstrText = Name; return(VSConstants.S_OK); } }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { var displayText = GetDisplayText(); if (IsAddedReference) { pbstrText = ServicesVSResources.PreviewChangesAddedPrefix + displayText; } else { pbstrText = ServicesVSResources.PreviewChangesDeletedPrefix + displayText; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return(VSConstants.S_OK); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { var displayText = GetDisplayText(); if (IsAddedReference) { pbstrText = ServicesVSResources.bracket_plus_bracket + displayText; } else { pbstrText = ServicesVSResources.bracket_bracket + displayText; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return(VSConstants.S_OK); }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { StringBuilder res = new StringBuilder(); foreach (var value in _value.Values) { bool isAlias = false; foreach (var desc in value.description) { if (desc.kind == "name") { if (desc.text != Name) { isAlias = true; } } } if (isAlias) { res.Append(Name); res.Append(" (alias of "); } foreach (var desc in value.description) { if (desc.kind == "enddecl") { break; } res.Append(desc.text); } if (isAlias) { res.Append(")"); } } if (res.Length == 0) { return(Name); } return(res.ToString()); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { if (_left == null) { pbstrText = ServicesVSResources.bracket_plus_bracket + _right.Name; } else if (_right == null) { pbstrText = ServicesVSResources.bracket_bracket + _left.Name; } else { pbstrText = _right.Name; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return(VSConstants.S_OK); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { if (_left == null) { pbstrText = ServicesVSResources.PreviewChangesAddedPrefix + _right.Name; } else if (_right == null) { pbstrText = ServicesVSResources.PreviewChangesDeletedPrefix + _left.Name; } else { pbstrText = _right.Name; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return(VSConstants.S_OK); }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { StringBuilder res = new StringBuilder(); foreach (var value in _value.Values) { bool isAlias = false; foreach (var desc in value.description) { if (desc.kind == "name") { if (desc.text != Name) { isAlias = true; } } } var descriptions = new StringBuilder(); foreach (var desc in value.description) { if (desc.kind == "enddecl") { break; } descriptions.Append(desc.text); } if (isAlias) { res.Append(Strings.LibraryNodeAliasOf.FormatUI(Name, descriptions)); } else { res.Append(descriptions); } } if (res.Length == 0) { return(Name); } return(res.ToString()); }
public override string GetTextRepresentation(VSTREETEXTOPTIONS options) { StringBuilder res = new StringBuilder(); foreach (var value in _value.Values) { bool isAlias = false; foreach (var desc in value.description) { if (desc.kind == "name") { if (desc.text != Name) { isAlias = true; } } } if (isAlias) { res.Append(Name); res.Append(" (alias of "); } foreach (var desc in value.description) { if (desc.kind == "enddecl") { break; } res.Append(desc.text); } if (isAlias) { res.Append(")"); } } if (res.Length == 0) { return Name; } return res.ToString(); }
public virtual string GetTextRepresentation(VSTREETEXTOPTIONS options) { return Name; }
public abstract int GetText(out VSTREETEXTOPTIONS tto, out string ppszText);
public override int GetText(out VSTREETEXTOPTIONS tto, out string ppszText) { tto = VSTREETEXTOPTIONS.TTO_DEFAULT; ppszText = ServicesVSResources.No_Changes; return(VSConstants.S_OK); }
/// <summary> /// Get a pointer to the main text for the list item. /// </summary> /// <param name="index"></param> /// <param name="tto"></param> /// <param name="pbstrText"></param> /// <returns></returns> public int GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { ArgumentValidation.CheckForOutOfRangeException(index, 0, _changeList.Count - 1); ppszText = _changeList[(int)index].DisplayText; return VSConstants.S_OK; }
/// <summary> /// Returns the text representations for the requested tree list item. /// </summary> /// <param name="index"></param> /// <param name="tto"></param> /// <param name="pbstrText"></param> /// <returns></returns> public int GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { //Logger.Log("ResultList GetTextWithOwnership"); pbstrText = children[(int)index].symbolText; return VSConstants.S_OK; }
int IVsLiteTreeList.GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { throw new NotImplementedException(); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string ppszText) { tto = VSTREETEXTOPTIONS.TTO_DEFAULT; ppszText = ServicesVSResources.No_Changes; return VSConstants.S_OK; }
public int GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { ppszText = _items[index].GetText(tto); return(VSConstants.S_OK); }
public int GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { ppszText = _items[index].GetText(tto); return VSConstants.S_OK; }
int IVsSimpleObjectList2.GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { // TODO: make use of the text option. if (index >= (uint)children.Count) { throw new ArgumentOutOfRangeException("index"); } pbstrText = children[(int)index].name; return VSConstants.S_OK; }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { if (_left == null) { pbstrText = ServicesVSResources.bracket_plus_bracket + _right.Name; } else if (_right == null) { pbstrText = ServicesVSResources.bracket_bracket + _left.Name; } else { pbstrText = _right.Name; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return VSConstants.S_OK; }
protected virtual string GetTextWithOwnership(VSTREETEXTOPTIONS tto) { return(Name); }
int IVsObjectList2.GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { if (index == NullIndex) ppszText = this.UniqueName; else ppszText = children[(int)index].UniqueName; return VSConstants.S_OK; }
public int GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { return Changes[index].GetText(out tto, out ppszText); }
protected virtual string GetTextWithOwnership(VSTREETEXTOPTIONS tto) { return Name; }
public int GetText(uint index, VSTREETEXTOPTIONS tto, out string ppszText) { return(Changes[index].GetText(out tto, out ppszText)); }
int IVsSimpleObjectList2.GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { // TODO: make use of the text option. if (index >= (uint)_children.Count) throw new ArgumentOutOfRangeException("index"); pbstrText = _children[(int)index].GetTextWithOwnership(tto); return pbstrText != null ? VSConstants.S_OK : VSConstants.E_NOTIMPL; }
public virtual string GetTextRepresentation(VSTREETEXTOPTIONS options) { return(Name); }
/// <summary> /// Returns the text representations for the requested tree list item. /// </summary> /// <param name="index"></param> /// <param name="tto"></param> /// <param name="pbstrText"></param> /// <returns></returns> public int GetTextWithOwnership(uint index, VSTREETEXTOPTIONS tto, out string pbstrText) { pbstrText = children[(int)index].symbolText; return(VSConstants.S_OK); }
protected override string GetText(uint index, VSTREETEXTOPTIONS tto) { return(GetDisplayText(index, tto)); }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { pbstrText = _text; tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return VSConstants.S_OK; }
public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { if (_left == null) { pbstrText = ServicesVSResources.PreviewChangesAddedPrefix + _right.Name; } else if (_right == null) { pbstrText = ServicesVSResources.PreviewChangesDeletedPrefix + _left.Name; } else { pbstrText = _right.Name; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return VSConstants.S_OK; }