Browse Source

Worked on SD2-1234 - added support for view contents that are not editing a file (e.g. project options).

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2365 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
467dcdd3a4
  1. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpCompletionBinding.cs
  2. 60
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs
  3. 2
      src/AddIns/DisplayBindings/WorkflowDesigner/Project/Src/Services/WorkflowSideTabService.cs
  4. 2
      src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms.TextEditor/SQLTextEditorControl.cs
  5. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs
  6. 1
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  7. 7
      src/Main/Base/Project/Src/Commands/AutostartCommands.cs
  8. 2
      src/Main/Base/Project/Src/Commands/EditCommands.cs
  9. 30
      src/Main/Base/Project/Src/Commands/FileCommands.cs
  10. 2
      src/Main/Base/Project/Src/Commands/FileMenuCommands.cs
  11. 14
      src/Main/Base/Project/Src/Commands/FileTabStripCommands.cs
  12. 4
      src/Main/Base/Project/Src/Commands/HelpCommands.cs
  13. 4
      src/Main/Base/Project/Src/Commands/ToolsCommands.cs
  14. 20
      src/Main/Base/Project/Src/Gui/AbstractViewContent.cs
  15. 16
      src/Main/Base/Project/Src/Gui/AbstractViewContentWithoutFile.cs
  16. 6
      src/Main/Base/Project/Src/Gui/ContentInterfaces/ICustomizedCommands.cs
  17. 2
      src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs
  18. 2
      src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs
  19. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/EditTemplateDialog.cs
  20. 6
      src/Main/Base/Project/Src/Gui/Dialogs/ProjectOptionsView.cs
  21. 2
      src/Main/Base/Project/Src/Gui/Dialogs/TabbedOptions.cs
  22. 2
      src/Main/Base/Project/Src/Gui/Dialogs/TreeViewOptions.cs
  23. 2
      src/Main/Base/Project/Src/Gui/Dialogs/WordCountDialog.cs
  24. 7
      src/Main/Base/Project/Src/Gui/IViewContent.cs
  25. 17
      src/Main/Base/Project/Src/Gui/IWorkbench.cs
  26. 4
      src/Main/Base/Project/Src/Gui/IWorkbenchLayout.cs
  27. 13
      src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs
  28. 2
      src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskView.cs
  29. 164
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs
  30. 13
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
  31. 38
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs
  32. 92
      src/Main/Base/Project/Src/Gui/Workbench/SingleInstanceHelper.cs
  33. 11
      src/Main/Base/Project/Src/Gui/WorkbenchSingleton.cs
  34. 16
      src/Main/Base/Project/Src/Services/File/FileService.cs
  35. 4
      src/Main/Base/Project/Src/Services/File/OpenedFile.cs
  36. 2
      src/Main/Base/Project/Src/Services/File/RecentOpen.cs
  37. 6
      src/Main/Base/Project/Src/Services/HelpProvider.cs
  38. 2
      src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs
  39. 2
      src/Main/Base/Project/Src/TextEditor/Commands/FormatCommands.cs
  40. 2
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/AttributesDataProvider.cs
  41. 4
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs
  42. 2
      src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/SearchReplaceManager.cs
  43. 6
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CSharp/ExpressionFinder.cs
  44. 11
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ExpressionContext.cs
  45. 4
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SystemTypes.cs
  46. 2
      src/Main/StartUp/Project/SharpDevelopMain.cs
  47. 22
      src/Tools/Tools.build

4
src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpCompletionBinding.cs

@ -43,10 +43,10 @@ namespace CSharpBinding
context = ExpressionContext.Default; context = ExpressionContext.Default;
break; break;
case "using": case "using":
context = ExpressionContext.TypeDerivingFrom(ParserService.CurrentProjectContent.GetClass("System.IDisposable", 0), false); context = ExpressionContext.TypeDerivingFrom(ParserService.CurrentProjectContent.SystemTypes.IDisposable, false);
break; break;
case "catch": case "catch":
context = ExpressionContext.TypeDerivingFrom(ParserService.CurrentProjectContent.GetClass("System.Exception", 0), false); context = ExpressionContext.TypeDerivingFrom(ParserService.CurrentProjectContent.SystemTypes.Exception, false);
break; break;
case "foreach": case "foreach":
case "typeof": case "typeof":

60
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs

@ -96,13 +96,6 @@ namespace ICSharpCode.FormsDesigner
this.textAreaControlProvider = viewContent as ITextEditorControlProvider; this.textAreaControlProvider = viewContent as ITextEditorControlProvider;
} }
/*public override void SwitchedTo()
{
if (IsFormsDesignerVisible) {
AddSideBars();
}
}*/
void LoadDesigner() void LoadDesigner()
{ {
LoggingService.Info("Form Designer: BEGIN INITIALIZE"); LoggingService.Info("Form Designer: BEGIN INITIALIZE");
@ -307,35 +300,27 @@ namespace ICSharpCode.FormsDesigner
return generator.GetCompatibleMethods(edesc); return generator.GetCompatibleMethods(edesc);
} }
#warning Code temporarily disabled after IViewContent changes /*
/*public override void Selected() protected override void OnViewActivated(EventArgs e)
{ {
PropertyPad.PropertyValueChanged += PropertyValueChanged; LoggingService.Info("Designer.OnViewActived 1");
Reload(); base.OnViewActivated(e); // calls Load() if required
LoggingService.Info("Designer.OnViewActived 2");
IsFormsDesignerVisible = true; IsFormsDesignerVisible = true;
AddSideBars(); AddSideBars();
PropertyPad.PropertyValueChanged += PropertyValueChanged;
SetActiveSideTab(); SetActiveSideTab();
UpdatePropertyPad(); UpdatePropertyPad();
}*/ LoggingService.Info("Designer.OnViewActived 3");
public override void Dispose()
{
disposing = true;
base.Dispose();
}
protected override void LoadFromPrimary()
{
Reload();
} }
*/
protected override void SaveToPrimary() /*
{ protected override void OnViewDeactivated(EventArgs e)
MergeFormChanges();
}
/*public override void Deselecting()
{ {
LoggingService.Info("Designer.OnViewDeactivated");
// can happen if form designer is disposed and then deselected // can happen if form designer is disposed and then deselected
if (!IsFormsDesignerVisible) if (!IsFormsDesignerVisible)
return; return;
@ -360,7 +345,24 @@ namespace ICSharpCode.FormsDesigner
} }
UnloadDesigner(); UnloadDesigner();
LoggingService.Info("Unloading form designer finished"); LoggingService.Info("Unloading form designer finished");
}*/ }
*/
public override void Dispose()
{
disposing = true;
base.Dispose();
}
protected override void LoadFromPrimary()
{
Reload();
}
protected override void SaveToPrimary()
{
MergeFormChanges();
}
void SelectionChangedHandler(object sender, EventArgs args) void SelectionChangedHandler(object sender, EventArgs args)
{ {

2
src/AddIns/DisplayBindings/WorkflowDesigner/Project/Src/Services/WorkflowSideTabService.cs

@ -113,7 +113,7 @@ namespace WorkflowDesigner
} }
// Attach the handlers. // Attach the handlers.
viewContent.ViewActivated += ViewContentActivatedEventHandler; viewContent.SwitchedTo += ViewContentActivatedEventHandler;
viewContent.Disposed += ViewContentDisposedEventHandler; viewContent.Disposed += ViewContentDisposedEventHandler;
ViewCount++; ViewCount++;

2
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms.TextEditor/SQLTextEditorControl.cs

@ -61,7 +61,7 @@ namespace SharpDbTools.Forms.TextEditor
if (next == '.') { if (next == '.') {
ICompletionDataProvider completionDataProvider = new TestCodeCompletionProvider(); // TODO: create a simple provider that just returns a couple of strings ICompletionDataProvider completionDataProvider = new TestCodeCompletionProvider(); // TODO: create a simple provider that just returns a couple of strings
codeCompletionWindow = codeCompletionWindow =
CodeCompletionWindow.ShowCompletionWindow((Form)WorkbenchSingleton.Workbench, CodeCompletionWindow.ShowCompletionWindow(WorkbenchSingleton.MainForm,
this, this.FileName, completionDataProvider, next); this, this.FileName, completionDataProvider, next);
if (codeCompletionWindow != null) { if (codeCompletionWindow != null) {
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow); codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);

2
src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs

@ -190,7 +190,7 @@ namespace ICSharpCode.Svn
thread.Name = "SvnOperation"; thread.Name = "SvnOperation";
thread.IsBackground = true; thread.IsBackground = true;
inOperationForm = new InOperationDialog(operationName, thread); inOperationForm = new InOperationDialog(operationName, thread);
inOperationForm.Owner = (Form)WorkbenchSingleton.Workbench; inOperationForm.Owner = WorkbenchSingleton.MainForm;
inOperationForm.Show(); inOperationForm.Show();
thread.Start(); thread.Start();
} }

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

