Browse Source

Refactored code accessing text editor options.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2487 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
f4826931df
  1. 6
      src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/PackageFilesView.cs
  2. 2
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  3. 2
      src/AddIns/Misc/CodeCoverage/Project/Src/CodeCoverageControl.cs
  4. 4
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/DigitsNode.cs
  5. 10
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs
  6. 4
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/KeywordListNode.cs
  7. 4
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/MarkerNode.cs
  8. 4
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/SpanNode.cs
  9. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs
  10. 13
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/DefaultTextEditorProperties.cs
  11. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/ITextEditorProperties.cs
  12. 7
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs
  13. 13
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs
  14. 6
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextView.cs
  15. 6
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Util/TipPainter.cs
  16. 92
      src/Main/Base/Project/Resources/GeneralTextEditorPanel.xfrm
  17. 7
      src/Main/Base/Project/Src/Commands/ToolsCommands.cs
  18. 4
      src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs
  19. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractProjectOptionPanel.cs
  20. 5
      src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsView.cs
  21. 6
      src/Main/Base/Project/Src/Gui/Dialogs/TabbedOptions.cs
  22. 13
      src/Main/Base/Project/Src/Gui/Dialogs/TreeViewOptions.cs
  23. 38
      src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs
  24. 3
      src/Main/Base/Project/Src/Services/AmbienceService/AmbienceService.cs
  25. 7
      src/Main/Base/Project/Src/Services/AmbienceService/CodeDOMGeneratorUtility.cs
  26. 3
      src/Main/Base/Project/Src/Services/ParserService/ParserService.cs
  27. 15
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs
  28. 102
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextEditorProperties.cs
  29. 46
      src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs
  30. 76
      src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs
  31. 50
      src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/MarkersTextEditorPanel.cs
  32. 3
      src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/Search.cs

6
src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/PackageFilesView.cs

@ -113,7 +113,7 @@ namespace ICSharpCode.WixBinding @@ -113,7 +113,7 @@ namespace ICSharpCode.WixBinding
public void Write(WixDocument document)
{
if (!UpdateOpenFile(document)) {
ITextEditorProperties properties = new SharpDevelopTextEditorProperties();
ITextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
document.Save(properties.LineTerminator, properties.ConvertTabsToSpaces, properties.TabIndent);
}
packageFilesControl.IsDirty = false;
@ -273,7 +273,7 @@ namespace ICSharpCode.WixBinding @@ -273,7 +273,7 @@ namespace ICSharpCode.WixBinding
Location location = WixDocument.GetEndElementLocation(new StringReader(document.TextContent), "Product", wixDocument.Product.GetAttribute("Id"));
if (!location.IsEmpty) {
// Insert the xml with an extra new line at the end.
ITextEditorProperties properties = new SharpDevelopTextEditorProperties();
ITextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
WixDocumentEditor documentEditor = new WixDocumentEditor(textAreaControl);
documentEditor.Insert(location.Y, location.X, String.Concat(xml, properties.LineTerminator));
return true;
@ -296,7 +296,7 @@ namespace ICSharpCode.WixBinding @@ -296,7 +296,7 @@ namespace ICSharpCode.WixBinding
/// </summary>
string GetWixXml(XmlElement element)
{
ITextEditorProperties properties = new SharpDevelopTextEditorProperties();
ITextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
return WixDocument.GetXml(element, properties.LineTerminator, properties.ConvertTabsToSpaces, properties.TabIndent);
}

2
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -87,7 +87,7 @@ namespace ICSharpCode.XmlEditor @@ -87,7 +87,7 @@ namespace ICSharpCode.XmlEditor
}
public XmlView()
: this(new SharpDevelopTextEditorProperties(), XmlSchemaManager.SchemaCompletionDataItems)
: this(SharpDevelopTextEditorProperties.Instance, XmlSchemaManager.SchemaCompletionDataItems)
{
xmlEditor.AddEditActions(GetEditActions());
xmlEditor.TextAreaContextMenuStrip = MenuService.CreateContextMenu(xmlEditor, contextMenuPath);

2
src/AddIns/Misc/CodeCoverage/Project/Src/CodeCoverageControl.cs

@ -467,7 +467,7 @@ namespace ICSharpCode.CodeCoverage @@ -467,7 +467,7 @@ namespace ICSharpCode.CodeCoverage
textEditorControl = new TextEditorControl();
textEditorControl.Dock = DockStyle.Fill;
textEditorControl.Document.ReadOnly = true;
textEditorControl.TextEditorProperties = new SharpDevelopTextEditorProperties();
textEditorControl.TextEditorProperties = SharpDevelopTextEditorProperties.Instance;
textEditorControl.ActiveTextAreaControl.TextArea.DoubleClick += TextEditorControlDoubleClick;
}

4
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/DigitsNode.cs

@ -11,6 +11,7 @@ using System.Xml; @@ -11,6 +11,7 @@ using System.Xml;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
@ -80,8 +81,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -80,8 +81,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
DigitsNode node = (DigitsNode)parent;
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
sampleLabel.Font = SharpDevelopTextEditorProperties.Instance.FontContainer.DefaultFont;
color = node.Color;
PreviewUpdate(sampleLabel, color);
}

10
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs

@ -13,6 +13,7 @@ using System.Xml; @@ -13,6 +13,7 @@ using System.Xml;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.TextEditor.Document;
namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
@ -142,12 +143,6 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -142,12 +143,6 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
Font basefont;
Font listfont;
static Font ParseFont(string font)
{
string[] descr = font.Split(new char[]{',', '='});
return new Font(descr[1], Single.Parse(descr[3]));
}
public EnvironmentItem(int index, string name, EditorHighlightColor color, Font listFont) : base(new string[] {name, "Sample"})
{
Name = name;
@ -156,8 +151,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -156,8 +151,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
this.UseItemStyleForSubItems = false;
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
basefont = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
basefont = SharpDevelopTextEditorProperties.Instance.FontContainer.DefaultFont;
listfont = listFont;
ColorUpdate();

4
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/KeywordListNode.cs

@ -12,6 +12,7 @@ using System.Xml; @@ -12,6 +12,7 @@ using System.Xml;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
@ -149,8 +150,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -149,8 +150,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
listBox.Items.Add(word);
}
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
sampleLabel.Font = SharpDevelopTextEditorProperties.Instance.FontContainer.DefaultFont;
color = node.Color;
nameBox.Text = node.Name;

4
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/MarkerNode.cs

@ -11,6 +11,7 @@ using System.Xml; @@ -11,6 +11,7 @@ using System.Xml;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
@ -132,8 +133,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -132,8 +133,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
MarkerNode node = (MarkerNode)parent;
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
sampleLabel.Font = SharpDevelopTextEditorProperties.Instance.FontContainer.DefaultFont;
color = node.Color;
nameBox.Text = node.What;

4
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/SpanNode.cs

