Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2010-03-24 20:07:14 +0300
committerLluis Sanchez <lluis@novell.com>2010-03-24 20:07:14 +0300
commit047d32932a5f27f98fbd2dfc04d9aaa293cfe16e (patch)
tree789319afe26143bf830b49f387caab16a582adcf /main/src/core/MonoDevelop.Ide
parent6aaef4412d971d46af58c93aabf68cd04d74db26 (diff)
* MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs: Don't
save the file if nothing has been replaced. * MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs: HashtableToStringArray is not necessary. The string parser service can directly handle a string dictionary. * MonoDevelop.Ide/Makefile.am: * MonoDevelop.Ide/gtk-gui/gui.stetic: * MonoDevelop.Ide/gtk-gui/objects.xml: * MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs: * MonoDevelop.Ide/MonoDevelop.Ide.csproj: * MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Commands/ToolsCommands.cs: * MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalTool.cs: * MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Commands/CustomStringTagProvider.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs: * MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs: * MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs: * MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs: * MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs: Use the new string tag model. Added a new StringTagSelectorButton class. * MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs: Sort the configurations list. * MonoDevelop.Core/Makefile.am: * MonoDevelop.Core/MonoDevelop.Core.csproj: * MonoDevelop.Core/MonoDevelop.Core.StringParsing: * MonoDevelop.Core/MonoDevelop.Projects/Project.cs: * MonoDevelop.Core/MonoDevelop.Projects/Solution.cs: * MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs: * MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs: * MonoDevelop.Core/MonoDevelop.Projects/CustomCommand.cs: * MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs: * MonoDevelop.Core/MonoDevelop.Core/StringParserService.cs: * MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs: * MonoDevelop.Core/MonoDevelop.Projects/ProjectConfiguration.cs: * MonoDevelop.Core/MonoDevelop.Core.StringParsing/StringTagModel.cs: * MonoDevelop.Core/MonoDevelop.Core.StringParsing/IStringTagModel.cs: * MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectConfiguration.cs: * MonoDevelop.Core/MonoDevelop.Core.StringParsing/StringTagProvider.cs: * MonoDevelop.Core/MonoDevelop.Core.StringParsing/IStringTagProvider.cs: * MonoDevelop.Core/MonoDevelop.Core.StringParsing/StringTagDescription.cs: * MonoDevelop.Core/MonoDevelop.Core.StringParsing/StringTagModelDescription.cs: Reworked the string parser service. Added an extension point for registering tag providers. Added StringTagModel and StringTagModelDescription classes. svn path=/trunk/monodevelop/; revision=154152
Diffstat (limited to 'main/src/core/MonoDevelop.Ide')
-rw-r--r--main/src/core/MonoDevelop.Ide/ChangeLog33
-rw-r--r--main/src/core/MonoDevelop.Ide/Makefile.am2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/CustomStringTagProvider.cs175
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ToolsCommands.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalTool.cs16
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs48
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs153
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs22
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs78
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs17
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs3
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs46
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs34
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs179
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic141
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/objects.xml4
22 files changed, 585 insertions, 397 deletions
diff --git a/main/src/core/MonoDevelop.Ide/ChangeLog b/main/src/core/MonoDevelop.Ide/ChangeLog
index 67c7416e57..d5a7342032 100644
--- a/main/src/core/MonoDevelop.Ide/ChangeLog
+++ b/main/src/core/MonoDevelop.Ide/ChangeLog
@@ -1,3 +1,36 @@
+2010-03-24 Lluis Sanchez Gual <lluis@novell.com>
+
+ * MonoDevelop.Ide.FindInFiles/FileProvider.cs: Don't save the
+ file if nothing has been replaced.
+
+ * MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:
+ * MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs:
+ HashtableToStringArray is not necessary. The string parser
+ service can directly handle a string dictionary.
+
+ * Makefile.am:
+ * gtk-gui/gui.stetic:
+ * gtk-gui/objects.xml:
+ * MonoDevelop.Ide/Ide.cs:
+ * MonoDevelop.Ide.csproj:
+ * MonoDevelop.Ide.Gui/Workbench.cs:
+ * MonoDevelop.Ide.Commands/ToolsCommands.cs:
+ * MonoDevelop.Ide.ExternalTools/ExternalTool.cs:
+ * MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs:
+ * MonoDevelop.Ide.Commands/CustomStringTagProvider.cs:
+ * MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs:
+ * MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs:
+ * MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs:
+ * gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs:
+ * MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs:
+ * gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs:
+ * gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs:
+ Use the new string tag model. Added a new
+ StringTagSelectorButton class.
+
+ * MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs:
+ Sort the configurations list.
+
2010-03-23 Michael Hutchinson <mhutchinson@novell.com>
* MonoDevelop.Ide/MessageService.cs: Use 'Ok' in error dialogs
diff --git a/main/src/core/MonoDevelop.Ide/Makefile.am b/main/src/core/MonoDevelop.Ide/Makefile.am
index a99e3b00d3..794e854838 100644
--- a/main/src/core/MonoDevelop.Ide/Makefile.am
+++ b/main/src/core/MonoDevelop.Ide/Makefile.am
@@ -40,6 +40,7 @@ FILES = \
gtk-gui/MonoDevelop.Ide.FindInFiles.FindInFilesDialog.cs \
gtk-gui/MonoDevelop.Ide.FindInFiles.SearchResultWidget.cs \
gtk-gui/MonoDevelop.Ide.Gui.Components.ExecutionModeComboBox.cs \
+ gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs \
gtk-gui/MonoDevelop.Ide.Gui.Dialogs.AddinLoadErrorDialog.cs \
gtk-gui/MonoDevelop.Ide.Gui.Dialogs.ErrorDialog.cs \
gtk-gui/MonoDevelop.Ide.Gui.Dialogs.GoToDialog.cs \
@@ -385,6 +386,7 @@ FILES = \
MonoDevelop.Ide.Gui.Components/NodeState.cs \
MonoDevelop.Ide.Gui.Components/PadTreeView.cs \
MonoDevelop.Ide.Gui.Components/ProjectFileEntry.cs \
+ MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs \
MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs \
MonoDevelop.Ide.Gui.Components/TreeBuilder.cs \
MonoDevelop.Ide.Gui.Components/TreeNodeNavigator.cs \
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/CustomStringTagProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/CustomStringTagProvider.cs
index cab5e3912b..b81558b7ef 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/CustomStringTagProvider.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/CustomStringTagProvider.cs
@@ -31,117 +31,80 @@ using MonoDevelop.Core;
using MonoDevelop.Ide.Gui;
using System.IO;
using System.Collections.Generic;
+using MonoDevelop.Core.StringParsing;
namespace MonoDevelop.Ide.Commands
{
- class DefaultStringTagProvider : StringParserService.IStringTagProvider
+ // The path name should not be required here. This is a workaround to a Mono.Addins bug (fixed in the last version)
+ [Mono.Addins.Extension ("/MonoDevelop.Core/TypeExtensions/MonoDevelop.Core.StringParsing.IStringTagProvider")]
+ class DefaultStringTagProvider : StringTagProvider<Workbench>
{
- public IEnumerable<string> Tags {
- get {
- return new String[] {
- "ITEMPATH",
- "ITEMDIR",
- "ITEMFILENAME",
- "ITEMEXT",
- "TARGETPATH",
- "TARGETDIR",
- "TARGETNAME",
- "TARGETEXT",
- "PROJECTDIR",
- "PROJECTFILENAME",
- "SOLUTIONDIR",
- "SOLUTIONFILE",
- "COMBINEDIR",
- "COMBINEFILENAME"
- };
- }
- }
-
- public string Convert (string tag, string format)
- {
- try {
- switch (tag.ToUpperInvariant ()) {
- case "ITEMPATH":
- if (IdeApp.Workbench.ActiveDocument != null)
- return (IdeApp.Workbench.ActiveDocument.IsViewOnly) ? String.Empty : IdeApp.Workbench.ActiveDocument.Name;
- return String.Empty;
-
- case "ITEMDIR":
- if (IdeApp.Workbench.ActiveDocument != null)
- return (IdeApp.Workbench.ActiveDocument.IsViewOnly) ? String.Empty : (string)IdeApp.Workbench.ActiveDocument.FileName.ParentDirectory;
- return String.Empty;
-
- case "ITEMFILENAME":
- if (IdeApp.Workbench.ActiveDocument != null)
- return (IdeApp.Workbench.ActiveDocument.IsViewOnly) ? String.Empty : IdeApp.Workbench.ActiveDocument.FileName.FileName;
- return String.Empty;
-
- case "ITEMEXT":
- if (IdeApp.Workbench.ActiveDocument != null)
- return (IdeApp.Workbench.ActiveDocument.IsViewOnly) ? String.Empty : IdeApp.Workbench.ActiveDocument.FileName.Extension;
- return String.Empty;
-
- case "TARGETPATH":
- if (IdeApp.ProjectOperations.CurrentSelectedProject != null)
- return IdeApp.ProjectOperations.CurrentSelectedProject.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration);
- else
- if ((IdeApp.Workbench.ActiveDocument != null) && (IdeApp.Workbench.ActiveDocument.Project != null))
- return IdeApp.Workbench.ActiveDocument.Project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration);
- return String.Empty;
-
- case "TARGETDIR":
- if(IdeApp.ProjectOperations.CurrentSelectedProject != null)
- return Path.GetDirectoryName (IdeApp.ProjectOperations.CurrentSelectedProject.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration));
- else
- if((IdeApp.Workbench.ActiveDocument != null) && (IdeApp.Workbench.ActiveDocument.Project != null))
- return Path.GetDirectoryName (IdeApp.Workbench.ActiveDocument.Project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration));
- return String.Empty;
-
- case "TARGETNAME":
- if(IdeApp.ProjectOperations.CurrentSelectedProject != null)
- return Path.GetFileName (IdeApp.ProjectOperations.CurrentSelectedProject.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration));
- else
- if((IdeApp.Workbench.ActiveDocument != null) && (IdeApp.Workbench.ActiveDocument.Project != null))
- return Path.GetFileName (IdeApp.Workbench.ActiveDocument.Project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration));
- return String.Empty;
-
- case "TARGETEXT":
- if(IdeApp.ProjectOperations.CurrentSelectedProject != null)
- return Path.GetExtension (IdeApp.ProjectOperations.CurrentSelectedProject.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration));
- else
- if((IdeApp.Workbench.ActiveDocument != null) && (IdeApp.Workbench.ActiveDocument.Project != null))
- return Path.GetExtension (IdeApp.Workbench.ActiveDocument.Project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration));
- return String.Empty;
-
- case "PROJECTDIR":
- if((IdeApp.Workbench.ActiveDocument != null) && (IdeApp.Workbench.ActiveDocument.Project != null))
- return IdeApp.Workbench.ActiveDocument.Project.FileName.ParentDirectory.FullPath;
- return String.Empty;
-
- case "PROJECTFILENAME":
- if((IdeApp.Workbench.ActiveDocument != null) && (IdeApp.Workbench.ActiveDocument.Project != null))
- return IdeApp.Workbench.ActiveDocument.Project.FileName.FileName;
- return String.Empty;
-
- case "SOLUTIONDIR":
- case "COMBINEDIR":
- if(IdeApp.ProjectOperations.CurrentSelectedSolutionItem != null)
- return IdeApp.ProjectOperations.CurrentSelectedSolutionItem.ParentSolution.FileName.ParentDirectory.FullPath;
- return String.Empty;
-
- case "SOLUTIONFILE":
- case "COMBINEFILENAME":
- if(IdeApp.ProjectOperations.CurrentSelectedSolutionItem != null)
- return IdeApp.ProjectOperations.CurrentSelectedSolutionItem.ParentSolution.FileName.FileName;
- return String.Empty;
-
- default:
- return String.Empty;
- }
- }
- catch {
- return String.Empty;
+ public override IEnumerable<StringTagDescription> GetTags ()
+ {
+ yield return new StringTagDescription ("FilePath", "File Path");
+ yield return new StringTagDescription ("FileDir", "File Directory");
+ yield return new StringTagDescription ("FileName", "File Name");
+ yield return new StringTagDescription ("FileExt", "File Extension");
+ yield return new StringTagDescription ("CurLine", "Cursor Line", false);
+ yield return new StringTagDescription ("CurColumn", "Cursor Column", false);
+ yield return new StringTagDescription ("CurOffset", "Cursor Offset", false);
+ yield return new StringTagDescription ("CurText", "Selected Editor Text", false);
+ yield return new StringTagDescription ("EditorText", "Editor Text", false);
+ yield return new StringTagDescription ("StartupPath", "MonoDevelop Startup Directory", false);
+ }
+
+ public override object GetTagValue (Workbench wb, string tag)
+ {
+ switch (tag) {
+ case "FILEPATH":
+ if (wb.ActiveDocument != null)
+ return !wb.ActiveDocument.IsFile ? String.Empty : wb.ActiveDocument.Name;
+ return null;
+
+ case "FILEDIR":
+ if (wb.ActiveDocument != null)
+ return !wb.ActiveDocument.IsFile ? FilePath.Empty : wb.ActiveDocument.FileName.ParentDirectory;
+ return null;
+
+ case "FILENAME":
+ if (wb.ActiveDocument != null)
+ return !wb.ActiveDocument.IsFile ? String.Empty : wb.ActiveDocument.FileName.FileName;
+ return null;
+
+ case "FILEEXT":
+ if (wb.ActiveDocument != null)
+ return !wb.ActiveDocument.IsFile ? String.Empty : wb.ActiveDocument.FileName.Extension;
+ return null;
+
+ case "CURLINE":
+ if (wb.ActiveDocument != null && wb.ActiveDocument.TextEditor != null)
+ return wb.ActiveDocument.TextEditor.CursorLine;
+ return null;
+
+ case "CURCOLUMN":
+ if (wb.ActiveDocument != null && wb.ActiveDocument.TextEditor != null)
+ return wb.ActiveDocument.TextEditor.CursorColumn;
+ return null;
+
+ case "CUROFFSET":
+ if (wb.ActiveDocument != null && wb.ActiveDocument.TextEditor != null)
+ return wb.ActiveDocument.TextEditor.CursorPosition;
+ return null;
+
+ case "CURTEXT":
+ if (wb.ActiveDocument != null && wb.ActiveDocument.TextEditor != null)
+ return wb.ActiveDocument.TextEditor.SelectedText;
+ return null;
+
+ case "EDITORTEXT":
+ if (wb.ActiveDocument != null && wb.ActiveDocument.TextEditor != null)
+ return wb.ActiveDocument.TextEditor.Text;
+ return null;
+
+ case "STARTUPPATH":
+ return AppDomain.CurrentDomain.BaseDirectory;
}
+ throw new NotSupportedException ();
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ToolsCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ToolsCommands.cs
index 87acfdd1fd..a8972e81dd 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ToolsCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ToolsCommands.cs
@@ -69,7 +69,7 @@ namespace MonoDevelop.Ide.Commands
{
ExternalTools.ExternalTool tool = (ExternalTools.ExternalTool)dataItem;
- string argumentsTool = StringParserService.Parse (tool.Arguments);
+ string argumentsTool = StringParserService.Parse (tool.Arguments, IdeApp.Workbench.GetStringTagModel ());
//Save current file checkbox
if (tool.SaveCurrentFile && IdeApp.Workbench.ActiveDocument != null)
@@ -78,7 +78,7 @@ namespace MonoDevelop.Ide.Commands
if (tool.PromptForArguments) {
string customerArguments = MessageService.GetTextResponse (GettextCatalog.GetString ("Enter any arguments you want to use while launching tool, {0}:", tool.MenuCommand), GettextCatalog.GetString ("Command Arguments for {0}", tool.MenuCommand), "");
if (customerArguments != String.Empty)
- argumentsTool = StringParserService.Parse (customerArguments);
+ argumentsTool = StringParserService.Parse (customerArguments, IdeApp.Workbench.GetStringTagModel ());
}
DispatchService.BackgroundDispatch (delegate {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalTool.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalTool.cs
index 39721e0f86..3481572852 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalTool.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalTool.cs
@@ -41,7 +41,7 @@ namespace MonoDevelop.Ide.ExternalTools
string arguments;
string initialDirectory;
bool promptForArguments;
- bool useOutputPad;
+ bool useOutputPad = true;
bool saveCurrentFile;
public string MenuCommand {
@@ -154,8 +154,22 @@ namespace MonoDevelop.Ide.ExternalTools
if (!String.IsNullOrEmpty (reader.GetAttribute (saveCurrentFileAttribute)))
result.saveCurrentFile = Boolean.Parse (reader.GetAttribute (saveCurrentFileAttribute));
+ // Some tag names have changed. Update them now.
+
+ result.arguments = UpgradeTags (result.arguments);
+ result.initialDirectory = UpgradeTags (result.initialDirectory);
+
return result;
}
+
+ static string UpgradeTags (string s)
+ {
+ s = s.Replace ("${ItemPath}","${FilePath}");
+ s = s.Replace ("${ItemDir}","${FileDir}");
+ s = s.Replace ("${ItemFileName}","${FileName}");
+ s = s.Replace ("${ItemExt}","${FileExt}");
+ return s;
+ }
#endregion
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs
index 7cba4e0869..abe5dbccf6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs
@@ -62,43 +62,6 @@ namespace MonoDevelop.Ide.ExternalTools
public partial class ExternalToolPanelWidget : Gtk.Bin
{
- static string[,] argumentQuickInsertMenu = new string[,] {
- {GettextCatalog.GetString ("Item Path"), "${ItemPath}"},
- {GettextCatalog.GetString ("_Item Directory"), "${ItemDir}"},
- {GettextCatalog.GetString ("Item file name"), "${ItemFileName}"},
- {GettextCatalog.GetString ("Item extension"), "${ItemExt}"},
- {"-", ""},
- {GettextCatalog.GetString ("Current line"), "${CurLine}"},
- {GettextCatalog.GetString ("Current column"), "${CurCol}"},
- {GettextCatalog.GetString ("Current text"), "${CurText}"},
- {"-", ""},
- {GettextCatalog.GetString ("Target Path"), "${TargetPath}"},
- {GettextCatalog.GetString ("_Target Directory"), "${TargetDir}"},
- {GettextCatalog.GetString ("Target Name"), "${TargetName}"},
- {GettextCatalog.GetString ("Target Extension"), "${TargetExt}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Project Directory"), "${ProjectDir}"},
- {GettextCatalog.GetString ("Project file name"), "${ProjectFileName}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Solution Directory"), "${SolutionDir}"},
- {GettextCatalog.GetString ("Solution File Name"), "${SolutionFile}"},
- {"-", ""},
- {GettextCatalog.GetString ("MonoDevelop Startup Directory"), "${StartupPath}"},
- };
-
- static string[,] workingDirInsertMenu = new string[,] {
- {GettextCatalog.GetString ("_Item Directory"), "${ItemDir}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Target Directory"), "${TargetDir}"},
- {GettextCatalog.GetString ("Target Name"), "${TargetName}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Project Directory"), "${ProjectDir}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Solution Directory"), "${SolutionDir}"},
- {"-", ""},
- {GettextCatalog.GetString ("MonoDevelop Startup Directory"), "${StartupPath}"},
- };
-
// gtk controls
ListStore toolListBoxStore;
@@ -119,8 +82,8 @@ namespace MonoDevelop.Ide.ExternalTools
titleTextBox, argumentTextBox,
workingDirTextBox, promptArgsCheckBox, useOutputPadCheckBox,
titleLabel, argumentLabel, commandLabel,
- workingDirLabel, browseButton, argumentQuickInsertButton,
- workingDirQuickInsertButton, moveUpButton, moveDownButton,
+ workingDirLabel, browseButton,
+ moveUpButton, moveDownButton,
saveCurrentFileCheckBox
};
@@ -136,8 +99,11 @@ namespace MonoDevelop.Ide.ExternalTools
toolListBox.AppendColumn (GettextCatalog.GetString ("Tools"), new CellRendererText (), "text", 0);
- new MenuButtonEntry (argumentTextBox, argumentQuickInsertButton, argumentQuickInsertMenu);
- new MenuButtonEntry (workingDirTextBox, workingDirQuickInsertButton, workingDirInsertMenu);
+ tagSelectorArgs.TagModel = IdeApp.Workbench.GetStringTagModelDescription ();
+ tagSelectorArgs.TargetEntry = argumentTextBox;
+
+ tagSelectorPath.TagModel = IdeApp.Workbench.GetStringTagModelDescription ();
+ tagSelectorPath.TargetEntry = workingDirTextBox;
toolListBox.Selection.Changed += SelectionChanged;
removeButton.Clicked += RemoveButtonClicked;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs
index 44bf97cd59..3dcb293322 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs
@@ -95,8 +95,11 @@ namespace MonoDevelop.Ide.FindInFiles
Document document;
StringBuilder buffer = null;
+ bool somethingReplaced;
+
public void BeginReplace ()
{
+ somethingReplaced = false;
TextReader reader = Open ();
buffer = new StringBuilder (reader.ReadToEnd ());
reader.Close ();
@@ -111,6 +114,7 @@ namespace MonoDevelop.Ide.FindInFiles
public void Replace (int offset, int length, string replacement)
{
+ somethingReplaced = true;
buffer.Remove (offset, length);
buffer.Insert (offset, replacement);
if (this.document != null) {
@@ -128,12 +132,12 @@ namespace MonoDevelop.Ide.FindInFiles
Gtk.Application.Invoke (delegate { document.TextEditor.EndAtomicUndo (); });
return;
}
- if (buffer != null) {
+ if (buffer != null && somethingReplaced) {
object attributes = DesktopService.GetFileAttributes (FileName);
File.WriteAllText (FileName, buffer.ToString ());
DesktopService.SetFileAttributes (FileName, attributes);
- buffer = null;
}
+ buffer = null;
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs
new file mode 100644
index 0000000000..0ab40cfff0
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs
@@ -0,0 +1,153 @@
+//
+// StringTagSelectorButton.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using MonoDevelop.Core.StringParsing;
+using Gtk;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.Ide.Gui.Components
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class StringTagSelectorButton : Gtk.Bin
+ {
+ bool isOpen;
+
+ public StringTagSelectorButton ()
+ {
+ this.Build ();
+ }
+
+ public StringTagModelDescription TagModel { get; set; }
+
+ public Entry TargetEntry { get; set; }
+
+ void InsertTag (string tag)
+ {
+ if (TargetEntry != null) {
+ int tempInt = TargetEntry.Position;
+ TargetEntry.DeleteSelection();
+ TargetEntry.InsertText ("${" + tag + "}", ref tempInt);
+ }
+ }
+
+ Menu CreateMenu (bool importantOnly)
+ {
+ if (TagModel != null) {
+ Menu menu = new Menu ();
+
+ bool itemsAdded = false;
+ bool extraItemsAdded = false;
+
+ foreach (StringTagDescription[] tags in TagModel.GetTagsGrouped ()) {
+ if (itemsAdded) {
+ SeparatorMenuItem sep = new SeparatorMenuItem ();
+ menu.Add (sep);
+ }
+ foreach (StringTagDescription tag in tags) {
+ if (tag.Important != importantOnly)
+ continue;
+ MenuItem item = new MenuItem (tag.Description);
+ string tagString = tag.Name;
+ item.ButtonPressEvent += delegate {
+ InsertTag (tagString);
+ };
+ menu.Add (item);
+ itemsAdded = true;
+ }
+ }
+ if (importantOnly) {
+ Menu subMenu = CreateMenu (false);
+ if (subMenu.Children.Length > 0) {
+ SeparatorMenuItem sep = new SeparatorMenuItem ();
+ menu.Add (sep);
+ MenuItem item = new MenuItem (GettextCatalog.GetString ("More"));
+ item.Submenu = subMenu;
+ menu.Add (item);
+ }
+ }
+ menu.ShowAll ();
+ return menu;
+ }
+ return null;
+ }
+
+ protected virtual void OnButtonClicked (object sender, System.EventArgs e)
+ {
+ Menu menu = CreateMenu (true);
+
+ if (menu != null) {
+ isOpen = true;
+
+ //make sure the button looks depressed
+ ReliefStyle oldRelief = button.Relief;
+ button.Relief = ReliefStyle.Normal;
+
+ //clean up after the menu's done
+ menu.Hidden += delegate {
+ button.Relief = oldRelief ;
+ isOpen = false;
+ button.State = StateType.Normal;
+
+ //FIXME: for some reason the menu's children don't get activated if we destroy
+ //directly here, so use a timeout to delay it
+ GLib.Timeout.Add (100, delegate {
+ menu.Destroy ();
+ return false;
+ });
+ };
+ menu.Popup (null, null, PositionFunc, 0, Gtk.Global.CurrentEventTime);
+ }
+ }
+
+ protected override void OnStateChanged(StateType previous_state)
+ {
+ base.OnStateChanged (previous_state);
+
+ //while the menu's open, make sure the button looks depressed
+ if (isOpen && button.State != StateType.Active)
+ button.State = StateType.Active;
+ }
+
+ void PositionFunc (Menu mn, out int x, out int y, out bool push_in)
+ {
+ button.GdkWindow.GetOrigin (out x, out y);
+ Gdk.Rectangle rect = button.Allocation;
+ x += rect.X;
+ y += rect.Y + rect.Height;
+
+ //if the menu would be off the bottom of the screen, "drop" it upwards
+ if (y + mn.Requisition.Height > button.Screen.Height) {
+ y -= mn.Requisition.Height;
+ y -= rect.Height;
+ }
+
+ //let GTK reposition the button if it still doesn't fit on the screen
+ push_in = true;
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
index 74a02eecb1..2b4931bbeb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
@@ -45,6 +45,7 @@ using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Ide.Desktop;
using Mono.Addins;
using MonoDevelop.Ide.Projects;
+using MonoDevelop.Core.StringParsing;
namespace MonoDevelop.Ide.Gui
{
@@ -526,6 +527,27 @@ namespace MonoDevelop.Ide.Gui
}
}
+ public StringTagModelDescription GetStringTagModelDescription ()
+ {
+ StringTagModelDescription model = new StringTagModelDescription ();
+ model.Add (typeof (Project));
+ model.Add (typeof (Solution));
+ model.Add (typeof (DotNetProjectConfiguration));
+ model.Add (typeof (Workbench));
+ return model;
+ }
+
+ public StringTagModel GetStringTagModel ()
+ {
+ StringTagModel source = new StringTagModel ();
+ source.Add (this);
+ if (IdeApp.ProjectOperations.CurrentSelectedSolutionItem != null)
+ source.Add (IdeApp.ProjectOperations.CurrentSelectedSolutionItem.GetStringTagModel (IdeApp.Workspace.ActiveConfiguration));
+ else if (IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem != null)
+ source.Add (IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem.GetStringTagModel ());
+ return source;
+ }
+
internal void ShowNext ()
{
// Shows the next item in a pad that implements ILocationListPad.
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
index 4a1ea2eb9d..93bfaaf5b7 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
@@ -59,7 +59,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
partial class CombineConfigurationPanelWidget : Gtk.Bin
{
- TreeStore store;
+ ListStore store;
SolutionConfiguration configuration;
MultiConfigItemOptionsDialog parentDialog;
@@ -68,7 +68,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
Build ();
this.parentDialog = parentDialog;
- store = new TreeStore (typeof(object), typeof(string), typeof(bool));
+ store = new ListStore (typeof(object), typeof(string), typeof(bool));
configsList.Model = store;
configsList.HeadersVisible = true;
@@ -79,6 +79,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
col.AddAttribute (sr, "text", 1);
col.Title = GettextCatalog.GetString ("Solution Item");
configsList.AppendColumn (col);
+ col.SortColumnId = 1;
CellRendererToggle tt = new CellRendererToggle ();
tt.Activatable = true;
@@ -88,6 +89,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
CellRendererComboBox comboCell = new CellRendererComboBox ();
comboCell.Changed += new ComboSelectionChangedHandler (OnConfigSelectionChanged);
configsList.AppendColumn (GettextCatalog.GetString ("Configuration"), comboCell, new TreeCellDataFunc (OnSetConfigurationsData));
+ store.SetSortColumnId (1, SortType.Ascending);
}
public void Load (SolutionConfiguration config)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs
index e12eaac575..89d69ada0c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanel.cs
@@ -45,7 +45,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public override void LoadConfigData ()
{
- widget.Load (ConfiguredSolutionItem, CurrentConfiguration.CustomCommands);
+ widget.Load (ConfiguredSolutionItem, CurrentConfiguration.CustomCommands, CurrentConfiguration.Selector);
}
public override void ApplyChanges ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs
index 90f29579b7..a6639bb7f8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandPanelWidget.cs
@@ -38,16 +38,18 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
CustomCommandCollection commands;
CustomCommandWidget lastSlot;
SolutionEntityItem entry;
+ ConfigurationSelector configSelector;
public CustomCommandPanelWidget ()
{
this.Build();
}
- public void Load (SolutionEntityItem entry, CustomCommandCollection commands)
+ public void Load (SolutionEntityItem entry, CustomCommandCollection commands, ConfigurationSelector configSelector)
{
this.entry = entry;
this.commands = commands;
+ this.configSelector = configSelector;
// Clean the list
foreach (CustomCommandWidget ccw in vboxCommands.Children) {
@@ -66,7 +68,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
void AddCommandSlot (CustomCommand cmd)
{
- CustomCommandWidget widget = new CustomCommandWidget (entry, cmd);
+ CustomCommandWidget widget = new CustomCommandWidget (entry, cmd, configSelector);
vboxCommands.PackStart (widget, false, false, 0);
widget.CommandCreated += OnCommandCreated;
widget.CommandRemoved += OnCommandRemoved;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
index a0974f89f9..3cdb8b3099 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
@@ -30,6 +30,7 @@ using System;
using MonoDevelop.Core;
using MonoDevelop.Projects;
using MonoDevelop.Components;
+using MonoDevelop.Core.StringParsing;
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -41,64 +42,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
IWorkspaceObject entry;
bool updating;
- // snatched from MonoDevelop.Ide.Gui.OptionPanels/ExternalToolPanel.cs
- // a lot of these probably don't apply to custom build commands (e.g. ItemPath -- path of current open doc)
-// static string[,] argumentQuickInsertMenu = new string[,] {
-// {GettextCatalog.GetString ("Item Path"), "${ItemPath}"},
-// {GettextCatalog.GetString ("_Item Directory"), "${ItemDir}"},
-// {GettextCatalog.GetString ("Item file name"), "${ItemFileName}"},
-// {GettextCatalog.GetString ("Item extension"), "${ItemExt}"},
-// {"-", ""},
-// {GettextCatalog.GetString ("Current line"), "${CurLine}"},
-// {GettextCatalog.GetString ("Current column"), "${CurCol}"},
-// {GettextCatalog.GetString ("Current text"), "${CurText}"},
-// {"-", ""},
-// {GettextCatalog.GetString ("Target Path"), "${TargetPath}"},
-// {GettextCatalog.GetString ("_Target Directory"), "${TargetDir}"},
-// {GettextCatalog.GetString ("Target Name"), "${TargetName}"},
-// {GettextCatalog.GetString ("Target Extension"), "${TargetExt}"},
-// {"-", ""},
-// {GettextCatalog.GetString ("_Project Directory"), "${ProjectDir}"},
-// {GettextCatalog.GetString ("Project file name"), "${ProjectFileName}"},
-// {"-", ""},
-// {GettextCatalog.GetString ("_Solution Directory"), "${CombineDir}"},
-// {GettextCatalog.GetString ("Solution File Name"), "${CombineFileName}"},
-// {"-", ""},
-// {GettextCatalog.GetString ("MonoDevelop Startup Directory"), "${StartupPath}"},
-// };
-
- static string[,] projectWorkingDirInsertMenu = new string[,] {
- // Keep in sync with CustomCommand.cs
- {GettextCatalog.GetString ("_Target Directory"), "${TargetDir}"},
- {GettextCatalog.GetString ("Target _Name"), "${TargetName}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Project Directory"), "${ProjectDir}"},
- {GettextCatalog.GetString ("P_roject Name"), "${ProjectName}"},
- {GettextCatalog.GetString ("Project _File"), "${ProjectFile}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Solution Directory"), "${SolutionDir}"},
- {GettextCatalog.GetString ("So_lution Name"), "${SolutionName}"},
- {GettextCatalog.GetString ("Solution F_ile"), "${SolutionFile}"},
- };
-
- static string[,] entryWorkingDirInsertMenu = new string[,] {
- // Keep in sync with CustomCommand.cs
- {GettextCatalog.GetString ("Solution _Item Directory"), "${ItemDir}"},
- {GettextCatalog.GetString ("Solution Item _Name"), "${ItemName}"},
- {GettextCatalog.GetString ("Solution Item _File"), "${ItemFile}"},
- {"-", ""},
- {GettextCatalog.GetString ("_Solution Directory"), "${SolutionDir}"},
- {GettextCatalog.GetString ("So_lution Name"), "${SolutionName}"},
- {GettextCatalog.GetString ("Solution F_ile"), "${SolutionFile}"},
- };
-
- static string[,] solutionWorkingDirInsertMenu = new string[,] {
- // Keep in sync with CustomCommand.cs
- {GettextCatalog.GetString ("_Solution Directory"), "${SolutionDir}"},
- {GettextCatalog.GetString ("So_lution Name"), "${SolutionName}"},
- };
-
- public CustomCommandWidget (IWorkspaceObject entry, CustomCommand cmd)
+ public CustomCommandWidget (IWorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector)
{
this.Build();
this.cmd = cmd;
@@ -112,15 +56,19 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
UpdateControls ();
this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;
- string[,] workingDirInsertMenu;
- if (entry is Project)
- workingDirInsertMenu = projectWorkingDirInsertMenu;
- else if (entry is SolutionEntityItem)
- workingDirInsertMenu = entryWorkingDirInsertMenu;
+ StringTagModelDescription tagModel;
+ if (entry is SolutionItem)
+ tagModel = ((SolutionItem)entry).GetStringTagModelDescription (configSelector);
+ else if (entry is WorkspaceItem)
+ tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription ();
else
- workingDirInsertMenu = solutionWorkingDirInsertMenu;
+ tagModel = new StringTagModelDescription ();
+
+ tagSelectorDirectory.TagModel = tagModel;
+ tagSelectorDirectory.TargetEntry = workingdirEntry;
- new MenuButtonEntry (workingdirEntry, workingdirQuickInsertButton, workingDirInsertMenu);
+ tagSelectorCommand.TagModel = tagModel;
+ tagSelectorCommand.TargetEntry = entryCommand;
}
public CustomCommand CustomCommand {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs
index c4cbf4502f..da09f14b02 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs
@@ -151,8 +151,7 @@ namespace MonoDevelop.Ide.Templates
//This is a bit hacky doing it here instead of in CreateContent, but need to
//substitute all tags in code before language is translated, because language
//translation gets confused by unsubstituted substitution tokens.
- string [,] tagsArr = HashtableToStringArray (tags);
- tempSubstitutedContent = StringParserService.Parse (content, tagsArr);
+ tempSubstitutedContent = StringParserService.Parse (content, tags);
}
private System.CodeDom.Compiler.CodeDomProvider GetCodeDomProvider (string language)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs
index a4c81325e2..67d4fd27ce 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs
@@ -117,7 +117,7 @@ namespace MonoDevelop.Ide.Templates
if (!string.IsNullOrEmpty (dependsOn)) {
Dictionary<string,string> tags = new Dictionary<string,string> ();
ModifyTags (policyParent, project, language, null, generatedFile, ref tags);
- string parsedDepName = StringParserService.Parse (dependsOn, HashtableToStringArray (tags));
+ string parsedDepName = StringParserService.Parse (dependsOn, tags);
if (projectFile.DependsOn != parsedDepName)
projectFile.DependsOn = parsedDepName;
}
@@ -210,7 +210,7 @@ namespace MonoDevelop.Ide.Templates
if ((name != null) && (name.Length > 0)) {
Dictionary<string,string> tags = new Dictionary<string,string> ();
ModifyTags (policyParent, project, language, entryName ?? name, null, ref tags);
- fileName = StringParserService.Parse (name, HashtableToStringArray (tags));
+ fileName = StringParserService.Parse (name, tags);
}
if (fileName == null)
@@ -371,18 +371,5 @@ namespace MonoDevelop.Ide.Templates
throw new InvalidOperationException ("Language '" + language + "' not found");
return binding;
}
-
- protected string[,] HashtableToStringArray (Dictionary<string,string> tags)
- {
- string[,] tagsArr = new string [tags.Count, 2];
- int i = 0;
- foreach (string key in tags.Keys) {
- tagsArr [i, 0] = key;
- tagsArr [i, 1] = tags [key];
- i++;
- }
-
- return tagsArr;
- }
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
index 53a22b9e12..d4e4ff26a5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
@@ -1349,6 +1349,8 @@
<Compile Include="MonoDevelop.Ide.Extensions\OptionsDialogSection.cs" />
<Compile Include="MonoDevelop.Ide.Extensions\OptionsPanelNode.cs" />
<Compile Include="MonoDevelop.Ide.Extensions\StockIconCodon.cs" />
+ <Compile Include="MonoDevelop.Ide.Gui.Components\StringTagSelectorButton.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ChangeLog" />
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs
index ec14dc1831..414cdda612 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs
@@ -168,9 +168,6 @@ namespace MonoDevelop.Ide
workbench.Initialize (monitor);
monitor.Step (1);
- // register string tag provider (TODO: move to add-in tree :)
- StringParserService.RegisterStringTagProvider (new MonoDevelop.Ide.Commands.DefaultStringTagProvider ());
-
InternalLog.EnableErrorNotification ();
monitor.Step (1);
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs
index 5bb9d7d538..50d06b67c4 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget.cs
@@ -34,13 +34,13 @@ namespace MonoDevelop.Ide.ExternalTools
private global::Gtk.Table table3;
- private global::Gtk.Button argumentQuickInsertButton;
-
private global::Gtk.Entry argumentTextBox;
+ private global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton tagSelectorArgs;
+
private global::Gtk.Table table4;
- private global::Gtk.Button workingDirQuickInsertButton;
+ private global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton tagSelectorPath;
private global::Gtk.Entry workingDirTextBox;
@@ -198,24 +198,23 @@ namespace MonoDevelop.Ide.ExternalTools
this.table3.RowSpacing = ((uint)(6));
this.table3.ColumnSpacing = ((uint)(4));
// Container child table3.Gtk.Table+TableChild
- this.argumentQuickInsertButton = new global::Gtk.Button ();
- this.argumentQuickInsertButton.Name = "argumentQuickInsertButton";
- this.argumentQuickInsertButton.UseUnderline = true;
- this.argumentQuickInsertButton.Label = " > ";
- this.table3.Add (this.argumentQuickInsertButton);
- global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table3[this.argumentQuickInsertButton]));
- w13.LeftAttach = ((uint)(1));
- w13.RightAttach = ((uint)(2));
- w13.XOptions = ((global::Gtk.AttachOptions)(0));
- w13.YOptions = ((global::Gtk.AttachOptions)(0));
- // Container child table3.Gtk.Table+TableChild
this.argumentTextBox = new global::Gtk.Entry ();
this.argumentTextBox.Name = "argumentTextBox";
this.argumentTextBox.IsEditable = true;
this.argumentTextBox.InvisibleChar = '●';
this.table3.Add (this.argumentTextBox);
- global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table3[this.argumentTextBox]));
- w14.YOptions = ((global::Gtk.AttachOptions)(0));
+ global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table3[this.argumentTextBox]));
+ w13.YOptions = ((global::Gtk.AttachOptions)(0));
+ // Container child table3.Gtk.Table+TableChild
+ this.tagSelectorArgs = new global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton ();
+ this.tagSelectorArgs.Events = ((global::Gdk.EventMask)(256));
+ this.tagSelectorArgs.Name = "tagSelectorArgs";
+ this.table3.Add (this.tagSelectorArgs);
+ global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table3[this.tagSelectorArgs]));
+ w14.LeftAttach = ((uint)(1));
+ w14.RightAttach = ((uint)(2));
+ w14.XOptions = ((global::Gtk.AttachOptions)(4));
+ w14.YOptions = ((global::Gtk.AttachOptions)(4));
this.table2.Add (this.table3);
global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table2[this.table3]));
w15.TopAttach = ((uint)(2));
@@ -229,16 +228,15 @@ namespace MonoDevelop.Ide.ExternalTools
this.table4.RowSpacing = ((uint)(6));
this.table4.ColumnSpacing = ((uint)(4));
// Container child table4.Gtk.Table+TableChild
- this.workingDirQuickInsertButton = new global::Gtk.Button ();
- this.workingDirQuickInsertButton.Name = "workingDirQuickInsertButton";
- this.workingDirQuickInsertButton.UseUnderline = true;
- this.workingDirQuickInsertButton.Label = " > ";
- this.table4.Add (this.workingDirQuickInsertButton);
- global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table4[this.workingDirQuickInsertButton]));
+ this.tagSelectorPath = new global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton ();
+ this.tagSelectorPath.Events = ((global::Gdk.EventMask)(256));
+ this.tagSelectorPath.Name = "tagSelectorPath";
+ this.table4.Add (this.tagSelectorPath);
+ global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table4[this.tagSelectorPath]));
w16.LeftAttach = ((uint)(1));
w16.RightAttach = ((uint)(2));
- w16.XOptions = ((global::Gtk.AttachOptions)(0));
- w16.YOptions = ((global::Gtk.AttachOptions)(0));
+ w16.XOptions = ((global::Gtk.AttachOptions)(4));
+ w16.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.workingDirTextBox = new global::Gtk.Entry ();
this.workingDirTextBox.Name = "workingDirTextBox";
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs
new file mode 100644
index 0000000000..e221925cb8
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.cs
@@ -0,0 +1,34 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Gui.Components
+{
+ public partial class StringTagSelectorButton
+ {
+ private global::Gtk.Button button;
+
+ private global::Gtk.Arrow arrow1;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Gui.Components.StringTagSelectorButton
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "MonoDevelop.Ide.Gui.Components.StringTagSelectorButton";
+ // Container child MonoDevelop.Ide.Gui.Components.StringTagSelectorButton.Gtk.Container+ContainerChild
+ this.button = new global::Gtk.Button ();
+ this.button.CanFocus = true;
+ this.button.Name = "button";
+ // Container child button.Gtk.Container+ContainerChild
+ this.arrow1 = new global::Gtk.Arrow (((global::Gtk.ArrowType)(1)), ((global::Gtk.ShadowType)(2)));
+ this.arrow1.Name = "arrow1";
+ this.button.Add (this.arrow1);
+ this.button.Label = null;
+ this.Add (this.button);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ this.button.Clicked += new global::System.EventHandler (this.OnButtonClicked);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs
index 9a5791b952..ada0c11025 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget.cs
@@ -16,15 +16,19 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
private global::Gtk.Table tableData;
- private global::Gtk.Button buttonBrowse;
-
private global::Gtk.Entry entryCommand;
private global::Gtk.Entry entryName;
private global::Gtk.HBox hbox2;
- private global::Gtk.Button workingdirQuickInsertButton;
+ private global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton tagSelectorDirectory;
+
+ private global::Gtk.HBox hbox3;
+
+ private global::Gtk.Button buttonBrowse;
+
+ private global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton tagSelectorCommand;
private global::Gtk.Label label1;
@@ -111,32 +115,18 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
this.tableData.RowSpacing = ((uint)(6));
this.tableData.ColumnSpacing = ((uint)(6));
// Container child tableData.Gtk.Table+TableChild
- this.buttonBrowse = new global::Gtk.Button ();
- this.buttonBrowse.CanFocus = true;
- this.buttonBrowse.Name = "buttonBrowse";
- this.buttonBrowse.UseUnderline = true;
- this.buttonBrowse.Label = global::MonoDevelop.Core.GettextCatalog.GetString ("Browse...");
- this.tableData.Add (this.buttonBrowse);
- global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.tableData[this.buttonBrowse]));
- w5.TopAttach = ((uint)(1));
- w5.BottomAttach = ((uint)(2));
- w5.LeftAttach = ((uint)(2));
- w5.RightAttach = ((uint)(3));
- w5.XOptions = ((global::Gtk.AttachOptions)(4));
- w5.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child tableData.Gtk.Table+TableChild
this.entryCommand = new global::Gtk.Entry ();
this.entryCommand.CanFocus = true;
this.entryCommand.Name = "entryCommand";
this.entryCommand.IsEditable = true;
this.entryCommand.InvisibleChar = '●';
this.tableData.Add (this.entryCommand);
- global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.tableData[this.entryCommand]));
- w6.TopAttach = ((uint)(1));
- w6.BottomAttach = ((uint)(2));
- w6.LeftAttach = ((uint)(1));
- w6.RightAttach = ((uint)(2));
- w6.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.tableData[this.entryCommand]));
+ w5.TopAttach = ((uint)(1));
+ w5.BottomAttach = ((uint)(2));
+ w5.LeftAttach = ((uint)(1));
+ w5.RightAttach = ((uint)(2));
+ w5.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child tableData.Gtk.Table+TableChild
this.entryName = new global::Gtk.Entry ();
this.entryName.CanFocus = true;
@@ -144,63 +134,94 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
this.entryName.IsEditable = true;
this.entryName.InvisibleChar = '●';
this.tableData.Add (this.entryName);
- global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.tableData[this.entryName]));
- w7.LeftAttach = ((uint)(1));
- w7.RightAttach = ((uint)(2));
- w7.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.tableData[this.entryName]));
+ w6.LeftAttach = ((uint)(1));
+ w6.RightAttach = ((uint)(2));
+ w6.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child tableData.Gtk.Table+TableChild
this.hbox2 = new global::Gtk.HBox ();
this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild
- this.workingdirQuickInsertButton = new global::Gtk.Button ();
- this.workingdirQuickInsertButton.Name = "workingdirQuickInsertButton";
- this.workingdirQuickInsertButton.UseUnderline = true;
- this.workingdirQuickInsertButton.Label = " > ";
- this.hbox2.Add (this.workingdirQuickInsertButton);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.workingdirQuickInsertButton]));
- w8.Position = 0;
- w8.Expand = false;
- w8.Fill = false;
+ this.tagSelectorDirectory = new global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton ();
+ this.tagSelectorDirectory.Events = ((global::Gdk.EventMask)(256));
+ this.tagSelectorDirectory.Name = "tagSelectorDirectory";
+ this.hbox2.Add (this.tagSelectorDirectory);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.tagSelectorDirectory]));
+ w7.Position = 0;
+ w7.Expand = false;
+ w7.Fill = false;
this.tableData.Add (this.hbox2);
- global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.tableData[this.hbox2]));
- w9.TopAttach = ((uint)(2));
- w9.BottomAttach = ((uint)(3));
- w9.LeftAttach = ((uint)(2));
- w9.RightAttach = ((uint)(3));
- w9.XOptions = ((global::Gtk.AttachOptions)(4));
- w9.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.tableData[this.hbox2]));
+ w8.TopAttach = ((uint)(2));
+ w8.BottomAttach = ((uint)(3));
+ w8.LeftAttach = ((uint)(2));
+ w8.RightAttach = ((uint)(3));
+ w8.XOptions = ((global::Gtk.AttachOptions)(4));
+ w8.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child tableData.Gtk.Table+TableChild
+ this.hbox3 = new global::Gtk.HBox ();
+ this.hbox3.Name = "hbox3";
+ this.hbox3.Spacing = 6;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.buttonBrowse = new global::Gtk.Button ();
+ this.buttonBrowse.CanFocus = true;
+ this.buttonBrowse.Name = "buttonBrowse";
+ this.buttonBrowse.UseUnderline = true;
+ this.buttonBrowse.Label = global::MonoDevelop.Core.GettextCatalog.GetString ("Browse...");
+ this.hbox3.Add (this.buttonBrowse);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.buttonBrowse]));
+ w9.Position = 0;
+ w9.Expand = false;
+ w9.Fill = false;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.tagSelectorCommand = new global::MonoDevelop.Ide.Gui.Components.StringTagSelectorButton ();
+ this.tagSelectorCommand.Events = ((global::Gdk.EventMask)(256));
+ this.tagSelectorCommand.Name = "tagSelectorCommand";
+ this.hbox3.Add (this.tagSelectorCommand);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.tagSelectorCommand]));
+ w10.Position = 1;
+ w10.Expand = false;
+ w10.Fill = false;
+ this.tableData.Add (this.hbox3);
+ global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.tableData[this.hbox3]));
+ w11.TopAttach = ((uint)(1));
+ w11.BottomAttach = ((uint)(2));
+ w11.LeftAttach = ((uint)(2));
+ w11.RightAttach = ((uint)(3));
+ w11.XOptions = ((global::Gtk.AttachOptions)(4));
+ w11.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child tableData.Gtk.Table+TableChild
this.label1 = new global::Gtk.Label ();
this.label1.Name = "label1";
this.label1.Xalign = 0f;
this.label1.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Working Directory:");
this.tableData.Add (this.label1);
- global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.tableData[this.label1]));
- w10.TopAttach = ((uint)(2));
- w10.BottomAttach = ((uint)(3));
- w10.XOptions = ((global::Gtk.AttachOptions)(4));
- w10.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.tableData[this.label1]));
+ w12.TopAttach = ((uint)(2));
+ w12.BottomAttach = ((uint)(3));
+ w12.XOptions = ((global::Gtk.AttachOptions)(4));
+ w12.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child tableData.Gtk.Table+TableChild
this.label3 = new global::Gtk.Label ();
this.label3.Name = "label3";
this.label3.Xalign = 0f;
this.label3.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Command:");
this.tableData.Add (this.label3);
- global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.tableData[this.label3]));
- w11.TopAttach = ((uint)(1));
- w11.BottomAttach = ((uint)(2));
- w11.XOptions = ((global::Gtk.AttachOptions)(4));
- w11.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.tableData[this.label3]));
+ w13.TopAttach = ((uint)(1));
+ w13.BottomAttach = ((uint)(2));
+ w13.XOptions = ((global::Gtk.AttachOptions)(4));
+ w13.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child tableData.Gtk.Table+TableChild
this.labelName = new global::Gtk.Label ();
this.labelName.Name = "labelName";
this.labelName.Xalign = 0f;
this.labelName.LabelProp = global::MonoDevelop.Core.GettextCatalog.GetString ("Name:");
this.tableData.Add (this.labelName);
- global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.tableData[this.labelName]));
- w12.XOptions = ((global::Gtk.AttachOptions)(4));
- w12.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.tableData[this.labelName]));
+ w14.XOptions = ((global::Gtk.AttachOptions)(4));
+ w14.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child tableData.Gtk.Table+TableChild
this.workingdirEntry = new global::Gtk.Entry ();
this.workingdirEntry.CanFocus = true;
@@ -208,17 +229,17 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
this.workingdirEntry.IsEditable = true;
this.workingdirEntry.InvisibleChar = '●';
this.tableData.Add (this.workingdirEntry);
- global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.tableData[this.workingdirEntry]));
- w13.TopAttach = ((uint)(2));
- w13.BottomAttach = ((uint)(3));
- w13.LeftAttach = ((uint)(1));
- w13.RightAttach = ((uint)(2));
- w13.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.tableData[this.workingdirEntry]));
+ w15.TopAttach = ((uint)(2));
+ w15.BottomAttach = ((uint)(3));
+ w15.LeftAttach = ((uint)(1));
+ w15.RightAttach = ((uint)(2));
+ w15.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox1.Add (this.tableData);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.tableData]));
- w14.Position = 2;
- w14.Expand = false;
- w14.Fill = false;
+ global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.tableData]));
+ w16.Position = 2;
+ w16.Expand = false;
+ w16.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.boxData = new global::Gtk.HBox ();
this.boxData.Name = "boxData";
@@ -231,10 +252,10 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
this.checkExternalCons.DrawIndicator = true;
this.checkExternalCons.UseUnderline = true;
this.boxData.Add (this.checkExternalCons);
- global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.boxData[this.checkExternalCons]));
- w15.Position = 0;
- w15.Expand = false;
- w15.Fill = false;
+ global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.boxData[this.checkExternalCons]));
+ w17.Position = 0;
+ w17.Expand = false;
+ w17.Fill = false;
// Container child boxData.Gtk.Box+BoxChild
this.checkPauseCons = new global::Gtk.CheckButton ();
this.checkPauseCons.CanFocus = true;
@@ -243,15 +264,15 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
this.checkPauseCons.DrawIndicator = true;
this.checkPauseCons.UseUnderline = true;
this.boxData.Add (this.checkPauseCons);
- global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.boxData[this.checkPauseCons]));
- w16.Position = 1;
- w16.Expand = false;
- w16.Fill = false;
+ global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.boxData[this.checkPauseCons]));
+ w18.Position = 1;
+ w18.Expand = false;
+ w18.Fill = false;
this.vbox1.Add (this.boxData);
- global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.boxData]));
- w17.Position = 3;
- w17.Expand = false;
- w17.Fill = false;
+ global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.boxData]));
+ w19.Position = 3;
+ w19.Expand = false;
+ w19.Fill = false;
this.Add (this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll ();
@@ -260,9 +281,9 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
this.comboType.Changed += new global::System.EventHandler (this.OnComboTypeChanged);
this.buttonRemove.Clicked += new global::System.EventHandler (this.OnButtonRemoveClicked);
this.workingdirEntry.Changed += new global::System.EventHandler (this.OnWorkingdirEntryChanged);
+ this.buttonBrowse.Clicked += new global::System.EventHandler (this.OnButtonBrowseClicked);
this.entryName.Changed += new global::System.EventHandler (this.OnEntryNameChanged);
this.entryCommand.Changed += new global::System.EventHandler (this.OnEntryCommandChanged);
- this.buttonBrowse.Clicked += new global::System.EventHandler (this.OnButtonBrowseClicked);
this.checkExternalCons.Clicked += new global::System.EventHandler (this.OnCheckExternalConsClicked);
this.checkPauseCons.Clicked += new global::System.EventHandler (this.OnCheckPauseConsClicked);
}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
index 8486a04494..2fc6ab2304 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
@@ -1131,6 +1131,7 @@
<widget class="MonoDevelop.Components.MenuButton" id="conflicButton">
<property name="MemberName" />
<property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
<property name="Label">View Conflicts</property>
<property name="UseMarkup">False</property>
</widget>
@@ -1819,7 +1820,7 @@
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget" design-size="482 442">
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget" design-size="805 442">
<property name="MemberName" />
<child>
<widget class="Gtk.VBox" id="vbox32">
@@ -2015,20 +2016,16 @@
<property name="RowSpacing">6</property>
<property name="ColumnSpacing">4</property>
<child>
- <widget class="Gtk.Button" id="argumentQuickInsertButton">
+ <widget class="Gtk.Entry" id="argumentTextBox">
<property name="MemberName" />
- <property name="Type">TextOnly</property>
- <property name="Label"> &gt; </property>
- <property name="UseUnderline">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
</widget>
<packing>
- <property name="LeftAttach">1</property>
- <property name="RightAttach">2</property>
<property name="AutoSize">False</property>
- <property name="XOptions">0</property>
<property name="YOptions">0</property>
- <property name="XExpand">False</property>
- <property name="XFill">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
<property name="YFill">False</property>
@@ -2036,19 +2033,21 @@
</packing>
</child>
<child>
- <widget class="Gtk.Entry" id="argumentTextBox">
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorArgs">
<property name="MemberName" />
- <property name="IsEditable">True</property>
- <property name="InvisibleChar">●</property>
+ <property name="Events">ButtonPressMask</property>
</widget>
<packing>
- <property name="AutoSize">False</property>
- <property name="YOptions">0</property>
- <property name="XExpand">True</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
<property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
- <property name="YFill">False</property>
+ <property name="YFill">True</property>
<property name="YShrink">False</property>
</packing>
</child>
@@ -2075,23 +2074,21 @@
<property name="RowSpacing">6</property>
<property name="ColumnSpacing">4</property>
<child>
- <widget class="Gtk.Button" id="workingDirQuickInsertButton">
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorPath">
<property name="MemberName" />
- <property name="Type">TextOnly</property>
- <property name="Label"> &gt; </property>
- <property name="UseUnderline">True</property>
+ <property name="Events">ButtonPressMask</property>
</widget>
<packing>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
- <property name="AutoSize">False</property>
- <property name="XOptions">0</property>
- <property name="YOptions">0</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
<property name="XExpand">False</property>
- <property name="XFill">False</property>
+ <property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
- <property name="YFill">False</property>
+ <property name="YFill">True</property>
<property name="YShrink">False</property>
</packing>
</child>
@@ -8024,23 +8021,21 @@ Custom Command</property>
<placeholder />
</child>
<child>
- <widget class="Gtk.Button" id="buttonBrowse">
+ <widget class="Gtk.Entry" id="entryCommand">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="Type">TextOnly</property>
- <property name="Label" translatable="yes">Browse...</property>
- <property name="UseUnderline">True</property>
- <signal name="Clicked" handler="OnButtonBrowseClicked" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryCommandChanged" />
</widget>
<packing>
<property name="TopAttach">1</property>
<property name="BottomAttach">2</property>
- <property name="LeftAttach">2</property>
- <property name="RightAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
<property name="AutoSize">True</property>
- <property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
- <property name="XExpand">False</property>
+ <property name="XExpand">True</property>
<property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
@@ -8049,16 +8044,14 @@ Custom Command</property>
</packing>
</child>
<child>
- <widget class="Gtk.Entry" id="entryCommand">
+ <widget class="Gtk.Entry" id="entryName">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="IsEditable">True</property>
<property name="InvisibleChar">●</property>
- <signal name="Changed" handler="OnEntryCommandChanged" />
+ <signal name="Changed" handler="OnEntryNameChanged" />
</widget>
<packing>
- <property name="TopAttach">1</property>
- <property name="BottomAttach">2</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">True</property>
@@ -8072,19 +8065,31 @@ Custom Command</property>
</packing>
</child>
<child>
- <widget class="Gtk.Entry" id="entryName">
+ <widget class="Gtk.HBox" id="hbox2">
<property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="IsEditable">True</property>
- <property name="InvisibleChar">●</property>
- <signal name="Changed" handler="OnEntryNameChanged" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorDirectory">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="LeftAttach">1</property>
- <property name="RightAttach">2</property>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
<property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
- <property name="XExpand">True</property>
+ <property name="XExpand">False</property>
<property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
@@ -8093,15 +8098,17 @@ Custom Command</property>
</packing>
</child>
<child>
- <widget class="Gtk.HBox" id="hbox2">
+ <widget class="Gtk.HBox" id="hbox3">
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
- <widget class="Gtk.Button" id="workingdirQuickInsertButton">
+ <widget class="Gtk.Button" id="buttonBrowse">
<property name="MemberName" />
+ <property name="CanFocus">True</property>
<property name="Type">TextOnly</property>
- <property name="Label"> &gt; </property>
+ <property name="Label" translatable="yes">Browse...</property>
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonBrowseClicked" />
</widget>
<packing>
<property name="Position">0</property>
@@ -8110,10 +8117,22 @@ Custom Command</property>
<property name="Fill">False</property>
</packing>
</child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorCommand">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="TopAttach">2</property>
- <property name="BottomAttach">3</property>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
<property name="LeftAttach">2</property>
<property name="RightAttach">3</property>
<property name="AutoSize">True</property>
@@ -11288,4 +11307,22 @@ Visual Studio generates a default ID for embedded resources, instead of simply u
</widget>
</child>
</widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" design-size="27 27">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.Button" id="button">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <signal name="Clicked" handler="OnButtonClicked" />
+ <child>
+ <widget class="Gtk.Arrow" id="arrow1">
+ <property name="MemberName" />
+ <property name="ArrowType">Down</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface> \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/objects.xml b/main/src/core/MonoDevelop.Ide/gtk-gui/objects.xml
index 8ad2071023..b1465c12f6 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/objects.xml
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/objects.xml
@@ -171,4 +171,8 @@
<itemgroups />
<signals />
</object>
+ <object type="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
</objects> \ No newline at end of file