@ -65,6 +65,7 @@
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\AddNewConfigurationDialog.Designer.cs"> <Compile Include="Src\Gui\Dialogs\SolutionConfiguration\AddNewConfigurationDialog.Designer.cs">
<DependentUpon>AddNewConfigurationDialog.cs</DependentUpon> <DependentUpon>AddNewConfigurationDialog.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Src\Gui\Workbench\SingleInstanceHelper.cs" />
<Compile Include="Src\Internal\ExternalTool\ExternalTool.cs" /> <Compile Include="Src\Internal\ExternalTool\ExternalTool.cs" />
<Compile Include="Src\Internal\Templates\CodeTemplate.cs" /> <Compile Include="Src\Internal\Templates\CodeTemplate.cs" />
<Compile Include="Src\Internal\Templates\Project\ProjectTemplate.cs" /> <Compile Include="Src\Internal\Templates\Project\ProjectTemplate.cs" />

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

@ -77,8 +77,7 @@ namespace ICSharpCode.SharpDevelop.Commands
public void Run(IList<string> fileList) public void Run(IList<string> fileList)
{ {
Form f = (Form)WorkbenchSingleton.Workbench; //WorkbenchSingleton.MainForm.Show();
f.Show();
bool didLoadCombineOrFile = false; bool didLoadCombineOrFile = false;
@ -110,13 +109,13 @@ namespace ICSharpCode.SharpDevelop.Commands
} }
} }
f.Focus(); // windows.forms focus workaround //WorkbenchSingleton.MainForm.Focus(); // windows.forms focus workaround
ParserService.StartParserThread(); ParserService.StartParserThread();
// finally run the workbench window ... // finally run the workbench window ...
Application.AddMessageFilter(new FormKeyHandler()); Application.AddMessageFilter(new FormKeyHandler());
Application.Run(f); Application.Run(WorkbenchSingleton.MainForm);
// save the workbench memento in the ide properties // save the workbench memento in the ide properties
try { try {

2
src/Main/Base/Project/Src/Commands/EditCommands.cs

@ -214,7 +214,7 @@ namespace ICSharpCode.SharpDevelop.Commands
public override void Run() public override void Run()
{ {
using (WordCountDialog wcd = new WordCountDialog()) { using (WordCountDialog wcd = new WordCountDialog()) {
wcd.Owner = (Form)WorkbenchSingleton.Workbench; wcd.Owner = WorkbenchSingleton.MainForm;
wcd.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); wcd.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm);
} }
} }

30
src/Main/Base/Project/Src/Commands/FileCommands.cs

@ -34,7 +34,7 @@ namespace ICSharpCode.SharpDevelop.Commands
} }
} }
using (NewFileDialog nfd = new NewFileDialog(null)) { using (NewFileDialog nfd = new NewFileDialog(null)) {
nfd.Owner = (Form)WorkbenchSingleton.Workbench; nfd.Owner = WorkbenchSingleton.MainForm;
nfd.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); nfd.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm);
} }
} }
@ -54,8 +54,17 @@ namespace ICSharpCode.SharpDevelop.Commands
{ {
public override void Run() public override void Run()
{ {
IViewContent content = WorkbenchSingleton.Workbench.ActiveViewContent; Save(WorkbenchSingleton.Workbench.ActiveViewContent);
}
internal static void Save(IViewContent content)
{
if (content != null) { if (content != null) {
if (content is ICustomizedCommands) {
if (((ICustomizedCommands)content).SaveCommand()) {
return;
}
}
if (content.IsViewOnly) { if (content.IsViewOnly) {
return; return;
} }
@ -111,14 +120,18 @@ namespace ICSharpCode.SharpDevelop.Commands
{ {
public override void Run() public override void Run()
{ {
// save the primary file only Save(WorkbenchSingleton.Workbench.ActiveViewContent);
IViewContent content = WorkbenchSingleton.Workbench.ActiveViewContent; }
internal static void Save(IViewContent content)
{
if (content != null && !content.IsViewOnly) { if (content != null && !content.IsViewOnly) {
if (content is ICustomizedCommands) { if (content is ICustomizedCommands) {
if (((ICustomizedCommands)content).SaveAsCommand()) { if (((ICustomizedCommands)content).SaveAsCommand()) {
return; return;
} }
} }
// save the primary file only
if (content.PrimaryFile != null) { if (content.PrimaryFile != null) {
Save(content.PrimaryFile); Save(content.PrimaryFile);
} }
@ -160,6 +173,11 @@ namespace ICSharpCode.SharpDevelop.Commands
{ {
public static void SaveAll() public static void SaveAll()
{ {
foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
if (content is ICustomizedCommands && content.IsDirty) {
((ICustomizedCommands)content).SaveCommand();
}
}
foreach (OpenedFile file in FileService.OpenedFiles) { foreach (OpenedFile file in FileService.OpenedFiles) {
if (file.IsDirty) { if (file.IsDirty) {
SaveFile.Save(file); SaveFile.Save(file);
@ -220,7 +238,7 @@ namespace ICSharpCode.SharpDevelop.Commands
{ {
public override void Run() public override void Run()
{ {
((Form)WorkbenchSingleton.Workbench).Close(); WorkbenchSingleton.MainForm.Close();
} }
} }
@ -259,7 +277,7 @@ namespace ICSharpCode.SharpDevelop.Commands
using (PrintDocument pdoc = printable.PrintDocument) { using (PrintDocument pdoc = printable.PrintDocument) {
if (pdoc != null) { if (pdoc != null) {
PrintPreviewDialog ppd = new PrintPreviewDialog(); PrintPreviewDialog ppd = new PrintPreviewDialog();
ppd.Owner = (Form)WorkbenchSingleton.Workbench; ppd.Owner = WorkbenchSingleton.MainForm;
ppd.TopMost = true; ppd.TopMost = true;
ppd.Document = pdoc; ppd.Document = pdoc;
ppd.Show(); ppd.Show();

2
src/Main/Base/Project/Src/Commands/FileMenuCommands.cs

@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
using (NewProjectDialog npdlg = new NewProjectDialog(true)) { using (NewProjectDialog npdlg = new NewProjectDialog(true)) {
npdlg.Owner = (Form)WorkbenchSingleton.Workbench; npdlg.Owner = WorkbenchSingleton.MainForm;
npdlg.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); npdlg.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm);
} }
} }

14
src/Main/Base/Project/Src/Commands/FileTabStripCommands.cs

@ -46,12 +46,7 @@ namespace ICSharpCode.SharpDevelop.Commands.TabStrip
{ {
IWorkbenchWindow window = Owner as IWorkbenchWindow; IWorkbenchWindow window = Owner as IWorkbenchWindow;
if (window != null) { if (window != null) {
if (window.ActiveViewContent.IsViewOnly) { SaveFile.Save(window.ActiveViewContent);
return;
}
foreach (OpenedFile file in window.ActiveViewContent.Files) {
SaveFile.Save(file);
}
} }
} }
} }
@ -63,12 +58,7 @@ namespace ICSharpCode.SharpDevelop.Commands.TabStrip
IWorkbenchWindow window = Owner as IWorkbenchWindow; IWorkbenchWindow window = Owner as IWorkbenchWindow;
if (window != null) { if (window != null) {
if (window.ActiveViewContent.IsViewOnly) { SaveFileAs.Save(window.ActiveViewContent);
return;
}
foreach (OpenedFile file in window.ActiveViewContent.Files) {
SaveFileAs.Save(file);
}
} }
} }
} }

4
src/Main/Base/Project/Src/Commands/HelpCommands.cs

@ -63,8 +63,8 @@ namespace ICSharpCode.SharpDevelop.Commands
public override void Run() public override void Run()
{ {
using (CommonAboutDialog ad = new CommonAboutDialog()) { using (CommonAboutDialog ad = new CommonAboutDialog()) {
ad.Owner = (Form)WorkbenchSingleton.Workbench; ad.Owner = WorkbenchSingleton.MainForm;
ad.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); ad.ShowDialog(WorkbenchSingleton.MainForm);
} }
} }
} }

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

@ -32,8 +32,8 @@ namespace ICSharpCode.SharpDevelop.Commands
AddInTree.GetTreeNode("/SharpDevelop/Dialogs/OptionsDialog"))) { AddInTree.GetTreeNode("/SharpDevelop/Dialogs/OptionsDialog"))) {
optionsDialog.FormBorderStyle = FormBorderStyle.FixedDialog; optionsDialog.FormBorderStyle = FormBorderStyle.FixedDialog;
optionsDialog.Owner = (Form)WorkbenchSingleton.Workbench; optionsDialog.Owner = WorkbenchSingleton.MainForm;
optionsDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); optionsDialog.ShowDialog(WorkbenchSingleton.MainForm);
} }
} }
} }

20
src/Main/Base/Project/Src/Gui/AbstractViewContent.cs

@ -34,18 +34,26 @@ namespace ICSharpCode.SharpDevelop.Gui
this.Files.Add(file); this.Files.Add(file);
} }
public event EventHandler ViewActivated; public event EventHandler SwitchedTo;
protected virtual void OnViewActivated(EventArgs e) /// <summary>
/// Is called when the window is switched to.
/// -> Inside the tab (on SelectedIndexChanged of the tab control)
/// -> Inside the workbench (focus change in the docking library).
///
/// You <b>must</b> call base.OnViewActivated if you override this method, otherwise the <see cref="SwitchedTo"/>
/// event will not fire and <see cref="OpenedFile"/> will not work correctly.
/// </summary>
protected virtual void OnSwitchedTo(EventArgs e)
{ {
if (ViewActivated != null) { if (SwitchedTo != null) {
ViewActivated(this, e); SwitchedTo(this, e);
} }
} }
public void SwitchedTo() void IViewContent.OnSwitchedTo()
{ {
OnViewActivated(EventArgs.Empty); OnSwitchedTo(EventArgs.Empty);
} }
public abstract Control Control { public abstract Control Control {

16
src/Main/Base/Project/Src/Gui/AbstractViewContentWithoutFile.cs

@ -12,14 +12,14 @@ namespace ICSharpCode.SharpDevelop.Gui
/// <summary> /// <summary>
/// Base class for view contents that are not based on a file. /// Base class for view contents that are not based on a file.
/// </summary> /// </summary>
public abstract class AbstractViewContentWithoutFile : AbstractViewContent public abstract class AbstractViewContentWithoutFile : AbstractViewContent, ICustomizedCommands
{ {
public override bool IsViewOnly { public override bool IsViewOnly {
get { return false; } get { return false; }
} }
[Obsolete("AbstractViewContentWithoutFile.PrimaryFile is always null")] [Obsolete("AbstractViewContentWithoutFile.PrimaryFile is always null")]
public override OpenedFile PrimaryFile { get { return null; } } public sealed override OpenedFile PrimaryFile { get { return null; } }
[Obsolete("This method is not supported on an AbstractViewContentWithoutFile")] [Obsolete("This method is not supported on an AbstractViewContentWithoutFile")]
public sealed override void Load(OpenedFile file, System.IO.Stream stream) public sealed override void Load(OpenedFile file, System.IO.Stream stream)
@ -42,5 +42,17 @@ namespace ICSharpCode.SharpDevelop.Gui
/// Save the view content. /// Save the view content.
/// </summary> /// </summary>
public abstract void Save(); public abstract void Save();
bool ICustomizedCommands.SaveCommand()
{
Save();
return true;
}
bool ICustomizedCommands.SaveAsCommand()
{
Save();
return true;
}
} }
} }

