Browse Source

Fixed forum-19066: Invalid params for External Tools.

Changed some instances of "combine" to "solution".

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2707 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
06b61ceb90
  1. 2
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  2. 2
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  3. 12
      src/Main/Base/Project/Src/Commands/AutostartCommands.cs
  4. 27
      src/Main/Base/Project/Src/Commands/CustomStringTagProvider.cs
  5. 27
      src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs
  6. 8
      src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs
  7. 6
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
  8. 6
      src/Main/Base/Project/Src/Gui/Dialogs/WordCountDialog.cs
  9. 8
      src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorListPad.cs
  10. 6
      src/Main/Base/Project/Src/Gui/Pads/PropertyPad/PropertyPad.cs
  11. 8
      src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskListPad.cs
  12. 6
      src/Main/Base/Project/Src/Internal/Templates/Project/ProjectCreateInformation.cs
  13. 2
      src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs
  14. 18
      src/Main/Base/Project/Src/Internal/Templates/Project/ProjectTemplate.cs
  15. 34
      src/Main/Base/Project/Src/Internal/Templates/Project/SolutionDescriptor.cs
  16. 2
      src/Main/Base/Project/Src/Services/ClassBrowserIcons/ClassBrowserIconService.cs
  17. 3
      src/Main/Base/Project/Src/Services/ParserService/ParserService.cs
  18. 6
      src/Main/Base/Project/Src/Services/StatusBar/StatusBarService.cs
  19. 2
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

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

@ -782,7 +782,7 @@ namespace ICSharpCode.XmlEditor @@ -782,7 +782,7 @@ namespace ICSharpCode.XmlEditor
TextAreaControl activeTextAreaControl = xmlEditor.ActiveTextAreaControl;
int line = activeTextAreaControl.Caret.Line;
int col = activeTextAreaControl.Caret.Column;
StatusBarService.SetCaretPosition(activeTextAreaControl.TextArea.TextView.GetVisualColumn(line, col), line, col);
StatusBarService.SetCaretPosition(activeTextAreaControl.TextArea.TextView.GetVisualColumn(line, col) + 1, line + 1, col = 1);
}
/// <summary>

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

@ -136,7 +136,7 @@ @@ -136,7 +136,7 @@
<Compile Include="Src\Services\AmbienceService\CodeDOMGeneratorUtility.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\WindowOpenEvaluator.cs" />
<Compile Include="Src\Internal\Templates\Project\ProjectDescriptor.cs" />
<Compile Include="Src\Internal\Templates\Project\CombineDescriptor.cs" />
<Compile Include="Src\Internal\Templates\Project\SolutionDescriptor.cs" />
<Compile Include="Src\Gui\IProgressMonitor.cs" />
<Compile Include="Src\Gui\IViewContent.cs" />
<Compile Include="Src\Gui\IWorkbench.cs" />

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

