From fc8a05358a92cc3c77c5f1e30d536807ef0614fd Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 8 Apr 2019 13:49:55 +0300 Subject: were added scripting projects --- .../Editing/IReadOnlySectionProvider.cs | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Editing/IReadOnlySectionProvider.cs (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Editing/IReadOnlySectionProvider.cs') diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Editing/IReadOnlySectionProvider.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Editing/IReadOnlySectionProvider.cs new file mode 100644 index 000000000..fc775baf3 --- /dev/null +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Editing/IReadOnlySectionProvider.cs @@ -0,0 +1,32 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) + +using System; +using System.Collections.Generic; +using Tango.Scripting.Editors.Document; + +namespace Tango.Scripting.Editors.Editing +{ + /// + /// Determines whether the document can be modified. + /// + public interface IReadOnlySectionProvider + { + /// + /// Gets whether insertion is possible at the specified offset. + /// + bool CanInsert(int offset); + + /// + /// Gets the deletable segments inside the given segment. + /// + /// + /// All segments in the result must be within the given segment, and they must be returned in order + /// (e.g. if two segments are returned, EndOffset of first segment must be less than StartOffset of second segment). + /// + /// For replacements, the last segment being returned will be replaced with the new text. If an empty list is returned, + /// no replacement will be done. + /// + IEnumerable GetDeletableSegments(ISegment segment); + } +} -- cgit v1.3.1