@ -317,9 +317,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -317,9 +317,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
} catch {}
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
////samBegin.Font = samEnd.Font = samCont.Font = ParseFont(properties.Get("DefaultFont", new Font("Courier New", 10).ToString()));
samBegin.Font = samEnd.Font = samCont.Font = ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.SharpDevelopTextEditorProperties.FontContainer.DefaultFont;
samBegin.Font = samEnd.Font = samCont.Font = ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.SharpDevelopTextEditorProperties.Instance.FontContainer.DefaultFont;
nameBox.Text = node.Name;
ruleBox.Text = node.Rule;

2
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs

@ -39,7 +39,7 @@ namespace ICSharpCode.Svn @@ -39,7 +39,7 @@ namespace ICSharpCode.Svn
textEditor.Dock = DockStyle.Fill;
diffViewPanel.Controls.Add(textEditor);
textEditor.TextEditorProperties = new SharpDevelopTextEditorProperties();
textEditor.TextEditorProperties = SharpDevelopTextEditorProperties.Instance;
textEditor.Document.ReadOnly = true;
textEditor.Enabled = false;

13
src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/DefaultTextEditorProperties.cs

@ -50,7 +50,7 @@ namespace ICSharpCode.TextEditor.Document @@ -50,7 +50,7 @@ namespace ICSharpCode.TextEditor.Document
bool showHorizontalRuler = false;
bool showVerticalRuler = true;
bool convertTabsToSpaces = false;
bool useAntiAliasedFont = false;
System.Drawing.Text.TextRenderingHint textRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
bool createBackupCopy = false;
bool mouseWheelScrollDown = true;
bool mouseWheelTextZoom = true;
@ -186,14 +186,11 @@ namespace ICSharpCode.TextEditor.Document @@ -186,14 +186,11 @@ namespace ICSharpCode.TextEditor.Document
convertTabsToSpaces = value;
}
}
public bool UseAntiAliasedFont {
get {
return useAntiAliasedFont;
}
set {
useAntiAliasedFont = value;
}
public System.Drawing.Text.TextRenderingHint TextRenderingHint {
get { return textRenderingHint; }
set { textRenderingHint = value; }
}
public bool CreateBackupCopy {
get {
return createBackupCopy;

2
src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/ITextEditorProperties.cs

@ -43,7 +43,7 @@ namespace ICSharpCode.TextEditor.Document @@ -43,7 +43,7 @@ namespace ICSharpCode.TextEditor.Document
set;
}
bool UseAntiAliasedFont { // is wrapped in text editor control
System.Drawing.Text.TextRenderingHint TextRenderingHint { // is wrapped in text editor control
get;
set;
}

7
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs

@ -476,6 +476,7 @@ namespace ICSharpCode.TextEditor @@ -476,6 +476,7 @@ namespace ICSharpCode.TextEditor
Graphics g = e.Graphics;
Rectangle clipRectangle = e.ClipRectangle;
g.TextRenderingHint = this.TextEditorProperties.TextRenderingHint;
if (updateMargin != null) {
updateMargin.Paint(g, updateMargin.DrawingPosition);
@ -486,12 +487,6 @@ namespace ICSharpCode.TextEditor @@ -486,12 +487,6 @@ namespace ICSharpCode.TextEditor
return;
}
if (this.TextEditorProperties.UseAntiAliasedFont) {
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
} else {
g.TextRenderingHint = TextRenderingHint.SystemDefault;
}
foreach (AbstractMargin margin in leftMargins) {
if (margin.IsVisible) {
Rectangle marginRectangle = new Rectangle(currentXPos , currentYPos, margin.Size.Width, Height - currentYPos);

13
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs

@ -10,6 +10,7 @@ using System.Collections.Generic; @@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Text;
using System.IO;
using System.Text;
using System.Windows.Forms;
@ -174,17 +175,17 @@ namespace ICSharpCode.TextEditor @@ -174,17 +175,17 @@ namespace ICSharpCode.TextEditor
}
/// <value>
/// If true antialiased fonts are used inside the textarea
/// Specifies the quality of text rendering (whether to use hinting and/or anti-aliasing).
/// </value>
[Category("Appearance")]
[DefaultValue(false)]
[Description("If true antialiased fonts are used inside the textarea")]
public bool UseAntiAliasFont {
[DefaultValue(TextRenderingHint.SystemDefault)]
[Description("Specifies the quality of text rendering (whether to use hinting and/or anti-aliasing).")]
public TextRenderingHint TextRenderingHint {
get {
return document.TextEditorProperties.UseAntiAliasedFont;
return document.TextEditorProperties.TextRenderingHint;
}
set {
document.TextEditorProperties.UseAntiAliasedFont = value;
document.TextEditorProperties.TextRenderingHint = value;
OptionsChanged();
}
}

6
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextView.cs

@ -90,12 +90,6 @@ namespace ICSharpCode.TextEditor @@ -90,12 +90,6 @@ namespace ICSharpCode.TextEditor
public TextView(TextArea textArea) : base(textArea)
{
/*measureStringFormat.LineAlignment = StringAlignment.Near;
measureStringFormat.FormatFlags = StringFormatFlags.MeasureTrailingSpaces |
StringFormatFlags.FitBlackBox |
StringFormatFlags.NoWrap |
StringFormatFlags.NoClip;*/
base.Cursor = Cursors.IBeam;
OptionsChanged();
}

6
src/Libraries/ICSharpCode.TextEditor/Project/Src/Util/TipPainter.cs

@ -11,7 +11,7 @@ using System.Windows.Forms; @@ -11,7 +11,7 @@ using System.Windows.Forms;
namespace ICSharpCode.TextEditor.Util
{
sealed class TipPainter
static class TipPainter
{
const float HorizontalBorder = 2;
const float VerticalBorder = 1;
@ -19,10 +19,6 @@ namespace ICSharpCode.TextEditor.Util @@ -19,10 +19,6 @@ namespace ICSharpCode.TextEditor.Util
//static StringFormat centerTipFormat = CreateTipStringFormat();
TipPainter()
{
}
public static Size GetTipSize(Control control, Graphics graphics, Font font, string description)
{
return GetTipSize(control, graphics, new TipText (graphics, font, description));

92
src/Main/Base/Project/Resources/GeneralTextEditorPanel.xfrm

@ -5,137 +5,127 @@ @@ -5,137 +5,127 @@
<Controls>
<System.Windows.Forms.GroupBox>
<Name value="CreatedObject2" />
<Location value="{X=8,Y=8}" />
<Location value="8, 8" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.GeneralOptionsGroupBox}" />
<Size value="{Width=360, Height=80}" />
<TabIndex value="0" />
<Anchor value="Top, Left, Right" />
<Size value="360, 80" />
<TabIndex value="0" />
<Controls>
<System.Windows.Forms.CheckBox>
<Name value="showQuickClassBrowserCheckBox" />
<Location value="{X=8,Y=52}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Location value="8, 52" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.ShowQuickClassBrowserCheckBox}" />
<TabIndex value="4" />
<Size value="{Width=344, Height=24}" />
<Size value="344, 24" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="enableFoldingCheckBox" />
<Location value="{X=184,Y=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Location value="8, 24" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.FoldingCheckBox}" />
<TabIndex value="3" />
<Size value="{Width=168, Height=24}" />
<Size value="344, 24" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="enableDoublebufferingCheckBox" />
<Location value="{X=8,Y=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.DoubleBufferCheckBox}" />
<TabIndex value="2" />
<Size value="{Width=168, Height=24}" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="CreatedObject7" />
<Location value="{X=8,Y=96}" />
<Location value="8, 96" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.FontGroupBox}" />
<Size value="{Width=360, Height=136}" />
<TabIndex value="1" />
<Anchor value="Top, Left, Right" />
<Size value="360, 136" />
<TabIndex value="1" />
<Controls>
<System.Windows.Forms.Label>
<Name value="fontPreviewLabel" />
<Location value="{X=8,Y=71}" />
<Location value="8, 71" />
<Text value="AaBbCcXxYyZz" />
<BorderStyle value="FixedSingle" />
<Anchor value="Top, Left, Right" />
<TextAlign value="MiddleCenter" />
<Size value="{Width=344, Height=40}" />
<TabIndex value="4" />
<Size value="344, 40" />
<BackColor value="Color [ControlLightLight]" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" />
<BorderStyle value="FixedSingle" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="fontSizeLabel" />
<Location value="{X=248,Y=21}" />
<Location value="248, 21" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.FontSizeLabel}" />
<Anchor value="Top, Left, Right" />
<TextAlign value="BottomLeft" />
<Size value="{Width=100, Height=20}" />
<Size value="100, 20" />
<TabIndex value="2" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="fontSizeComboBox" />
<Size value="104, 21" />
<TabIndex value="3" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=104, Height=21}" />
<FormattingEnabled value="True" />
<Location value="{X=248,Y=41}" />
<Location value="248, 41" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.ComboBox>
<Name value="fontListComboBox" />
<DrawMode value="OwnerDrawFixed" />
<Size value="224, 21" />
<TabIndex value="1" />
<Size value="{Width=224, Height=22}" />
<DrawMode value="OwnerDrawFixed" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
<Location value="{X=8,Y=40}" />
<RightToLeft value="No" />
<RightToLeft value="No" />
<Location value="8, 40" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.CheckBox>
<Name value="mouseWheelZoomCheckBox" />
<Location value="{X=192,Y=109}" />
<Location value="192, 109" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.MouseWheelZoomCheckBoxCheckBox}" />
<TabIndex value="6" />
<Size value="{Width=160, Height=24}" />
<Size value="160, 24" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label>
<Name value="CreatedObject9" />
<Location value="{X=8,Y=20}" />
<Location value="8, 20" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.TextfontLabel}" />
<TextAlign value="BottomLeft" />
<Size value="{Width=208, Height=20}" />
<Size value="208, 20" />
<TabIndex value="0" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="enableAAFontRenderingCheckBox" />
<Location value="{X=8,Y=108}" />
<Location value="8, 108" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.AntialiasedFontCheckBox}" />
<TabIndex value="5" />
<Size value="{Width=184, Height=24}" />
<Size value="184, 24" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="CreatedObject8b" />
<Location value="{X=8,Y=240}" />
<Location value="8, 240" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.FontGroupBox.FileEncodingGroupBox}" />
<Size value="{Width=360, Height=72}" />
<TabIndex value="2" />
<Anchor value="Top, Left, Right" />
<Size value="360, 72" />
<TabIndex value="2" />
<Controls>
<System.Windows.Forms.Label>
<Name value="CreatedObject9b" />
<Location value="{X=8,Y=24}" />
<Location value="8, 24" />
<Text value="${res:Dialog.Options.IDEOptions.TextEditor.General.FontGroupBox.FileEncodingLabel}" />
<Anchor value="Top, Left, Right" />
<TextAlign value="BottomLeft" />
<Size value="{Width=336, Height=16}" />
<Size value="336, 16" />
<TabIndex value="0" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="textEncodingComboBox" />
<Size value="344, 21" />
<TabIndex value="1" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=344, Height=21}" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
<Location value="{X=8,Y=40}" />
<RightToLeft value="No" />
<RightToLeft value="No" />
<Location value="8, 40" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
</Controls>
</System.Windows.Forms.GroupBox>

