Browse Source

SD2-464. Added projects and solutions options.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1196 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
d4ad2a79a6
  1. 3
      AddIns/ICSharpCode.SharpDevelop.addin
  2. BIN
      data/resources/StringResources.cz.resources
  3. BIN
      data/resources/StringResources.de.resources
  4. BIN
      data/resources/StringResources.hu.resources
  5. BIN
      data/resources/StringResources.it.resources
  6. BIN
      data/resources/StringResources.kr.resources
  7. BIN
      data/resources/StringResources.no.resources
  8. BIN
      data/resources/StringResources.pl.resources
  9. BIN
      data/resources/StringResources.pt-br.resources
  10. BIN
      data/resources/StringResources.se.resources
  11. BIN
      data/resources/StringResources.tr.resources
  12. 8
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  13. 2
      src/AddIns/Misc/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs
  14. 14
      src/AddIns/Misc/NAntAddIn/Project/Src/Commands/AbstractRunNAntCommand.cs
  15. 2
      src/AddIns/Misc/UnitTesting/Src/PadContent.cs
  16. 2
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  17. 68
      src/Main/Base/Project/Resources/ProjectAndSolutionOptionsPanel.xfrm
  18. 63
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndSolutionOptionsPanel.cs
  19. 11
      src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorListPad.cs
  20. 2
      src/Main/Base/Project/Src/Project/MSBuildEngine.cs
  21. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources

3
AddIns/ICSharpCode.SharpDevelop.addin

@ -977,6 +977,9 @@ @@ -977,6 +977,9 @@
<DialogPanel id = "OutputWindowOptions"
label = "${res:Dialog.Options.IDEOptions.OutputPanel.Title}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.OutputWindowOptionsPanel"/>
<DialogPanel id = "ProjectAndSolutionOptions"
label = "${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.PanelName}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.ProjectAndSolutionOptionsPanel"/>
</DialogPanel>
<DialogPanel id = "CodingOptions"
label = "${res:Dialog.Options.IDEOptions.CodingOptionsText}">

BIN
data/resources/StringResources.cz.resources

Binary file not shown.

BIN
data/resources/StringResources.de.resources

Binary file not shown.

BIN
data/resources/StringResources.hu.resources

Binary file not shown.

BIN
data/resources/StringResources.it.resources

Binary file not shown.

BIN
data/resources/StringResources.kr.resources

Binary file not shown.

BIN
data/resources/StringResources.no.resources

Binary file not shown.

BIN
data/resources/StringResources.pl.resources

Binary file not shown.

BIN
data/resources/StringResources.pt-br.resources

Binary file not shown.

BIN
data/resources/StringResources.se.resources

Binary file not shown.

BIN
data/resources/StringResources.tr.resources

Binary file not shown.

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

@ -657,15 +657,9 @@ namespace ICSharpCode.XmlEditor @@ -657,15 +657,9 @@ namespace ICSharpCode.XmlEditor
Category.AppendText(String.Concat(message, Environment.NewLine));
}
bool ShowErrorListAfterBuild {
get {
return PropertyService.Get("SharpDevelop.ShowErrorListAfterBuild", true);
}
}
void ShowErrorList()
{
if (ShowErrorListAfterBuild && TaskService.SomethingWentWrong) {
if (ErrorListPad.ShowAfterBuild && TaskService.SomethingWentWrong) {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront();
}
}

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

@ -150,7 +150,7 @@ namespace ICSharpCode.CodeCoverage @@ -150,7 +150,7 @@ namespace ICSharpCode.CodeCoverage
UnitTestApplicationStartHelper.DisplayResults(unitTestResultsFileName);
DisplayCoverageResults(runner.CoverageResultsFileName);
if (TaskService.SomethingWentWrong) {
if (TaskService.SomethingWentWrong && ErrorListPad.ShowAfterBuild) {
ShowErrorList();
}
}

14
src/AddIns/Misc/NAntAddIn/Project/Src/Commands/AbstractRunNAntCommand.cs

@ -290,14 +290,12 @@ namespace ICSharpCode.NAntAddIn.Commands @@ -290,14 +290,12 @@ namespace ICSharpCode.NAntAddIn.Commands
}
// Bring task list to front.
if (tasks.Count > 0) {
//if ((bool)PropertyService.Get("SharpDevelop.ShowTaskListAfterBuild", true)) {
IWorkbench workbench = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.Workbench;
PadDescriptor padDescriptor = workbench.GetPad(typeof(ErrorListPad));
if (padDescriptor != null) {
WorkbenchSingleton.SafeThreadAsyncCall(padDescriptor, "BringPadToFront");
}
//}
if (tasks.Count > 0 && ErrorListPad.ShowAfterBuild) {
IWorkbench workbench = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.Workbench;
PadDescriptor padDescriptor = workbench.GetPad(typeof(ErrorListPad));
if (padDescriptor != null) {
WorkbenchSingleton.SafeThreadAsyncCall(padDescriptor, "BringPadToFront");
}
}
}

2
src/AddIns/Misc/UnitTesting/Src/PadContent.cs