6
src/Main/Base/Project/Src/Gui/ContentInterfaces/ICustomizedCommands.cs

@ -10,9 +10,15 @@ using System;
namespace ICSharpCode.SharpDevelop.Gui namespace ICSharpCode.SharpDevelop.Gui
{ {
/// <summary> /// <summary>
/// Allows a IViewContent to handle the save command on its own instead of using OpenedFile.
/// </summary> /// </summary>
public interface ICustomizedCommands public interface ICustomizedCommands
{ {
/// <summary>
/// Returns true, if the save command is handled, false otherwise
/// </summary>
bool SaveCommand();
/// <summary> /// <summary>
/// Returns true, if the save as command is handled, false otherwise /// Returns true, if the save as command is handled, false otherwise
/// </summary> /// </summary>

2
src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs

@ -606,7 +606,7 @@ namespace ICSharpCode.SharpDevelop.Gui
tooltip.SetToolTip(ControlDictionary["largeIconsRadioButton"], StringParser.Parse("${res:Global.LargeIconToolTip}")); tooltip.SetToolTip(ControlDictionary["largeIconsRadioButton"], StringParser.Parse("${res:Global.LargeIconToolTip}"));
tooltip.SetToolTip(ControlDictionary["smallIconsRadioButton"], StringParser.Parse("${res:Global.SmallIconToolTip}")); tooltip.SetToolTip(ControlDictionary["smallIconsRadioButton"], StringParser.Parse("${res:Global.SmallIconToolTip}"));
tooltip.Active = true; tooltip.Active = true;
Owner = (Form)WorkbenchSingleton.Workbench; Owner = WorkbenchSingleton.MainForm;
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Icon = null; Icon = null;

2
src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs

@ -398,7 +398,7 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
tooltip.SetToolTip(ControlDictionary["largeIconsRadioButton"], StringParser.Parse("${res:Global.LargeIconToolTip}")); tooltip.SetToolTip(ControlDictionary["largeIconsRadioButton"], StringParser.Parse("${res:Global.LargeIconToolTip}"));
tooltip.SetToolTip(ControlDictionary["smallIconsRadioButton"], StringParser.Parse("${res:Global.SmallIconToolTip}")); tooltip.SetToolTip(ControlDictionary["smallIconsRadioButton"], StringParser.Parse("${res:Global.SmallIconToolTip}"));
tooltip.Active = true; tooltip.Active = true;
Owner = (Form)WorkbenchSingleton.Workbench; Owner = WorkbenchSingleton.MainForm;
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Icon = null; Icon = null;

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

@ -45,7 +45,7 @@ namespace ICSharpCode.SharpDevelop.Gui
ControlDictionary["okButton"].Click += new EventHandler(AcceptEvent); ControlDictionary["okButton"].Click += new EventHandler(AcceptEvent);
Owner = (Form)WorkbenchSingleton.Workbench; Owner = WorkbenchSingleton.MainForm;
Icon = null; Icon = null;
} }
} }

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

@ -38,15 +38,13 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
public ProjectOptionsView(AddInTreeNode node, IProject project) public ProjectOptionsView(AddInTreeNode node, IProject project)
{ {
this.project = project; this.project = project;
this.TitleName = project.Name;
// tabControl.Alignment = TabAlignment.Left; // tabControl.Alignment = TabAlignment.Left;
tabControl.HandleCreated += TabControlHandleCreated; tabControl.HandleCreated += TabControlHandleCreated;
AddOptionPanels(node.BuildChildItems<IDialogPanelDescriptor>(this)); AddOptionPanels(node.BuildChildItems<IDialogPanelDescriptor>(this));
this.AutomaticallyRegisterViewOnFiles = false;
this.Files.Add(FileService.AttachToOpenedFile(project.FileName, this));
} }
void TabControlHandleCreated(object sender, EventArgs e) void TabControlHandleCreated(object sender, EventArgs e)

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

@ -64,7 +64,7 @@ namespace ICSharpCode.SharpDevelop.Gui
this.Text = dialogName; this.Text = dialogName;
ControlDictionary["okButton"].Click += new EventHandler(AcceptEvent); ControlDictionary["okButton"].Click += new EventHandler(AcceptEvent);
Icon = null; Icon = null;
Owner = (Form)WorkbenchSingleton.Workbench; Owner = WorkbenchSingleton.MainForm;
AddOptionPanels(node.BuildChildItems<IDialogPanelDescriptor>(this)); AddOptionPanels(node.BuildChildItems<IDialogPanelDescriptor>(this));
} }

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

@ -225,7 +225,7 @@ namespace ICSharpCode.SharpDevelop.Gui
protected void InitializeComponent() protected void InitializeComponent()
{ {
Owner = (Form)WorkbenchSingleton.Workbench; Owner = WorkbenchSingleton.MainForm;
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.TreeViewOptionsDialog.xfrm")); SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.TreeViewOptionsDialog.xfrm"));

2
src/Main/Base/Project/Src/Gui/Dialogs/WordCountDialog.cs

@ -231,7 +231,7 @@ namespace ICSharpCode.SharpDevelop.Gui
((ListView)ControlDictionary["resultListView"]).ColumnClick += new ColumnClickEventHandler(SortEvt); ((ListView)ControlDictionary["resultListView"]).ColumnClick += new ColumnClickEventHandler(SortEvt);
Icon = IconService.GetIcon("Icons.16x16.FindIcon"); Icon = IconService.GetIcon("Icons.16x16.FindIcon");
Owner = (Form)WorkbenchSingleton.Workbench; Owner = WorkbenchSingleton.MainForm;
((ComboBox)ControlDictionary["locationComboBox"]).Items.Add(StringParser.Parse("${res:Global.Location.currentfile}")); ((ComboBox)ControlDictionary["locationComboBox"]).Items.Add(StringParser.Parse("${res:Global.Location.currentfile}"));
((ComboBox)ControlDictionary["locationComboBox"]).Items.Add(StringParser.Parse("${res:Global.Location.allopenfiles}")); ((ComboBox)ControlDictionary["locationComboBox"]).Items.Add(StringParser.Parse("${res:Global.Location.allopenfiles}"));

