private void ConvertProperty(TextDocument textDocument, Property property) { if (textDocument == null || property == null) return; Property propertyClone = (Property)property.Clone(); string newPropertyCode = ChangeProperty(propertyClone); SourceRange propertyRange = property.Range.Clone(); textDocument.DeleteText(propertyRange); SourceRange newPropertyRange = textDocument.InsertText(propertyRange.Start, newPropertyCode); textDocument.Format(newPropertyRange); }
private void ConvertProperty(TextDocument textDocument, Property property, bool baseClassVersion, LanguageElement classExpression) { if (textDocument == null || property == null) return; Property propertyClone = (Property)property.Clone(); string newPropertyCode = ChangeProperty(propertyClone, baseClassVersion, classExpression); SourceRange propertyRange = property.Range.Clone(); textDocument.DeleteText(propertyRange); SourceRange newPropertyRange = textDocument.InsertText(propertyRange.Start, newPropertyCode); textDocument.Format(newPropertyRange); }
private void ConvertProperty(TextDocument textDocument, Property property, bool baseClassVersion, LanguageElement classExpression) { if (textDocument == null || property == null) { return; } Property propertyClone = (Property)property.Clone(); string newPropertyCode = ChangeProperty(propertyClone, baseClassVersion, classExpression); SourceRange propertyRange = property.Range.Clone(); textDocument.DeleteText(propertyRange); SourceRange newPropertyRange = textDocument.InsertText(propertyRange.Start, newPropertyCode); textDocument.Format(newPropertyRange); }
private void ConvertProperty(TextDocument textDocument, Property property) { if (textDocument == null || property == null) { return; } Property propertyClone = (Property)property.Clone(); string newPropertyCode = ChangeProperty(propertyClone); SourceRange propertyRange = property.Range.Clone(); textDocument.DeleteText(propertyRange); SourceRange newPropertyRange = textDocument.InsertText(propertyRange.Start, newPropertyCode); textDocument.Format(newPropertyRange); }