@ -79,12 +79,12 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -79,12 +79,12 @@ namespace ICSharpCode.SharpDevelop.Commands
{
//WorkbenchSingleton.MainForm.Show();
bool didLoadCombineOrFile = false;
bool didLoadSolutionOrFile = false;
NavigationService.SuspendLogging();
foreach (string file in fileList) {
didLoadCombineOrFile = true;
didLoadSolutionOrFile = true;
try {
IProjectLoader loader = ProjectService.GetProjectLoader(file);
if (loader != null) {
@ -97,15 +97,15 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -97,15 +97,15 @@ namespace ICSharpCode.SharpDevelop.Commands
}
}
// load previous combine
if (!didLoadCombineOrFile && PropertyService.Get("SharpDevelop.LoadPrevProjectOnStartup", false)) {
// load previous solution
if (!didLoadSolutionOrFile && PropertyService.Get("SharpDevelop.LoadPrevProjectOnStartup", false)) {
if (FileService.RecentOpen.RecentProject.Count > 0) {
ProjectService.LoadSolution(FileService.RecentOpen.RecentProject[0].ToString());
didLoadCombineOrFile = true;
didLoadSolutionOrFile = true;
}
}
if (!didLoadCombineOrFile) {
if (!didLoadSolutionOrFile) {
foreach (ICommand command in AddInTree.BuildItems("/Workspace/AutostartNothingLoaded", null, false)) {
command.Run();
}

27
src/Main/Base/Project/Src/Commands/CustomStringTagProvider.cs

@ -24,6 +24,7 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -24,6 +24,7 @@ namespace ICSharpCode.SharpDevelop.Commands
"CurrentProjectName",
"ProjectDir", "ProjectFilename",
"CombineDir", "CombineFilename",
"SolutionDir", "SolutionFilename",
"Startuppath",
"TaskService.Warnings", "TaskService.Errors", "TaskService.Messages",
"NetSdkDir"
@ -92,14 +93,28 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -92,14 +93,28 @@ namespace ICSharpCode.SharpDevelop.Commands
} catch (Exception) {}
break;
// TODO:
case "CURLINE":
return String.Empty;
{
IPositionable positionable = WorkbenchSingleton.Workbench.ActiveViewContent as IPositionable;
if (positionable != null)
return (positionable.Line + 1).ToString();
break;
}
case "CURCOL":
return String.Empty;
{
IPositionable positionable = WorkbenchSingleton.Workbench.ActiveViewContent as IPositionable;
if (positionable != null)
return (positionable.Column + 1).ToString();
break;
}
case "CURTEXT":
return String.Empty;
{
var tecp = WorkbenchSingleton.Workbench.ActiveViewContent as DefaultEditor.Gui.Editor.ITextEditorControlProvider;
if (tecp != null) {
return tecp.TextEditorControl.ActiveTextAreaControl.SelectionManager.SelectedText;
}
break;
}
case "TARGETPATH":
try {
return GetCurrentTargetPath();
@ -135,7 +150,9 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -135,7 +150,9 @@ namespace ICSharpCode.SharpDevelop.Commands
break;
case "COMBINEDIR":
case "SOLUTIONDIR":
return Path.GetDirectoryName(ProjectService.OpenSolution.FileName);
case "SOLUTIONFILENAME":
case "COMBINEFILENAME":
try {
return Path.GetFileName(ProjectService.OpenSolution.FileName);

27
src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs

@ -235,33 +235,6 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -235,33 +235,6 @@ namespace ICSharpCode.SharpDevelop.Commands
if (item.Text == ToolLoader.Tool[i].ToString()) {
ExternalTool tool = (ExternalTool)ToolLoader.Tool[i];
string fileName = WorkbenchSingleton.Workbench.ActiveViewContent.PrimaryFileName;
StringParser.Properties["ItemPath"] = fileName == null ? String.Empty : fileName;
StringParser.Properties["ItemDir"] = fileName == null ? String.Empty : Path.GetDirectoryName(fileName);
StringParser.Properties["ItemFileName"] = fileName == null ? String.Empty : Path.GetFileName(fileName);
StringParser.Properties["ItemExt"] = fileName == null ? String.Empty : Path.GetExtension(fileName);
// TODO:
StringParser.Properties["CurLine"] = "0";
StringParser.Properties["CurCol"] = "0";
StringParser.Properties["CurText"] = "0";
string targetPath = ProjectService.CurrentProject == null ? null : ProjectService.CurrentProject.OutputAssemblyFullPath;
StringParser.Properties["TargetPath"] = targetPath == null ? String.Empty : targetPath;
StringParser.Properties["TargetDir"] = targetPath == null ? String.Empty : Path.GetDirectoryName(targetPath);
StringParser.Properties["TargetName"] = targetPath == null ? String.Empty : Path.GetFileName(targetPath);
StringParser.Properties["TargetExt"] = targetPath == null ? String.Empty : Path.GetExtension(targetPath);
string projectFileName = ProjectService.CurrentProject == null ? null : ProjectService.CurrentProject.FileName;
StringParser.Properties["ProjectDir"] = projectFileName == null ? null : Path.GetDirectoryName(projectFileName);
StringParser.Properties["ProjectFileName"] = projectFileName == null ? null : projectFileName;
string combineFileName = ProjectService.OpenSolution == null ? null : ProjectService.OpenSolution.FileName;
StringParser.Properties["CombineDir"] = combineFileName == null ? null : Path.GetDirectoryName(combineFileName);
StringParser.Properties["CombineFileName"] = combineFileName == null ? null : combineFileName;
StringParser.Properties["StartupPath"] = Application.StartupPath;
string command = StringParser.Parse(tool.Command);
string args = StringParser.Parse(tool.Arguments);

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

@ -258,7 +258,7 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs @@ -258,7 +258,7 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
}
public string NewProjectLocation;
public string NewCombineLocation;
public string NewSolutionLocation;
void OpenEvent(object sender, EventArgs e)
{
@ -313,12 +313,12 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs @@ -313,12 +313,12 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
cinfo.ProjectName = name;
NewCombineLocation = item.Template.CreateProject(cinfo);
if (NewCombineLocation == null || NewCombineLocation.Length == 0) {
NewSolutionLocation = item.Template.CreateProject(cinfo);
if (NewSolutionLocation == null || NewSolutionLocation.Length == 0) {
return;
}
if (createNewSolution) {
ProjectService.LoadSolutionOrProject(NewCombineLocation);
ProjectService.LoadSolutionOrProject(NewSolutionLocation);
item.Template.RunOpenActions(cinfo);
}

6
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs

@ -35,8 +35,8 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -35,8 +35,8 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.ProjectDirectory}", "${ProjectDir}"},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.ProjectFileName}", "${ProjectFileName}"},
{"-", ""},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.CombineDirectory}", "${CombineDir}"},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.CombineFileName}", "${CombineFileName}"},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.CombineDirectory}", "${SolutionDir}"},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.CombineFileName}", "${SolutionFileName}"},
{"-", ""},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.SharpDevelopStartupPath}", "${StartupPath}"},
};
@ -49,7 +49,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -49,7 +49,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{"-", ""},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.ProjectDirectory}", "${ProjectDir}"},
{"-", ""},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.CombineDirectory}", "${CombineDir}"},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.CombineDirectory}", "${SolutionDir}"},
{"-", ""},
{"${res:Dialog.Options.ExternalTool.QuickInsertMenu.SharpDevelopStartupPath}", "${StartupPath}"},
};

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