7
src/Main/Base/Project/Src/Gui/IViewContent.cs

@ -65,11 +65,14 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
/// <summary> /// <summary>
/// Used internally.
/// Is called when the window is switched to. /// Is called when the window is switched to.
/// -> Inside the tab (on SelectedIndexChanged of the tab control) /// -> Inside the tab (on SelectedIndexChanged of the tab control)
/// -> Inside the workbench (focus change in the docking library). /// -> Inside the workbench (focus change in the docking library).
/// </summary> /// </summary>
void SwitchedTo(); void OnSwitchedTo();
event EventHandler SwitchedTo;
/// <summary> /// <summary>
/// Reinitializes the content. (Re-initializes all add-in tree stuff) /// Reinitializes the content. (Re-initializes all add-in tree stuff)
@ -131,8 +134,6 @@ namespace ICSharpCode.SharpDevelop.Gui
/// </summary> /// </summary>
INavigationPoint BuildNavPoint(); INavigationPoint BuildNavPoint();
event EventHandler ViewActivated;
bool IsDisposed { get; } bool IsDisposed { get; }
event EventHandler Disposed; event EventHandler Disposed;

17
src/Main/Base/Project/Src/Gui/IWorkbench.cs

@ -52,6 +52,12 @@ namespace ICSharpCode.SharpDevelop.Gui
get; get;
} }
/// <summary>
/// Is called, when the workbench window which the user has into
/// the foreground (e.g. editable) changed to a new one.
/// </summary>
event EventHandler ActiveWorkbenchWindowChanged;
/// <summary> /// <summary>
/// The active view content inside the active workbench window. /// The active view content inside the active workbench window.
/// </summary> /// </summary>
@ -59,6 +65,11 @@ namespace ICSharpCode.SharpDevelop.Gui
get; get;
} }
/// <summary>
/// Is called, when the active view content has changed.
/// </summary>
event EventHandler ActiveViewContentChanged;
/// <summary> /// <summary>
/// The active content. This can be either a IViewContent or a IPadContent, depending on /// The active content. This can be either a IViewContent or a IPadContent, depending on
/// where the focus currently is. /// where the focus currently is.
@ -130,11 +141,5 @@ namespace ICSharpCode.SharpDevelop.Gui
/// Is called, when a workbench view was closed /// Is called, when a workbench view was closed
/// </summary> /// </summary>
event ViewContentEventHandler ViewClosed; event ViewContentEventHandler ViewClosed;
/// <summary>
/// Is called, when the workbench window which the user has into
/// the foreground (e.g. editable) changed to a new one.
/// </summary>
event EventHandler ActiveWorkbenchWindowChanged;
} }
} }

4
src/Main/Base/Project/Src/Gui/IWorkbenchLayout.cs

@ -88,9 +88,5 @@ namespace ICSharpCode.SharpDevelop.Gui
/// the foreground (e.g. editable) changed to a new one. /// the foreground (e.g. editable) changed to a new one.
/// </summary> /// </summary>
event EventHandler ActiveWorkbenchWindowChanged; event EventHandler ActiveWorkbenchWindowChanged;
// only needed in the workspace window when the 'secondary view content' changed
// it is somewhat like 'active workbench window changed'
void OnActiveWorkbenchWindowChanged(EventArgs e);
} }
} }

13
src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs

@ -38,6 +38,11 @@ namespace ICSharpCode.SharpDevelop.Gui
set; set;
} }
/// <summary>
/// Is raised when the ActiveViewContent property has changed.
/// </summary>
event EventHandler ActiveViewContentChanged;
/// <summary> /// <summary>
/// Gets the list of view contents displayed in this window /// Gets the list of view contents displayed in this window
/// </summary> /// </summary>
@ -66,9 +71,15 @@ namespace ICSharpCode.SharpDevelop.Gui
void RedrawContent(); void RedrawContent();
/// <summary> /// <summary>
/// Only for internal use. /// Used internally:
/// This method is called by the workbench to notify the window that is was selected.
/// </summary> /// </summary>
void OnWindowSelected(EventArgs e); void OnWindowSelected(EventArgs e);
/// <summary>
/// Used internally:
/// This method is called by the workbench to notify the window that is was deselected.
/// </summary>
void OnWindowDeselected(EventArgs e); void OnWindowDeselected(EventArgs e);
/// <summary> /// <summary>

2
src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskView.cs