@ -202,7 +202,7 @@ namespace ICSharpCode.UnitTesting @@ -202,7 +202,7 @@ namespace ICSharpCode.UnitTesting
void ShowErrorList()
{
if (TaskService.SomethingWentWrong) {
if (TaskService.SomethingWentWrong && ErrorListPad.ShowAfterBuild) {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront();
}
}

2
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -755,6 +755,8 @@ @@ -755,6 +755,8 @@
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\ProjectAndSolutionOptionsPanel.cs" />
<EmbeddedResource Include="Resources\ProjectAndSolutionOptionsPanel.xfrm" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj">

68
src/Main/Base/Project/Resources/ProjectAndSolutionOptionsPanel.xfrm

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="ProjectAndSolutionOptionsPanel" />
<ClientSize value="{Width=352, Height=324}" />
<Controls>
<System.Windows.Forms.GroupBox>
<Name value="CreatedObject2" />
<Location value="{X=8,Y=8}" />
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SettingsGroupBox}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=336, Height=104}" />
<TabIndex value="0" />
<Controls>
<System.Windows.Forms.Button>
<Name value="selectProjectLocationButton" />
<Location value="{X=294,Y=32}" />
<Text value="..." />
<Anchor value="Top, Right" />
<Size value="{Width=32, Height=21}" />
<TabIndex value="6" />
</System.Windows.Forms.Button>
<System.Windows.Forms.TextBox>
<Name value="projectLocationTextBox" />
<TabIndex value="1" />
<Size value="{Width=280, Height=21}" />
<Location value="{X=8,Y=32}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label" />
<Location value="{X=8,Y=16}" />
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.ProjectLocationLabel}" />
<Anchor value="Top, Left, Right" />
<TextAlign value="BottomLeft" />
<Size value="{Width=320, Height=16}" />
<TabIndex value="0" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="loadPrevProjectCheckBox" />
<Location value="{X=8,Y=56}" />
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.LoadPrevProjectCheckBox}" />
<TabIndex value="8" />
<Size value="{Width=320, Height=32}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="CreatedObject27" />
<Location value="{X=8,Y=128}" />
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.BuildAndRunGroupBox}" />
<Anchor value="Top, Bottom, Left, Right" />
<Size value="{Width=336, Height=86}" />
<TabIndex value="1" />
<Controls>
<System.Windows.Forms.CheckBox>
<Name value="showErrorListCheckBox" />
<Location value="{X=8,Y=35}" />
<Text value="${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.ShowErrorListPadCheckBox}" />
<TabIndex value="10" />
<Size value="{Width=320, Height=32}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.GroupBox>
</Controls>
</System.Windows.Forms.UserControl>
</Components>

63
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndSolutionOptionsPanel.cs

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.IO;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
public class ProjectAndSolutionOptionsPanel : AbstractOptionPanel
{
public override void LoadPanelContents()
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.ProjectAndSolutionOptionsPanel.xfrm"));
// read properties
ControlDictionary["projectLocationTextBox"].Text = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
"SharpDevelop Projects")).ToString();
((CheckBox)ControlDictionary["loadPrevProjectCheckBox"]).Checked = PropertyService.Get("SharpDevelop.LoadPrevProjectOnStartup", false);
((CheckBox)ControlDictionary["showErrorListCheckBox"]).Checked = ErrorListPad.ShowAfterBuild;
((Button)ControlDictionary["selectProjectLocationButton"]).Click += new EventHandler(SelectProjectLocationButtonClicked);
}
public override bool StorePanelContents()
{
// check for correct settings
string projectPath = ControlDictionary["projectLocationTextBox"].Text;
if (projectPath.Length > 0) {
if (!FileUtility.IsValidFileName(projectPath)) {
MessageService.ShowError(StringParser.Parse("${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.InvalidProjectPathSpecified}"));
return false;
}
}
// set properties
PropertyService.Set("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", projectPath);
PropertyService.Set("SharpDevelop.LoadPrevProjectOnStartup", ((CheckBox)ControlDictionary["loadPrevProjectCheckBox"]).Checked);
ErrorListPad.ShowAfterBuild = ((CheckBox)ControlDictionary["showErrorListCheckBox"]).Checked;
return true;
}
void SelectProjectLocationButtonClicked(object sender, EventArgs e)
{
FolderDialog fdiag = new FolderDialog();
if (fdiag.DisplayDialog(StringParser.Parse("${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SelectDefaultProjectLocationDialog.Title}")) == DialogResult.OK) {
ControlDictionary["projectLocationTextBox"].Text = fdiag.Path;
}
}
}
}

11
src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorListPad.cs

@ -65,6 +65,15 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -65,6 +65,15 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public static bool ShowAfterBuild {
get {
return PropertyService.Get("SharpDevelop.ShowErrorListAfterBuild", true);
}
set {
PropertyService.Set("SharpDevelop.ShowErrorListAfterBuild", value);
}
}
public override Control Control {
get {
return contentPanel;
@ -124,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -124,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.Gui
void ProjectServiceEndBuild(object sender, EventArgs e)
{
if (TaskService.TaskCount > 0) {
if (TaskService.TaskCount > 0 && ShowAfterBuild) {
WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad(this.GetType().FullName);
}
UpdateToolstripStatus();

2
src/Main/Base/Project/Src/Project/MSBuildEngine.cs

@ -64,7 +64,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -64,7 +64,7 @@ namespace ICSharpCode.SharpDevelop.Project
LastErrorCount++;
}
TaskService.InUpdate = false;
if (results.Errors.Count > 0) {
if (results.Errors.Count > 0 && ErrorListPad.ShowAfterBuild) {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront();
}
}

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.
Loading…
Cancel
Save