7
src/Main/Base/Project/Src/Commands/ToolsCommands.cs

@ -16,9 +16,7 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -16,9 +16,7 @@ namespace ICSharpCode.SharpDevelop.Commands
{
public static void ShowTabbedOptions(string dialogTitle, AddInTreeNode node)
{
TabbedOptions o = new TabbedOptions(dialogTitle,
((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties())),
node);
TabbedOptions o = new TabbedOptions(dialogTitle, node);
o.Width = 450;
o.Height = 425;
o.FormBorderStyle = FormBorderStyle.FixedDialog;
@ -28,8 +26,7 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -28,8 +26,7 @@ namespace ICSharpCode.SharpDevelop.Commands
public override void Run()
{
using (TreeViewOptions optionsDialog = new TreeViewOptions((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()),
AddInTree.GetTreeNode("/SharpDevelop/Dialogs/OptionsDialog"))) {
using (TreeViewOptions optionsDialog = new TreeViewOptions(AddInTree.GetTreeNode("/SharpDevelop/Dialogs/OptionsDialog"))) {
optionsDialog.FormBorderStyle = FormBorderStyle.FixedDialog;
optionsDialog.Owner = WorkbenchSingleton.MainForm;

4
src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs

@ -18,7 +18,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -18,7 +18,7 @@ namespace ICSharpCode.SharpDevelop.Gui
{
bool wasActivated = false;
bool isFinished = true;
object customizationObject = null;
object customizationObject;
public Control Control {
get {
@ -32,7 +32,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -32,7 +32,7 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public virtual object CustomizationObject {
public object CustomizationObject {
get {
return customizationObject;
}

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractProjectOptionPanel.cs

@ -21,7 +21,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -21,7 +21,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
protected void InitializeHelper()
{
project = (MSBuildBasedProject)((Properties)CustomizationObject).Get("Project");
project = (MSBuildBasedProject)CustomizationObject;
baseDirectory = project.Directory;
helper = new ConfigurationGuiHelper(project, this.ControlDictionary);
}

5
src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsView.cs

@ -68,13 +68,10 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs @@ -68,13 +68,10 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
void AddOptionPanels(IEnumerable<IDialogPanelDescriptor> dialogPanelDescriptors)
{
Properties newProperties = new Properties();
newProperties.Set("Project", project);
foreach (IDialogPanelDescriptor descriptor in dialogPanelDescriptors) {
descriptors.Add(descriptor);
if (descriptor != null && descriptor.DialogPanel != null && descriptor.DialogPanel.Control != null) { // may be null, if it is only a "path"
descriptor.DialogPanel.CustomizationObject = newProperties;
descriptor.DialogPanel.CustomizationObject = project;
descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Activated);
ICanBeDirty dirtyable = descriptor.DialogPanel as ICanBeDirty;
if (dirtyable != null) {

6
src/Main/Base/Project/Src/Gui/Dialogs/TabbedOptions.cs

@ -22,7 +22,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -22,7 +22,6 @@ namespace ICSharpCode.SharpDevelop.Gui
public class TabbedOptions : BaseSharpDevelopForm
{
ArrayList OptionPanels = new ArrayList();
Properties properties = null;
void AcceptEvent(object sender, EventArgs e)
{
@ -38,7 +37,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -38,7 +37,6 @@ namespace ICSharpCode.SharpDevelop.Gui
{
foreach (IDialogPanelDescriptor descriptor in dialogPanelDescriptors) {
if (descriptor != null && descriptor.DialogPanel != null && descriptor.DialogPanel.Control != null) { // may be null, if it is only a "path"
descriptor.DialogPanel.CustomizationObject = properties;
descriptor.DialogPanel.Control.Dock = DockStyle.Fill;
descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Activated);
OptionPanels.Add(descriptor.DialogPanel);
@ -55,10 +53,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -55,10 +53,8 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public TabbedOptions(string dialogName, Properties properties, AddInTreeNode node)
public TabbedOptions(string dialogName, AddInTreeNode node)
{
this.properties = properties;
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.TabbedOptionsDialog.xfrm"));
this.Text = dialogName;

13
src/Main/Base/Project/Src/Gui/Dialogs/TreeViewOptions.cs

@ -53,17 +53,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -53,17 +53,9 @@ namespace ICSharpCode.SharpDevelop.Gui
protected List<IDialogPanel> OptionPanels = new List<IDialogPanel>();
protected Properties properties = null;
protected Font plainFont = null;
protected Font boldFont = null;
public Properties Properties {
get {
return properties;
}
}
protected void AcceptEvent(object sender, EventArgs e)
{
foreach (IDialogPanel pane in OptionPanels) {
@ -139,7 +131,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -139,7 +131,6 @@ namespace ICSharpCode.SharpDevelop.Gui
IDialogPanelDescriptor descriptor = node.Tag as IDialogPanelDescriptor;
if (descriptor != null && descriptor.DialogPanel != null && descriptor.DialogPanel.Control != null) {
if (!OptionPanels.Contains(descriptor.DialogPanel)) {
descriptor.DialogPanel.CustomizationObject = this.properties;
descriptor.DialogPanel.Control.Dock = DockStyle.Fill;
OptionPanels.Add(descriptor.DialogPanel);
}
@ -205,10 +196,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -205,10 +196,8 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public TreeViewOptions(Properties properties, AddInTreeNode node)
public TreeViewOptions(AddInTreeNode node)
{
this.properties = properties;
this.Text = StringParser.Parse("${res:Dialog.Options.TreeViewOptions.DialogName}");
this.InitializeComponent();

38
src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs

@ -38,10 +38,20 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -38,10 +38,20 @@ namespace ICSharpCode.SharpDevelop.Gui
{
ctl = new TextEditorControl();
ctl.Document.ReadOnly = true;
ctl.TextEditorProperties = new SharpDevelopTextEditorProperties();
ctl.TextEditorProperties = SharpDevelopTextEditorProperties.Instance;
ctl.ActiveTextAreaControl.TextArea.DoubleClick += OnDoubleClick;
ParserService.ParserUpdateStepFinished += UpdateTick;
ctl.VisibleChanged += delegate { UpdateTick(null, null); };
ParserService.ParserUpdateStepFinished += OnParserUpdateStep;
ctl.VisibleChanged += delegate { UpdateTick(null); };
}
/// <summary>
/// Cleans up all used resources
/// </summary>
public override void Dispose()
{
ParserService.ParserUpdateStepFinished -= OnParserUpdateStep;
ctl.Dispose();
base.Dispose();
}
void OnDoubleClick(object sender, EventArgs e)
@ -52,19 +62,25 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -52,19 +62,25 @@ namespace ICSharpCode.SharpDevelop.Gui
FileService.JumpToFilePosition(fileName, caret.Line, caret.Column);
// refresh DefinitionView to show the definition of the expression that was double-clicked
UpdateTick(null, null);
UpdateTick(null);
}
}
void UpdateTick(object sender, ParserUpdateStepEventArgs e)
void OnParserUpdateStep(object sender, ParserUpdateStepEventArgs e)
{
WorkbenchSingleton.SafeThreadAsyncCall(UpdateTick, e);
}
void UpdateTick(ParserUpdateStepEventArgs e)
{
if (!this.IsVisible) return;
LoggingService.Debug("DefinitionViewPad.Update");
ResolveResult res = ResolveAtCaret(e);
if (res == null) return;
FilePosition pos = res.GetDefinitionPosition();
if (pos.IsEmpty) return;
WorkbenchSingleton.SafeThreadAsyncCall(OpenFile, pos);
OpenFile(pos);
}
ResolveResult ResolveAtCaret(ParserUpdateStepEventArgs e)
@ -130,15 +146,5 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -130,15 +146,5 @@ namespace ICSharpCode.SharpDevelop.Gui
{
// Refresh the whole pad control here, renew all resource strings whatever.
}
/// <summary>
/// Cleans up all used resources
/// </summary>
public override void Dispose()
{
ParserService.ParserUpdateStepFinished -= UpdateTick;
ctl.Dispose();
base.Dispose();
}
}
}

3
src/Main/Base/Project/Src/Services/AmbienceService/AmbienceService.cs

@ -17,7 +17,6 @@ namespace ICSharpCode.SharpDevelop @@ -17,7 +17,6 @@ namespace ICSharpCode.SharpDevelop
{
const string ambienceProperty = "SharpDevelop.UI.CurrentAmbience";
const string codeGenerationProperty = "SharpDevelop.UI.CodeGenerationOptions";
const string textEditorProperty = "ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties";
static AmbienceService()
{
@ -116,7 +115,7 @@ namespace ICSharpCode.SharpDevelop @@ -116,7 +115,7 @@ namespace ICSharpCode.SharpDevelop
defaultAmbience = null;
OnAmbienceChanged(EventArgs.Empty);
}
if (e.Key == codeGenerationProperty || e.Key == textEditorProperty) {
if (e.Key == codeGenerationProperty) {
ApplyCodeGenerationPropertiesToNRefactory();
}
}

7
src/Main/Base/Project/Src/Services/AmbienceService/CodeDOMGeneratorUtility.cs

@ -12,6 +12,7 @@ using System.Collections; @@ -12,6 +12,7 @@ using System.Collections;
using System.Text;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
namespace ICSharpCode.SharpDevelop
{
@ -25,11 +26,11 @@ namespace ICSharpCode.SharpDevelop @@ -25,11 +26,11 @@ namespace ICSharpCode.SharpDevelop
options.ElseOnClosing = AmbienceService.CodeGenerationProperties.Get("ElseOnClosing", true);
Properties docProperties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
SharpDevelopTextEditorProperties docProperties = SharpDevelopTextEditorProperties.Instance;
if ((bool)docProperties.Get("TabsToSpaces", false)) {
if (docProperties.ConvertTabsToSpaces) {
StringBuilder indentationString = new StringBuilder();
for (int i = 0; i < (int)docProperties.Get("IndentationSize", 4); ++i) {
for (int i = 0; i < docProperties.IndentationSize; ++i) {
indentationString.Append(' ');
}
options.IndentString = indentationString.ToString();

3
src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

@ -624,8 +624,7 @@ namespace ICSharpCode.SharpDevelop @@ -624,8 +624,7 @@ namespace ICSharpCode.SharpDevelop
public static Encoding DefaultFileEncoding {
get {
Properties textEditorProperties = PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties());
return Encoding.GetEncoding(textEditorProperties.Get("Encoding", 1252));
return DefaultEditor.Gui.Editor.SharpDevelopTextEditorProperties.Instance.Encoding;
}
}

15
src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs

@ -54,14 +54,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -54,14 +54,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public SharpDevelopTextAreaControl()
{
errorDrawer = new ErrorDrawer(this);
Document.FoldingManager.FoldingStrategy = new ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ParserFoldingStrategy();
Document.BookmarkManager.Factory = new Bookmarks.SDBookmarkFactory(Document.BookmarkManager);
Document.BookmarkManager.Added += new BookmarkEventHandler(BookmarkAdded);
Document.BookmarkManager.Removed += new BookmarkEventHandler(BookmarkRemoved);
GenerateEditActions();
TextEditorProperties = new SharpDevelopTextEditorProperties();
TextEditorProperties = SharpDevelopTextEditorProperties.Instance;
}
void BookmarkAdded(object sender, BookmarkEventArgs e)
@ -167,6 +166,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -167,6 +166,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
} else {
ActivateQuickClassBrowserOnDemand();
}
if (sdtep.UnderlineErrors) {
if (errorDrawer == null) {
errorDrawer = new ErrorDrawer(this);
}
} else {
if (errorDrawer != null) {
errorDrawer.Dispose();
errorDrawer = null;
}
}
}
}
@ -285,7 +294,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -285,7 +294,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
return false;
}
}
if (ch == ' ') {
if (ch == ' ' && SharpDevelopTextEditorProperties.Instance.AutoInsertTemplates) {
string word = GetWordBeforeCaret();
if (word != null) {
CodeTemplateGroup templateGroup = CodeTemplateLoader.GetTemplateGroupPerFilename(FileName);

102
src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextEditorProperties.cs

@ -8,46 +8,58 @@ @@ -8,46 +8,58 @@
using System;
using System.Drawing;
using System.Text;
using System.Drawing.Text;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui.OptionPanels;
using ICSharpCode.TextEditor.Document;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
{
public class SharpDevelopTextEditorProperties : ITextEditorProperties
public sealed class SharpDevelopTextEditorProperties : ITextEditorProperties
{
static Properties properties;
static FontContainer fontContainer;
static SharpDevelopTextEditorProperties textEditorProperties;
Properties properties;
FontContainer fontContainer;
public static SharpDevelopTextEditorProperties Instance {
get {
if (textEditorProperties == null) {
textEditorProperties = new SharpDevelopTextEditorProperties();
}
return textEditorProperties;
}
}
static SharpDevelopTextEditorProperties()
private SharpDevelopTextEditorProperties()
{
Properties properties2 = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
fontContainer = new FontContainer(FontContainer.ParseFont(properties2.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString())));
properties2.PropertyChanged += new PropertyChangedEventHandler(CheckFontChange);
properties = PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties());
fontContainer = new FontContainer(FontContainer.ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString())));
properties.PropertyChanged += new PropertyChangedEventHandler(CheckFontChange);
}
static void CheckFontChange(object sender, PropertyChangedEventArgs e)
void CheckFontChange(object sender, PropertyChangedEventArgs e)
{
if (e.Key == "DefaultFont") {
fontContainer.DefaultFont = FontContainer.ParseFont(e.NewValue.ToString());
}
}
public SharpDevelopTextEditorProperties()
{
properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
}
public int TabIndent {
get {
return properties.Get("TabIndent", 4);
}
set {
properties.Set("TabIndent", value);
}
}
public int IndentationSize {
get {
return properties.Get("IndentationSize", 4);
}
set {
properties.Set("IndentationSize", value);
}
}
public IndentStyle IndentStyle {
get {
return (IndentStyle)properties.Get("IndentStyle", IndentStyle.Smart);
@ -83,6 +95,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -83,6 +95,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
properties.Set("CursorBehindEOL", value);
}
}
public bool UnderlineErrors {
get {
return properties.Get("ShowErrors", true);
}
set {
properties.Set("ShowErrors", value);
}
}
public bool ShowMatchingBracket {
get {
return properties.Get("ShowBracketHighlight", true);
@ -171,22 +191,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -171,22 +191,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
properties.Set("TabsToSpaces", value);
}
}
public bool UseAntiAliasedFont {
get {
return properties.Get("UseAntiAliasFont", false);
}
set {
properties.Set("UseAntiAliasFont", value);
}
}
public bool CreateBackupCopy {
get {
return properties.Get("CreateBackupCopy", false);
}
set {
properties.Set("CreateBackupCopy", value);
}
}
public bool MouseWheelScrollDown {
get {
return properties.Get("MouseWheelScrollDown", true);
@ -225,12 +229,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -225,12 +229,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public Encoding Encoding {
get {
return Encoding.GetEncoding(properties.Get("Encoding", 65001));
return Encoding.GetEncoding(this.EncodingCodePage);
}
set {
properties.Set("Encoding", value.CodePage);
this.EncodingCodePage = value.CodePage;
}
}
public int EncodingCodePage {
get { return properties.Get("Encoding", 65001); }
set { properties.Set("Encoding", value); }
}
public int VerticalRulerRow {
get {
@ -271,6 +279,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -271,6 +279,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
properties.Set("AutoInsertCurlyBracket", value);
}
}
public bool AutoInsertTemplates {
get {
return properties.Get("AutoInsertTemplates", true);
}
set {
properties.Set("AutoInsertTemplates", value);
}
}
public Font Font {
get {
@ -281,20 +297,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -281,20 +297,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
fontContainer.DefaultFont = value;
}
}
FontContainer ITextEditorProperties.FontContainer {
public FontContainer FontContainer {
get {
return fontContainer;
}
}
public static FontContainer FontContainer {
get {
return fontContainer;
}
}
public BracketMatchingStyle BracketMatchingStyle {
get {
return (BracketMatchingStyle)properties.Get("BracketMatchingStyle", BracketMatchingStyle.After);
return properties.Get("BracketMatchingStyle", BracketMatchingStyle.After);
}
set {
properties.Set("BracketMatchingStyle", value);
@ -310,5 +320,15 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -310,5 +320,15 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
useCustomLine = value;
}
}
public TextRenderingHint TextRenderingHint {
get {
return properties.Get("TextRenderingHint", TextRenderingHint.SystemDefault);
}
set {
LoggingService.Debug("Setting TextRenderingHint to " + value);
properties.Set("TextRenderingHint", value);
}
}
}
}

46
src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs

@ -24,40 +24,44 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -24,40 +24,44 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.BehaviorTextEditorPanel.xfrm"));
((CheckBox)ControlDictionary["autoinsertCurlyBraceCheckBox"]).Checked = ((Properties)CustomizationObject).Get("AutoInsertCurlyBracket", true);
((CheckBox)ControlDictionary["hideMouseCursorCheckBox"]).Checked = ((Properties)CustomizationObject).Get("HideMouseCursor", true);
((CheckBox)ControlDictionary["caretBehindEOLCheckBox"]).Checked = ((Properties)CustomizationObject).Get("CursorBehindEOL", false);
((CheckBox)ControlDictionary["auotInsertTemplatesCheckBox"]).Checked = ((Properties)CustomizationObject).Get("AutoInsertTemplates", true);
((CheckBox)ControlDictionary["cutCopyWholeLine"]).Checked = ((Properties)CustomizationObject).Get("CutCopyWholeLine", true);
SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
((CheckBox)ControlDictionary["convertTabsToSpacesCheckBox"]).Checked = ((Properties)CustomizationObject).Get("TabsToSpaces", false);
((CheckBox)ControlDictionary["autoinsertCurlyBraceCheckBox"]).Checked = properties.AutoInsertCurlyBracket;
((CheckBox)ControlDictionary["hideMouseCursorCheckBox"]).Checked = properties.HideMouseCursor;
((CheckBox)ControlDictionary["caretBehindEOLCheckBox"]).Checked = properties.AllowCaretBeyondEOL;
((CheckBox)ControlDictionary["auotInsertTemplatesCheckBox"]).Checked = properties.AutoInsertTemplates;
((CheckBox)ControlDictionary["cutCopyWholeLine"]).Checked = properties.CutCopyWholeLine;
ControlDictionary["tabSizeTextBox"].Text = ((Properties)CustomizationObject).Get("TabIndent", 4).ToString();
ControlDictionary["indentSizeTextBox"].Text = ((Properties)CustomizationObject).Get("IndentationSize", 4).ToString();
((CheckBox)ControlDictionary["convertTabsToSpacesCheckBox"]).Checked = properties.ConvertTabsToSpaces;
ControlDictionary["tabSizeTextBox"].Text = properties.TabIndent.ToString();
ControlDictionary["indentSizeTextBox"].Text = properties.IndentationSize.ToString();
((ComboBox)ControlDictionary["indentStyleComboBox"]).Items.Add(StringParser.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.None}"));
((ComboBox)ControlDictionary["indentStyleComboBox"]).Items.Add(StringParser.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.Automatic}"));
((ComboBox)ControlDictionary["indentStyleComboBox"]).Items.Add(StringParser.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.Smart}"));
((ComboBox)ControlDictionary["indentStyleComboBox"]).SelectedIndex = (int)(IndentStyle)((Properties)CustomizationObject).Get("IndentStyle", IndentStyle.Smart);
((ComboBox)ControlDictionary["indentStyleComboBox"]).SelectedIndex = (int)properties.IndentStyle;
((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).Items.Add(StringParser.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.NormalMouseDirectionRadioButton}"));
((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).Items.Add(StringParser.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.ReverseMouseDirectionRadioButton}"));
((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).SelectedIndex = ((Properties)CustomizationObject).Get("MouseWheelScrollDown", true) ? 0 : 1;
((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).SelectedIndex = properties.MouseWheelScrollDown ? 0 : 1;
}
public override bool StorePanelContents()
{
((Properties)CustomizationObject).Set("TabsToSpaces", ((CheckBox)ControlDictionary["convertTabsToSpacesCheckBox"]).Checked);
((Properties)CustomizationObject).Set("MouseWheelScrollDown", ((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).SelectedIndex == 0);
SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
properties.ConvertTabsToSpaces = ((CheckBox)ControlDictionary["convertTabsToSpacesCheckBox"]).Checked;
properties.MouseWheelScrollDown = ((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).SelectedIndex == 0;
((Properties)CustomizationObject).Set("AutoInsertCurlyBracket", ((CheckBox)ControlDictionary["autoinsertCurlyBraceCheckBox"]).Checked);
((Properties)CustomizationObject).Set("HideMouseCursor", ((CheckBox)ControlDictionary["hideMouseCursorCheckBox"]).Checked);
((Properties)CustomizationObject).Set("CursorBehindEOL", ((CheckBox)ControlDictionary["caretBehindEOLCheckBox"]).Checked);
((Properties)CustomizationObject).Set("AutoInsertTemplates", ((CheckBox)ControlDictionary["auotInsertTemplatesCheckBox"]).Checked);
((Properties)CustomizationObject).Set("CutCopyWholeLine", ((CheckBox)ControlDictionary["cutCopyWholeLine"]).Checked);
properties.AutoInsertCurlyBracket = ((CheckBox)ControlDictionary["autoinsertCurlyBraceCheckBox"]).Checked;
properties.HideMouseCursor = ((CheckBox)ControlDictionary["hideMouseCursorCheckBox"]).Checked;
properties.AllowCaretBeyondEOL = ((CheckBox)ControlDictionary["caretBehindEOLCheckBox"]).Checked;
properties.AutoInsertTemplates = ((CheckBox)ControlDictionary["auotInsertTemplatesCheckBox"]).Checked;
properties.CutCopyWholeLine = ((CheckBox)ControlDictionary["cutCopyWholeLine"]).Checked;
((Properties)CustomizationObject).Set("IndentStyle", (IndentStyle)((ComboBox)ControlDictionary["indentStyleComboBox"]).SelectedIndex);
properties.IndentStyle = (IndentStyle)((ComboBox)ControlDictionary["indentStyleComboBox"]).SelectedIndex;
try {
int tabSize = Int32.Parse(ControlDictionary["tabSizeTextBox"].Text);
@ -65,13 +69,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -65,13 +69,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
// FIX: don't allow to set tab size to zero as this will cause divide by zero exceptions in the text control.
// Zero isn't a setting that makes sense, anyway.
if (tabSize > 0) {
((Properties)CustomizationObject).Set("TabIndent", tabSize);
properties.TabIndent = tabSize;
}
} catch (Exception) {
}
try {
((Properties)CustomizationObject).Set("IndentationSize", Int32.Parse(ControlDictionary["indentSizeTextBox"].Text));
properties.IndentationSize = Int32.Parse(ControlDictionary["indentSizeTextBox"].Text);
} catch (Exception) {
}

76
src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
using System;
using System.Drawing;
using System.Drawing.Text;
using System.Text;
using System.Windows.Forms;
@ -22,8 +23,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -22,8 +23,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
/// </summary>
public class GeneralTextEditorPanel : AbstractOptionPanel
{
int encoding = Encoding.UTF8.CodePage;
ComboBox fontListComboBox, fontSizeComboBox;
FontSelectionPanelHelper helper;
@ -34,25 +33,24 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -34,25 +33,24 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
fontListComboBox = ((ComboBox)ControlDictionary["fontListComboBox"]);
fontSizeComboBox = ((ComboBox)ControlDictionary["fontSizeComboBox"]);
((CheckBox)ControlDictionary["enableDoublebufferingCheckBox"]).Checked = ((Properties)CustomizationObject).Get("DoubleBuffer", true);
//((CheckBox)ControlDictionary["enableCodeCompletionCheckBox"]).Checked = ((Properties)CustomizationObject).Get("EnableCodeCompletion", true);
((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked = ((Properties)CustomizationObject).Get("EnableFolding", true);
((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowQuickClassBrowserPanel", true);
SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked = properties.EnableFolding;
((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked = properties.ShowQuickClassBrowserPanel;
((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked = ((Properties)CustomizationObject).Get("UseAntiAliasFont", false);
((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked = ((Properties)CustomizationObject).Get("MouseWheelTextZoom", true);
((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked = UseAntialiasing;
((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked = properties.MouseWheelTextZoom;
foreach (String name in CharacterEncodings.Names) {
((ComboBox)ControlDictionary["textEncodingComboBox"]).Items.Add(name);
}
int encodingIndex = 0;
try {
encodingIndex = CharacterEncodings.GetEncodingIndex((Int32)((Properties)CustomizationObject).Get("Encoding", encoding));
encodingIndex = CharacterEncodings.GetEncodingIndex(properties.EncodingCodePage);
} catch {
encodingIndex = CharacterEncodings.GetEncodingIndex(encoding);
encodingIndex = CharacterEncodings.GetEncodingIndex(Encoding.UTF8.CodePage);
}
((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex = encodingIndex;
encoding = CharacterEncodings.GetEncodingByIndex(encodingIndex).CodePage;
for (int i = 6; i <= 24; ++i) {
fontSizeComboBox.Items.Add(i);
@ -65,7 +63,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -65,7 +63,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
fontListComboBox.TextChanged += new EventHandler(UpdateFontPreviewLabel);
fontListComboBox.SelectedIndexChanged += new EventHandler(UpdateFontPreviewLabel);
Font currentFont = FontSelectionPanel.ParseFont(((Properties)CustomizationObject).Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()).ToString());
Font currentFont = FontSelectionPanel.ParseFont(properties.FontContainer.DefaultFont.ToString());
helper = new FontSelectionPanelHelper(fontSizeComboBox, fontListComboBox, currentFont);
fontListComboBox.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(helper.MeasureComboBoxItem);
@ -75,6 +73,33 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -75,6 +73,33 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
helper.StartThread();
}
bool UseAntialiasing {
get {
switch (SharpDevelopTextEditorProperties.Instance.TextRenderingHint) {
case TextRenderingHint.SystemDefault:
return SystemInformation.IsFontSmoothingEnabled;
case TextRenderingHint.SingleBitPerPixel:
case TextRenderingHint.SingleBitPerPixelGridFit:
return false;
default:
return true;
}
}
set {
if (value == true) {
if (SystemInformation.IsFontSmoothingEnabled)
SharpDevelopTextEditorProperties.Instance.TextRenderingHint = TextRenderingHint.SystemDefault;
else
SharpDevelopTextEditorProperties.Instance.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
} else {
if (SystemInformation.IsFontSmoothingEnabled)
SharpDevelopTextEditorProperties.Instance.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit;
else
SharpDevelopTextEditorProperties.Instance.TextRenderingHint = TextRenderingHint.SystemDefault;
}
}
}
Font CurrentFont {
get {
return helper.GetSelectedFont();
@ -88,17 +113,19 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -88,17 +113,19 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
public override bool StorePanelContents()
{
((Properties)CustomizationObject).Set("DoubleBuffer", ((CheckBox)ControlDictionary["enableDoublebufferingCheckBox"]).Checked);
((Properties)CustomizationObject).Set("UseAntiAliasFont", ((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked);
((Properties)CustomizationObject).Set("MouseWheelTextZoom", ((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked);
SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
UseAntialiasing = ((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked;
properties.MouseWheelTextZoom = ((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked;
//((Properties)CustomizationObject).Set("EnableCodeCompletion", ((CheckBox)ControlDictionary["enableCodeCompletionCheckBox"]).Checked);
((Properties)CustomizationObject).Set("EnableFolding", ((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked);
properties.EnableFolding = ((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked;
Font currentFont = CurrentFont;
if (currentFont != null) {
((Properties)CustomizationObject).Set("DefaultFont", currentFont.ToString());
properties.Font = currentFont;
}
((Properties)CustomizationObject).Set("Encoding", CharacterEncodings.GetCodePageByIndex(((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex));
((Properties)CustomizationObject).Set("ShowQuickClassBrowserPanel", ((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked);
properties.EncodingCodePage = CharacterEncodings.GetCodePageByIndex(((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex);
properties.ShowQuickClassBrowserPanel = ((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked;
IViewContent activeViewContent = WorkbenchSingleton.Workbench.ActiveViewContent;
@ -108,16 +135,5 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -108,16 +135,5 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
}
return true;
}
static Font ParseFont(string font)
{
try {
string[] descr = font.Split(new char[]{',', '='});
return new Font(descr[1], Single.Parse(descr[3]));
} catch (Exception ex) {
LoggingService.Warn(ex);
return ResourceService.DefaultMonospacedFont;
}
}
}
}

50
src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/MarkersTextEditorPanel.cs

@ -24,49 +24,51 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -24,49 +24,51 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.MarkersTextEditorPanel.xfrm"));
((CheckBox)ControlDictionary["showLineNumberCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowLineNumbers", true);
((CheckBox)ControlDictionary["showInvalidLinesCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowInvalidLines", true);
((CheckBox)ControlDictionary["showBracketHighlighterCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowBracketHighlight", true);
((CheckBox)ControlDictionary["showErrorsCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowErrors", true);
((CheckBox)ControlDictionary["showHRulerCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowHRuler", false);
((CheckBox)ControlDictionary["showEOLMarkersCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowEOLMarkers", false);
((CheckBox)ControlDictionary["showVRulerCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowVRuler", false);
((CheckBox)ControlDictionary["showTabCharsCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowTabs", false);
((CheckBox)ControlDictionary["showSpaceCharsCheckBox"]).Checked = ((Properties)CustomizationObject).Get("ShowSpaces", false);
SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
((CheckBox)ControlDictionary["showLineNumberCheckBox"]).Checked = properties.ShowLineNumbers;
((CheckBox)ControlDictionary["showInvalidLinesCheckBox"]).Checked = properties.ShowInvalidLines;
((CheckBox)ControlDictionary["showBracketHighlighterCheckBox"]).Checked = properties.ShowMatchingBracket;
((CheckBox)ControlDictionary["showErrorsCheckBox"]).Checked = properties.UnderlineErrors;
((CheckBox)ControlDictionary["showHRulerCheckBox"]).Checked = properties.ShowHorizontalRuler;
((CheckBox)ControlDictionary["showEOLMarkersCheckBox"]).Checked = properties.ShowEOLMarker;
((CheckBox)ControlDictionary["showVRulerCheckBox"]).Checked = properties.ShowVerticalRuler;
((CheckBox)ControlDictionary["showTabCharsCheckBox"]).Checked = properties.ShowTabs;
((CheckBox)ControlDictionary["showSpaceCharsCheckBox"]).Checked = properties.ShowSpaces;
ControlDictionary["vRulerRowTextBox"].Text = ((Properties)CustomizationObject).Get("VRulerRow", 80).ToString();
ControlDictionary["vRulerRowTextBox"].Text = properties.VerticalRulerRow.ToString();
((ComboBox)ControlDictionary["lineMarkerStyleComboBox"]).Items.Add(ResourceService.GetString("Dialog.Options.IDEOptions.TextEditor.Markers.LineViewerStyle.None"));
((ComboBox)ControlDictionary["lineMarkerStyleComboBox"]).Items.Add(ResourceService.GetString("Dialog.Options.IDEOptions.TextEditor.Markers.LineViewerStyle.FullRow"));
((ComboBox)ControlDictionary["lineMarkerStyleComboBox"]).SelectedIndex = (int)(LineViewerStyle)((Properties)CustomizationObject).Get("LineViewerStyle", LineViewerStyle.None);
((ComboBox)ControlDictionary["lineMarkerStyleComboBox"]).SelectedIndex = (int)properties.LineViewerStyle;
((ComboBox)ControlDictionary["bracketMatchingStyleComboBox"]).Items.Add(ResourceService.GetString("Dialog.Options.IDEOptions.TextEditor.Markers.BracketMatchingStyle.BeforeCaret"));
((ComboBox)ControlDictionary["bracketMatchingStyleComboBox"]).Items.Add(ResourceService.GetString("Dialog.Options.IDEOptions.TextEditor.Markers.BracketMatchingStyle.AfterCaret"));
((ComboBox)ControlDictionary["bracketMatchingStyleComboBox"]).SelectedIndex = (int)(BracketMatchingStyle)((Properties)CustomizationObject).Get("BracketMatchingStyle", BracketMatchingStyle.After);
((ComboBox)ControlDictionary["bracketMatchingStyleComboBox"]).SelectedIndex = (int)properties.BracketMatchingStyle;
}
public override bool StorePanelContents()
{
((Properties)CustomizationObject).Set("ShowInvalidLines", ((CheckBox)ControlDictionary["showInvalidLinesCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowLineNumbers", ((CheckBox)ControlDictionary["showLineNumberCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowBracketHighlight", ((CheckBox)ControlDictionary["showBracketHighlighterCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowErrors", ((CheckBox)ControlDictionary["showErrorsCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowHRuler", ((CheckBox)ControlDictionary["showHRulerCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowEOLMarkers", ((CheckBox)ControlDictionary["showEOLMarkersCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowVRuler", ((CheckBox)ControlDictionary["showVRulerCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowTabs", ((CheckBox)ControlDictionary["showTabCharsCheckBox"]).Checked);
((Properties)CustomizationObject).Set("ShowSpaces", ((CheckBox)ControlDictionary["showSpaceCharsCheckBox"]).Checked);
SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance;
properties.ShowInvalidLines = ((CheckBox)ControlDictionary["showInvalidLinesCheckBox"]).Checked;
properties.ShowLineNumbers = ((CheckBox)ControlDictionary["showLineNumberCheckBox"]).Checked;
properties.ShowMatchingBracket = ((CheckBox)ControlDictionary["showBracketHighlighterCheckBox"]).Checked;
properties.UnderlineErrors = ((CheckBox)ControlDictionary["showErrorsCheckBox"]).Checked;
properties.ShowHorizontalRuler = ((CheckBox)ControlDictionary["showHRulerCheckBox"]).Checked;
properties.ShowEOLMarker = ((CheckBox)ControlDictionary["showEOLMarkersCheckBox"]).Checked;
properties.ShowVerticalRuler = ((CheckBox)ControlDictionary["showVRulerCheckBox"]).Checked;
properties.ShowTabs = ((CheckBox)ControlDictionary["showTabCharsCheckBox"]).Checked;
properties.ShowSpaces = ((CheckBox)ControlDictionary["showSpaceCharsCheckBox"]).Checked;
try {
((Properties)CustomizationObject).Set("VRulerRow", Int32.Parse(ControlDictionary["vRulerRowTextBox"].Text));
properties.VerticalRulerRow = Int32.Parse(ControlDictionary["vRulerRowTextBox"].Text);
} catch (Exception) {
}
((Properties)CustomizationObject).Set("LineViewerStyle", (LineViewerStyle)((ComboBox)ControlDictionary["lineMarkerStyleComboBox"]).SelectedIndex);
((Properties)CustomizationObject).Set("BracketMatchingStyle", (BracketMatchingStyle)((ComboBox)ControlDictionary["bracketMatchingStyleComboBox"]).SelectedIndex);
properties.LineViewerStyle = (LineViewerStyle)((ComboBox)ControlDictionary["lineMarkerStyleComboBox"]).SelectedIndex;
properties.BracketMatchingStyle = (BracketMatchingStyle)((ComboBox)ControlDictionary["bracketMatchingStyleComboBox"]).SelectedIndex;
IViewContent activeViewContent = WorkbenchSingleton.Workbench.ActiveViewContent;

3
src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/Search.cs

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
using System;
using System.Diagnostics;
using ICSharpCode.SharpDevelop.Gui;
namespace SearchAndReplace
{
@ -80,7 +81,7 @@ namespace SearchAndReplace @@ -80,7 +81,7 @@ namespace SearchAndReplace
}
}
public SearchResult FindNext()
public SearchResult FindNext()
{
// insanity check
Debug.Assert(searchStrategy != null);

Loading…
Cancel
Save