@ -18,7 +18,7 @@ using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop namespace ICSharpCode.SharpDevelop.Gui
{ {
public enum TaskViewCols : int { public enum TaskViewCols : int {
Icon = 0, Icon = 0,

164
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -24,7 +24,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// <summary> /// <summary>
/// This is the Workspace with a multiple document interface. /// This is the Workspace with a multiple document interface.
/// </summary> /// </summary>
public class DefaultWorkbench : Form, IWorkbench sealed class DefaultWorkbench : Form, IWorkbench
{ {
readonly static string mainMenuPath = "/SharpDevelop/Workbench/MainMenu"; readonly static string mainMenuPath = "/SharpDevelop/Workbench/MainMenu";
readonly static string viewContentPath = "/SharpDevelop/Workbench/Pads"; readonly static string viewContentPath = "/SharpDevelop/Workbench/Pads";
@ -99,6 +99,7 @@ namespace ICSharpCode.SharpDevelop.Gui
value.Attach(this); value.Attach(this);
layout = value; layout = value;
layout.ActiveWorkbenchWindowChanged += OnActiveWindowChanged; layout.ActiveWorkbenchWindowChanged += OnActiveWindowChanged;
OnActiveWindowChanged(null, null);
} }
} }
@ -129,31 +130,78 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
void OnActiveWindowChanged(object sender, EventArgs e)
{
if (closeAll) return;
if (layout == null) {
this.ActiveWorkbenchWindow = null;
} else {
this.ActiveWorkbenchWindow = layout.ActiveWorkbenchwindow;
}
}
IWorkbenchWindow activeWorkbenchWindow;
public IWorkbenchWindow ActiveWorkbenchWindow { public IWorkbenchWindow ActiveWorkbenchWindow {
get { get {
#if DEBUG WorkbenchSingleton.DebugAssertMainThread();
WorkbenchSingleton.AssertMainThread(); return activeWorkbenchWindow;
#endif }
if (layout == null) { private set {
return null; if (activeWorkbenchWindow != value) {
if (activeWorkbenchWindow != null) {
activeWorkbenchWindow.ActiveViewContentChanged -= OnWorkbenchActiveViewContentChanged;
}
activeWorkbenchWindow = value;
if (activeWorkbenchWindow != null) {
activeWorkbenchWindow.ActiveViewContentChanged += OnWorkbenchActiveViewContentChanged;
}
OnWorkbenchActiveViewContentChanged(null, null);
if (ActiveWorkbenchWindowChanged != null) {
ActiveWorkbenchWindowChanged(this, EventArgs.Empty);
}
} }
return layout.ActiveWorkbenchwindow;
} }
} }
void OnWorkbenchActiveViewContentChanged(object sender, EventArgs e)
{
// update ActiveViewContent
IWorkbenchWindow window = this.ActiveWorkbenchWindow;
if (window != null)
this.ActiveViewContent = window.ActiveViewContent;
else
this.ActiveViewContent = null;
}
public event EventHandler ActiveWorkbenchWindowChanged;
IViewContent activeViewContent;
/// <summary> /// <summary>
/// The active view content inside the active workbench window. /// The active view content inside the active workbench window.
/// </summary> /// </summary>
public IViewContent ActiveViewContent { public IViewContent ActiveViewContent {
get{ get {
IWorkbenchWindow window = this.ActiveWorkbenchWindow; WorkbenchSingleton.DebugAssertMainThread();
if (window != null) return activeViewContent;
return window.ActiveViewContent; }
else private set {
return null; if (activeViewContent != value) {
activeViewContent = value;
if (ActiveViewContentChanged != null) {
ActiveViewContentChanged(this, EventArgs.Empty);
}
}
} }
} }
/// <summary>
/// Is called, when the active view content has changed.
/// </summary>
public event EventHandler ActiveViewContentChanged;
public object ActiveContent { public object ActiveContent {
get { get {
if (layout == null) { if (layout == null) {
@ -173,7 +221,6 @@ namespace ICSharpCode.SharpDevelop.Gui
AllowDrop = true; AllowDrop = true;
} }
#region Single instance code
protected override void WndProc(ref Message m) protected override void WndProc(ref Message m)
{ {
if (!SingleInstanceHelper.PreFilterMessage(ref m)) { if (!SingleInstanceHelper.PreFilterMessage(ref m)) {
@ -181,80 +228,6 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public static class SingleInstanceHelper
{
const int WM_USER = 0x400;
const int CUSTOM_MESSAGE = WM_USER + 2;
const int RESULT_FILES_HANDLED = 2;
const int RESULT_PROJECT_IS_OPEN = 3;
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern IntPtr SetForegroundWindow(IntPtr hWnd);
public static bool OpenFilesInPreviousInstance(string[] fileList)
{
LoggingService.Info("Trying to pass arguments to previous instance...");
int currentProcessId = Process.GetCurrentProcess().Id;
string currentFile = Assembly.GetEntryAssembly().Location;
int number = new Random().Next();
string fileName = Path.Combine(Path.GetTempPath(), "sd" + number + ".tmp");
try {
File.WriteAllLines(fileName, fileList);
List<IntPtr> alternatives = new List<IntPtr>();
foreach (Process p in Process.GetProcessesByName("SharpDevelop")) {
if (p.Id == currentProcessId) continue;
if (FileUtility.IsEqualFileName(currentFile, p.MainModule.FileName)) {
IntPtr hWnd = p.MainWindowHandle;
if (hWnd != IntPtr.Zero) {
long result = SendMessage(hWnd, CUSTOM_MESSAGE, new IntPtr(number), IntPtr.Zero).ToInt64();
if (result == RESULT_FILES_HANDLED) {
return true;
} else if (result == RESULT_PROJECT_IS_OPEN) {
alternatives.Add(hWnd);
}
}
}
}
foreach (IntPtr hWnd in alternatives) {
if (SendMessage(hWnd, CUSTOM_MESSAGE, new IntPtr(number), new IntPtr(1)).ToInt64()== RESULT_FILES_HANDLED) {
return true;
}
}
return false;
} finally {
File.Delete(fileName);
}
}
internal static bool PreFilterMessage(ref Message m)
{
if (m.Msg != CUSTOM_MESSAGE)
return false;
long fileNumber = m.WParam.ToInt64();
long openEvenIfProjectIsOpened = m.LParam.ToInt64();
LoggingService.Info("Receiving custom message...");
if (openEvenIfProjectIsOpened == 0 && ProjectService.OpenSolution != null) {
m.Result = new IntPtr(RESULT_PROJECT_IS_OPEN);
} else {
m.Result = new IntPtr(RESULT_FILES_HANDLED);
try {
WorkbenchSingleton.SafeThreadAsyncCall(delegate { SetForegroundWindow(WorkbenchSingleton.MainForm.Handle) ; });
foreach (string file in File.ReadAllLines(Path.Combine(Path.GetTempPath(), "sd" + fileNumber + ".tmp"))) {
WorkbenchSingleton.SafeThreadAsyncCall(delegate(string openFileName) { FileService.OpenFile(openFileName); }, file);
}
} catch (Exception ex) {
LoggingService.Warn(ex);
}
}
return true;
}
}
#endregion
System.Windows.Forms.Timer toolbarUpdateTimer; System.Windows.Forms.Timer toolbarUpdateTimer;
public void InitializeWorkspace() public void InitializeWorkspace()
@ -321,7 +294,7 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public virtual void ShowView(IViewContent content) public void ShowView(IViewContent content)
{ {
System.Diagnostics.Debug.Assert(layout != null); System.Diagnostics.Debug.Assert(layout != null);
viewContentCollection.Add(content); viewContentCollection.Add(content);
@ -341,7 +314,7 @@ namespace ICSharpCode.SharpDevelop.Gui
OnViewOpened(new ViewContentEventArgs(content)); OnViewOpened(new ViewContentEventArgs(content));
} }
public virtual void ShowPad(PadDescriptor content) public void ShowPad(PadDescriptor content)
{ {
PadContentCollection.Add(content); PadContentCollection.Add(content);
@ -560,12 +533,6 @@ namespace ICSharpCode.SharpDevelop.Gui
StatusBarService.SetMessage("${res:MainWindow.StatusBar.ReadyMessage}"); StatusBarService.SetMessage("${res:MainWindow.StatusBar.ReadyMessage}");
} }
void OnActiveWindowChanged(object sender, EventArgs e)
{
if (!closeAll && ActiveWorkbenchWindowChanged != null) {
ActiveWorkbenchWindowChanged(this, e);
}
}
// public ToolStripManager ToolStripManager = new ToolStripManager(); // public ToolStripManager ToolStripManager = new ToolStripManager();
public MenuStrip TopMenu = null; public MenuStrip TopMenu = null;
public ToolStrip[] ToolBars = null; public ToolStrip[] ToolBars = null;
@ -675,14 +642,14 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
protected virtual void OnViewOpened(ViewContentEventArgs e) void OnViewOpened(ViewContentEventArgs e)
{ {
if (ViewOpened != null) { if (ViewOpened != null) {
ViewOpened(this, e); ViewOpened(this, e);
} }
} }
protected virtual void OnViewClosed(ViewContentEventArgs e) void OnViewClosed(ViewContentEventArgs e)
{ {
if (ViewClosed != null) { if (ViewClosed != null) {
ViewClosed(this, e); ViewClosed(this, e);
@ -691,7 +658,6 @@ namespace ICSharpCode.SharpDevelop.Gui
public event ViewContentEventHandler ViewOpened; public event ViewContentEventHandler ViewOpened;
public event ViewContentEventHandler ViewClosed; public event ViewContentEventHandler ViewClosed;
public event EventHandler ActiveWorkbenchWindowChanged;
protected override void OnActivated(EventArgs e) protected override void OnActivated(EventArgs e)
{ {

13
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// <summary> /// <summary>
/// This is the a Workspace with a single document interface. /// This is the a Workspace with a single document interface.
/// </summary> /// </summary>
public class SdiWorkbenchLayout : IWorkbenchLayout internal sealed class SdiWorkbenchLayout : IWorkbenchLayout
{ {
DefaultWorkbench wbForm; DefaultWorkbench wbForm;
@ -604,7 +604,8 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
IWorkbenchWindow oldSelectedWindow = null; IWorkbenchWindow oldSelectedWindow = null;
public virtual void OnActiveWorkbenchWindowChanged(EventArgs e)
internal void OnActiveWorkbenchWindowChanged(EventArgs e)
{ {
IWorkbenchWindow newWindow = this.ActiveWorkbenchwindow; IWorkbenchWindow newWindow = this.ActiveWorkbenchwindow;
if (newWindow == null || newWindow.ActiveViewContent != null) { if (newWindow == null || newWindow.ActiveViewContent != null) {
@ -618,13 +619,13 @@ namespace ICSharpCode.SharpDevelop.Gui
} else { } else {
//LoggingService.Debug("ignore window change to disposed window"); //LoggingService.Debug("ignore window change to disposed window");
} }
if (oldSelectedWindow != null) { if (oldSelectedWindow != null && oldSelectedWindow.ActiveViewContent != null) {
oldSelectedWindow.OnWindowDeselected(EventArgs.Empty); oldSelectedWindow.OnWindowDeselected(EventArgs.Empty);
} }
oldSelectedWindow = newWindow; oldSelectedWindow = newWindow;
if (oldSelectedWindow != null && oldSelectedWindow.ActiveViewContent != null && oldSelectedWindow.ActiveViewContent.Control != null) { if (newWindow != null && newWindow.ActiveViewContent != null) {
oldSelectedWindow.OnWindowSelected(EventArgs.Empty); newWindow.ActiveViewContent.OnSwitchedTo();
oldSelectedWindow.ActiveViewContent.SwitchedTo(); newWindow.OnWindowSelected(EventArgs.Empty);
} }
} }

38
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs

@ -18,7 +18,7 @@ using WeifenLuo.WinFormsUI;
namespace ICSharpCode.SharpDevelop.Gui namespace ICSharpCode.SharpDevelop.Gui
{ {
public class SdiWorkspaceWindow : DockContent, IWorkbenchWindow, IOwnerState internal sealed class SdiWorkspaceWindow : DockContent, IWorkbenchWindow, IOwnerState
{ {
readonly static string contextMenuPath = "/SharpDevelop/Workbench/OpenFileTab/ContextMenu"; readonly static string contextMenuPath = "/SharpDevelop/Workbench/OpenFileTab/ContextMenu";
@ -82,6 +82,20 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public event EventHandler ActiveViewContentChanged;
IViewContent oldActiveViewContent;
void UpdateActiveViewContent()
{
UpdateTitle();
IViewContent newActiveViewContent = this.ActiveViewContent;
if (oldActiveViewContent != newActiveViewContent && ActiveViewContentChanged != null) {
ActiveViewContentChanged(this, EventArgs.Empty);
}
oldActiveViewContent = newActiveViewContent;
}
sealed class ViewContentCollection : Collection<IViewContent> sealed class ViewContentCollection : Collection<IViewContent>
{ {
readonly SdiWorkspaceWindow window; readonly SdiWorkspaceWindow window;
@ -99,6 +113,7 @@ namespace ICSharpCode.SharpDevelop.Gui
base.ClearItems(); base.ClearItems();
window.ClearContent(); window.ClearContent();
window.UpdateActiveViewContent();
} }
protected override void InsertItem(int index, IViewContent item) protected override void InsertItem(int index, IViewContent item)
@ -131,7 +146,7 @@ namespace ICSharpCode.SharpDevelop.Gui
window.viewTabControl.TabPages.Insert(index, newPage); window.viewTabControl.TabPages.Insert(index, newPage);
} }
} }
window.UpdateTitle(); window.UpdateActiveViewContent();
} }
protected override void RemoveItem(int index) protected override void RemoveItem(int index)
@ -148,7 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui
} else { } else {
window.viewTabControl.TabPages.RemoveAt(index); window.viewTabControl.TabPages.RemoveAt(index);
} }
window.UpdateTitle(); window.UpdateActiveViewContent();
} }
protected override void SetItem(int index, IViewContent item) protected override void SetItem(int index, IViewContent item)
@ -169,7 +184,7 @@ namespace ICSharpCode.SharpDevelop.Gui
page.Controls.Add(item.Control); page.Controls.Add(item.Control);
page.Text = StringParser.Parse(item.TabPageText); page.Text = StringParser.Parse(item.TabPageText);
} }
window.UpdateTitle(); window.UpdateActiveViewContent();
} }
} }
@ -230,7 +245,8 @@ namespace ICSharpCode.SharpDevelop.Gui
this.Controls.Add(viewTabControl); this.Controls.Add(viewTabControl);
viewTabControl.SelectedIndexChanged += delegate { viewTabControl.SelectedIndexChanged += delegate {
this.ActiveViewContent.SwitchedTo(); this.ActiveViewContent.OnSwitchedTo();
UpdateActiveViewContent();
}; };
} }
} }
@ -341,7 +357,7 @@ namespace ICSharpCode.SharpDevelop.Gui
return true; return true;
} }
public virtual void RedrawContent() public void RedrawContent()
{ {
RefreshTabPageTexts(); RefreshTabPageTexts();
} }
@ -356,12 +372,11 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
protected virtual void OnTitleChanged(EventArgs e) void OnTitleChanged(EventArgs e)
{ {
if (TitleChanged != null) { if (TitleChanged != null) {
TitleChanged(this, e); TitleChanged(this, e);
} }
WorkbenchSingleton.Workbench.WorkbenchLayout.OnActiveWorkbenchWindowChanged(EventArgs.Empty);
} }
protected override void OnClosing(System.ComponentModel.CancelEventArgs e) protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
@ -369,7 +384,7 @@ namespace ICSharpCode.SharpDevelop.Gui
e.Cancel = !CloseWindow(false); e.Cancel = !CloseWindow(false);
} }
protected virtual void OnCloseEvent(EventArgs e) void OnCloseEvent(EventArgs e)
{ {
OnWindowDeselected(e); OnWindowDeselected(e);
if (CloseEvent != null) { if (CloseEvent != null) {
@ -377,13 +392,14 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public virtual void OnWindowSelected(EventArgs e) public void OnWindowSelected(EventArgs e)
{ {
if (WindowSelected != null) { if (WindowSelected != null) {
WindowSelected(this, e); WindowSelected(this, e);
} }
} }
public virtual void OnWindowDeselected(EventArgs e)
public void OnWindowDeselected(EventArgs e)
{ {
if (WindowDeselected != null) { if (WindowDeselected != null) {
WindowDeselected(this, e); WindowDeselected(this, e);

92
src/Main/Base/Project/Src/Gui/Workbench/SingleInstanceHelper.cs

@ -0,0 +1,92 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui
{
public static class SingleInstanceHelper
{
const int WM_USER = 0x400;
const int CUSTOM_MESSAGE = WM_USER + 2;
const int RESULT_FILES_HANDLED = 2;
const int RESULT_PROJECT_IS_OPEN = 3;
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern IntPtr SetForegroundWindow(IntPtr hWnd);
public static bool OpenFilesInPreviousInstance(string[] fileList)
{
LoggingService.Debug("Trying to pass arguments to previous instance...");
int currentProcessId = Process.GetCurrentProcess().Id;
string currentFile = Assembly.GetEntryAssembly().Location;
int number = new Random().Next();
string fileName = Path.Combine(Path.GetTempPath(), "sd" + number + ".tmp");
try {
File.WriteAllLines(fileName, fileList);
List<IntPtr> alternatives = new List<IntPtr>();
foreach (Process p in Process.GetProcessesByName("SharpDevelop")) {
if (p.Id == currentProcessId) continue;
if (FileUtility.IsEqualFileName(currentFile, p.MainModule.FileName)) {
IntPtr hWnd = p.MainWindowHandle;
if (hWnd != IntPtr.Zero) {
long result = SendMessage(hWnd, CUSTOM_MESSAGE, new IntPtr(number), IntPtr.Zero).ToInt64();
if (result == RESULT_FILES_HANDLED) {
return true;
} else if (result == RESULT_PROJECT_IS_OPEN) {
alternatives.Add(hWnd);
}
}
}
}
foreach (IntPtr hWnd in alternatives) {
if (SendMessage(hWnd, CUSTOM_MESSAGE, new IntPtr(number), new IntPtr(1)).ToInt64() == RESULT_FILES_HANDLED) {
return true;
}
}
return false;
} finally {
File.Delete(fileName);
}
}
internal static bool PreFilterMessage(ref Message m)
{
if (m.Msg != CUSTOM_MESSAGE)
return false;
long fileNumber = m.WParam.ToInt64();
long openEvenIfProjectIsOpened = m.LParam.ToInt64();
LoggingService.Debug("Receiving custom message...");
if (openEvenIfProjectIsOpened == 0 && ProjectService.OpenSolution != null) {
m.Result = new IntPtr(RESULT_PROJECT_IS_OPEN);
} else {
m.Result = new IntPtr(RESULT_FILES_HANDLED);
try {
WorkbenchSingleton.SafeThreadAsyncCall(delegate { SetForegroundWindow(WorkbenchSingleton.MainForm.Handle) ; });
foreach (string file in File.ReadAllLines(Path.Combine(Path.GetTempPath(), "sd" + fileNumber + ".tmp"))) {
WorkbenchSingleton.SafeThreadAsyncCall(delegate(string openFileName) { FileService.OpenFile(openFileName); }, file);
}
} catch (Exception ex) {
LoggingService.Warn(ex);
}
}
return true;
}
}
}

11
src/Main/Base/Project/Src/Gui/WorkbenchSingleton.cs

@ -6,6 +6,7 @@
// </file> // </file>
using System; using System;
using System.Diagnostics;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
@ -130,6 +131,16 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
/// <summary>
/// Throws an exception if the current thread is not the main thread.
/// For performance reasons, the thread check is only done in debug builds.
/// </summary>
[Conditional("DEBUG")]
internal static void DebugAssertMainThread()
{
AssertMainThread();
}
/// <summary> /// <summary>
/// Throws an exception if the current thread is not the main thread. /// Throws an exception if the current thread is not the main thread.
/// </summary> /// </summary>

16
src/Main/Base/Project/Src/Services/File/FileService.cs

@ -45,6 +45,7 @@ namespace ICSharpCode.SharpDevelop
PropertyService.Set("RecentOpen", recentOpen.ToProperties()); PropertyService.Set("RecentOpen", recentOpen.ToProperties());
} }
ProjectService.SolutionLoaded -= ProjectServiceSolutionLoaded; ProjectService.SolutionLoaded -= ProjectServiceSolutionLoaded;
ParserService.LoadSolutionProjectsThreadEnded -= ParserServiceLoadSolutionProjectsThreadEnded;
serviceInitialized = false; serviceInitialized = false;
} }
@ -52,6 +53,7 @@ namespace ICSharpCode.SharpDevelop
{ {
if (!serviceInitialized) { if (!serviceInitialized) {
ProjectService.SolutionLoaded += ProjectServiceSolutionLoaded; ProjectService.SolutionLoaded += ProjectServiceSolutionLoaded;
ParserService.LoadSolutionProjectsThreadEnded += ParserServiceLoadSolutionProjectsThreadEnded;
serviceInitialized = true; serviceInitialized = true;
} }
} }
@ -182,6 +184,16 @@ namespace ICSharpCode.SharpDevelop
} }
} }
static void ParserServiceLoadSolutionProjectsThreadEnded(object sender, EventArgs e)
{
WorkbenchSingleton.SafeThreadAsyncCall(
delegate {
foreach (IViewContent content in Linq.ToArray(WorkbenchSingleton.Workbench.ViewContentCollection)) {
DisplayBindingService.AttachSubWindows(content, true);
}
});
}
public static bool IsOpen(string fileName) public static bool IsOpen(string fileName)
{ {
return GetOpenFile(fileName) != null; return GetOpenFile(fileName) != null;
@ -372,7 +384,7 @@ namespace ICSharpCode.SharpDevelop
} }
/// <summary> /// <summary>
/// Creates a FolderBrowserDialog that will initially select the /// Creates a FolderBrowserDialog that will initially select the
/// specified folder. If the folder does not exist then the default /// specified folder. If the folder does not exist then the default
/// behaviour of the FolderBrowserDialog is used where it selects the /// behaviour of the FolderBrowserDialog is used where it selects the
/// desktop folder. /// desktop folder.
@ -389,7 +401,7 @@ namespace ICSharpCode.SharpDevelop
} }
/// <summary> /// <summary>
/// Creates a FolderBrowserDialog that will initially select the /// Creates a FolderBrowserDialog that will initially select the
/// desktop folder. /// desktop folder.
/// </summary> /// </summary>
public static FolderBrowserDialog CreateFolderBrowserDialog(string description) public static FolderBrowserDialog CreateFolderBrowserDialog(string description)