@ -131,7 +131,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -131,7 +131,7 @@ namespace ICSharpCode.SharpDevelop.Gui
break;
}
total = new Report(StringParser.Parse("${res:Dialog.WordCountDialog.TotalText}"), 0, 0, 0);
CountCombine(ProjectService.OpenSolution, ref total);
CountSolution(ProjectService.OpenSolution, ref total);
// ((ListView)ControlDictionary["resultListView"]).Items.Add(new ListViewItem(""));
// ((ListView)ControlDictionary["resultListView"]).Items.Add(all.ToListItem());
break;
@ -140,9 +140,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -140,9 +140,9 @@ namespace ICSharpCode.SharpDevelop.Gui
UpdateList(0);
}
void CountCombine(Solution combine, ref Report all)
void CountSolution(Solution solution, ref Report all)
{
foreach (IProject project in combine.Projects) {
foreach (IProject project in solution.Projects) {
foreach (ProjectItem item in project.Items) {
if (item.ItemType == ItemType.Compile) {
Report r = GetReport(item.FileName);

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

@ -91,8 +91,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -91,8 +91,8 @@ namespace ICSharpCode.SharpDevelop.Gui
};
ProjectService.EndBuild += ProjectServiceEndBuild;
ProjectService.SolutionLoaded += OnCombineOpen;
ProjectService.SolutionClosed += OnCombineClosed;
ProjectService.SolutionLoaded += OnSolutionOpen;
ProjectService.SolutionClosed += OnSolutionClosed;
taskView.CreateControl();
contentPanel.Controls.Add(taskView);
@ -111,13 +111,13 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -111,13 +111,13 @@ namespace ICSharpCode.SharpDevelop.Gui
taskView.RefreshColumnNames();
}
void OnCombineOpen(object sender, SolutionEventArgs e)
void OnSolutionOpen(object sender, SolutionEventArgs e)
{
taskView.ClearTasks();
UpdateToolstripStatus();
}
void OnCombineClosed(object sender, EventArgs e)
void OnSolutionClosed(object sender, EventArgs e)
{
try {
taskView.ClearTasks();

6
src/Main/Base/Project/Src/Gui/Pads/PropertyPad/PropertyPad.cs

@ -183,7 +183,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -183,7 +183,7 @@ namespace ICSharpCode.SharpDevelop.Gui
panel.Controls.Add(grid);
panel.Controls.Add(comboBox);
ProjectService.SolutionClosed += CombineClosedEvent;
ProjectService.SolutionClosed += SolutionClosedEvent;
grid.PropertyValueChanged += new PropertyValueChangedEventHandler(PropertyChanged);
grid.ContextMenuStrip = MenuService.CreateContextMenu(this, "/SharpDevelop/Views/PropertyPad/ContextMenu");
@ -197,7 +197,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -197,7 +197,7 @@ namespace ICSharpCode.SharpDevelop.Gui
WorkbenchActiveContentChanged(null, null);
}
void CombineClosedEvent(object sender, EventArgs e)
void SolutionClosedEvent(object sender, EventArgs e)
{
SetDesignableObjects(null);
}
@ -300,7 +300,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -300,7 +300,7 @@ namespace ICSharpCode.SharpDevelop.Gui
{
base.Dispose();
if (grid != null) {
ProjectService.SolutionClosed -= CombineClosedEvent;
ProjectService.SolutionClosed -= SolutionClosedEvent;
try {
grid.SelectedObjects = null;
} catch {}

8
src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskListPad.cs

@ -29,8 +29,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -29,8 +29,8 @@ namespace ICSharpCode.SharpDevelop.Gui
TaskService.Added += new TaskEventHandler(TaskServiceAdded);
TaskService.Removed += new TaskEventHandler(TaskServiceRemoved);
ProjectService.SolutionLoaded += OnCombineOpen;
ProjectService.SolutionClosed += OnCombineClosed;
ProjectService.SolutionLoaded += OnSolutionOpen;
ProjectService.SolutionClosed += OnSolutionClosed;
InternalShowResults(null, null);
}
@ -40,12 +40,12 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -40,12 +40,12 @@ namespace ICSharpCode.SharpDevelop.Gui
taskView.RefreshColumnNames();
}
void OnCombineOpen(object sender, SolutionEventArgs e)
void OnSolutionOpen(object sender, SolutionEventArgs e)
{
taskView.ClearTasks();
}
void OnCombineClosed(object sender, EventArgs e)
void OnSolutionClosed(object sender, EventArgs e)
{
taskView.ClearTasks();
}

6
src/Main/Base/Project/Src/Internal/Templates/Project/ProjectCreateInformation.cs

@ -22,7 +22,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -22,7 +22,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
public class ProjectCreateInformation
{
string projectName;
string combinePath;
string solutionPath;
string projectBasePath;
string outputProjectFileName;
string rootNamespace;
@ -59,10 +59,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -59,10 +59,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
public string SolutionPath {
get {
return combinePath;
return solutionPath;
}
set {
combinePath = value;
solutionPath = value;
}
}

2
src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs

@ -20,7 +20,7 @@ using MSBuild = Microsoft.Build.BuildEngine; @@ -20,7 +20,7 @@ using MSBuild = Microsoft.Build.BuildEngine;
namespace ICSharpCode.SharpDevelop.Internal.Templates
{
/// <summary>
/// This class is used inside the combine templates for projects.
/// This class is used inside the solution templates for projects.
/// </summary>
public sealed class ProjectDescriptor
{

18
src/Main/Base/Project/Src/Internal/Templates/Project/ProjectTemplate.cs

@ -87,7 +87,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -87,7 +87,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
ArrayList actions = new ArrayList();
CombineDescriptor combineDescriptor = null;
SolutionDescriptor solutionDescriptor = null;
ProjectDescriptor projectDescriptor = null;
#region Template Properties
@ -159,9 +159,9 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -159,9 +159,9 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
[Browsable(false)]
public CombineDescriptor CombineDescriptor {
public SolutionDescriptor SolutionDescriptor {
get {
return combineDescriptor;
return solutionDescriptor;
}
}
@ -221,9 +221,9 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -221,9 +221,9 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
string hintPath = Path.GetDirectoryName(xmlFileName);
if (templateElement["Solution"] != null) {
combineDescriptor = CombineDescriptor.CreateCombineDescriptor(templateElement["Solution"], hintPath);
solutionDescriptor = SolutionDescriptor.CreateSolutionDescriptor(templateElement["Solution"], hintPath);
} else if (templateElement["Combine"] != null) {
combineDescriptor = CombineDescriptor.CreateCombineDescriptor(templateElement["Combine"], hintPath);
solutionDescriptor = SolutionDescriptor.CreateSolutionDescriptor(templateElement["Combine"], hintPath);
WarnObsoleteNode(templateElement["Combine"], "Use <Solution> instead!");
}
@ -231,8 +231,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -231,8 +231,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
projectDescriptor = new ProjectDescriptor(templateElement["Project"], hintPath);
}
if (combineDescriptor == null && projectDescriptor == null
|| combineDescriptor != null && projectDescriptor != null)
if (solutionDescriptor == null && projectDescriptor == null
|| solutionDescriptor != null && projectDescriptor != null)
{
throw new TemplateLoadException("Template must contain either Project or Solution node!");
}
@ -281,8 +281,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -281,8 +281,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
return null;
}
}
if (combineDescriptor != null) {
return combineDescriptor.CreateSolution(projectCreateInformation, this.languagename);
if (solutionDescriptor != null) {
return solutionDescriptor.CreateSolution(projectCreateInformation, this.languagename);
} else if (projectDescriptor != null) {
projectCreateInformation.Solution = new Solution();
IProject project = projectDescriptor.CreateProject(projectCreateInformation, this.languagename);

34
src/Main/Base/Project/Src/Internal/Templates/Project/CombineDescriptor.cs → src/Main/Base/Project/Src/Internal/Templates/Project/SolutionDescriptor.cs

@ -15,7 +15,7 @@ using ICSharpCode.SharpDevelop.Project; @@ -15,7 +15,7 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Internal.Templates
{
public class CombineDescriptor
public class SolutionDescriptor
{
SolutionFolderDescriptor mainFolder = new SolutionFolderDescriptor("");
@ -87,7 +87,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -87,7 +87,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
}
#endregion
protected CombineDescriptor(string name)
protected SolutionDescriptor(string name)
{
this.name = name;
}
@ -97,11 +97,11 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -97,11 +97,11 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
Solution newSolution = new Solution();
projectCreateInformation.Solution = newSolution;
string newCombineName = StringParser.Parse(name, new string[,] {
string newSolutionName = StringParser.Parse(name, new string[,] {
{"ProjectName", projectCreateInformation.ProjectName}
});
newSolution.Name = newCombineName;
newSolution.Name = newSolutionName;
string oldCombinePath = projectCreateInformation.SolutionPath;
string oldProjectPath = projectCreateInformation.ProjectBasePath;
@ -124,35 +124,35 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -124,35 +124,35 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
return null;
}
string combineLocation = Path.Combine(projectCreateInformation.SolutionPath, newCombineName + ".sln");
// Save combine
if (File.Exists(combineLocation)) {
string solutionLocation = Path.Combine(projectCreateInformation.SolutionPath, newSolutionName + ".sln");
// Save solution
if (File.Exists(solutionLocation)) {
StringParser.Properties["combineLocation"] = combineLocation;
StringParser.Properties["combineLocation"] = solutionLocation;
if (MessageService.AskQuestion("${res:ICSharpCode.SharpDevelop.Internal.Templates.CombineDescriptor.OverwriteProjectQuestion}")) {
newSolution.Save(combineLocation);
newSolution.Save(solutionLocation);
}
} else {
newSolution.Save(combineLocation);
newSolution.Save(solutionLocation);
}
newSolution.Dispose();
return combineLocation;
return solutionLocation;
}
public static CombineDescriptor CreateCombineDescriptor(XmlElement element, string hintPath)
public static SolutionDescriptor CreateSolutionDescriptor(XmlElement element, string hintPath)
{
CombineDescriptor combineDescriptor = new CombineDescriptor(element.Attributes["name"].InnerText);
SolutionDescriptor solutionDescriptor = new SolutionDescriptor(element.Attributes["name"].InnerText);
if (element.Attributes["directory"] != null) {
combineDescriptor.relativeDirectory = element.Attributes["directory"].InnerText;
solutionDescriptor.relativeDirectory = element.Attributes["directory"].InnerText;
}
if (element["Options"] != null && element["Options"]["StartupProject"] != null) {
combineDescriptor.startupProject = element["Options"]["StartupProject"].InnerText;
solutionDescriptor.startupProject = element["Options"]["StartupProject"].InnerText;
}
combineDescriptor.mainFolder.Read(element, hintPath);
return combineDescriptor;
solutionDescriptor.mainFolder.Read(element, hintPath);
return solutionDescriptor;
}
}
}

2
src/Main/Base/Project/Src/Services/ClassBrowserIcons/ClassBrowserIconService.cs

@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop
public static class ClassBrowserIconService
{
public const int NamespaceIndex = 3;
public const int CombineIndex = 14;
public const int SolutionIndex = 14;
public const int ConstIndex = 15;
public const int GotoArrowIndex = 13;

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

@ -116,7 +116,7 @@ namespace ICSharpCode.SharpDevelop @@ -116,7 +116,7 @@ namespace ICSharpCode.SharpDevelop
{
if (loadSolutionProjectsThread != null) {
if (!abortLoadSolutionProjectsThread)
throw new InvalidOperationException("Cannot open new combine without closing old combine!");
throw new InvalidOperationException("Cannot open new solution without closing old solution!");
if (!loadSolutionProjectsThread.Join(50)) {
// loadSolutionProjects might be waiting for main thread, so give it
// a chance to complete safethread calls by putting this method at
@ -412,6 +412,7 @@ namespace ICSharpCode.SharpDevelop @@ -412,6 +412,7 @@ namespace ICSharpCode.SharpDevelop
}
IEditable editable = activeViewContent as IEditable;
if (editable != null) {
#warning PrimaryFileName is not thread-safe, move all property accesses that are not guaranteed to be thread-safe into GetActiveViewContent
string fileName = activeViewContent.PrimaryFileName;
string text = null;

6
src/Main/Base/Project/Src/Services/StatusBar/StatusBarService.cs

@ -47,9 +47,9 @@ namespace ICSharpCode.SharpDevelop @@ -47,9 +47,9 @@ namespace ICSharpCode.SharpDevelop
statusBar.CursorStatusBarPanel.Text = StringParser.Parse(
"${res:StatusBarService.CursorStatusBarPanelText}",
new string[,] {
{"Line", String.Format("{0,-10}", y + 1)},
{"Column", String.Format("{0,-5}", x + 1)},
{"Character", String.Format("{0,-5}", charOffset + 1)}
{"Line", String.Format("{0,-10}", y)},
{"Column", String.Format("{0,-5}", x)},
{"Character", String.Format("{0,-5}", charOffset)}
});
}

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

@ -288,7 +288,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -288,7 +288,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
TextAreaControl activeTextAreaControl = textEditorControl.ActiveTextAreaControl;
int line = activeTextAreaControl.Caret.Line;
int col = activeTextAreaControl.Caret.Column;
StatusBarService.SetCaretPosition(activeTextAreaControl.TextArea.TextView.GetVisualColumn(line, col), line, col);
StatusBarService.SetCaretPosition(activeTextAreaControl.TextArea.TextView.GetVisualColumn(line, col) + 1, line + 1, col + 1);
NavigationService.Log(this.BuildNavPoint());
}

Loading…
Cancel
Save