4
src/Main/Base/Project/Src/Services/File/OpenedFile.cs

@ -191,7 +191,7 @@ namespace ICSharpCode.SharpDevelop
registeredViews.Add(view); registeredViews.Add(view);
view.ViewActivated += SwitchedToView; view.SwitchedTo += SwitchedToView;
#if DEBUG #if DEBUG
view.Disposed += ViewDisposed; view.Disposed += ViewDisposed;
#endif #endif
@ -203,7 +203,7 @@ namespace ICSharpCode.SharpDevelop
throw new ArgumentNullException("view"); throw new ArgumentNullException("view");
Debug.Assert(registeredViews.Contains(view)); Debug.Assert(registeredViews.Contains(view));
view.ViewActivated -= SwitchedToView; view.SwitchedTo -= SwitchedToView;
#if DEBUG #if DEBUG
view.Disposed -= ViewDisposed; view.Disposed -= ViewDisposed;
#endif #endif

2
src/Main/Base/Project/Src/Services/File/RecentOpen.cs

@ -18,7 +18,7 @@ namespace ICSharpCode.SharpDevelop
/// it checks, if the files exists at every creation, and if not it doesn't list them in the /// it checks, if the files exists at every creation, and if not it doesn't list them in the
/// recent files, and they'll not be saved during the next option save. /// recent files, and they'll not be saved during the next option save.
/// </summary> /// </summary>
public class RecentOpen public sealed class RecentOpen
{ {
/// <summary> /// <summary>
/// This variable is the maximal length of lastfile/lastopen entries /// This variable is the maximal length of lastfile/lastopen entries

6
src/Main/Base/Project/Src/Services/HelpProvider.cs

@ -6,7 +6,7 @@
// </file> // </file>
using System; using System;
using System.Collections; using System.Collections.Generic;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
@ -14,9 +14,9 @@ namespace ICSharpCode.SharpDevelop
{ {
public class HelpProvider public class HelpProvider
{ {
public static ArrayList GetProviders() public static List<HelpProvider> GetProviders()
{ {
return AddInTree.BuildItems("/SharpDevelop/Services/HelpProvider", null, false); return AddInTree.BuildItems<HelpProvider>("/SharpDevelop/Services/HelpProvider", null, false);
} }
public static void ShowHelp(IClass c) public static void ShowHelp(IClass c)

2
src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs

@ -13,7 +13,7 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop namespace ICSharpCode.SharpDevelop
{ {
public class ParseProjectContent : DefaultProjectContent public sealed class ParseProjectContent : DefaultProjectContent
{ {
internal static ParseProjectContent CreateUninitalized(IProject project) internal static ParseProjectContent CreateUninitalized(IProject project)
{ {

2
src/Main/Base/Project/Src/TextEditor/Commands/FormatCommands.cs

@ -232,7 +232,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
} }
using (SortOptionsDialog sortOptionsDialog = new SortOptionsDialog()) { using (SortOptionsDialog sortOptionsDialog = new SortOptionsDialog()) {
sortOptionsDialog.Owner = (Form)WorkbenchSingleton.Workbench; sortOptionsDialog.Owner = WorkbenchSingleton.MainForm;
if (sortOptionsDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) { if (sortOptionsDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
TextArea textarea = ((ITextEditorControlProvider)viewContent).TextEditorControl.ActiveTextAreaControl.TextArea; TextArea textarea = ((ITextEditorControlProvider)viewContent).TextEditorControl.ActiveTextAreaControl.TextArea;
textarea.BeginUpdate(); textarea.BeginUpdate();

2
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/AttributesDataProvider.cs

@ -18,7 +18,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public class AttributesDataProvider : CtrlSpaceCompletionDataProvider public class AttributesDataProvider : CtrlSpaceCompletionDataProvider
{ {
public AttributesDataProvider(IProjectContent pc) public AttributesDataProvider(IProjectContent pc)
: this(ExpressionContext.TypeDerivingFrom(pc.GetClass("System.Attribute", 0), true)) : this(ExpressionContext.TypeDerivingFrom(pc.SystemTypes.Attribute, true))
{ {
} }

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

@ -316,7 +316,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public void ShowInsightWindow(IInsightDataProvider insightDataProvider) public void ShowInsightWindow(IInsightDataProvider insightDataProvider)
{ {
if (insightWindow == null || insightWindow.IsDisposed) { if (insightWindow == null || insightWindow.IsDisposed) {
insightWindow = new InsightWindow(((Form)WorkbenchSingleton.Workbench), this); insightWindow = new InsightWindow(WorkbenchSingleton.MainForm, this);
insightWindow.Closed += new EventHandler(CloseInsightWindow); insightWindow.Closed += new EventHandler(CloseInsightWindow);
} }
insightWindow.AddInsightDataProvider(insightDataProvider, this.FileName); insightWindow.AddInsightDataProvider(insightDataProvider, this.FileName);
@ -331,7 +331,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public void ShowCompletionWindow(ICompletionDataProvider completionDataProvider, char ch) public void ShowCompletionWindow(ICompletionDataProvider completionDataProvider, char ch)
{ {
codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow((Form)WorkbenchSingleton.Workbench, this, this.FileName, completionDataProvider, ch); codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow(WorkbenchSingleton.MainForm, this, this.FileName, completionDataProvider, ch);
if (codeCompletionWindow != null) { if (codeCompletionWindow != null) {
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow); codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
} }

2
src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/SearchReplaceManager.cs

@ -362,7 +362,7 @@ namespace SearchAndReplace
static void ShowNotFoundMessage(IProgressMonitor monitor) static void ShowNotFoundMessage(IProgressMonitor monitor)
{ {
if (monitor != null) monitor.ShowingDialog = true; if (monitor != null) monitor.ShowingDialog = true;
MessageBox.Show((Form)WorkbenchSingleton.Workbench, MessageBox.Show(WorkbenchSingleton.MainForm,
ResourceService.GetString("Dialog.NewProject.SearchReplace.SearchStringNotFound"), ResourceService.GetString("Dialog.NewProject.SearchReplace.SearchStringNotFound"),
ResourceService.GetString("Dialog.NewProject.SearchReplace.SearchStringNotFound.Title"), ResourceService.GetString("Dialog.NewProject.SearchReplace.SearchStringNotFound.Title"),
MessageBoxButtons.OK, MessageBoxButtons.OK,

6
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CSharp/ExpressionFinder.cs

@ -76,7 +76,7 @@ namespace ICSharpCode.SharpDevelop.Dom.CSharp
IReturnType t = finder.SearchType(nonGenericClassName, typeParameterCount); IReturnType t = finder.SearchType(nonGenericClassName, typeParameterCount);
IClass c = (t != null) ? t.GetUnderlyingClass() : null; IClass c = (t != null) ? t.GetUnderlyingClass() : null;
if (c != null) { if (c != null) {
ExpressionContext context = ExpressionContext.TypeDerivingFrom(c, true); ExpressionContext context = ExpressionContext.TypeDerivingFrom(t, true);
if (context.ShowEntry(c)) { if (context.ShowEntry(c)) {
if (genericPart != null) { if (genericPart != null) {
DefaultClass genericClass = new DefaultClass(c.CompilationUnit, c.ClassType, c.Modifiers, c.Region, c.DeclaringType); DefaultClass genericClass = new DefaultClass(c.CompilationUnit, c.ClassType, c.Modifiers, c.Region, c.DeclaringType);
@ -94,7 +94,7 @@ namespace ICSharpCode.SharpDevelop.Dom.CSharp
} else { } else {
UnGet(); UnGet();
if (ReadIdentifier(GetNextNonWhiteSpace()) == "throw") { if (ReadIdentifier(GetNextNonWhiteSpace()) == "throw") {
return ExpressionContext.TypeDerivingFrom(HostCallback.GetCurrentProjectContent().GetClass("System.Exception", 0), true); return ExpressionContext.TypeDerivingFrom(HostCallback.GetCurrentProjectContent().SystemTypes.Exception, true);
} }
} }
return ExpressionContext.ObjectCreation; return ExpressionContext.ObjectCreation;
@ -201,7 +201,7 @@ namespace ICSharpCode.SharpDevelop.Dom.CSharp
/// <summary> /// <summary>
/// Gets the position in the source string (after filtering out comments) /// Gets the position in the source string (after filtering out comments)
/// where the beginning of last expression was found. /// where the beginning of last expression was found.
/// </summary> /// </summary>
public int LastExpressionStartPosition { public int LastExpressionStartPosition {
get { get {

11
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ExpressionContext.cs

@ -93,16 +93,16 @@ namespace ICSharpCode.SharpDevelop.Dom
/// object creation.</remarks> /// object creation.</remarks>
public static ExpressionContext GetAttribute(IProjectContent projectContent) public static ExpressionContext GetAttribute(IProjectContent projectContent)
{ {
return new TypeExpressionContext(projectContent.GetClass("System.Attribute", 0), false, true); return new TypeExpressionContext(projectContent.SystemTypes.Attribute, false, true);
} }
/// <summary>Context expects a type name which has special base type</summary> /// <summary>Context expects a type name which has special base type</summary>
/// <param name="baseClass">The class the expression must derive from.</param> /// <param name="baseClass">The class the expression must derive from.</param>
/// <param name="isObjectCreation">Specifies whether classes must be constructable.</param> /// <param name="isObjectCreation">Specifies whether classes must be constructable.</param>
/// <example>catch(*expr* ...), using(*expr* ...), throw new ***</example> /// <example>catch(*expr* ...), using(*expr* ...), throw new ***</example>
public static ExpressionContext TypeDerivingFrom(IClass baseClass, bool isObjectCreation) public static ExpressionContext TypeDerivingFrom(IReturnType baseType, bool isObjectCreation)
{ {
return new TypeExpressionContext(baseClass, isObjectCreation, false); return new TypeExpressionContext(baseType, isObjectCreation, false);
} }
/// <summary>Context expects an interface</summary> /// <summary>Context expects an interface</summary>
@ -163,9 +163,10 @@ namespace ICSharpCode.SharpDevelop.Dom
IClass baseClass; IClass baseClass;
bool isObjectCreation; bool isObjectCreation;
public TypeExpressionContext(IClass baseClass, bool isObjectCreation, bool readOnly) public TypeExpressionContext(IReturnType baseType, bool isObjectCreation, bool readOnly)
{ {
this.baseClass = baseClass; if (baseType != null)
baseClass = baseType.GetUnderlyingClass();
this.isObjectCreation = isObjectCreation; this.isObjectCreation = isObjectCreation;
this.readOnly = readOnly; this.readOnly = readOnly;
} }

4
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SystemTypes.cs

@ -26,8 +26,10 @@ namespace ICSharpCode.SharpDevelop.Dom
public readonly IReturnType Attribute; public readonly IReturnType Attribute;
public readonly IReturnType Type; public readonly IReturnType Type;
public readonly IReturnType Exception;
public readonly IReturnType AsyncCallback; public readonly IReturnType AsyncCallback;
public readonly IReturnType IAsyncResult; public readonly IReturnType IAsyncResult;
public readonly IReturnType IDisposable;
IProjectContent pc; IProjectContent pc;
@ -47,8 +49,10 @@ namespace ICSharpCode.SharpDevelop.Dom
Attribute = CreateFromName("System.Attribute"); Attribute = CreateFromName("System.Attribute");
Type = CreateFromName("System.Type"); Type = CreateFromName("System.Type");
Exception = CreateFromName("System.Exception");
AsyncCallback = CreateFromName("System.AsyncCallback"); AsyncCallback = CreateFromName("System.AsyncCallback");
IAsyncResult = CreateFromName("System.IAsyncResult"); IAsyncResult = CreateFromName("System.IAsyncResult");
IAsyncResult = CreateFromName("System.IDisposable");
} }
IReturnType CreateFromName(string name) IReturnType CreateFromName(string name)

2
src/Main/StartUp/Project/SharpDevelopMain.cs

@ -155,7 +155,7 @@ namespace ICSharpCode.SharpDevelop
return false; return false;
} }
} }
return DefaultWorkbench.SingleInstanceHelper.OpenFilesInPreviousInstance(fileList); return SingleInstanceHelper.OpenFilesInPreviousInstance(fileList);
} catch (Exception ex) { } catch (Exception ex) {
LoggingService.Error(ex); LoggingService.Error(ex);
return false; return false;

22
src/Tools/Tools.build

@ -13,17 +13,17 @@
</ItemGroup> </ItemGroup>
<Target Name="Build"> <Target Name="Build">
<Copy SourceFiles="@(NDocFiles)" DestinationFolder="..\..\bin\Tools\NDoc"/> <Copy SourceFiles="@(NDocFiles)" DestinationFolder="..\..\bin\Tools\NDoc" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(WixFiles)" DestinationFolder="..\..\bin\Tools\Wix"/> <Copy SourceFiles="@(WixFiles)" DestinationFolder="..\..\bin\Tools\Wix" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(WixDocFiles)" DestinationFolder="..\..\bin\Tools\Wix\doc"/> <Copy SourceFiles="@(WixDocFiles)" DestinationFolder="..\..\bin\Tools\Wix\doc" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(WixBitmapFiles)" DestinationFolder="..\..\bin\Tools\Wix\Bitmaps"/> <Copy SourceFiles="@(WixBitmapFiles)" DestinationFolder="..\..\bin\Tools\Wix\Bitmaps" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(WixIncFiles)" DestinationFolder="..\..\bin\Tools\Wix\inc"/> <Copy SourceFiles="@(WixIncFiles)" DestinationFolder="..\..\bin\Tools\Wix\inc" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(WixLibFiles)" DestinationFolder="..\..\bin\Tools\Wix\lib"/> <Copy SourceFiles="@(WixLibFiles)" DestinationFolder="..\..\bin\Tools\Wix\lib" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(NUnitFiles)" DestinationFolder="..\..\bin\Tools\NUnit"/> <Copy SourceFiles="@(NUnitFiles)" DestinationFolder="..\..\bin\Tools\NUnit" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(NUnitFiles)" DestinationFolder="..\..\bin\Tools\NUnit\Net-1.1"/> <Copy SourceFiles="@(NUnitFiles)" DestinationFolder="..\..\bin\Tools\NUnit\Net-1.1" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(NUnitConfigFileNetv11)" DestinationFiles="@(NUnitConfigFileNetv11->'..\..\bin\Tools\NUnit\Net-1.1\nunit-console.exe.config')"/> <Copy SourceFiles="@(NUnitConfigFileNetv11)" DestinationFiles="@(NUnitConfigFileNetv11->'..\..\bin\Tools\NUnit\Net-1.1\nunit-console.exe.config')" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(NUnitConfigFile)" DestinationFolder="..\..\bin\Tools\NUnit"/> <Copy SourceFiles="@(NUnitConfigFile)" DestinationFolder="..\..\bin\Tools\NUnit" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(ToolFiles)" DestinationFolder="..\..\bin\Tools"/> <Copy SourceFiles="@(ToolFiles)" DestinationFolder="..\..\bin\Tools" SkipUnchangedFiles="true"/>
<!-- <!--
<MSBuild Projects="@(ToolProject)" Targets="Build"> <MSBuild Projects="@(ToolProject)" Targets="Build">

Loading…
Cancel
Save