diff options
author | Michael Hutchinson <mhutch@xamarin.com> | 2014-06-02 11:19:40 +0400 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2014-06-18 05:28:36 +0400 |
commit | d92632dc0339a7fe24c5f36d1e278c3df5c1c1de (patch) | |
tree | e06bea3f24c8fd74637dc846a3ef38255daa3099 /main | |
parent | d919aae53ee5f62ff8beca8ede082b25915f0c08 (diff) |
[AspNet] Massive overhaul
* Merged ASP.NET and ASP.NET MVC addins
- Added support for ASP.NET MVC in Web App
projects, needed for ASP.MVC 5 projects
* Cleaned and reorganized the codebase
* Moved ASP.NET unit tests into separate assembly
- Fixed some minor issues in Razor tests
* Removed automatic translation of C# project/file
templates to other languages
- Only C# templates are included
* Removed build-time updating of Web Forms CodeBehind
- Update-on-save is still supported
* Removed unmaintained remote deployment system
- It was never supported on Windows/Mac
- Removes dependency on Linux deployment addin
* Updated ASP.NET MVC templates to ASP.NET MVC 5
- ASP.NET MVC reference is now a NuGet reference
* Removed incomplete default doctype abstraction
* All template used HTML5 doctype
* Stetic is no longer used for UI
* Fixed build warnings
Diffstat (limited to 'main')
282 files changed, 5202 insertions, 11021 deletions
diff --git a/main/Main.sln b/main/Main.sln index 5f16bcac0f..59df01890f 100644 --- a/main/Main.sln +++ b/main/Main.sln @@ -125,11 +125,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacPlatform", "src\addins\M EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Refactoring", "src\addins\MonoDevelop.Refactoring\MonoDevelop.Refactoring.csproj", "{100568FC-F4E8-439B-94AD-41D11724E45B}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspNet", "AspNet", "{0ADCD824-2506-4A61-9B88-ABF1D5267CE8}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web", "Web", "{0ADCD824-2506-4A61-9B88-ABF1D5267CE8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.AspNet", "src\addins\AspNet\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj", "{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.AspNet", "src\addins\Web\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj", "{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.AspNet.Mvc", "src\addins\AspNet\MonoDevelop.AspNet.Mvc\MonoDevelop.AspNet.Mvc.csproj", "{B32AD0DD-5247-437B-A2EF-1A4676C1B072}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.AspNet.Tests", "src\addins\Web\MonoDevelop.AspNet.Tests\MonoDevelop.AspNet.Tests.csproj", "{BEFADF93-EE92-4806-9C0B-937B25311C95}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TextTemplating", "TextTemplating", "{68F63ACB-A9B2-468F-B365-0F41F0D5F1DA}"
EndProject
@@ -1436,22 +1436,22 @@ Global {B257A1A3-78DF-4F00-8053-D32A8B1EB679}.ReleaseMac|Any CPU.Build.0 = Release|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.ReleaseWin32|Any CPU.ActiveCfg = Release|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.ReleaseWin32|Any CPU.Build.0 = Release|x86
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Release|Any CPU.Build.0 = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -1998,7 +1998,7 @@ Global {A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC} = {DE462010-393D-4655-A42C-2C78BB14D2FA}
{0AF16AF1-0876-413E-9803-08BD33C19E00} = {DE462010-393D-4655-A42C-2C78BB14D2FA}
{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E} = {0ADCD824-2506-4A61-9B88-ABF1D5267CE8}
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072} = {0ADCD824-2506-4A61-9B88-ABF1D5267CE8}
+ {BEFADF93-EE92-4806-9C0B-937B25311C95} = {0ADCD824-2506-4A61-9B88-ABF1D5267CE8}
{A2364D6A-00EF-417C-80A6-815726C70032} = {68F63ACB-A9B2-468F-B365-0F41F0D5F1DA}
{D1D35409-C814-47F6-B038-B9B5BF0FE490} = {68F63ACB-A9B2-468F-B365-0F41F0D5F1DA}
{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC} = {68F63ACB-A9B2-468F-B365-0F41F0D5F1DA}
diff --git a/main/configure.in b/main/configure.in index 94e9d58d08..f5799cfd4a 100644 --- a/main/configure.in +++ b/main/configure.in @@ -312,8 +312,6 @@ src/addins/TextTemplating/TextTransform/Makefile src/addins/TextTemplating/MonoDevelop.TextTemplating/Makefile src/addins/TextTemplating/Mono.TextTemplating.Tests/Makefile src/addins/AspNet/Makefile -src/addins/AspNet/MonoDevelop.AspNet/Makefile -src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile src/addins/MonoDevelop.Autotools/Makefile src/addins/MonoDevelop.DesignerSupport/Makefile src/addins/MonoDevelop.WebReferences/Makefile diff --git a/main/src/addins/AspNet/ChangeLog b/main/src/addins/AspNet/ChangeLog deleted file mode 100644 index ee5e8af19b..0000000000 --- a/main/src/addins/AspNet/ChangeLog +++ /dev/null @@ -1,6 +0,0 @@ -2009-08-12 Michael Hutchinson <mhutchinson@novell.com> - - * Makefile.am: - * MonoDevelop.AspNet.Mvc: Include the ASP.NET MVC and - TextTemplating addins in the main solution and build. - diff --git a/main/src/addins/AspNet/Makefile.am b/main/src/addins/AspNet/Makefile.am deleted file mode 100644 index e27cad6a75..0000000000 --- a/main/src/addins/AspNet/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = \ - MonoDevelop.AspNet \ - MonoDevelop.AspNet.Mvc diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AddinInfo.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AddinInfo.cs deleted file mode 100644 index 276f882f7e..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AddinInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ - -using System; -using Mono.Addins; -using Mono.Addins.Description; - -[assembly:Addin ("AspNet.Mvc", - Namespace = "MonoDevelop", - Version = MonoDevelop.BuildInfo.Version, - Flags = AddinFlags.Hidden, - Category = "Web Development")] - -[assembly:AddinName ("ASP.NET MVC Support")] -[assembly:AddinDescription ("Support for ASP.NET MVC projects")] - -[assembly:AddinDependency ("Core", MonoDevelop.BuildInfo.Version)] -[assembly:AddinDependency ("Ide", MonoDevelop.BuildInfo.Version)] -[assembly:AddinDependency ("DesignerSupport", MonoDevelop.BuildInfo.Version)] -[assembly:AddinDependency ("AspNet", MonoDevelop.BuildInfo.Version)] -[assembly:AddinDependency ("XmlEditor", MonoDevelop.BuildInfo.Version)] -[assembly:AddinDependency ("SourceEditor2", MonoDevelop.BuildInfo.Version)] diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProject.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProject.cs deleted file mode 100644 index c16fbe9608..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProject.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -// AspMvcProject.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (c) 2009 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 System.IO; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Xml; -using MonoDevelop.Projects; -using MonoDevelop.Core.Serialization; - -namespace MonoDevelop.AspNet.Mvc -{ - public abstract class AspMvcProject : AspNetAppProject - { - public AspMvcProject () - { - } - - public AspMvcProject (string languageName) - : base (languageName) - { - } - - public AspMvcProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions) - : base (languageName, info, projectOptions) - { - } - - public override SolutionItemConfiguration CreateConfiguration (string name) - { - var conf = new AspMvcProjectConfiguration (name); - conf.CopyFrom (base.CreateConfiguration (name)); - return conf; - } - - public override IEnumerable<string> GetProjectTypes () - { - yield return "AspNetMvc"; - foreach (var t in base.GetProjectTypes ()) - yield return t; - } - - public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework) - { - return framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_3_5); - } - - public override IEnumerable<string> GetSpecialDirectories () - { - foreach (string s in BaseGetSpecialDirectories ()) - yield return s; - yield return "Views"; - yield return "Models"; - yield return "Controllers"; - } - - //so iterator can access base.GetSpecialDirectories () verifiably - IEnumerable<string> BaseGetSpecialDirectories () - { - return base.GetSpecialDirectories (); - } - - public IList<string> GetCodeTemplates (string type, string subtype = null) - { - var files = new List<string> (); - var names = new HashSet<string> (); - - string asmDir = Path.GetDirectoryName (typeof (AspMvcProject).Assembly.Location); - string lang = this.LanguageName; - if (lang == "C#") { - lang = "CSharp"; - } - - if (subtype != null) { - type = Path.Combine (type, subtype); - } - - var dirs = new string[] { - Path.Combine (this.BaseDirectory, "CodeTemplates", type), - Path.Combine (this.BaseDirectory, "CodeTemplates", lang, type), - Path.Combine (asmDir, "CodeTemplates", type), - Path.Combine (asmDir, "CodeTemplates", lang, type), - }; - - foreach (string directory in dirs) - if (Directory.Exists (directory)) - foreach (string file in Directory.GetFiles (directory, "*.tt", SearchOption.TopDirectoryOnly)) - if (names.Add (Path.GetFileName (file))) - files.Add (file); - - return files; - } - - protected override void PopulateSupportFileList (MonoDevelop.Projects.FileCopySet list, ConfigurationSelector solutionConfiguration) - { - base.PopulateSupportFileList (list, solutionConfiguration); - - //HACK: workaround for MD not local-copying package references - foreach (ProjectReference projectReference in References) { - if (projectReference.Package != null && projectReference.Package.Name == "system.web.mvc") { - if (projectReference.ReferenceType == ReferenceType.Package) - foreach (MonoDevelop.Core.Assemblies.SystemAssembly assem in projectReference.Package.Assemblies) - list.Add (assem.Location); - break; - } - } - } - - public string GetAspNetMvcVersion () - { - foreach (var pref in References) { - if (pref.StoredReference.IndexOf ("System.Web.Mvc", StringComparison.OrdinalIgnoreCase) < 0) - continue; - switch (pref.ReferenceType) { - case ReferenceType.Assembly: - case ReferenceType.Package: - foreach (var f in pref.GetReferencedFileNames (null)) { - if (Path.GetFileNameWithoutExtension (f) != "System.Web.Mvc" || !File.Exists (f)) - continue; - return AssemblyName.GetAssemblyName (f).Version.ToString (); - } - break; - default: - continue; - } - }; - - return GetDefaultAspNetMvcVersion (); - } - - protected abstract string GetDefaultAspNetMvcVersion (); - - public override string GetDefaultBuildAction (string fileName) - { - var fileType = DetermineFileType (fileName); - switch (fileType) { - case AspMvcSubtype.Razor: - return BuildAction.Content; - default: - return base.GetDefaultBuildAction (fileName); - } - } - - private AspMvcSubtype DetermineFileType (string fileName) - { - string extension = System.IO.Path.GetExtension (fileName); - if (extension == null) - return AspMvcSubtype.Unknown; - extension = extension.ToUpperInvariant ().TrimStart ('.'); - switch (extension) - { - case "CSHTML": - return AspMvcSubtype.Razor; - default: - return AspMvcSubtype.Unknown; - } - } - } - - public enum AspMvcSubtype - { - Unknown, - Razor - }
-
- public class AspMvc1Project : AspMvcProject
- {
- public AspMvc1Project ()
- {
- }
-
- public AspMvc1Project (string languageName)
- : base (languageName)
- {
- }
-
- public AspMvc1Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
- : base (languageName, info, projectOptions)
- {
- } - - protected override string GetDefaultAspNetMvcVersion () - { - return "1.0.0.0"; - }
- }
-
- public class AspMvc2Project : AspMvcProject
- {
- public AspMvc2Project ()
- {
- }
-
- public AspMvc2Project (string languageName)
- : base (languageName)
- {
- }
-
- public AspMvc2Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
- : base (languageName, info, projectOptions)
- {
- } - - protected override string GetDefaultAspNetMvcVersion () - { - return "2.0.0.0"; - }
- }
-
- public class AspMvc3Project : AspMvcProject
- {
- public AspMvc3Project ()
- {
- }
-
- public AspMvc3Project (string languageName)
- : base (languageName)
- {
- }
-
- public AspMvc3Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
- : base (languageName, info, projectOptions)
- {
- }
-
- public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework)
- {
- return framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0);
- } - - protected override string GetDefaultAspNetMvcVersion () - { - return "3.0.0.0"; - }
- } - - public class AspMvc4Project : AspMvcProject - { - public AspMvc4Project () - { - } - - public AspMvc4Project (string languageName) - : base (languageName) - { - } - - public AspMvc4Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions) - : base (languageName, info, projectOptions) - { - } - - public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework) - { - return framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0); - } - - protected override string GetDefaultAspNetMvcVersion () - { - return "4.0.0.0"; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProjectBinding.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProjectBinding.cs deleted file mode 100644 index 4fd822ce9e..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProjectBinding.cs +++ /dev/null @@ -1,129 +0,0 @@ -// -// AspMvcProjectBinding.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (c) 2009 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; -using MonoDevelop.Projects; - -namespace MonoDevelop.AspNet.Mvc -{ - - - public class AspMvc1ProjectBinding : IProjectBinding - { - public Project CreateProject (ProjectCreateInformation info, System.Xml.XmlElement projectOptions) - { - string lang = projectOptions.GetAttribute ("language"); - return new AspMvc1Project (lang, info, projectOptions); - } - - public Project CreateSingleFileProject (string sourceFile) - { - throw new InvalidOperationException (); - } - - public bool CanCreateSingleFileProject (string sourceFile) - { - return false; - } - - public string Name { - get { return "AspNetMvc1"; } - } - }
-
- public class AspMvc2ProjectBinding : IProjectBinding
- {
- public Project CreateProject (ProjectCreateInformation info, System.Xml.XmlElement projectOptions)
- {
- string lang = projectOptions.GetAttribute ("language");
- return new AspMvc2Project (lang, info, projectOptions);
- }
-
- public Project CreateSingleFileProject (string sourceFile)
- {
- throw new InvalidOperationException ();
- }
-
- public bool CanCreateSingleFileProject (string sourceFile)
- {
- return false;
- }
-
- public string Name
- {
- get { return "AspNetMvc2"; }
- }
- }
-
- public class AspMvc3ProjectBinding : IProjectBinding
- {
- public Project CreateProject (ProjectCreateInformation info, System.Xml.XmlElement projectOptions)
- {
- string lang = projectOptions.GetAttribute ("language");
- return new AspMvc3Project (lang, info, projectOptions);
- }
-
- public Project CreateSingleFileProject (string sourceFile)
- {
- throw new InvalidOperationException ();
- }
-
- public bool CanCreateSingleFileProject (string sourceFile)
- {
- return false;
- }
-
- public string Name
- {
- get { return "AspNetMvc3"; }
- }
- } - - public class AspMvc4ProjectBinding : IProjectBinding - { - public Project CreateProject (ProjectCreateInformation info, System.Xml.XmlElement projectOptions) - { - string lang = projectOptions.GetAttribute ("language"); - return new AspMvc4Project (lang, info, projectOptions); - } - - public Project CreateSingleFileProject (string sourceFile) - { - throw new InvalidOperationException (); - } - - public bool CanCreateSingleFileProject (string sourceFile) - { - return false; - } - - public string Name - { - get { return "AspNetMvc4"; } - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AssemblyInfo.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AssemblyInfo.cs deleted file mode 100644 index fca3c6b090..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Autogenerated from MonoDevelop.AspNet.Mvc.addin.xml - -using System.Reflection; - -[assembly: AssemblyProduct ("MonoDevelop")] -[assembly: AssemblyTitle ("ASP.NET MVC Support")] -[assembly: AssemblyDescription ("Support for ASP.NET MVC projects.")] -[assembly: AssemblyVersion ("2.6")] -[assembly: AssemblyCopyright ("MIT X11")] diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/ChangeLog b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/ChangeLog deleted file mode 100644 index b2436669b0..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/ChangeLog +++ /dev/null @@ -1,393 +0,0 @@ -2010-07-13 Mike Krüger <mkrueger@novell.com> - - * Makefile.am: - * gtk-gui/gui.stetic: - * Gui/AddViewDialog.cs: - * MonoDevelop.AspNet.Mvc.csproj: Track API changes. - -2010-05-30 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/FolderNodeBuilderExtension.cs: Use the recyclable text - templating domain. Fixes Bug 584067 - ASP.NET MVC: cannot - add a View, uncaught exception. - -2010-05-28 Lluis Sanchez Gual <lluis@novell.com> - - * Gui/AddViewDialog.cs: - * Gui/FolderNodeBuilderExtension.cs: Fix incorrect use of - ShowCustomDialog/RunCustomDialog. - -2010-05-21 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Clean up dialog placement. - -2010-05-18 Michael Hutchinson <mhutchinson@novell.com> - - * gtk-gui/gui.stetic: - * Gui/AddViewDialog.cs: Heavy refactoring and tidying of - ASP.NET parser code to support future changes. - -2010-03-22 Lluis Sanchez Gual <lluis@novell.com> - - * AssemblyInfo.cs: - * MonoDevelop.AspNet.Mvc.addin.xml: Bumped MD version. - -2010-03-17 Lluis Sanchez Gual <lluis@novell.com> - - * Makefile.am: - * AspMvcProject.cs: - * gtk-gui/gui.stetic: - * Gui/AddViewDialog.cs: - * MonoDevelop.AspNet.Mvc.csproj: - * MonoDevelop.AspNet.Mvc.addin.xml: - * Gui/FolderNodeBuilderExtension.cs: Merged MD.Projects into - MD.Core, and MD.Projects.Gui, MD.Core.Gui and MD.Components - into MD.Ide. - -2010-03-15 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Added makefile to project. - -2010-03-01 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/FolderNodeBuilderExtension.cs: Fix "Bug 584067 - ASP.NET - MVC: cannot add a View, uncaught exception" by marshalling - assembly resolves from the templating AppDomain to the MD - AppDomain. - -2010-01-28 Lluis Sanchez Gual <lluis@novell.com> - - * gtk-gui/generated.cs: - * gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs: Flush. - -2009-12-01 Lluis Sanchez Gual <lluis@novell.com> - - * AspMvcProject.cs: Introduced the ConfigurationSelector class - to all methods that previously took a configuration name as - string. This eliminates the ambiguity between solution - configuration names and project configuration names. - -2009-11-11 Michael Hutchinson <mhutchinson@novell.com> - - * AspMvcProject.cs: - * AspMvcProjectConfiguration.cs: Simplify creation of new - ASP.NET MVC configurations. - -2009-11-09 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Wire the soft debug addin - into the build. - -2009-10-30 Lluis Sanchez Gual <lluis@novell.com> - - * AssemblyInfo.cs: - * MonoDevelop.AspNet.Mvc.addin.xml: Bump MD version. - -2009-10-29 Lluis Sanchez Gual <lluis@novell.com> - - * gtk-gui/generated.cs: - * gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs: Flush. - -2009-10-08 Ankit Jain <jankit@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Import md.targets . - -2009-10-07 Lluis Sanchez Gual <lluis@novell.com> - - * AssemblyInfo.cs: - * MonoDevelop.AspNet.Mvc.addin.xml: Bump MD version. - -2009-09-15 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Fix output path. - -2009-08-20 Michael Hutchinson <mhutchinson@novell.com> - - * AssemblyInfo.cs: Update assembly info. - -2009-08-14 Lluis Sanchez Gual <lluis@novell.com> - - * Makefile.am: - * MonoDevelop.AspNet.Mvc.csproj: Fix windows build. - -2009-08-12 Michael Hutchinson <mhutchinson@novell.com> - - * Makefile.am: Fix install targets. - -2009-08-12 Michael Hutchinson <mhutchinson@novell.com> - - * Makefile.am: - * MonoDevelop.AspNet.Mvc.csproj: Add the data files. - -2009-08-12 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Don't local-copy project - refs. - -2009-08-12 Michael Hutchinson <mhutchinson@novell.com> - - * Makefile.am: - * MonoDevelop.AspNet.Mvc.csproj: Include the ASP.NET MVC and - TextTemplating addins in the main solution and build. - -2009-08-11 Michael Hutchinson <mhutchinson@novell.com> - - * System.Web.Mvc.dll: - * MonoDevelop.AspNet.Mvc.csproj: - * MonoDevelop.AspNet.Mvc.addin.xml: Remove the MVC dll now - that Mono 2.4 series ships it. - -2009-07-29 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Track API. - - * gtk-gui/gui.stetic: - * MonoDevelop.AspNet.Mvc.csproj: - * gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs: Flush. - -2009-06-03 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Add another project dependency. - -2009-06-03 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/FolderNodeBuilderExtension.cs: Track FilePath API. - -2009-04-29 Michael Hutchinson <mhutchinson@novell.com> - - * AspMvcProject.cs: Fix possible NRE. - -2009-04-21 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Fix build. - -2009-04-17 Michael Hutchinson <mhutchinson@novell.com> - - * AspMvcProject.cs: Track namespace changes. - -2009-04-15 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.AspNet.Mvc.addin.xml: Bump MD version. - -2009-04-09 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Track parser API. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Refresh the placeholder list properly. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: When auto-selecting site master, - refresh the placeholders list. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * CodeTemplates/AddView/Empty.tt: Fix missing runat="server" - in Content tags. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.addin.xml: Update package name. - - * AspMvcProject.cs: Check we're on the 2.4 runtime or later. - Update package name. - - * Templates/Project.xpt.xml: Add some "Hello World" content. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Disable class selector, and the widget - it uses has broken input handling in modal dialogs. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * AspMvcProject.cs: Add a workaround for Bug 491377: Package - references can't be local-copied even if they aren't GAC - assemblies. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/WebConfigApp.xft.xml: Fix web.config. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * System.Web.Mvc.dll: Need assembly signed with winfx key. - -2009-04-02 Michael Hutchinson <mhutchinson@novell.com> - - * System.Web.Mvc.dll: - * MonoDevelop.AspNet.Mvc.csproj: - * MonoDevelop.AspNet.Mvc.addin.xml: Fix refs. Add a local - copy of the GMCS-built, MS-PL System.Web.Mvc dll. - -2009-03-13 Michael Hutchinson <mhutchinson@novell.com> - - * gtk-gui/gui.stetic: Track build directory change. - -2009-03-13 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Move output dir from ../bin - to ../build. - -2009-03-13 Michael Hutchinson <mhutchinson@novell.com> - - * gtk-gui: - * gtk-gui/gui.stetic: - * gtk-gui/generated.cs: - * gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs: Add - missing files. - -2009-03-12 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: - * MonoDevelop.AspNet.Mvc.addin.xml: Reference the - TextTemplating addin. - - * Gui/AddViewDialog.cs: Fix warning. - - * Gui/FolderNodeBuilderExtension.cs: Move error-showing code - to the TemplatingService. - -2009-03-09 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.addin.xml: Update dependencies. - - * Gui/AddViewDialog.cs: - * MonoDevelop.AspNet.Mvc.csproj: Add class picker. - -2009-03-06 Michael Hutchinson <mhutchinson@novell.com> - - * Gui/AddViewDialog.cs: Get the placeholder list from the - master page. Better validation of input. - -2009-03-06 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Updated. - - * AspMvcProject.cs: Add method for looking up .tt files. - - * Gui/AddViewDialog.cs: New Add View dialog. - - * Gui/FolderNodeBuilderExtension.cs: Use new Add View dialog - and the MVC T4 host. - - * CodeTemplates: - * TextTemplating: - * CodeTemplates/AddView: - * CodeTemplates/AddController: Added. - - * TextTemplating/MvcTextTemplateHost.cs: ASP.NET MVC T4 host. - - * CodeTemplates/AddView/Empty.tt: Simple empty tt file. - - * Templates/UserControl.xft.xml: Add more whitespace. - -2009-03-04 Michael Hutchinson <mhutchinson@novell.com> - - * T4/Engine.cs: - * T4/Tokeniser.cs: - * T4/ToStringHelper.cs: - * T4/ParsedTemplate.cs: - * T4/TextTransformation.cs: - * T4/DirectiveProcessor.cs: - * MonoDevelop.AspNet.Mvc.csproj: - * T4/ITextTemplatingEngineHost.cs: - * T4/DirectiveProcessorException.cs: - * T4/RequiresProvidesDirectiveProcessor.cs: Move T4 - implementation to its own assembly. Tweak some appdomain - stuff. - -2009-03-03 Michael Hutchinson <mhutchinson@novell.com> - - * T4/Engine.cs: Handle culture, encoding, extension directive - values. - -2009-03-03 Michael Hutchinson <mhutchinson@novell.com> - - * T4/Engine.cs: - * T4/Template.cs: - * T4/Tokeniser.cs: - * T4/ParsedTemplate.cs: - * MonoDevelop.AspNet.Mvc.csproj: T4 implementation is complete - except for handling some of the directive values and custom - directives. - -2009-03-03 Michael Hutchinson <mhutchinson@novell.com> - - * T4: - * T4/Engine.cs: - * T4/Template.cs: - * T4/Tokeniser.cs: - * T4/ToStringHelper.cs: - * T4/DirectiveProcessor.cs: - * T4/TextTransformation.cs: - * MonoDevelop.AspNet.Mvc.csproj: - * T4/ITextTemplatingEngineHost.cs: - * T4/DirectiveProcessorException.cs: - * T4/RequiresProvidesDirectiveProcessor.cs: Added an - incomplete T4 implemention. - -2009-02-28 Michael Hutchinson <mhutchinson@novell.com> - - * AspMvcProject.cs: Add Models, Views, Controllers to special - folders list. - -2009-02-27 Michael Hutchinson <mhutchinson@novell.com> - - * Gui: - * AspMvcCommands.cs: - * MonoDevelop.AspNet.Mvc.addin.xml: - * Gui/FolderNodeBuilderExtension.cs: Add context menu commands - for adding views and controllers to the appropriate folders. - - * MonoDevelop.AspNet.Mvc.csproj: Updated. - -2009-02-26 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.AspNet.Mvc.csproj: Flush. - -2009-02-26 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/Project.xpt.xml: - * Templates/EmptyProject.xpt.xml: Set SpecificVersion false - for some references. - -2009-02-24 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/ViewContentPage.xft.xml: Fix MasterPageFile - attribute name. - -2009-02-24 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/ViewContentPage.xft.xml: Use master content - generator. - -2009-02-21 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/Project.xpt.xml: - * Templates/GlobalAsax.xft.xml: - * MonoDevelop.AspNet.Mvc.csproj: - * Templates/WebConfigApp.xft.xml: - * Templates/EmptyProject.xpt.xml: - * MonoDevelop.AspNet.Mvc.addin.xml: - * Templates/WebConfigViews.xft.xml: Added web.config, - global.asax templates. - -2009-02-20 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/Project.xpt.xml: - * Templates/EmptyProject.xpt.xml: Add Web.configs. - -2009-02-20 Michael Hutchinson <mhutchinson@novell.com> - - * Templates/Project.xpt.xml: - * Templates/EmptyProject.xpt.xml: Set target framework - version. Create default MVC directories. - -2009-02-18 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.AspNet.Mvc.addin.xml: Fix MVC project type - registration. - diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CommandHandlers.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CommandHandlers.cs deleted file mode 100644 index 4a507549f1..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CommandHandlers.cs +++ /dev/null @@ -1,155 +0,0 @@ -//
-// CommandHandlers.cs
-//
-// Author:
-// Piotr Dowgiallo <sparekd@gmail.com>
-//
-// Copyright (c) 2012 Piotr Dowgiallo
-//
-// 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.Collections.Generic;
-using System.Linq;
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Ide;
-using ICSharpCode.NRefactory.TypeSystem;
-using System.IO;
-using MonoDevelop.Core;
-using MonoDevelop.AspNet.Mvc.Gui;
-using System;
-
-namespace MonoDevelop.AspNet.Mvc
-{
- class GoToViewCommandHandler : CommandHandler
- {
- protected override void Update (CommandInfo info)
- {
- MvcCommandsCommonHandler.Update (info);
- }
-
- protected override void Run ()
- {
- var doc = IdeApp.Workbench.ActiveDocument;
- var currentLocation = doc.Editor.Caret.Location;
-
- var controller = doc.ParsedDocument.GetTopLevelTypeDefinition (currentLocation); - string controllerName = controller.Name; - int pos = controllerName.LastIndexOf ("Controller", StringComparison.Ordinal);
- if (pos > 0)
- controllerName = controllerName.Remove (pos);
- - var baseDirectory = doc.FileName.ParentDirectory.ParentDirectory; -
- string actionName = doc.ParsedDocument.GetMember (currentLocation).Name;
- var viewFoldersPaths = new FilePath[] {
- baseDirectory.Combine ("Views", controllerName), - baseDirectory.Combine ("Views", "Shared") - };
- var viewExtensions = new string[] { ".aspx", ".cshtml" };
-
- foreach (var folder in viewFoldersPaths) {
- foreach (var ext in viewExtensions) {
- var possibleFile = folder.Combine (actionName + ext);
- if (File.Exists (possibleFile)) {
- IdeApp.Workbench.OpenDocument (possibleFile);
- return;
- }
- }
- }
-
- MessageService.ShowError ("Matching view cannot be found.");
- }
- }
-
- class AddViewFromControllerCommandHandler : CommandHandler
- {
- protected override void Update (CommandInfo info)
- {
- MvcCommandsCommonHandler.Update (info);
- }
-
- protected override void Run ()
- {
- var doc = IdeApp.Workbench.ActiveDocument;
- var project = doc.Project as AspMvcProject;
- var currentLocation = doc.Editor.Caret.Location;
-
- string controllerName = doc.ParsedDocument.GetTopLevelTypeDefinition (currentLocation).Name;
- int pos = controllerName.LastIndexOf ("Controller", StringComparison.Ordinal);
- if (pos > 0)
- controllerName = controllerName.Remove (pos);
-
- string path = doc.FileName.ParentDirectory.ParentDirectory.Combine ("Views", controllerName); - string actionName = doc.ParsedDocument.GetMember (currentLocation).Name;
- FolderCommandHandler.AddView (project, path, actionName);
- }
- }
-
- class GoToControllerCommandHandler : CommandHandler
- {
- protected override void Update (CommandInfo info)
- {
- var doc = IdeApp.Workbench.ActiveDocument;
- if (doc == null || !(doc.Project is AspMvcProject)) {
- info.Enabled = info.Visible = false;
- return;
- }
- var baseDirectory = doc.FileName.ParentDirectory.ParentDirectory; - if (!string.Equals (baseDirectory.FileName, "Views")) - info.Enabled = info.Visible = false;
- }
-
- protected override void Run ()
- {
- var doc = IdeApp.Workbench.ActiveDocument;
- var name = doc.FileName.ParentDirectory.FileName;
- var controller = doc.ProjectContent.GetAllTypeDefinitions ().FirstOrDefault (t => t.Name == name + "Controller");
-
- if (controller != null)
- IdeApp.Workbench.OpenDocument (controller.UnresolvedFile.FileName);
- else
- MessageService.ShowError ("Matching controller cannot be found.");
- }
- }
-
- static class MvcCommandsCommonHandler
- {
- public static void Update (CommandInfo info)
- {
- var doc = IdeApp.Workbench.ActiveDocument;
- if (doc == null || !(doc.Project is AspMvcProject)) {
- info.Enabled = info.Visible = false;
- return;
- }
-
- var currentLocation = doc.Editor.Caret.Location;
- var topLevelType = doc.ParsedDocument.GetTopLevelTypeDefinition (currentLocation);
- if (topLevelType == null || !topLevelType.Name.EndsWith ("Controller", StringComparison.Ordinal)) { - info.Enabled = info.Visible = false;
- return;
- }
-
- var correctReturnTypes = new string[] { "ActionResult", "ViewResultBase", "ViewResult", "PartialViewResult" };
- var member = doc.ParsedDocument.GetMember (currentLocation) as IUnresolvedMethod;
- if (member == null || !member.IsPublic || !correctReturnTypes.Any (t => t == member.ReturnType.ToString ()))
- info.Enabled = info.Visible = false;
- }
- }
-}
-
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml deleted file mode 100644 index 0b1cba0afc..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml +++ /dev/null @@ -1,202 +0,0 @@ -<ExtensionModel> - - <Runtime> - <Import file = "Templates/Controller.xft.xml"/> - <Import file = "Templates/ViewPage.xft.xml"/> - <Import file = "Templates/ViewContentPage.xft.xml"/> - <Import file = "Templates/UserControl.xft.xml"/> - <Import file = "Templates/ViewMasterPage.xft.xml" /> - <Import file = "Templates/Project.xpt.xml" /> - <Import file = "Templates/EmptyProject.xpt.xml"/> - <Import file = "Templates/GlobalAsax.xft.xml"/> - <Import file = "Templates/WebConfigApp.xft.xml"/> - <Import file = "Templates/WebConfigViews.xft.xml"/> - <Import file = "Templates/ProjectMvc3.xpt.xml" /> - <Import file = "Templates/EmptyProjectMvc3.xpt.xml" /> - <Import file = "Templates/GlobalAsaxMvc3.xft.xml" /> - <Import file = "Templates/WebConfigAppMvc3.xft.xml" /> - <Import file = "Templates/WebConfigViewsMvc3.xft.xml" /> - <Import file = "Templates/ProjectWithUnitTest.xpt.xml" /> - <Import file = "Templates/ProjectMvc3WithUnitTest.xpt.xml" /> - <Import file = "Templates/ProjectMvc3Razor.xpt.xml" /> - <Import file = "Templates/ProjectMvc3RazorWithUnitTest.xpt.xml" /> - <Import file = "Templates/LayoutPage.xft.xml" /> - <Import file = "Templates/ViewPageRazor.xft.xml" /> - <Import file = "Templates/PartialViewPageRazor.xft.xml" /> - <Import file = "Templates/PreprocessedRazorTemplate.xft.xml" /> - <Import file = "CodeTemplates/CSharp/AddView/Aspx/Empty.tt" /> - <Import file = "CodeTemplates/CSharp/AddView/Razor/Empty.tt" /> - <Import file = "CodeTemplates/CSharp/AddController/Empty.tt" /> - <Import file = "CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt" /> - </Runtime> - - <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes"> - <DotNetProjectSubtype - guid="{603c0e0b-db56-11dc-be95-000d561079b0}" - type="MonoDevelop.AspNet.Mvc.AspMvc1Project" - insertbefore="MonoDevelop.AspNet.AspNetAppProject" - /> - <DotNetProjectSubtype - guid="{F85E285D-A4E0-4152-9332-AB1D724D3325}" - type="MonoDevelop.AspNet.Mvc.AspMvc2Project" - insertbefore="MonoDevelop.AspNet.AspNetAppProject" - /> - <DotNetProjectSubtype - guid="{E53F8FEA-EAE0-44A6-8774-FFD645390401}" - type="MonoDevelop.AspNet.Mvc.AspMvc3Project" - insertbefore="MonoDevelop.AspNet.AspNetAppProject" - /> - <DotNetProjectSubtype - guid="{E3E379DF-F4C6-4180-9B81-6769533ABE47}" - type="MonoDevelop.AspNet.Mvc.AspMvc4Project" - insertbefore="MonoDevelop.AspNet.AspNetAppProject" - /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/FileTemplates"> - <FileTemplate id = "AspMvcController" - file = "Templates/Controller.xft.xml"/> - <FileTemplate id = "AspMvcViewPage" - file = "Templates/ViewPage.xft.xml"/> - <FileTemplate id = "AspMvcViewContentPage" - file = "Templates/ViewContentPage.xft.xml"/> - <FileTemplate id = "AspMvcUserControl" - file = "Templates/UserControl.xft.xml"/> - <FileTemplate id = "AspMvcViewMasterPage" - file = "Templates/ViewMasterPage.xft.xml" /> - <FileTemplate id = "AspMvcGlobalAsax" - file = "Templates/GlobalAsax.xft.xml" /> - <FileTemplate id = "AspMvcWebConfigApp" - file = "Templates/WebConfigApp.xft.xml" /> - <FileTemplate id = "AspMvcWebConfigViews" - file = "Templates/WebConfigViews.xft.xml" /> - <FileTemplate id = "AspMvc3GlobalAsax" - file = "Templates/GlobalAsaxMvc3.xft.xml" /> - <FileTemplate id = "AspMvc3WebConfigApp" - file = "Templates/WebConfigAppMvc3.xft.xml" /> - <FileTemplate id = "AspMvc3WebConfigViews" - file = "Templates/WebConfigViewsMvc3.xft.xml" /> - <FileTemplate id = "AspMvcViewPageRazor" - file = "Templates/ViewPageRazor.xft.xml" /> - <FileTemplate id = "AspMvcLayoutPage" - file = "Templates/LayoutPage.xft.xml" /> - <FileTemplate id = "AspMvcPartialViewPageRazor" - file = "Templates/PartialViewPageRazor.xft.xml" /> - <FileTemplate id = "PreprocessedRazorTemplate" - file = "Templates/PreprocessedRazorTemplate.xft.xml" /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/ProjectTemplates"> - <ProjectTemplate id = "AspMvcProject-Empty" file = "Templates/EmptyProject.xpt.xml"/> - <ProjectTemplate id = "AspMvcProject" file = "Templates/Project.xpt.xml" /> - <ProjectTemplate id = "AspMvcProjectWithUnitTest" file = "Templates/ProjectWithUnitTest.xpt.xml" /> - <Condition id="AssemblyInstalled" name="System.Web.Mvc" minVersion="3.0.0.0"> - <ProjectTemplate id = "AspMvc3Project-Empty" file = "Templates/EmptyProjectMvc3.xpt.xml" /> - <ProjectTemplate id = "AspMvc3Project" file = "Templates/ProjectMvc3.xpt.xml" /> - <ProjectTemplate id = "AspMvc3ProjectWithUnitTest" file = "Templates/ProjectMvc3WithUnitTest.xpt.xml" /> - <ProjectTemplate id = "AspMvc3Project-Razor" file = "Templates/ProjectMvc3Razor.xpt.xml" /> - <ProjectTemplate id = "AspMvc3Project-RazorWithUnitTest" file = "Templates/ProjectMvc3RazorWithUnitTest.xpt.xml" /> - </Condition> - </Extension> - - <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings"> - <ProjectBinding id = "AspNetMvc1" class = "MonoDevelop.AspNet.Mvc.AspMvc1ProjectBinding" /> - <ProjectBinding id = "AspNetMvc2" class = "MonoDevelop.AspNet.Mvc.AspMvc2ProjectBinding" /> - <ProjectBinding id = "AspNetMvc3" class = "MonoDevelop.AspNet.Mvc.AspMvc3ProjectBinding" /> - <ProjectBinding id = "AspNetMvc4" class = "MonoDevelop.AspNet.Mvc.AspMvc4ProjectBinding" /> - </Extension> - - <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses"> - <DataType class = "MonoDevelop.AspNet.Mvc.AspMvcProject" /> - <DataType class = "MonoDevelop.AspNet.Mvc.AspMvcProjectConfiguration" /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/Commands"> - <Category _name = "ASP.NET" id = "AspNet"> - <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddController" - _label = "Controller..." - _description = "Add an ASP.NET MVC controller" /> - <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddView" - _label = "View..." - _description = "Add an ASP.NET MVC view" /> - </Category> - </Extension> - - <Extension path = "/MonoDevelop/Ide/Commands/TextEditor"> - <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToView" - _label = "Go To View" - defaultHandler = "MonoDevelop.AspNet.Mvc.GoToViewCommandHandler" - description = "Go to the corresponding view file" /> - <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddViewFromController" - _label = "Add View..." - defaultHandler = "MonoDevelop.AspNet.Mvc.AddViewFromControllerCommandHandler" - description = "Add an ASP.NET MVC view" /> - <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToController" - _label = "Go To Controller" - defaultHandler = "MonoDevelop.AspNet.Mvc.GoToControllerCommandHandler" - description = "Go to the corresponding controller file" /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add"> - <Condition id="activeproject" value="AspNetMvc"> - <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddController" insertbefore="MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" disabledVisible="false"/> - <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddView" disabledVisible="false" /> - <SeparatorItem id = "MvcAddSeparator" /> - </Condition> - </Extension> - - <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor"> - <Condition id="FileType" fileExtensions=".cs"> - <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToView" insertbefore="MonoDevelop.Ide.Commands.EditCommands.Cut" /> - <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddViewFromController" /> - <SeparatorItem id = "MvcSeparator1" /> - </Condition> - <Condition id="FileType" fileExtensions=".cshtml,.aspx"> - <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToController" insertbefore="MonoDevelop.Ide.Commands.EditCommands.Cut" /> - <SeparatorItem id = "MvcSeparator2" /> - </Condition> - </Extension> - - <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad"> - <NodeBuilder id="AspMvcFolderNodeBuilderExtension" class = "MonoDevelop.AspNet.Mvc.Gui.FolderNodeBuilderExtension"/> - </Extension> - - <Extension path = "/MonoDevelop/TypeSystem/Parser"> - <Parser class = "MonoDevelop.AspNet.Mvc.Parser.RazorCSharpParser" mimeType="text/x-cshtml" /> - </Extension> - - <ExtensionPoint path = "/MonoDevelop/Razor/CompletionBuilders"> - <ExtensionNode name="Class" /> - </ExtensionPoint> - - <Extension path = "/MonoDevelop/Razor/CompletionBuilders"> - <Class class = "MonoDevelop.AspNet.Mvc.Completion.RazorCSharpCompletionBuilder" /> - </Extension> - - <Extension path = "/MonoDevelop/Core/MimeTypes"> - <MimeType id="text/x-cshtml" _description="ASP.NET MVC Razor View" icon="md-html-file-icon" isText="true"> - <File pattern="*.cshtml" /> - </MimeType> - </Extension> - - <Extension path = "/MonoDevelop/Ide/TextEditorExtensions"> - <Class fileExtensions=".cshtml" class = "MonoDevelop.AspNet.Mvc.Gui.RazorCSharpEditorExtension" /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/CodeTemplates"> - <CodeTemplate file="Razor-templates.xml" /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/CodeFormatters"> - <Formatter mimeType="text/x-cshtml" class="MonoDevelop.AspNet.Mvc.Formatting.RazorCSharpFormatter" /> - </Extension> - - <Extension path = "/MonoDevelop/Ide/CompletionCharacters"> - <Complete language="Razor" commitOnSpace="True" commitChars="{}[]().,:;+-*/%&|^!~=<>?@#'"\"/> - </Extension> - - <Extension path = "/MonoDevelop/Ide/CustomTools"> - <!-- NOTE: we explicitly do no call this "RazorGenerator" to avoid conflicts with http://razorgenerator.codeplex.com/ --> - <Tool name="RazorTemplatePreprocessor" type="MonoDevelop.RazorGenerator.RazorTemplatePreprocessor"/> - </Extension> -</ExtensionModel> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.csproj b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.csproj deleted file mode 100644 index 250f115344..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.csproj +++ /dev/null @@ -1,339 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{B32AD0DD-5247-437B-A2EF-1A4676C1B072}</ProjectGuid> - <OutputType>Library</OutputType> - <RootNamespace>MonoDevelop.AspNet.Mvc</RootNamespace> - <AssemblyName>MonoDevelop.AspNet.Mvc</AssemblyName> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>True</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>False</Optimize> - <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.AspNet.Mvc</OutputPath> - <DefineConstants>DEBUG</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <ConsolePause>False</ConsolePause> - <NoWarn>1591;1573</NoWarn> - <DocumentationFile>..\..\..\..\build\AddIns\MonoDevelop.AspNet.Mvc\MonoDevelop.AspNet.Mvc.xml</DocumentationFile> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\build</OutputPath> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <ConsolePause>False</ConsolePause> - <DebugSymbols>true</DebugSymbols> - <NoWarn>1591;1573</NoWarn> - <DocumentationFile>..\build\MonoDevelop.AspNet.Mvc.xml</DocumentationFile> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <ItemGroup> - <Compile Include="AssemblyInfo.cs" /> - <Compile Include="AspMvcProjectBinding.cs" /> - <Compile Include="AspMvcProject.cs" /> - <Compile Include="AspMvcProjectConfiguration.cs" /> - <Compile Include="AspMvcCommands.cs" /> - <Compile Include="CommandHandlers.cs" /> - <Compile Include="Completion\IRazorCompletionBuilder.cs" /> - <Compile Include="Completion\RazorCompletion.cs" /> - <Compile Include="Completion\RazorCSharpCompletionBuilder.cs" /> - <Compile Include="Formatting\RazorCSharpFormatter.cs" /> - <Compile Include="Gui\FolderNodeBuilderExtension.cs" /> - <None Include="CodeTemplates\CSharp\AddController\ControllerWithEmptyReadAndWriteActions.tt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="CodeTemplates\CSharp\AddController\Empty.tt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="CodeTemplates\CSharp\AddView\Razor\Empty.tt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Common\Error.cshtml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Common\HomeController.cs"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Common\HomeControllerTest.cs"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <Compile Include="Gui\RazorCSharpEditorExtension.cs" /> - <Compile Include="Parser\OutlineNode.cs" /> - <Compile Include="Parser\RazorCSharpParsedDocument.cs" /> - <Compile Include="Parser\RazorCSharpParser.cs" /> - <Compile Include="Parser\RazorPageInfo.cs" /> - <Compile Include="Parser\RazorSymbols.cs" /> - <Compile Include="Parser\RazorUtils.cs" /> - <Compile Include="RazorSyntaxMode.cs" /> - <Compile Include="StateEngine\RazorCodeBlockState.cs" /> - <Compile Include="StateEngine\RazorCodeFragmentState.cs" /> - <Compile Include="StateEngine\RazorCommentState.cs" /> - <Compile Include="StateEngine\RazorDirectiveState.cs" /> - <Compile Include="StateEngine\RazorDom.cs" /> - <Compile Include="StateEngine\RazorExpressionState.cs" /> - <Compile Include="StateEngine\RazorFreeState.cs" /> - <Compile Include="StateEngine\RazorSpeculativeState.cs" /> - <Compile Include="StateEngine\RazorState.cs" /> - <Compile Include="StateEngine\RazorStatementState.cs" /> - <Compile Include="StateEngine\StateEngineService.cs" /> - <Compile Include="TextTemplating\MvcTextTemplateHost.cs" /> - <Compile Include="gtk-gui\generated.cs" /> - <Compile Include="Gui\AddViewDialog.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs" /> - <Compile Include="Gui\AddControllerDialog.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog.cs" /> - <None Include="Templates\PreprocessedRazorTemplate.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <Compile Include="RazorGenerator\RazorTemplatePreprocessor.cs" /> - <Compile Include="RazorGenerator\PreprocessedCSharpRazorCodeParser.cs" /> - <Compile Include="RazorGenerator\PreprocessedTemplateCodeTransformer.cs" /> - <Compile Include="RazorEditorParserFixed\RazorEditorParser.cs" /> - <Compile Include="RazorEditorParserFixed\BackgroundParser.cs" /> - <Compile Include="RazorEditorParserFixed\RazorEditorTrace.cs" /> - <Compile Include="RazorEditorParserFixed\RazorResources.Designer.cs" /> - <Compile Include="RazorEditorParserFixed\CommonResources.Designer.cs" /> - <Compile Include="RazorEditorParserFixed\DisposableAction.cs" /> - <Compile Include="AddinInfo.cs" /> - <Compile Include="RazorGenerator\MarkupRewriter.cs" /> - <Compile Include="RazorGenerator\RewritingRazorTemplateEngine.cs" /> - <Compile Include="RazorGenerator\PreprocessedAttributeRewriter.cs" /> - <Compile Include="RazorGenerator\PreprocessedRazorHost.cs" /> - <Compile Include="RazorGenerator\PreprocessedLiteralAttributeCodeGenerator.cs" /> - <Compile Include="RazorGenerator\PreprocessedAttributeBlockCodeGenerator.cs" /> - <Compile Include="RazorGenerator\PreprocessedDynamicAttributeBlockCodeGenerator.cs" /> - <Compile Include="RazorGenerator\RazorWriterHelper.cs" /> - <Compile Include="RazorGenerator\FileUtil.cs" /> - </ItemGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Configuration" /> - <Reference Include="System.Web" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Core" /> - <Reference Include="Mono.Posix" /> - <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference Include="System.Web.Mvc"> - <HintPath>lib\System.Web.Mvc.dll</HintPath> - </Reference> - <Reference Include="System.Web.Razor"> - <HintPath>lib\System.Web.Razor.dll</HintPath> - </Reference> - <Reference Include="System.Web.WebPages"> - <HintPath>lib\System.Web.WebPages.dll</HintPath> - </Reference> - <Reference Include="System.Web.WebPages.Razor"> - <HintPath>lib\System.Web.WebPages.Razor.dll</HintPath> - </Reference> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="MonoDevelop.AspNet.Mvc.addin.xml"> - <LogicalName>MonoDevelop.AspNet.Mvc.addin.xml</LogicalName> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="gtk-gui\gui.stetic"> - <LogicalName>gui.stetic</LogicalName> - </EmbeddedResource> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <ItemGroup> - <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj"> - <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project> - <Name>ICSharpCode.NRefactory.CSharp</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\CSharpBinding\CSharpBinding.csproj"> - <Project>{07CC7654-27D6-421D-A64C-0FFA40456FA2}</Project> - <Name>CSharpBinding</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\TextTemplating\Mono.TextTemplating\Mono.TextTemplating.csproj"> - <Project>{A2364D6A-00EF-417C-80A6-815726C70032}</Project> - <Name>Mono.TextTemplating</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\TextTemplating\MonoDevelop.TextTemplating\MonoDevelop.TextTemplating.csproj"> - <Project>{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}</Project> - <Name>MonoDevelop.TextTemplating</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj"> - <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project> - <Name>MonoDevelop.Core</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj"> - <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project> - <Name>MonoDevelop.DesignerSupport</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> - <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> - <Name>MonoDevelop.Ide</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj"> - <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project> - <Name>MonoDevelop.XmlEditor</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj"> - <Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project> - <Name>Mono.TextEditor</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj"> - <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project> - <Name>ICSharpCode.NRefactory</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj"> - <Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project> - <Name>Mono.Addins</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj"> - <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project> - <Name>MonoDevelop.Debugger</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="Templates\Common\Index.cshtml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Common\ViewPageRazor.cshtml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Common\_Layout.cshtml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Common\_ViewStart.cshtml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Controller.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\EmptyProject.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\GlobalAsax.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\Project.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\UserControl.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\ViewContentPage.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\ViewMasterPage.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\ViewPage.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\WebConfigApp.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\WebConfigViews.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - <None Include="CodeTemplates\CSharp\AddView\Aspx\Empty.tt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Makefile.am" /> - </ItemGroup> - <ItemGroup> - <None Include="Templates\EmptyProjectMvc3.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - <None Include="Templates\GlobalAsaxMvc3.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\ProjectMvc3.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - <None Include="Templates\WebConfigAppMvc3.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\WebConfigViewsMvc3.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Templates\ProjectMvc3Razor.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Templates\ProjectMvc3WithUnitTest.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <None Include="Templates\ProjectWithUnitTest.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Templates\ProjectMvc3RazorWithUnitTest.xpt.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Templates\LayoutPage.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Templates\PartialViewPageRazor.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <ItemGroup> - <None Include="Templates\ViewPageRazor.xft.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <ItemGroup /> - <ItemGroup> - <None Include="Razor-templates.xml"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - <SubType>Designer</SubType> - </None> - </ItemGroup> - <ItemGroup> - <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> - </ItemGroup> - <ItemGroup> - <Folder Include="RazorGenerator\" /> - <Folder Include="RazorEditorParserFixed\" /> - </ItemGroup> -</Project> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorDom.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorDom.cs deleted file mode 100644 index 2069d32a4b..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorDom.cs +++ /dev/null @@ -1,202 +0,0 @@ -//
-// RazorDom.cs
-//
-// Author:
-// Piotr Dowgiallo <sparekd@gmail.com>
-//
-// Copyright (c) 2012 Piotr Dowgiallo
-//
-// 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 MonoDevelop.Xml.StateEngine;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory;
-using System.Diagnostics;
-using Mono.TextEditor;
-using MonoDevelop.Ide;
-using System.Linq;
-
-namespace MonoDevelop.AspNet.Mvc.StateEngine
-{
- public abstract class RazorExpression : XNode
- {
- public RazorExpression (DomRegion region) : base (region) { }
- public RazorExpression (TextLocation start) : base (start) { }
- protected RazorExpression () { }
- }
-
- public class RazorExplicitExpression : RazorExpression
- {
- public RazorExplicitExpression (DomRegion region) : base (region) { }
- public RazorExplicitExpression (TextLocation start) : base (start) { }
- protected RazorExplicitExpression () { }
-
- protected override XObject NewInstance () { return new RazorExplicitExpression (); }
-
- public override string ToString ()
- {
- return string.Format ("[RazorExplicitExpression Location='{0}'", this.Region);
- }
-
- public override string FriendlyPathRepresentation
- {
- get { return "@( )"; }
- }
- }
-
- public class RazorImplicitExpression : RazorExpression
- {
- public RazorImplicitExpression (DomRegion region) : base (region) { }
- public RazorImplicitExpression (TextLocation start) : base (start) { }
- protected RazorImplicitExpression () { }
-
- protected override XObject NewInstance () { return new RazorImplicitExpression (); }
-
- public override string ToString ()
- {
- return string.Format ("[RazorImplicitExpression Location='{0}'", this.Region);
- }
-
- public override string FriendlyPathRepresentation
- {
- get { return "@"; }
- }
- }
-
- public class RazorComment : XNode
- {
- public RazorComment (DomRegion region) : base (region) { }
- public RazorComment (TextLocation start) : base (start) { }
- protected RazorComment () { }
-
- protected override XObject NewInstance () { return new RazorComment (); }
-
- public override string ToString ()
- {
- return string.Format ("[RazorComment Location='{0}'", this.Region);
- }
-
- public override string FriendlyPathRepresentation
- {
- get { return "@* *@"; }
- }
- }
-
- public abstract class RazorCodeFragment : XContainer
- {
- public RazorCodeFragment (TextLocation start) : base (start) {}
-
- protected RazorCodeFragment () { }
-
- public string Name { get; set; }
- public TextLocation? FirstBracket { get; set; }
- public TextDocument Document {
- get {
- if (IdeApp.Workbench.ActiveDocument != null && IdeApp.Workbench.ActiveDocument.Editor != null)
- return IdeApp.Workbench.ActiveDocument.Editor.Document;
- return null;
- }
- }
-
- public bool IsEndingBracket (TextLocation bracketLocation)
- {
- // If document isn't entirely loaded
- if (Document == null || Document.Lines.Count () < Region.BeginLine)
- return false;
-
- if (!FirstBracket.HasValue && !FindFirstBracket (bracketLocation))
- return false;
-
- int firstBracketOffset = Document.GetOffset (FirstBracket.Value);
- int currentBracketOffset = Document.GetOffset (bracketLocation);
-
- return Document.GetMatchingBracketOffset (firstBracketOffset) == currentBracketOffset;
- }
-
- public bool FindFirstBracket (TextLocation currentLocation)
- {
- if (Document.Lines.Count () < Region.BeginLine)
- return false;
-
- int firstBracketPosition = Document.GetTextBetween (Region.Begin, currentLocation).IndexOf ('{');
- if (firstBracketPosition == -1)
- return false;
-
- int beginOffset = Document.LocationToOffset (Region.Begin);
- FirstBracket = Document.OffsetToLocation (beginOffset + firstBracketPosition);
- return true;
- }
- }
-
- public class RazorCodeBlock : RazorCodeFragment
- {
- public RazorCodeBlock (TextLocation start) : base (start) { }
- protected RazorCodeBlock () { }
-
- protected override XObject NewInstance () { return new RazorCodeBlock (); }
-
- public override string ToString ()
- {
- return string.Format ("[RazorCodeBlock Location='{0}'", this.Region);
- }
-
- public override string FriendlyPathRepresentation
- {
- get { return "@{ }"; }
- }
- }
-
- public class RazorDirective : RazorCodeFragment
- {
- public RazorDirective (TextLocation start) : base (start) { }
- protected RazorDirective () { }
-
- protected override XObject NewInstance () { return new RazorDirective (); }
-
- public bool IsSimpleDirective { get; set; }
-
- public override string ToString ()
- {
- return string.Format ("[RazorDirective Location='{0}'", this.Region);
- }
-
- public override string FriendlyPathRepresentation
- {
- get { return "@" + Name; }
- }
- }
-
- public class RazorStatement : RazorCodeFragment
- {
- public RazorStatement (TextLocation start) : base (start) { }
- protected RazorStatement () { }
-
- protected override XObject NewInstance () { return new RazorStatement (); }
-
- public override string ToString ()
- {
- return string.Format ("[RazorStatement Location='{0}'", this.Region);
- }
-
- public override string FriendlyPathRepresentation
- {
- get { return "@" + Name; }
- }
- }
-}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Controller.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Controller.xft.xml deleted file mode 100644 index efd7300bcd..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Controller.xft.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<Template originator="Michael Hutchinson" - created="2009/02/17" - lastModified="2009/02/17"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC Controller</_Name> - <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <_Description>Creates an ASP.NET MVC Controller.</_Description> - </TemplateConfiguration> - - <!-- Template Content --> - <TemplateFiles> - <CodeDomFile> - <CompileUnit> - <Namespaces> - <Namespace Name=""> - <Imports> - <NamespaceImport Namespace="System" /> - <NamespaceImport Namespace="System.Collections.Generic" /> - <NamespaceImport Namespace="System.Linq" /> - <NamespaceImport Namespace="System.Web" /> - <NamespaceImport Namespace="System.Web.Mvc" /> - <NamespaceImport Namespace="System.Web.Mvc.Ajax" /> - </Imports> - </Namespace> - <Namespace Name="${Namespace}.Controllers"> - <Types> - <TypeDeclaration Name="${Name}" IsClass="true" > - <BaseTypes> - <TypeReference BaseType="Controller" /> - </BaseTypes> - <Members> - </Members> - </TypeDeclaration> - </Types> - </Namespace> - </Namespaces> - </CompileUnit> - </CodeDomFile> - </TemplateFiles> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/EmptyProjectMvc3.xpt.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/EmptyProjectMvc3.xpt.xml deleted file mode 100644 index 06b0bb25ca..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/EmptyProjectMvc3.xpt.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<Template originator="Piotr Dowgiallo" - created="2012/05/16" - lastModified="2012/05/16"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>Empty ASP.NET MVC 3 Project</_Name> - <_Category>C#/ASP.NET</_Category> - <Icon>md-project-web</Icon> - <LanguageName>C#</LanguageName> - <_Description>Creates an empty ASP.NET MVC 3 Web Project.</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc3"> - <Options TargetFrameworkVersion = "4.0" /> - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - </References> - <Files> - <Directory name="Content" /> - <Directory name="Controllers" /> - <Directory name="Models" /> - <Directory name="Scripts" /> - <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvc3WebConfigViews" name="Web.config" SuppressAutoOpen="true" /> - </Directory> - <FileTemplateReference TemplateID="AspMvc3WebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvc3GlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/GlobalAsax.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/GlobalAsax.xft.xml deleted file mode 100644 index cf812f649a..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/GlobalAsax.xft.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Michael Hutchinson" - Created="2009/02/20" - LastModified="2012/05/17"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 2 Global.asax</_Name> - <_Category>ASP.NET MVC</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>C#</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <DefaultFilename IsFixed="True">Global.asax</DefaultFilename> - <_Description>Creates an ASP.NET MVC 2 Global.asax file.</_Description> - </TemplateConfiguration> - - <Conditions> - <ParentProject PermittedCreationPaths="" ExcludedFiles="/Global.asax" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile name="Global.asax"> - <FileText> -<![CDATA[<%@ Application Inherits="${Namespace}.MvcApplication" %>]]> - </FileText> - </AspNetFile> - <File name="Global.asax.cs" DependsOn="Global.asax" > -<![CDATA[ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; - -namespace ${Namespace} -{ - public class MvcApplication : System.Web.HttpApplication - { - public static void RegisterRoutes(RouteCollection routes) - { - routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); - - routes.MapRoute( - "Default", - "{controller}/{action}/{id}", - new { controller = "Home", action = "Index", id = "" } - ); - - } - - protected void Application_Start() - { - AreaRegistration.RegisterAllAreas(); - RegisterRoutes(RouteTable.Routes); - } - } -}]]> - </File> - </TemplateFiles> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Project.xpt.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Project.xpt.xml deleted file mode 100644 index c146ff30a8..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Project.xpt.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<Template originator="Michael Hutchinson" - created="2009/02/17" - lastModified="2012/05/17"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 2 Project</_Name> - <_Category>C#/ASP.NET</_Category> - <Icon>md-project-web</Icon> - <LanguageName>C#</LanguageName> - <_Description>Creates an ASP.NET MVC 2 Web Project.</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "Controllers/HomeController.cs"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc2"> - <Options TargetFrameworkVersion = "4.0" /> - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - </References> - <Files> - <Directory name="Content" /> - <Directory name="Controllers"> - <File name="HomeController.cs" src="Common/HomeController.cs" /> - </Directory> - <Directory name="Models" /> - <Directory name="Scripts" /> - <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvcWebConfigViews" name="Web.config" SuppressAutoOpen="true" /> - <Directory name="Home"> - <AspNetFile name="Index.aspx"> - <FileText><![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title></title> -</head> -<body> - <div> - <%= Html.Encode(ViewData["Message"]) %> - </div> -</body> -]]> - </FileText> - </AspNetFile> - </Directory> - </Directory> - <FileTemplateReference TemplateID="AspMvcWebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvcGlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectWithUnitTest.xpt.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectWithUnitTest.xpt.xml deleted file mode 100644 index 4166b103a0..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectWithUnitTest.xpt.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0"?> -<Template originator="Piotr Dowgiallo" - created="2012/06/05" - lastModified="2012/06/05"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 2 with Unit Test Project</_Name> - <_Category>C#/ASP.NET</_Category> - <Icon>md-project-web</Icon> - <LanguageName>C#</LanguageName> - <_Description>Creates an ASP.NET MVC 2 Web Project with Unit Test project.</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "Controllers/HomeController.cs"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc2"> - <Options TargetFrameworkVersion = "4.0" /> - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - </References> - <Files> - <Directory name="Content" /> - <Directory name="Controllers"> - <File name="HomeController.cs" src="Common/HomeController.cs" /> - </Directory> - <Directory name="Models" /> - <Directory name="Scripts" /> - <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvcWebConfigViews" name="Web.config" SuppressAutoOpen="true" /> - <Directory name="Home"> - <AspNetFile name="Index.aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title></title> -</head> -<body> - <div> - <%= Html.Encode(ViewData["Message"]) %> - </div> -</body> -]]> - </FileText> - </AspNetFile> - </Directory> - </Directory> - <FileTemplateReference TemplateID="AspMvcWebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvcGlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> - </Files> - </Project> - <Project name = "${ProjectName}.Tests" directory = "${ProjectName}.Tests"> - <Options Target = "Library" /> - - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - <Reference type="Package" refto="nunit.framework" SpecificVersion = "false" LocalCopy = "false" /> - <Reference type="Project" refto="${ProjectName}" /> - </References> - - <Files> - <Directory name="Controllers"> - <File name="HomeControllerTest.cs" src="Common/HomeControllerTest.cs" /> - </Directory> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigApp.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigApp.xft.xml deleted file mode 100644 index fe96f40c35..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigApp.xft.xml +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0"?> -<Template - Originator="Michael Hutchinson" - Created="2009/02/20" - LastModified="2012/05/17"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 2 Application Configuration</_Name> - <_Category>ASP.NET MVC</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <DefaultFilename IsFixed="True">Web.config</DefaultFilename> - <_Description>Creates an ASP.NET MVC 2 Web.config file for an application.</_Description> - </TemplateConfiguration> - - <Conditions> - <ParentProject PermittedCreationPaths="" ExcludedFiles="Web.config" RequireProject="True"/> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile name="Web.config"> - <FileText> -<![CDATA[<?xml version="1.0" ?> -<!-- -Web.config file for ${ProjectName}. - -The settings that can be used in this file are documented at -http://www.mono-project.com/Config_system.web and -http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx ---> -<configuration> - <configSections> - <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> - <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> - <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> - <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> - <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> - </sectionGroup> - </sectionGroup> - </sectionGroup> - </configSections> - - <system.web> - <!-- - Set compilation debug="true" to insert debugging - symbols into the compiled page. Because this - affects performance, set this value to true only - during development. - --> - <compilation defaultLanguage="${AspNetLanguage}" debug="false"> - <assemblies> - <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> - <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> - <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> - </assemblies> - </compilation> - - <customErrors mode="RemoteOnly"> - </customErrors> - - <pages> - <controls> - <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - </controls> - - <namespaces> - <add namespace="System.Web.Mvc"/> - <add namespace="System.Web.Mvc.Ajax"/> - <add namespace="System.Web.Mvc.Html"/> - <add namespace="System.Web.Routing"/> - <add namespace="System.Linq"/> - <add namespace="System.Collections.Generic"/> - </namespaces> - </pages> - - <authorization> - <allow users="*" /> - </authorization> - - <httpHandlers> - <remove verb="*" path="*.asmx"/> - <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> - <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - </httpHandlers> - - <httpModules> - <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - </httpModules> - - <trace - enabled="false" - localOnly="true" - pageOutput="false" - requestLimit="10" - traceMode="SortByTime" - /> - - <globalization - requestEncoding="utf-8" - responseEncoding="utf-8" - /> - - </system.web> - - <system.codedom> - <compilers> - <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" - type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <providerOption name="CompilerVersion" value="v4.0"/> - <providerOption name="WarnAsError" value="false"/> - </compiler> - <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" - type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <providerOption name="CompilerVersion" value="v4.0"/> - <providerOption name="OptionInfer" value="true"/> - <providerOption name="WarnAsError" value="false"/> - </compiler> - </compilers> - </system.codedom> - - <system.web.extensions/> - -</configuration>]]> - </FileText> - </AspNetFile> - </TemplateFiles> -</Template> - diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigViews.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigViews.xft.xml deleted file mode 100644 index 4e18d67c88..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigViews.xft.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0"?> -<Template - Originator="Michael Hutchinson" - Created="2009/02/20" - LastModified="2012/05/17"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 2 Views Configuration</_Name> - <_Category>ASP.NET MVC</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <DefaultFilename IsFixed="True">Web.config</DefaultFilename> - <_Description>Creates an ASP.NET MVC 2 Web.config file for the Views directory.</_Description> - </TemplateConfiguration> - - <Conditions> - <ParentProject PermittedCreationPaths="/Views" ExcludedFiles="Web.config" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <File name="Web.config"> -<![CDATA[<?xml version="1.0"?> -<configuration> - <system.web> - <httpHandlers> - <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> - </httpHandlers> - - <!-- - Enabling request validation in view pages would cause validation to occur - after the input has already been processed by the controller. By default - MVC performs request validation before a controller processes the input. - To change this behavior apply the ValidateInputAttribute to a - controller or action. - --> - <pages validateRequest="false" - pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" - pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" - userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <controls> - <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> - </controls> - </pages> - </system.web> - - <system.webServer> - <validation validateIntegratedModeConfiguration="false"/> - <handlers> - <remove name="BlockViewHandler"/> - <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/> - </handlers> - </system.webServer> -</configuration>]]> - </File> - </TemplateFiles> -</Template>
\ No newline at end of file diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog.cs deleted file mode 100644 index 2ef2c71e15..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog.cs +++ /dev/null @@ -1,122 +0,0 @@ -
-// This file has been generated by the GUI designer. Do not modify.
-namespace MonoDevelop.AspNet.Mvc.Gui
-{
- public partial class AddControllerDialog
- {
- private global::Gtk.Table table1;
- private global::Gtk.Label label1;
- private global::Gtk.Label label2;
- private global::Gtk.Entry nameEntry;
- private global::Gtk.ComboBox templateCombo;
- private global::Gtk.Button buttonCancel;
- private global::Gtk.Button buttonOk;
-
- protected virtual void Build ()
- {
- global::Stetic.Gui.Initialize (this);
- // Widget MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog
- this.Name = "MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog";
- this.Title = global::Mono.Unix.Catalog.GetString ("Add Controller");
- this.WindowPosition = ((global::Gtk.WindowPosition)(4));
- // Internal child MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog.VBox
- global::Gtk.VBox w1 = this.VBox;
- w1.Name = "dialog1_VBox";
- w1.Spacing = 6;
- w1.BorderWidth = ((uint)(6));
- // Container child dialog1_VBox.Gtk.Box+BoxChild
- this.table1 = new global::Gtk.Table (((uint)(2)), ((uint)(2)), false);
- this.table1.Name = "table1";
- this.table1.RowSpacing = ((uint)(6));
- this.table1.ColumnSpacing = ((uint)(6));
- // Container child table1.Gtk.Table+TableChild
- this.label1 = new global::Gtk.Label ();
- this.label1.Name = "label1";
- this.label1.Xalign = 0F;
- this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("_Name:");
- this.label1.UseUnderline = true;
- this.table1.Add (this.label1);
- global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1 [this.label1]));
- w2.XOptions = ((global::Gtk.AttachOptions)(4));
- w2.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.Xalign = 0F;
- this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("_Template:");
- this.label2.UseUnderline = true;
- this.table1.Add (this.label2);
- global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1 [this.label2]));
- w3.TopAttach = ((uint)(1));
- w3.BottomAttach = ((uint)(2));
- w3.XOptions = ((global::Gtk.AttachOptions)(4));
- w3.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.nameEntry = new global::Gtk.Entry ();
- this.nameEntry.CanFocus = true;
- this.nameEntry.Name = "nameEntry";
- this.nameEntry.IsEditable = true;
- this.nameEntry.InvisibleChar = '●';
- this.table1.Add (this.nameEntry);
- global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1 [this.nameEntry]));
- w4.LeftAttach = ((uint)(1));
- w4.RightAttach = ((uint)(2));
- w4.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.templateCombo = global::Gtk.ComboBox.NewText ();
- this.templateCombo.Name = "templateCombo";
- this.table1.Add (this.templateCombo);
- global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1 [this.templateCombo]));
- w5.TopAttach = ((uint)(1));
- w5.BottomAttach = ((uint)(2));
- w5.LeftAttach = ((uint)(1));
- w5.RightAttach = ((uint)(2));
- w5.YOptions = ((global::Gtk.AttachOptions)(4));
- w1.Add (this.table1);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1 [this.table1]));
- w6.Position = 0;
- w6.Expand = false;
- w6.Fill = false;
- // Internal child MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog.ActionArea
- global::Gtk.HButtonBox w7 = this.ActionArea;
- w7.Name = "dialog1_ActionArea";
- w7.Spacing = 10;
- w7.BorderWidth = ((uint)(5));
- w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
- // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.buttonCancel = new global::Gtk.Button ();
- this.buttonCancel.CanDefault = true;
- this.buttonCancel.CanFocus = true;
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.UseStock = true;
- this.buttonCancel.UseUnderline = true;
- this.buttonCancel.Label = "gtk-cancel";
- this.AddActionWidget (this.buttonCancel, -6);
- global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonCancel]));
- w8.Expand = false;
- w8.Fill = false;
- // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.buttonOk = new global::Gtk.Button ();
- this.buttonOk.CanDefault = true;
- this.buttonOk.CanFocus = true;
- this.buttonOk.Name = "buttonOk";
- this.buttonOk.UseStock = true;
- this.buttonOk.UseUnderline = true;
- this.buttonOk.Label = "gtk-ok";
- this.AddActionWidget (this.buttonOk, -5);
- global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonOk]));
- w9.Position = 1;
- w9.Expand = false;
- w9.Fill = false;
- if ((this.Child != null)) {
- this.Child.ShowAll ();
- }
- this.DefaultWidth = 400;
- this.DefaultHeight = 157;
- this.label1.MnemonicWidget = this.nameEntry;
- this.label2.MnemonicWidget = this.templateCombo;
- this.Show ();
- this.nameEntry.Changed += new global::System.EventHandler (this.Validate);
- }
- }
-}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs deleted file mode 100644 index 7b7de3c626..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.cs +++ /dev/null @@ -1,368 +0,0 @@ -
-// This file has been generated by the GUI designer. Do not modify.
-namespace MonoDevelop.AspNet.Mvc.Gui
-{
- public partial class AddViewDialog
- {
- private global::Gtk.VBox vbox2;
- private global::Gtk.Table table1;
- private global::Gtk.Label label1;
- private global::Gtk.Label label4;
- private global::Gtk.Label label6;
- private global::Gtk.Entry nameEntry;
- private global::Gtk.ComboBox templateCombo;
- private global::Gtk.ComboBox viewEngineCombo;
- private global::Gtk.Frame frame1;
- private global::Gtk.Alignment alignment1;
- private global::Gtk.VBox vbox4;
- private global::Gtk.CheckButton partialCheck;
- private global::Gtk.CheckButton stronglyTypedCheck;
- private global::Gtk.Alignment typePanel;
- private global::Gtk.HBox hbox1;
- private global::Gtk.Label label3;
- private global::Gtk.Alignment dataClassAlignment;
- private global::Gtk.ComboBoxEntry dataClassCombo;
- private global::Gtk.CheckButton masterCheck;
- private global::Gtk.Alignment masterPanel;
- private global::Gtk.VBox vbox3;
- private global::Gtk.HBox hbox4;
- private global::Gtk.Label label5;
- private global::Gtk.Entry masterEntry;
- private global::Gtk.Button masterButton;
- private global::Gtk.HBox placeholderBox;
- private global::Gtk.Label label2;
- private global::Gtk.ComboBoxEntry primaryPlaceholderCombo;
- private global::Gtk.Label GtkLabel6;
- private global::Gtk.Button buttonCancel;
- private global::Gtk.Button buttonOk;
-
- protected virtual void Build ()
- {
- global::Stetic.Gui.Initialize (this);
- // Widget MonoDevelop.AspNet.Mvc.Gui.AddViewDialog
- this.Name = "MonoDevelop.AspNet.Mvc.Gui.AddViewDialog";
- this.Title = global::Mono.Unix.Catalog.GetString ("Add View");
- this.WindowPosition = ((global::Gtk.WindowPosition)(4));
- this.BorderWidth = ((uint)(6));
- this.Resizable = false;
- this.AllowGrow = false;
- // Internal child MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.VBox
- global::Gtk.VBox w1 = this.VBox;
- w1.Name = "dialog1_VBox";
- w1.BorderWidth = ((uint)(2));
- // Container child dialog1_VBox.Gtk.Box+BoxChild
- this.vbox2 = new global::Gtk.VBox ();
- this.vbox2.Name = "vbox2";
- this.vbox2.Spacing = 6;
- // Container child vbox2.Gtk.Box+BoxChild
- this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(2)), false);
- this.table1.Name = "table1";
- this.table1.RowSpacing = ((uint)(6));
- this.table1.ColumnSpacing = ((uint)(6));
- // Container child table1.Gtk.Table+TableChild
- this.label1 = new global::Gtk.Label ();
- this.label1.Name = "label1";
- this.label1.Xalign = 0F;
- this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("_Name:");
- this.label1.UseUnderline = true;
- this.table1.Add (this.label1);
- global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1 [this.label1]));
- w2.XOptions = ((global::Gtk.AttachOptions)(4));
- w2.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.label4 = new global::Gtk.Label ();
- this.label4.Name = "label4";
- this.label4.Xalign = 0F;
- this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("_Template:");
- this.label4.UseUnderline = true;
- this.table1.Add (this.label4);
- global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1 [this.label4]));
- w3.TopAttach = ((uint)(1));
- w3.BottomAttach = ((uint)(2));
- w3.XOptions = ((global::Gtk.AttachOptions)(4));
- w3.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.label6 = new global::Gtk.Label ();
- this.label6.Name = "label6";
- this.label6.LabelProp = global::Mono.Unix.Catalog.GetString ("_View Engine:");
- this.label6.UseUnderline = true;
- this.table1.Add (this.label6);
- global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1 [this.label6]));
- w4.TopAttach = ((uint)(2));
- w4.BottomAttach = ((uint)(3));
- w4.XOptions = ((global::Gtk.AttachOptions)(4));
- w4.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.nameEntry = new global::Gtk.Entry ();
- this.nameEntry.CanFocus = true;
- this.nameEntry.Name = "nameEntry";
- this.nameEntry.IsEditable = true;
- this.nameEntry.InvisibleChar = '●';
- this.table1.Add (this.nameEntry);
- global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1 [this.nameEntry]));
- w5.LeftAttach = ((uint)(1));
- w5.RightAttach = ((uint)(2));
- w5.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.templateCombo = global::Gtk.ComboBox.NewText ();
- this.templateCombo.Name = "templateCombo";
- this.table1.Add (this.templateCombo);
- global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1 [this.templateCombo]));
- w6.TopAttach = ((uint)(1));
- w6.BottomAttach = ((uint)(2));
- w6.LeftAttach = ((uint)(1));
- w6.RightAttach = ((uint)(2));
- w6.XOptions = ((global::Gtk.AttachOptions)(4));
- w6.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.viewEngineCombo = global::Gtk.ComboBox.NewText ();
- this.viewEngineCombo.Name = "viewEngineCombo";
- this.table1.Add (this.viewEngineCombo);
- global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1 [this.viewEngineCombo]));
- w7.TopAttach = ((uint)(2));
- w7.BottomAttach = ((uint)(3));
- w7.LeftAttach = ((uint)(1));
- w7.RightAttach = ((uint)(2));
- w7.XOptions = ((global::Gtk.AttachOptions)(4));
- w7.YOptions = ((global::Gtk.AttachOptions)(4));
- this.vbox2.Add (this.table1);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
- w8.Position = 0;
- w8.Expand = false;
- w8.Fill = false;
- // Container child vbox2.Gtk.Box+BoxChild
- this.frame1 = new global::Gtk.Frame ();
- this.frame1.Name = "frame1";
- this.frame1.ShadowType = ((global::Gtk.ShadowType)(1));
- this.frame1.BorderWidth = ((uint)(2));
- // Container child frame1.Gtk.Container+ContainerChild
- this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
- this.alignment1.Name = "alignment1";
- this.alignment1.LeftPadding = ((uint)(4));
- this.alignment1.TopPadding = ((uint)(4));
- this.alignment1.RightPadding = ((uint)(4));
- this.alignment1.BottomPadding = ((uint)(4));
- // Container child alignment1.Gtk.Container+ContainerChild
- this.vbox4 = new global::Gtk.VBox ();
- this.vbox4.Name = "vbox4";
- this.vbox4.Spacing = 6;
- // Container child vbox4.Gtk.Box+BoxChild
- this.partialCheck = new global::Gtk.CheckButton ();
- this.partialCheck.CanFocus = true;
- this.partialCheck.Name = "partialCheck";
- this.partialCheck.Label = global::Mono.Unix.Catalog.GetString ("_Partial view");
- this.partialCheck.DrawIndicator = true;
- this.partialCheck.UseUnderline = true;
- this.vbox4.Add (this.partialCheck);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.partialCheck]));
- w9.Position = 0;
- w9.Expand = false;
- w9.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.stronglyTypedCheck = new global::Gtk.CheckButton ();
- this.stronglyTypedCheck.CanFocus = true;
- this.stronglyTypedCheck.Name = "stronglyTypedCheck";
- this.stronglyTypedCheck.Label = global::Mono.Unix.Catalog.GetString ("_Strongly typed");
- this.stronglyTypedCheck.DrawIndicator = true;
- this.stronglyTypedCheck.UseUnderline = true;
- this.vbox4.Add (this.stronglyTypedCheck);
- global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.stronglyTypedCheck]));
- w10.Position = 1;
- w10.Expand = false;
- w10.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.typePanel = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
- this.typePanel.Name = "typePanel";
- this.typePanel.LeftPadding = ((uint)(24));
- // Container child typePanel.Gtk.Container+ContainerChild
- this.hbox1 = new global::Gtk.HBox ();
- this.hbox1.Name = "hbox1";
- this.hbox1.Spacing = 6;
- // Container child hbox1.Gtk.Box+BoxChild
- this.label3 = new global::Gtk.Label ();
- this.label3.Name = "label3";
- this.label3.Xalign = 0F;
- this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("_Data class:");
- this.label3.UseUnderline = true;
- this.hbox1.Add (this.label3);
- global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label3]));
- w11.Position = 0;
- w11.Expand = false;
- w11.Fill = false;
- // Container child hbox1.Gtk.Box+BoxChild
- this.dataClassAlignment = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
- this.dataClassAlignment.Name = "dataClassAlignment";
- // Container child dataClassAlignment.Gtk.Container+ContainerChild
- this.dataClassCombo = global::Gtk.ComboBoxEntry.NewText ();
- this.dataClassCombo.Name = "dataClassCombo";
- this.dataClassAlignment.Add (this.dataClassCombo);
- this.hbox1.Add (this.dataClassAlignment);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.dataClassAlignment]));
- w13.Position = 1;
- this.typePanel.Add (this.hbox1);
- this.vbox4.Add (this.typePanel);
- global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.typePanel]));
- w15.Position = 2;
- w15.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.masterCheck = new global::Gtk.CheckButton ();
- this.masterCheck.CanFocus = true;
- this.masterCheck.Name = "masterCheck";
- this.masterCheck.Label = global::Mono.Unix.Catalog.GetString ("Has _master page or layout:");
- this.masterCheck.DrawIndicator = true;
- this.masterCheck.UseUnderline = true;
- this.vbox4.Add (this.masterCheck);
- global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.masterCheck]));
- w16.Position = 3;
- w16.Expand = false;
- w16.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.masterPanel = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
- this.masterPanel.Name = "masterPanel";
- this.masterPanel.LeftPadding = ((uint)(24));
- // Container child masterPanel.Gtk.Container+ContainerChild
- this.vbox3 = new global::Gtk.VBox ();
- this.vbox3.Name = "vbox3";
- this.vbox3.Spacing = 6;
- // Container child vbox3.Gtk.Box+BoxChild
- this.hbox4 = new global::Gtk.HBox ();
- this.hbox4.Name = "hbox4";
- this.hbox4.Spacing = 6;
- // Container child hbox4.Gtk.Box+BoxChild
- this.label5 = new global::Gtk.Label ();
- this.label5.Name = "label5";
- this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("_File:");
- this.label5.UseUnderline = true;
- this.hbox4.Add (this.label5);
- global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.label5]));
- w17.Position = 0;
- w17.Expand = false;
- w17.Fill = false;
- // Container child hbox4.Gtk.Box+BoxChild
- this.masterEntry = new global::Gtk.Entry ();
- this.masterEntry.CanFocus = true;
- this.masterEntry.Name = "masterEntry";
- this.masterEntry.IsEditable = true;
- this.masterEntry.InvisibleChar = '●';
- this.hbox4.Add (this.masterEntry);
- global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.masterEntry]));
- w18.Position = 1;
- // Container child hbox4.Gtk.Box+BoxChild
- this.masterButton = new global::Gtk.Button ();
- this.masterButton.CanFocus = true;
- this.masterButton.Name = "masterButton";
- this.masterButton.UseUnderline = true;
- this.masterButton.Label = global::Mono.Unix.Catalog.GetString ("...");
- this.hbox4.Add (this.masterButton);
- global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.masterButton]));
- w19.Position = 2;
- w19.Expand = false;
- w19.Fill = false;
- this.vbox3.Add (this.hbox4);
- global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox4]));
- w20.Position = 0;
- w20.Expand = false;
- w20.Fill = false;
- // Container child vbox3.Gtk.Box+BoxChild
- this.placeholderBox = new global::Gtk.HBox ();
- this.placeholderBox.Name = "placeholderBox";
- this.placeholderBox.Spacing = 6;
- // Container child placeholderBox.Gtk.Box+BoxChild
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("P_rimary placeholder: ");
- this.label2.UseUnderline = true;
- this.placeholderBox.Add (this.label2);
- global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.placeholderBox [this.label2]));
- w21.Position = 0;
- w21.Expand = false;
- w21.Fill = false;
- // Container child placeholderBox.Gtk.Box+BoxChild
- this.primaryPlaceholderCombo = global::Gtk.ComboBoxEntry.NewText ();
- this.primaryPlaceholderCombo.WidthRequest = 250;
- this.primaryPlaceholderCombo.Name = "primaryPlaceholderCombo";
- this.placeholderBox.Add (this.primaryPlaceholderCombo);
- global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.placeholderBox [this.primaryPlaceholderCombo]));
- w22.Position = 1;
- this.vbox3.Add (this.placeholderBox);
- global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.placeholderBox]));
- w23.Position = 1;
- w23.Expand = false;
- w23.Fill = false;
- this.masterPanel.Add (this.vbox3);
- this.vbox4.Add (this.masterPanel);
- global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.masterPanel]));
- w25.Position = 4;
- w25.Expand = false;
- w25.Fill = false;
- this.alignment1.Add (this.vbox4);
- this.frame1.Add (this.alignment1);
- this.GtkLabel6 = new global::Gtk.Label ();
- this.GtkLabel6.Name = "GtkLabel6";
- this.GtkLabel6.LabelProp = global::Mono.Unix.Catalog.GetString ("Options");
- this.frame1.LabelWidget = this.GtkLabel6;
- this.vbox2.Add (this.frame1);
- global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.frame1]));
- w28.Position = 1;
- w28.Expand = false;
- w28.Fill = false;
- w1.Add (this.vbox2);
- global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
- w29.Position = 0;
- w29.Expand = false;
- w29.Fill = false;
- // Internal child MonoDevelop.AspNet.Mvc.Gui.AddViewDialog.ActionArea
- global::Gtk.HButtonBox w30 = this.ActionArea;
- w30.Name = "dialog1_ActionArea";
- w30.Spacing = 6;
- w30.BorderWidth = ((uint)(5));
- w30.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
- // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.buttonCancel = new global::Gtk.Button ();
- this.buttonCancel.CanDefault = true;
- this.buttonCancel.CanFocus = true;
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.UseStock = true;
- this.buttonCancel.UseUnderline = true;
- this.buttonCancel.Label = "gtk-cancel";
- this.AddActionWidget (this.buttonCancel, -6);
- global::Gtk.ButtonBox.ButtonBoxChild w31 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w30 [this.buttonCancel]));
- w31.Expand = false;
- w31.Fill = false;
- // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.buttonOk = new global::Gtk.Button ();
- this.buttonOk.CanDefault = true;
- this.buttonOk.CanFocus = true;
- this.buttonOk.Name = "buttonOk";
- this.buttonOk.UseStock = true;
- this.buttonOk.UseUnderline = true;
- this.buttonOk.Label = "gtk-ok";
- this.AddActionWidget (this.buttonOk, -5);
- global::Gtk.ButtonBox.ButtonBoxChild w32 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w30 [this.buttonOk]));
- w32.Position = 1;
- w32.Expand = false;
- w32.Fill = false;
- if ((this.Child != null)) {
- this.Child.ShowAll ();
- }
- this.DefaultWidth = 470;
- this.DefaultHeight = 393;
- this.label1.MnemonicWidget = this.nameEntry;
- this.label4.MnemonicWidget = this.templateCombo;
- this.label6.MnemonicWidget = this.viewEngineCombo;
- this.label3.MnemonicWidget = this.dataClassCombo;
- this.label5.MnemonicWidget = this.masterEntry;
- this.Hide ();
- this.viewEngineCombo.Changed += new global::System.EventHandler (this.ViewEngineChanged);
- this.templateCombo.Changed += new global::System.EventHandler (this.Validate);
- this.nameEntry.Changed += new global::System.EventHandler (this.Validate);
- this.partialCheck.Toggled += new global::System.EventHandler (this.UpdateMasterPanelSensitivity);
- this.stronglyTypedCheck.Toggled += new global::System.EventHandler (this.UpdateTypePanelSensitivity);
- this.dataClassCombo.Changed += new global::System.EventHandler (this.DataClassChanged);
- this.masterCheck.Toggled += new global::System.EventHandler (this.UpdateMasterPanelSensitivity);
- this.masterEntry.Changed += new global::System.EventHandler (this.MasterChanged);
- this.masterButton.Clicked += new global::System.EventHandler (this.ShowMasterSelectionDialog);
- this.primaryPlaceholderCombo.Changed += new global::System.EventHandler (this.Validate);
- }
- }
-}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/generated.cs b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/generated.cs deleted file mode 100644 index 9ef3363981..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/generated.cs +++ /dev/null @@ -1,29 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace Stetic -{ - internal class Gui - { - private static bool initialized; - - internal static void Initialize (Gtk.Widget iconRenderer) - { - if ((Stetic.Gui.initialized == false)) { - Stetic.Gui.initialized = true; - } - } - } - - internal class ActionGroups - { - public static Gtk.ActionGroup GetActionGroup (System.Type type) - { - return Stetic.ActionGroups.GetActionGroup (type.FullName); - } - - public static Gtk.ActionGroup GetActionGroup (string name) - { - return null; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/gui.stetic b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/gui.stetic deleted file mode 100644 index 9c7eb4001f..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/gtk-gui/gui.stetic +++ /dev/null @@ -1,638 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<stetic-interface> - <configuration> - <images-root-path>..</images-root-path> - <target-gtk-version>2.12</target-gtk-version> - </configuration> - <import> - <widget-library name="../../../../../build/AddIns/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" /> - <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.AspNet/MonoDevelop.AspNet.dll" /> - <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.dll" internal="true" /> - </import> - <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Mvc.Gui.AddViewDialog" design-size="470 393"> - <property name="MemberName" /> - <property name="Visible">False</property> - <property name="Title" translatable="yes">Add View</property> - <property name="WindowPosition">CenterOnParent</property> - <property name="BorderWidth">6</property> - <property name="Resizable">False</property> - <property name="AllowGrow">False</property> - <property name="Buttons">2</property> - <property name="HelpButton">False</property> - <child internal-child="VBox"> - <widget class="Gtk.VBox" id="dialog1_VBox"> - <property name="MemberName" /> - <property name="BorderWidth">2</property> - <child> - <widget class="Gtk.VBox" id="vbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Table" id="table1"> - <property name="MemberName" /> - <property name="NRows">3</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="Gtk.Label" id="label1"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">_Name:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">nameEntry</property> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label4"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">_Template:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">templateCombo</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label6"> - <property name="MemberName" /> - <property name="LabelProp" translatable="yes">_View Engine:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">viewEngineCombo</property> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="nameEntry"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - <signal name="Changed" handler="Validate" /> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.ComboBox" id="templateCombo"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="Validate" /> - </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> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.ComboBox" id="viewEngineCombo"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="ViewEngineChanged" /> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">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="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Frame" id="frame1"> - <property name="MemberName" /> - <property name="ShadowType">In</property> - <property name="BorderWidth">2</property> - <child> - <widget class="Gtk.Alignment" id="alignment1"> - <property name="MemberName" /> - <property name="LeftPadding">4</property> - <property name="TopPadding">4</property> - <property name="RightPadding">4</property> - <property name="BottomPadding">4</property> - <child> - <widget class="Gtk.VBox" id="vbox4"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.CheckButton" id="partialCheck"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Label" translatable="yes">_Partial view</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - <signal name="Toggled" handler="UpdateMasterPanelSensitivity" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.CheckButton" id="stronglyTypedCheck"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Label" translatable="yes">_Strongly typed</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - <signal name="Toggled" handler="UpdateTypePanelSensitivity" /> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Alignment" id="typePanel"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="Yalign">0</property> - <property name="LeftPadding">24</property> - <child> - <widget class="Gtk.HBox" id="hbox1"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label3"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">_Data class:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">dataClassCombo</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> - <child> - <widget class="Gtk.Alignment" id="dataClassAlignment"> - <property name="MemberName" /> - <child> - <widget class="Gtk.ComboBoxEntry" id="dataClassCombo"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="DataClassChanged" /> - </widget> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.CheckButton" id="masterCheck"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Label" translatable="yes">Has _master page or layout:</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - <signal name="Toggled" handler="UpdateMasterPanelSensitivity" /> - </widget> - <packing> - <property name="Position">3</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Alignment" id="masterPanel"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="Yalign">0</property> - <property name="LeftPadding">24</property> - <child> - <widget class="Gtk.VBox" id="vbox3"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.HBox" id="hbox4"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label5"> - <property name="MemberName" /> - <property name="LabelProp" translatable="yes">_File:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">masterEntry</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> - <child> - <widget class="Gtk.Entry" id="masterEntry"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - <signal name="Changed" handler="MasterChanged" /> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - </packing> - </child> - <child> - <widget class="Gtk.Button" id="masterButton"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Type">TextOnly</property> - <property name="Label" translatable="yes">...</property> - <property name="UseUnderline">True</property> - <signal name="Clicked" handler="ShowMasterSelectionDialog" /> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="placeholderBox"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label2"> - <property name="MemberName" /> - <property name="LabelProp" translatable="yes">P_rimary placeholder: </property> - <property name="UseUnderline">True</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> - <child> - <widget class="Gtk.ComboBoxEntry" id="primaryPlaceholderCombo"> - <property name="MemberName" /> - <property name="WidthRequest">250</property> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="Validate" /> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </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> - </child> - </widget> - <packing> - <property name="Position">4</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="Gtk.Label" id="GtkLabel6"> - <property name="MemberName" /> - <property name="LabelProp" translatable="yes">Options</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </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="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - <child internal-child="ActionArea"> - <widget class="Gtk.HButtonBox" id="dialog1_ActionArea"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <property name="BorderWidth">5</property> - <property name="Size">2</property> - <property name="LayoutStyle">End</property> - <child> - <widget class="Gtk.Button" id="buttonCancel"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-cancel</property> - <property name="ResponseId">-6</property> - <property name="label">gtk-cancel</property> - </widget> - <packing> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Button" id="buttonOk"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-ok</property> - <property name="ResponseId">-5</property> - <property name="label">gtk-ok</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog" design-size="400 157"> - <property name="MemberName" /> - <property name="Title" translatable="yes">Add Controller</property> - <property name="WindowPosition">CenterOnParent</property> - <property name="Buttons">2</property> - <property name="HelpButton">False</property> - <child internal-child="VBox"> - <widget class="Gtk.VBox" id="dialog1_VBox"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <property name="BorderWidth">6</property> - <child> - <widget class="Gtk.Table" id="table1"> - <property name="MemberName" /> - <property name="NRows">2</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="Gtk.Label" id="label1"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">_Name:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">nameEntry</property> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label2"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">_Template:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">templateCombo</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="nameEntry"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - <signal name="Changed" handler="Validate" /> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.ComboBox" id="templateCombo"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - </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">False</property> - <property name="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - </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> - </child> - <child internal-child="ActionArea"> - <widget class="Gtk.HButtonBox" id="dialog1_ActionArea"> - <property name="MemberName" /> - <property name="Spacing">10</property> - <property name="BorderWidth">5</property> - <property name="Size">2</property> - <property name="LayoutStyle">End</property> - <child> - <widget class="Gtk.Button" id="buttonCancel"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-cancel</property> - <property name="ResponseId">-6</property> - <property name="label">gtk-cancel</property> - </widget> - <packing> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Button" id="buttonOk"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-ok</property> - <property name="ResponseId">-5</property> - <property name="label">gtk-ok</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> -</stetic-interface>
\ No newline at end of file diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.Mvc.dll b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.Mvc.dll Binary files differdeleted file mode 100755 index f05ae7c9bc..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.Mvc.dll +++ /dev/null diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.Razor.dll b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.Razor.dll Binary files differdeleted file mode 100755 index 59058c5346..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.Razor.dll +++ /dev/null diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.WebPages.Razor.dll b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.WebPages.Razor.dll Binary files differdeleted file mode 100755 index 0772e6e8b6..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.WebPages.Razor.dll +++ /dev/null diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.WebPages.dll b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.WebPages.dll Binary files differdeleted file mode 100755 index cb749797c1..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/System.Web.WebPages.dll +++ /dev/null diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/md-aspnet.snk b/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/md-aspnet.snk Binary files differdeleted file mode 100644 index be6bf28179..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/lib/md-aspnet.snk +++ /dev/null diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Makefile.am b/main/src/addins/AspNet/MonoDevelop.AspNet/Makefile.am deleted file mode 100644 index c9cc87438f..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -include $(top_srcdir)/xbuild.include diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/AspNetDeployServiceExtension.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/AspNetDeployServiceExtension.cs deleted file mode 100644 index 5675337d7c..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/AspNetDeployServiceExtension.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// AspNetDeployServiceExtension.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2008 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 System.IO; - -using MonoDevelop.Projects; -using MonoDevelop.Deployment; - -namespace MonoDevelop.AspNet.Deployment -{ - - - public class AspNetDeployServiceExtension : DeployServiceExtension - { - - public override DeployFileCollection GetProjectDeployFiles (DeployContext ctx, Project project, - ConfigurationSelector configuration) - { - DeployFileCollection files = base.GetProjectDeployFiles (ctx, project, configuration); - - AspNetAppProject aspProj = project as AspNetAppProject; - - //none of this needs to happen if it's just happening during solution build - if (aspProj == null || ctx.ProjectBuildOnly) - return files; - - //audit the DeployFiles to make sure they're allowed and laid out for ASP.NET - foreach (DeployFile df in files) { - //rewrite ProgramFiles target to ASP.NET's "bin" target - if (df.TargetDirectoryID == TargetDirectory.ProgramFiles) { - df.RelativeTargetPath = Path.Combine ("bin", df.RelativeTargetPath); - } - } - - //add all ASP.NET files marked as content. They go relative to the application root, which we assume to be ProgramFiles - foreach (ProjectFile pf in aspProj.Files) { - if (pf.BuildAction == BuildAction.Content) - files.Add (new DeployFile (aspProj, pf.FilePath, pf.ProjectVirtualPath, TargetDirectory.ProgramFiles)); - } - - return files; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployCommands.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployCommands.cs deleted file mode 100644 index 0c6bfebe70..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployCommands.cs +++ /dev/null @@ -1,55 +0,0 @@ -// WebDeployCommands.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 MonoDevelop.Components.Commands; -using MonoDevelop.AspNet; -using MonoDevelop.Ide; - -namespace MonoDevelop.AspNet.Deployment -{ - - public enum WebDeployCommands - { - DeployProject, - } - - class ProjectDeployHandler : CommandHandler - { - protected override void Run () - { - AspNetAppProject project = (AspNetAppProject) IdeApp.ProjectOperations.CurrentSelectedProject; - WebDeployService.DeployDialog (project); - } - - protected override void Update (CommandInfo info) - { - AspNetAppProject project = IdeApp.ProjectOperations.CurrentSelectedProject as AspNetAppProject; - info.Visible = (project != null); - info.Enabled = (project != null); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployLaunchDialog.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployLaunchDialog.cs deleted file mode 100644 index 7ea86210d2..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployLaunchDialog.cs +++ /dev/null @@ -1,130 +0,0 @@ -// WebDeployLaunchDialog.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 System.Collections.Generic; -using Gtk; - -using MonoDevelop.AspNet; -using MonoDevelop.Ide; - -namespace MonoDevelop.AspNet.Deployment -{ - - public partial class WebDeployLaunchDialog : Dialog - { - Gtk.ListStore targetStore = new Gtk.ListStore (typeof (string), typeof(WebDeployTarget), typeof (bool)); - const int LISTCOL_Text = 0; - const int LISTCOL_Target = 1; - const int LISTCOL_Checked = 2; - AspNetAppProject project; - - public WebDeployLaunchDialog (AspNetAppProject project) - { - this.Build(); - - this.project = project; - - //set up the sort order - targetStore.SetSortFunc (LISTCOL_Text, delegate (TreeModel m, TreeIter a, TreeIter b) { - return string.Compare ((string) m.GetValue (a, LISTCOL_Text), (string) m.GetValue (b, LISTCOL_Text)); - }); - targetStore.SetSortColumnId (LISTCOL_Text, SortType.Ascending); - - //set up the view - targetView.Model = targetStore; - targetView.HeadersVisible = false; - - CellRendererToggle toggleRenderer = new CellRendererToggle (); - toggleRenderer.Activatable = true; - toggleRenderer.Xpad = 6; - TreeViewColumn checkCol = new TreeViewColumn ("", toggleRenderer, "active", LISTCOL_Checked); - checkCol.Expand = false; - targetView.AppendColumn (checkCol); - toggleRenderer.Toggled += HandleToggle; - - CellRendererText textRenderer = new CellRendererText (); - textRenderer.WrapMode = Pango.WrapMode.WordChar; - targetView.AppendColumn ("", textRenderer, "markup", LISTCOL_Text); - - fillStore (); - } - - void fillStore () - { - int count = 0; - TreeIter lastIter = TreeIter.Zero; - foreach (WebDeployTarget target in project.WebDeployTargets) { - if (target.ValidForDeployment) { - lastIter = targetStore.AppendValues (target.GetMarkup (), target, false); - count++; - } - } - - //select some targets by default if appropriate - if (count == 1) { - targetStore.SetValue (lastIter, LISTCOL_Checked, true); - } - //FIXME: store/load other selections in .userprefs file - UpdateButtonState (); - } - - public ICollection<WebDeployTarget> GetSelectedTargets () - { - List<WebDeployTarget> targets = new List<WebDeployTarget> (); - foreach (object[] row in targetStore) - if (((bool)row [LISTCOL_Checked]) == true) - targets.Add ((WebDeployTarget) row [LISTCOL_Target]); - return targets; - } - - void HandleToggle (object sender, ToggledArgs e) - { - TreeIter iter; - if (targetStore.GetIter (out iter, new TreePath (e.Path))) { - bool currentVal = (bool) targetStore.GetValue (iter, LISTCOL_Checked); - targetStore.SetValue (iter, LISTCOL_Checked, !currentVal); - } - UpdateButtonState (); - } - - void UpdateButtonState () - { - bool targetSelected = false; - foreach (object[] row in targetStore) - if (((bool)row [LISTCOL_Checked]) == true) - targetSelected = true; - buttonDeploy.Sensitive = targetSelected; - } - - protected virtual void editTargetsClicked (object sender, System.EventArgs e) - { - IdeApp.ProjectOperations.ShowOptions (project, "MonoDevelop.AspNet.Deployment"); - targetStore.Clear (); - fillStore (); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployOptionsPanel.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployOptionsPanel.cs deleted file mode 100644 index 55dc29d769..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployOptionsPanel.cs +++ /dev/null @@ -1,54 +0,0 @@ -// WebDeployOptionsPanel.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 Gtk; - -using MonoDevelop.Ide.Projects; -using MonoDevelop.Core; -using MonoDevelop.AspNet; -using MonoDevelop.Ide.Gui.Dialogs; - -namespace MonoDevelop.AspNet.Deployment -{ - - public class WebDeployOptionsPanel : ItemOptionsPanel - { - WebDeployOptionsPanelWidget panel; - - public override Widget CreatePanelWidget () - { - AspNetAppProject project = (AspNetAppProject) ConfiguredProject; - return panel = new WebDeployOptionsPanelWidget (project); - } - - public override void ApplyChanges () - { - AspNetAppProject project = (AspNetAppProject) ConfiguredProject; - panel.Store (project); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployOptionsPanelWidget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployOptionsPanelWidget.cs deleted file mode 100644 index c1fb4f5453..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployOptionsPanelWidget.cs +++ /dev/null @@ -1,135 +0,0 @@ -// WebDeployOptionsPanelWidget.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 Gtk; - -using MonoDevelop.Core; -using MonoDevelop.AspNet; - -namespace MonoDevelop.AspNet.Deployment -{ - - public partial class WebDeployOptionsPanelWidget : Gtk.Bin - { - Gtk.ListStore targetList = new Gtk.ListStore (typeof (string), typeof(WebDeployTarget)); - const int LISTCOL_TEXT = 0; - const int LISTCOL_TARGET = 1; - - //because MD doesn't use an instant-apply settings model, we have to make a local - //copy of the collection to amke sure that cancelling changes works - WebDeployTargetCollection localCollection; - - public WebDeployOptionsPanelWidget (AspNetAppProject project) - { - localCollection = project.WebDeployTargets.Clone (); - - //fill model and set it up - this.Build (); - foreach (WebDeployTarget target in localCollection) { - targetList.AppendValues (target.GetMarkup (), target); - } - targetView.HeadersVisible = false; - targetList.SetSortFunc (LISTCOL_TEXT, delegate (TreeModel m, TreeIter a, TreeIter b) { - return string.Compare ((string) m.GetValue (a, LISTCOL_TEXT), (string) m.GetValue (b, LISTCOL_TEXT)); - }); - targetList.SetSortColumnId (LISTCOL_TEXT, SortType.Ascending); - - //set up the view - targetView.Model = targetList; - targetView.AppendColumn ("", new Gtk.CellRendererText (), "markup", LISTCOL_TEXT); - targetView.Selection.Changed += delegate (object sender, EventArgs e) { - UpdateButtonState (); - }; - - UpdateButtonState (); - } - - public void Store (AspNetAppProject project) - { - project.WebDeployTargets.Clear (); - foreach (WebDeployTarget target in localCollection) - project.WebDeployTargets.Add ((WebDeployTarget) target.Clone ()); - } - - protected virtual void AddActivated (object sender, System.EventArgs e) - { - WebDeployTarget newTarget = new WebDeployTarget (); - localCollection.Add (newTarget); - TreeIter newIter = targetList.AppendValues (newTarget.GetMarkup(), newTarget); - targetView.Selection.SelectIter (newIter); - RunEditor (newTarget); - UpdateTextForIter (newIter); - } - - void UpdateTextForIter (TreeIter iter) - { - WebDeployTarget target = (WebDeployTarget) targetList.GetValue (iter, LISTCOL_TARGET); - targetList.SetValue (iter, LISTCOL_TEXT, target.GetMarkup ()); - } - - protected virtual void RemoveActivated (object sender, System.EventArgs e) - { - TreeIter iter; - if(targetView.Selection.GetSelected (out iter)) { - WebDeployTarget targetToRemove = (WebDeployTarget) targetList.GetValue (iter, LISTCOL_TARGET); - localCollection.Remove (targetToRemove); - targetList.Remove (ref iter); - } - - if (targetList.IterIsValid (iter) || (localCollection.Count > 0 && targetList.IterNthChild (out iter, localCollection.Count - 1))) - targetView.Selection.SelectIter (iter); - } - - protected virtual void EditActivated (object sender, System.EventArgs e) - { - TreeIter iter; - if (targetView.Selection.GetSelected (out iter)) { - WebDeployTarget target = (WebDeployTarget) targetList.GetValue (iter, LISTCOL_TARGET); - RunEditor (target); - UpdateTextForIter (iter); - } - } - - void UpdateButtonState () - { - TreeIter iter; - bool selected = targetView.Selection.GetSelected (out iter); - editButton.Sensitive = selected; - removeButton.Sensitive = selected; - } - - void RunEditor (WebDeployTarget target) - { - var targetEditor = new WebDeployTargetEditor (); - targetEditor.Load (target); - targetEditor.Show (); - - if (MonoDevelop.Ide.MessageService.ShowCustomDialog (targetEditor, (Gtk.Window) Toplevel) == (int) ResponseType.Ok) - targetEditor.Save (target); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployResolver.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployResolver.cs deleted file mode 100644 index aa9c5e7a4c..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployResolver.cs +++ /dev/null @@ -1,52 +0,0 @@ -// WebDeployResolver.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 System.IO; - -using MonoDevelop.Deployment; - -namespace MonoDevelop.AspNet.Deployment -{ - - public class WebDeployResolver : IDirectoryResolver - { - - public string GetDirectory (DeployContext context, string folderId) - { - if (folderId == TargetDirectory.ProgramFiles) - return string.Empty; - - // While this would seem to be what the deploy API expects, for a web deploy it could - // produces results the user wouldn't expect - //if (context.Prefix != null) - // directory = Path.Combine (context.Prefix, directory); - - return null; - } - } - -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployService.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployService.cs deleted file mode 100644 index 352048d0b1..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployService.cs +++ /dev/null @@ -1,148 +0,0 @@ -// WebDeployService.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 System.Threading; -using System.Collections.Generic; -using Gtk; - -using MonoDevelop.Core; -using MonoDevelop.Ide.ProgressMonitoring; -using MonoDevelop.Deployment; -using MonoDevelop.Deployment.Gui; -using MonoDevelop.AspNet; -using MonoDevelop.Projects; -using MonoDevelop.Ide; - -namespace MonoDevelop.AspNet.Deployment -{ - - public class WebDeployService - { - private WebDeployService () - { - } - - static public void Deploy (AspNetAppProject project, WebDeployTarget target, ConfigurationSelector configuration) - { - Deploy (project, new WebDeployTarget[] { target }, configuration); - } - - static public void Deploy (AspNetAppProject project, ICollection<WebDeployTarget> targets, ConfigurationSelector configuration) - { - //project needs to be built before it can be deployed - IdeApp.ProjectOperations.Build (project); - - //set up and launch a copying thread - DeployThreadParams threadParams = new DeployThreadParams (); - threadParams.Context = new DeployContext (new WebDeployResolver (), null, null); - threadParams.Files = MonoDevelop.Deployment.DeployService.GetDeployFiles (threadParams.Context, - project, configuration); - - Dictionary<string, string> taskAliases = new Dictionary<string,string> (); - foreach (WebDeployTarget target in targets) { - threadParams.Targets.Add ((WebDeployTarget) target.Clone ()); - taskAliases.Add (target.LocationName, target.GetMarkup ()); - } - - var monitor = new MultiTaskDialogProgressMonitor (true, true, true, taskAliases); - monitor.SetDialogTitle (MonoDevelop.Core.GettextCatalog.GetString ("Web Deployment Progress")); - monitor.SetOperationTitle (MonoDevelop.Core.GettextCatalog.GetString ("Deploying {0}...", project.Name)); - threadParams.Monitor = monitor; - - Thread deployThread = new Thread (new ParameterizedThreadStart (DoDeploy)); - deployThread.Name = "Web deploy"; - deployThread.Start (threadParams); - } - - - static void DoDeploy (object o) - { - var threadParams = (DeployThreadParams) o; - try { - IFileReplacePolicy replacePolicy = new DialogFileReplacePolicy (); - - foreach (WebDeployTarget target in threadParams.Targets) { - if (threadParams.Monitor.IsCancelRequested) - break; - try { - - target.FileCopier.CopyFiles (threadParams.Monitor, replacePolicy, - threadParams.Files, threadParams.Context); - } - catch (OperationCanceledException ex) { - threadParams.Monitor.ReportError (GettextCatalog.GetString ("Web deploy aborted."), ex); - break; - } - catch (InvalidOperationException ex) { - threadParams.Monitor.ReportError (GettextCatalog.GetString ("Web deploy aborted."), ex); - break; - } - } - } catch (Exception e) { - MonoDevelop.Core.LoggingService.LogError ("Unhandled exception in the web deploy thread", e); - MonoDevelop.Ide.MessageService.ShowException (e, "Web deploy failed due to unhandled exception"); - } finally { - try { - threadParams.Monitor.Dispose (); - } catch (Exception ex2) { - MonoDevelop.Core.LoggingService.LogError ("Unhandled exception disposing the web deploy thread", ex2); - } - } - } - - static public void DeployDialog (AspNetAppProject project) - { - var dialog = new WebDeployLaunchDialog (project) { - Modal = true, - }; - - ICollection<WebDeployTarget> targets = null; - - var response = ResponseType.None; - try { - do { - response = (ResponseType) MessageService.RunCustomDialog (dialog, MessageService.RootWindow); - } while (response != ResponseType.Ok && response != ResponseType.Cancel && response != ResponseType.DeleteEvent); - - if (response == Gtk.ResponseType.Ok) - targets = dialog.GetSelectedTargets (); - } finally { - dialog.Destroy (); - } - if (targets != null && targets.Count > 0) - Deploy (project, targets, IdeApp.Workspace.ActiveConfiguration); - } - - class DeployThreadParams - { - public List<WebDeployTarget> Targets = new List<WebDeployTarget> (); - public DeployFileCollection Files; - public IProgressMonitor Monitor; - public DeployContext Context; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTarget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTarget.cs deleted file mode 100644 index 6e6a9beb9e..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTarget.cs +++ /dev/null @@ -1,105 +0,0 @@ -// WebDeployTarget.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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.Serialization; -using MonoDevelop.Deployment; - -namespace MonoDevelop.AspNet.Deployment -{ - - - public class WebDeployTarget - { - [ItemProperty ("Name")] - internal string name; - - [ItemProperty ("FileCopier")] - FileCopyConfiguration fileCopier; - - internal WebDeployTargetCollection parent; - - public WebDeployTarget () - { - } - - public object Clone () - { - return MemberwiseClone (); - } - - public string Name { - get { return name; } - set { - name = value; - //when bound to a parent, check to avoid name collisions - if (parent != null) - parent.EnforceUniqueName (this); - } - } - - //returns GTK markup for lists - public string GetMarkup () - { - string locationLabel = MonoDevelop.Core.GettextCatalog.GetString ("Location: {0}", LocationName); - return string.Format ("<b>{0}</b>\n{1}", Name, locationLabel); - } - - public string LocationName { - get { - return ValidForDeployment ? - fileCopier.FriendlyLocation : - MonoDevelop.Core.GettextCatalog.GetString ("Not set"); - } - } - - public bool ValidForDeployment { - get { - return (fileCopier != null && !string.IsNullOrEmpty (fileCopier.FriendlyLocation)); - } - } - - public FileCopyConfiguration FileCopier - { - get { return fileCopier; } - set { fileCopier = value; } - } - - public override bool Equals (object o) - { - WebDeployTarget other = o as WebDeployTarget; - if (other != null) - return fileCopier == other.fileCopier && name == other.name; - return false; - } - - public override int GetHashCode () - { - return fileCopier.GetHashCode () + name.GetHashCode (); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTargetCollection.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTargetCollection.cs deleted file mode 100644 index 5e4a9feca2..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTargetCollection.cs +++ /dev/null @@ -1,146 +0,0 @@ -// DeployTargets.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 System.Collections; - -namespace MonoDevelop.AspNet.Deployment -{ - - public class WebDeployTargetCollection : CollectionBase - { - - public int Add (WebDeployTarget target) - { - return List.Add (target); - } - - public WebDeployTarget this [int index] { - get { - return (WebDeployTarget) List [index]; - } - } - - public WebDeployTarget this [string name] { - get { - foreach (WebDeployTarget c in this) - if (c.Name == name) - return c; - return null; - } - } - - public void Remove (WebDeployTarget target) - { - List.Remove (target); - } - - public void Remove (string name) - { - int nameAt = ContainsName (name); - if (nameAt >= 0) - List.RemoveAt (nameAt); - } - - int ContainsName (string name) - { - for (int i = 0; i < Count; i++) - if (this [i].Name == name) - return i; - return -1; - } - - //this is used to ensure that each target has a unique name within the collection - bool settingName = false; - internal void EnforceUniqueName (WebDeployTarget target) - { - if (settingName) - return; - - bool foundSameName = false; - if (!string.IsNullOrEmpty (target.Name)) { - foreach (WebDeployTarget c in this) - if (c != target && c.Name == target.Name) - foundSameName = true; - } - if (!foundSameName) - return; - - int newIndex = 1; - do { - string newName = MonoDevelop.Core.GettextCatalog.GetString ("Web Deploy Target {0}", newIndex); - if (ContainsName (newName) < 0) { - settingName = true; - target.name = newName; - settingName = false; - return; - } - newIndex++; - } while (newIndex < int.MaxValue); - throw new InvalidOperationException ("Ran out of indices for default target names."); - } - - protected override void OnSet (int index, object oldValue, object newValue) - { - WebDeployTarget target = (WebDeployTarget) newValue; - target.parent = this; - EnforceUniqueName (target); - base.OnSet (index, oldValue, newValue); - } - - protected override void OnInsert (int index, object value) - { - WebDeployTarget target = (WebDeployTarget) value; - target.parent = this; - EnforceUniqueName (target); - base.OnInsert (index, value); - } - - protected override void OnRemove (int index, object value) - { - WebDeployTarget target = (WebDeployTarget) value; - target.parent = null; - base.OnRemove (index, value); - } - - - internal WebDeployTargetCollection Clone () - { - WebDeployTargetCollection clone = new WebDeployTargetCollection (); - foreach (WebDeployTarget target in this) - clone.Add ((WebDeployTarget) target.Clone ()); - return clone; - } - - public bool ContainsTargetValidForDeployment () - { - foreach (WebDeployTarget target in this) - if (target.ValidForDeployment) - return true; - return false; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTargetEditor.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTargetEditor.cs deleted file mode 100644 index 1f474d2901..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployTargetEditor.cs +++ /dev/null @@ -1,64 +0,0 @@ -// WebDeployTargetEditor.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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.Deployment; -using MonoDevelop.Deployment.Targets; -using MonoDevelop.Deployment.Gui; - -namespace MonoDevelop.AspNet.Deployment -{ - - public partial class WebDeployTargetEditor : Gtk.Dialog - { - FileCopyConfigurationSelector selector; - public WebDeployTargetEditor() - { - this.Build(); - - selector = new FileCopyConfigurationSelector (); - fileCopyBox.PackStart (selector, true, true, 0); - } - - public void Load (WebDeployTarget target) - { - nameEntry.Text = target.Name; - FileCopyConfiguration fConfig = null; - try { - fConfig = target.FileCopier == null? null : target.FileCopier.Clone (); - } catch (InvalidOperationException) {// if the handler can't be found - } - selector.Configuration = fConfig; - } - - public void Save (WebDeployTarget target) - { - target.Name = nameEntry.Text; - target.FileCopier = selector.Configuration; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployWindow.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployWindow.cs deleted file mode 100644 index a71d71e7a7..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployWindow.cs +++ /dev/null @@ -1,167 +0,0 @@ -// WebDeployWindow.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 System.Collections.Generic; -using System.Threading; -using Gtk; - -using MonoDevelop.Ide.Gui; -using MonoDevelop.Deployment; -using MonoDevelop.Core; -using MonoDevelop.Core.ProgressMonitoring; -using AspNetAddIn; - -namespace MonoDevelop.AspNet.Deployment -{ - - public partial class WebDeployWindow : Gtk.Dialog//, IProgressMonitor, IAsyncOperation - { - IList<WebDeployTarget> targets; - AspNetAppProject project; - DeployFileCollection deployFiles; - - public WebDeployWindow (AspNetAppProject project, IList<WebDeployTarget> targets) - { - this.Build(); - this.targets = targets; - this.project = project; - deployFiles = project.GetDeployFiles (); - } - /* - protected override void OnRealized () - { - base.OnRealized (); - } - - void LaunchDeployThread () - { - Thread deployThread = new Thread (DeployThread); - deployThread.Start (); - } - - void DeployThread () - { - IFileReplacePolicy replacePolicy = new MonoDevelop.Deployment.Gui.DialogFileReplacePolicy (); - - foreach (WebDeployTarget target in targets) { - FileCopyHandler handler = target.FileCopier.Handler; - //handler.CopyFiles (this, replacePolicy, target.FileCopier, deployFiles); - } - -#region IProgressMonitor - - ProgressTracker progressTracker = new ProgressTracker (); - - public void IProgressMonitor.ReportError (string message, System.Exception exception) - { - } - - public void IProgressMonitor.ReportSuccess (string message) - { - } - - public void IProgressMonitor.ReportWarning (string message) - { - } - - public void IProgressMonitor.Step (int work) - { - progressTracker.Step (work); - } - - public void IProgressMonitor.EndTask () - { - progressTracker.EndTask (); - } - - public void IProgressMonitor.BeginStepTask (string name, int totalWork, int stepSize) - { - progressTracker.BeginStepTask (name, totalWork, stepSize); - } - - public void IProgressMonitor.BeginTask (string name, int totalWork) - { - progressTracker.BeginTask (name, totalWork); - } - - public System.IO.TextWriter IProgressMonitor.Log { - get { return null; } - } - - MonitorHandler IProgressMonitor_cancelRequested; - event MonitorHandler IProgressMonitor.CancelRequested { - add { - lock(privateLock) - IProgressMonitor_cancelRequested += value; - } - remove { - lock (privateLock) - IProgressMonitor_cancelRequested -= value; - } - } - - bool IProgressMonitor_cancelRequested = false; - bool IProgressMonitor.IsCancelRequested { - //FIXME - get { return false; } - } - - IAsyncOperation IProgressMonitor.AsyncOperation { - get { return (IAsyncOperation) this; } - } - - object privateLock = new object (); - object IProgressMonitor.SyncRoot { - get { return privateLock; } - } - -#endregion - -#region IAsyncOperation - void IAsyncOperation.WaitForCompleted () - { - } - - void IAsyncOperation.Cancel () - { - } - - event MonoDevelop.Core.OperationHandler IAsyncOperation.Completed; - - bool IAsyncOperation.IsCompleted { - get { - } - } - - bool IAsyncOperation.Success { - get { - } - } - -#endregion*/ - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetConfigurationPanel.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetConfigurationPanel.cs deleted file mode 100644 index 553c3b5a4e..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetConfigurationPanel.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// AspNetConfigurationPanel.cs: Edits complication configuration options -// of an AspNetAppProject -// -// Authors: -// Michael Hutchinson <m.j.hutchinson@gmail.com> -// -// Copyright (C) 2006 Michael Hutchinson -// -// -// This source code is licenced under The MIT License: -// -// 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 Gtk; -using MonoDevelop.Ide.Projects; -using MonoDevelop.Core; -using MonoDevelop.Ide.Gui.Dialogs; - -namespace MonoDevelop.AspNet.Gui -{ - - class AspNetConfigurationPanel : MultiConfigItemOptionsPanel - { - AspNetConfigurationPanelWidget panel; - - public override Widget CreatePanelWidget () - { - return panel = new AspNetConfigurationPanelWidget (); - } - - public override void LoadConfigData () - { - panel.Load ((AspNetAppProjectConfiguration) CurrentConfiguration); - } - - public override void ApplyChanges () - { - panel.Store ((AspNetAppProjectConfiguration) CurrentConfiguration); - } - } -} - diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetConfigurationPanelWidget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetConfigurationPanelWidget.cs deleted file mode 100644 index 20d857f6e2..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetConfigurationPanelWidget.cs +++ /dev/null @@ -1,32 +0,0 @@ -// ------------------------------------------------------------------------------ -// <autogenerated> -// This code was generated by a tool. -// Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </autogenerated> -// ------------------------------------------------------------------------------ - -using MonoDevelop.Core; - -namespace MonoDevelop.AspNet.Gui -{ - partial class AspNetConfigurationPanelWidget : Gtk.Bin - { - public AspNetConfigurationPanelWidget () - { - this.Build(); - } - - public void Load (AspNetAppProjectConfiguration configuration) - { - disableCodeBehindGeneration.Active = configuration.DisableCodeBehindGeneration; - } - - public void Store (AspNetAppProjectConfiguration configuration) - { - configuration.DisableCodeBehindGeneration = disableCodeBehindGeneration.Active; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs deleted file mode 100644 index 6b29cee292..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs +++ /dev/null @@ -1,84 +0,0 @@ -//// -//// AspProjectDom.cs -//// -//// Author: -//// Michael Hutchinson <mhutchinson@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 System.Collections.Generic; -//using System.Linq; -//using ICSharpCode.NRefactory.TypeSystem; -//using ICSharpCode.NRefactory.TypeSystem.Implementation; -// -// -//namespace MonoDevelop.AspNet.Gui -//{ -// /// <summary> -// /// This wraps a project dom and adds the compilation information from the ASP.NET page to the DOM to lookup members -// /// on the page. -// /// </summary> -// class AspProjectDomWrapper : TypeResolveContextDecorator -// { -// DocumentInfo info; -// -// //FIXME: use all the doms -// //FIXME: merge the items from the members visitor too -// public AspProjectDomWrapper (DocumentInfo info) : base (info.References[0]) -// { -// this.info = info; -// } -// -// ITypeDefinition constructedType = null; -// ITypeDefinition CheckType (ITypeDefinition type) -// { -// if (type == null) -// return null; -// var cu = info.ParsedDocument; -// var firstType = cu.TopLevelTypeDefinitions.FirstOrDefault (); -// if (firstType != null && firstType.FullName == type.FullName) { -// if (constructedType != null) -// return constructedType; -// constructedType = CompoundTypeDefinition.Create (new [] { firstType, type, info.CodeBesideClass }); -//// constructedType.GetProjectContent () = this; -// return constructedType; -// } -// return type; -// } -// -// public override ITypeDefinition GetTypeDefinition (string nameSpace, string name, int typeParameterCount, StringComparer nameComparer) -// { -// return CheckType (base.GetTypeDefinition (nameSpace, name, typeParameterCount, nameComparer)); -// } -// -// public override IEnumerable<ITypeDefinition> GetTypes() -// { -// return base.GetTypes ().Select (t => CheckType (t)); -// } -// -// public override IEnumerable<ITypeDefinition> GetTypes(string nameSpace, StringComparer nameComparer) -// { -// return base.GetTypes (nameSpace, nameComparer).Select (t => CheckType (t)); -// } -// -// } -//} -// diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/XspOptionsPanelWidget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/XspOptionsPanelWidget.cs deleted file mode 100644 index cabb69c96f..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/XspOptionsPanelWidget.cs +++ /dev/null @@ -1,119 +0,0 @@ -// XspOptionsPanelWidget.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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 Gtk; - -using MonoDevelop.Core; - -namespace MonoDevelop.AspNet.Gui -{ - - - public partial class XspOptionsPanelWidget : Gtk.Bin - { - - public XspOptionsPanelWidget (AspNetAppProject project) - { - this.Build(); - - XspParameters xPar = project.XspParameters; - - //index should be equivalent to XspSslMode enum - ((ListStore) sslMode.Model).Clear (); - sslMode.AppendText (GettextCatalog.GetString ("None")); - sslMode.AppendText (GettextCatalog.GetString ("Enabled")); - sslMode.AppendText (GettextCatalog.GetString ("Accept Client Certificates")); - sslMode.AppendText (GettextCatalog.GetString ("Require Client Certificates")); - - //index should be equivalent to XspSslProtocol enum - ((ListStore) sslProtocol.Model).Clear (); - sslProtocol.AppendText (GettextCatalog.GetString ("Default")); - sslProtocol.AppendText ("TLS"); - sslProtocol.AppendText ("SSL 2"); - sslProtocol.AppendText ("SSL 3"); - - ((ListStore) keyType.Model).Clear (); - keyType.AppendText (GettextCatalog.GetString ("None")); - keyType.AppendText ("Pkcs12"); - keyType.AppendText ("PVK"); - - ((ListStore) passwordOptions.Model).Clear (); - passwordOptions.AppendText (GettextCatalog.GetString ("None")); - passwordOptions.AppendText (GettextCatalog.GetString ("Ask")); - passwordOptions.AppendText (GettextCatalog.GetString ("Store (insecure)")); - - //set to valid port range - portNumber.SetRange (0, UInt16.MaxValue); - - //load all options - ipAddress.Text = xPar.Address; - portNumber.Value = xPar.Port; - verboseCheck.Active = xPar.Verbose; - sslMode.Active = (int) xPar.SslMode; - sslProtocol.Active = (int) xPar.SslProtocol; - keyType.Active = (int) xPar.KeyType; - keyLocation.Path = xPar.PrivateKeyFile; - certLocation.Path = xPar.CertificateFile; - passwordOptions.Active = (int) xPar.PasswordOptions; - passwordEntry.Text = xPar.PrivateKeyPassword; - } - - public void Store (AspNetAppProject project) - { - XspParameters xPar = project.XspParameters; - - xPar.Address = ipAddress.Text; - xPar.Port = System.Convert.ToUInt16 (portNumber.Value); - xPar.Verbose = verboseCheck.Active; - xPar.SslMode = (XspSslMode) sslMode.Active; - xPar.SslProtocol = (XspSslProtocol) sslProtocol.Active; - xPar.KeyType = (XspKeyType) keyType.Active; - xPar.PrivateKeyFile = keyLocation.Path; - xPar.CertificateFile = certLocation.Path; - xPar.PasswordOptions = (XspPasswordOptions) passwordOptions.Active; - xPar.PrivateKeyPassword = passwordEntry.Text; - } - - void updateSensitivity (object sender, EventArgs e) - { - bool sslEnabled = ((XspSslMode) sslMode.Active) != XspSslMode.None; - sslProtocol.Sensitive = sslEnabled; - keyType.Sensitive = sslEnabled; - - bool keyEnabled = (sslEnabled)? (keyType.Active != 0) : false; - keyLocation.Sensitive = keyEnabled; - passwordOptions.Sensitive = keyEnabled; - - bool certEnabled = (keyEnabled)? (keyType.Active == 2) : false; - certLocation.Sensitive = certEnabled; - - passwordEntry.Sensitive = (keyEnabled)? (passwordOptions.Active == 2) : false; - if (!passwordEntry.Sensitive) - passwordEntry.Text = ""; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs deleted file mode 100644 index c2819e6edc..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs +++ /dev/null @@ -1,205 +0,0 @@ -// -// MemberListVisitor.cs: Collects members from ASP.NET document tree, -// for code completion and other services. -// -// Authors: -// Michael Hutchinson <m.j.hutchinson@gmail.com> -// -// Copyright (C) 2006 Michael Hutchinson -// -// -// This source code is licenced under The MIT License: -// -// 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 System.Collections.Generic; - -using MonoDevelop.Core; -using MonoDevelop.AspNet.Parser.Dom; -using ICSharpCode.NRefactory.TypeSystem; -using ICSharpCode.NRefactory.CSharp; -using ICSharpCode.NRefactory; -using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; - -namespace MonoDevelop.AspNet.Parser -{ - //purpose is to find all named tags for code completion and compilation of base class - public class MemberListVisitor : Visitor - { - DocumentReferenceManager refMan; - - public MemberListVisitor (DocumentReferenceManager refMan) - { - this.refMan = refMan; - this.Errors = new List<Error> (); - this.Members = new Dictionary<string,CodeBehindMember> (); - } - - public override void Visit (TagNode node) - { - if (!node.Attributes.IsRunAtServer ()) - return; - - string id = node.Attributes ["id"] as string; - - if (id == null) - return; - - if (Members.ContainsKey (id)) { - AddError (ErrorType.Error, node.Location, GettextCatalog.GetString ("Tag ID must be unique within the document: '{0}'.", id)); - return; - } - - string [] s = node.TagName.Split (':'); - string prefix = (s.Length == 1)? "" : s[0]; - string name = (s.Length == 1)? s[0] : s[1]; - if (s.Length > 2) { - AddError (ErrorType.Error, node.Location, GettextCatalog.GetString ("Malformed tag name: '{0}'.", node.TagName)); - return; - } - - IType type = null; - try { - type = refMan.GetType (prefix, name, node.Attributes ["type"] as string); - } catch (Exception e) { - AddError (ErrorType.Error, node.Location, "Unknown parser error:" + e.ToString ()); - return; - } - - if (type == null) { - AddError (ErrorType.Error, node.Location, GettextCatalog.GetString ("The tag type '{0}{1}{2}' has not been registered.", prefix, string.IsNullOrEmpty(prefix)? string.Empty:":", name)); - return; - } - - Members [id] = new CodeBehindMember (id, type, new TextLocation (node.Location.BeginLine, node.Location.BeginColumn)); - } - - internal void AddError (ErrorType type, ILocation location, string message) - { - Errors.Add (new Error (type, message, location.BeginLine, location.BeginColumn)); - } - - public IDictionary<string,CodeBehindMember> Members { get; private set; } - public IList<Error> Errors { get; private set; } - } - - public class MemberListBuilder - { - DocumentReferenceManager docRefMan; - XDocument xDocument; - - public IDictionary<string,CodeBehindMember> Members { get; private set; } - public IList<Error> Errors { get; private set; } - - public MemberListBuilder (DocumentReferenceManager refMan, XDocument xDoc) - { - docRefMan = refMan; - xDocument = xDoc; - - Errors = new List<Error> (); - Members = new Dictionary<string,CodeBehindMember> (); - } - - public void Build () - { - try { - AddMember (xDocument.RootElement); - } catch (Exception ex) { - Errors.Add (new Error (ErrorType.Error, "Unknown parser error: " + ex.ToString ())); - } - } - - void AddMember (XElement element) - { - string id = GetAttributeValueCI (element.Attributes, "id"); - if (IsRunatServer (element) && (id != string.Empty)) { - - if (Members.ContainsKey (id)) { - Errors.Add (new Error ( - ErrorType.Error, - GettextCatalog.GetString ("Tag ID must be unique within the document: '{0}'.", id), - element.Region - ) - ); - } else { - string controlType = GetAttributeValueCI (element.Attributes, "type"); - IType type = docRefMan.GetType (element.Name.Prefix, element.Name.Name, controlType); - - if (type == null) { - Errors.Add ( - new Error ( - ErrorType.Error, - GettextCatalog.GetString ("The tag type '{0}{1}{2}' has not been registered.", - element.Name.Prefix, - element.Name.HasPrefix ? string.Empty : ":", - element.Name.Name), - element.Region - ) - ); - } else - Members [id] = new CodeBehindMember (id, type, element.Region.Begin); - } - - } - foreach (XNode node in element.Nodes) { - if (node is XElement) - AddMember (node as XElement); - } - } - - bool IsRunatServer (XElement el) - { - XName runat = new XName ("runat"); - foreach (XAttribute attr in el.Attributes) { - if ((attr.Name.ToLower () == runat) && (attr.Value.ToLower () == "server")) - return true; - } - return false; - } - - string GetAttributeValueCI (XAttributeCollection attributes, string key) - { - XName nameKey = new XName (key.ToLowerInvariant ()); - - foreach (XAttribute attr in attributes) { - if (attr.Name.ToLower () == nameKey) - return attr.Value; - } - return string.Empty; - } - } - - public class CodeBehindMember - { - public CodeBehindMember (string name, IType type, TextLocation location) - { - this.Name = name; - this.Type = type; - this.Location = location; - } - - public string Name { get; private set; } - public IType Type { get; private set; } - public TextLocation Location { get; private set; } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/Regexes.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/Regexes.cs deleted file mode 100644 index 255c0969bb..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/Regexes.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// QuickInfo.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2008 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 System.Text.RegularExpressions; - -namespace MonoDevelop.AspNet.Parser -{ - - - public static class Regexes - { - public static Regex DocType { - get { - return new Regex (@"<!DOCTYPE\s+(\w+)\s+PUBLIC\s+""(.+)""\s+""(.+)""\s*>", - RegexOptions.Compiled | RegexOptions.Singleline); - } - } - - public static Regex Directive { - get { - return new Regex (@"<%@\s*(\w+)\s+(.*)%>", RegexOptions.Compiled | RegexOptions.Singleline); - } - } - - public static Regex Expression { - get { - return new Regex (@"<%\s*([=$#]?)(.*)%>", RegexOptions.Compiled | RegexOptions.Singleline); - } - } - - public static Regex ServerTag { - get { - return new Regex (@"<\s*(?<prefix>\w+:)?(?<name>\w+)(?<attributes>(?:[^"">']|""[^""]*""|'[^']*')*runat\s*=\s*""server""(?:[^"">']|""[^""]*""|'[^']*')*>)", RegexOptions.Compiled | RegexOptions.Singleline); - } - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/WebFormReferenceManager.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/WebFormReferenceManager.cs deleted file mode 100644 index 0488c53d2f..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/WebFormReferenceManager.cs +++ /dev/null @@ -1,181 +0,0 @@ -// -// WebFormReferenceManager.cs: Tracks references within an ASP.NET document, and -// resolves types from tag names -// -// Authors: -// Michael Hutchinson <m.j.hutchinson@gmail.com> -// -// Copyright (C) 2006 Michael Hutchinson -// -// -// This source code is licenced under The MIT License: -// -// 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 System.Globalization; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.Design; - -using MonoDevelop.Projects; -using MonoDevelop.Ide.Gui; - -namespace MonoDevelop.AspNet.Parser -{ - public class WebFormReferenceManager : DocumentReferenceManager, IWebFormReferenceManager - { - int prefixIndex = 0; - - public WebFormReferenceManager (AspNetAppProject project) : base (project) - { - } - - #region IWebFormReferenceManager Members
-
- public Type GetObjectType (string tagPrefix, string typeName)
- { - string fullName = GetTypeName (tagPrefix, typeName); - if (fullName == null) - throw new Exception (string.Format ("The tag type '{0}{1}{2}' has not been registered.", tagPrefix, string.IsNullOrEmpty(tagPrefix)? string.Empty:":", typeName)); - Type type = System.Type.GetType (fullName, false); - if (type != null) - return type; - throw new NotImplementedException ("Cannot yet load custom types out-of-process."); - }
-
- public string GetRegisterDirectives ()
- { - var sb = new System.Text.StringBuilder (); - - foreach (var directive in RegisteredTags) { - var ard = directive as AssemblyRegisterDirective; - - if (ard != null) - sb.AppendFormat ("<%@ Register {0}=\"{1}\" {2}=\"{3}\" {4}=\"{5}\" %>", "TagPrefix", ard.TagPrefix, "Namespace", ard.Namespace, "Assembly", ard.Assembly); - else { - ControlRegisterDirective crd = (ControlRegisterDirective) directive; - sb.AppendFormat ("<%@ Register {0}=\"{1}\" {2}=\"{3}\" {4}=\"{5}\" %>", "TagPrefix", crd.TagPrefix, "TagName", crd.TagName, "Src", crd.Src); - } - } - - return sb.ToString ();
- }
-
- public string GetTagPrefix (Type objectType)
- {
- if (objectType.Namespace.StartsWith ("System.Web.UI"))
- return "asp"; -
- foreach (var directive in RegisteredTags) { - AssemblyRegisterDirective ard = directive as AssemblyRegisterDirective; - - if (ard != null) - if (string.Compare (ard.Namespace, objectType.Namespace, StringComparison.OrdinalIgnoreCase) == 0) - return directive.TagPrefix; - } -
- throw new Exception ("A tag prefix has not been registered for " + objectType.ToString ());
- }
-
- #endregion - - #region Add/Remove references
-
- public void AddReference (Type type)
- {
- RegisterTagPrefix (type);
- }
-
- public void AddReference (Type type, string prefix)
- {
- if (type.Assembly == typeof(System.Web.UI.WebControls.WebControl).Assembly)
- return;
-
- //check namespace is not already registered
foreach (var directive in RegisteredTags) { - AssemblyRegisterDirective ard = directive as AssemblyRegisterDirective; - if (0 == string.Compare (ard.Namespace, type.Namespace, StringComparison.Ordinal))
- throw new Exception ("That namespace is already registered with another prefix"); -
- if (0 == string.Compare (directive.TagPrefix, prefix, StringComparison.OrdinalIgnoreCase)) { - //duplicate prefix; generate a new one.
- //FIXME: possibility of stack overflow with too many default prefixes in existing document
- AddReference (type);
- return;
- } - } - - Project.References.Add (new ProjectReference (ReferenceType.Assembly, type.Assembly.ToString ()));
- /* - TODO: insert the reference into the document tree - */
- }
-
- #endregion - - #region 2.0 WebFormsReferenceManager members - - public string RegisterTagPrefix (Type type) - { - if (type.Assembly == typeof(System.Web.UI.WebControls.WebControl).Assembly)
- return "asp";
-
- string prefix = null;
-
- //check if there's a prefix for this namespace in the assembly
- var atts = (TagPrefixAttribute[]) type.Assembly.GetCustomAttributes (typeof (TagPrefixAttribute), true);
- foreach (var tpa in atts)
- if (0 == string.Compare (tpa.NamespaceName, type.Namespace, StringComparison.Ordinal))
- prefix = tpa.TagPrefix;
-
- //generate default prefix
- if (prefix == null) {
- prefix = "cc" + prefixIndex.ToString ();
- prefixIndex++;
- }
-
- AddReference (type, prefix); - - return prefix; - } - - public string GetUserControlPath (string tagPrefix, string tagName) - { - foreach (var directive in RegisteredTags) { - var crd = directive as ControlRegisterDirective; - - if (crd != null && (string.Compare (crd.TagPrefix, tagPrefix, StringComparison.OrdinalIgnoreCase) == 0) - && (string.Compare (crd.TagName, tagName, StringComparison.OrdinalIgnoreCase) == 0)) - return crd.Src; - } - - throw new Exception ("That tag has not been registered"); - } - - public Type GetType (string tagPrefix, string tagName) - { - return GetObjectType (tagPrefix, tagName); - } - - #endregion 2.0 WebFormsReferenceManager members - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetDom.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetDom.cs deleted file mode 100644 index 091196955e..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetDom.cs +++ /dev/null @@ -1,271 +0,0 @@ -// -// AspNetDom.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2008 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 System.Text; -using System.Diagnostics; -using System.Collections.Generic; - -using MonoDevelop.Xml.StateEngine; -using ICSharpCode.NRefactory.CSharp; -using ICSharpCode.NRefactory.TypeSystem; -using ICSharpCode.NRefactory; -using System.Linq; - -namespace MonoDevelop.AspNet.StateEngine -{ - - public class AspNetDirective : XNode, IAttributedXObject - { - XName name; - XAttributeCollection attributes; - - public AspNetDirective (TextLocation start) : base (start) - { - attributes = new XAttributeCollection (this); - } - - public AspNetDirective (TextLocation start, XName name) : this (start) - { - this.name = name; - } - - protected AspNetDirective () - { - attributes = new XAttributeCollection (this); - } - - public XAttributeCollection Attributes { - get { return attributes; } - } - - public XName Name { - get { return name; } - set { - Debug.Assert (!IsNamed, "Should not name node more than once."); - name = value; - } - } - - public override bool IsComplete { get { return base.IsComplete && IsNamed; } } - public bool IsNamed { get { return name.IsValid; } } - - protected override XObject NewInstance () - { - return new AspNetDirective (); - } - - protected override void ShallowCopyFrom (XObject copyFrom) - { - base.ShallowCopyFrom (copyFrom); - AspNetDirective copyFromEl = (AspNetDirective) copyFrom; - name = copyFromEl.name; //XName is immutable value type - } - - public override string ToString () - { - return string.Format ("[AspNetDirective Name='{0}' Location='{1}'", name.FullName, this.Region); - } - - public override void BuildTreeString (StringBuilder builder, int indentLevel) - { - builder.Append (' ', indentLevel * 2); - builder.AppendFormat ("[AspNetDirective Name='{0}' Location='{1}' Children=", name.FullName, this.Region); - builder.AppendLine (); - - builder.Append (' ', indentLevel * 2); - builder.Append ("Attributes="); - builder.AppendLine (); - - foreach (XAttribute att in Attributes) - att.BuildTreeString (builder, indentLevel + 1); - - builder.Append (' ', indentLevel * 2); - builder.AppendLine ("]"); - } - - public override string FriendlyPathRepresentation { - get { return "<%@ " + name.FullName + " %>"; } - } - - } - - public abstract class AspNetExpression : XNode - { - public AspNetExpression (DomRegion region) : base (region) {} - public AspNetExpression (TextLocation start) : base (start) {} - protected AspNetExpression () {} - } - - - public class AspNetRenderExpression : AspNetExpression - { - public AspNetRenderExpression (DomRegion region) : base (region) {} - public AspNetRenderExpression (TextLocation start) : base (start) {} - protected AspNetRenderExpression () {} - - protected override XObject NewInstance () { return new AspNetRenderExpression (); } - - public override string ToString () - { - return string.Format ("[AspNetRenderExpression Location='{0}'", this.Region); - } - - public override string FriendlyPathRepresentation { - get { return "<%= %>"; } - } - } - - public class AspNetHtmlEncodedExpression : AspNetExpression - { - public AspNetHtmlEncodedExpression (DomRegion region) : base (region) {} - public AspNetHtmlEncodedExpression (TextLocation start) : base (start) {} - protected AspNetHtmlEncodedExpression () {} - - protected override XObject NewInstance () { return new AspNetHtmlEncodedExpression (); } - - public override string ToString () - { - return string.Format ("[AspNetHtmlEncodedExpression Location='{0}'", this.Region); - } - - public override string FriendlyPathRepresentation { - get { return "<%: %>"; } - } - } - - public class AspNetDataBindingExpression : AspNetExpression - { - public AspNetDataBindingExpression (DomRegion region) : base (region) {} - public AspNetDataBindingExpression (TextLocation start) : base (start) {} - protected AspNetDataBindingExpression () {} - - protected override XObject NewInstance () { return new AspNetDataBindingExpression (); } - - public override string ToString () - { - return string.Format ("[AspNetDataBindingExpression Location='{0}'", this.Region); - } - - public override string FriendlyPathRepresentation { - get { return "<%# %>"; } - } - } - - public class AspNetResourceExpression : AspNetExpression - { - public AspNetResourceExpression (DomRegion region) : base (region) {} - public AspNetResourceExpression (TextLocation start) : base (start) {} - protected AspNetResourceExpression () {} - - protected override XObject NewInstance () { return new AspNetResourceExpression (); } - - public override string ToString () - { - return string.Format ("[AspNetResourceExpression Location='{0}'", this.Region); - } - - public override string FriendlyPathRepresentation { - get { return "<%$ %>"; } - } - } - - public class AspNetServerComment : XNode - { - public AspNetServerComment (DomRegion region) : base (region) {} - public AspNetServerComment (TextLocation start) : base (start) {} - protected AspNetServerComment () {} - - protected override XObject NewInstance () { return new AspNetServerComment (); } - - public override string ToString () - { - return string.Format ("[AspNetServerComment Location='{0}'", this.Region); - } - - public override string FriendlyPathRepresentation { - get { return "<%-- --%>"; } - } - } - - public class AspNetRenderBlock : XNode - { - public AspNetRenderBlock (DomRegion region) : base (region) {} - public AspNetRenderBlock (TextLocation start) : base (start) {} - protected AspNetRenderBlock () {} - - protected override XObject NewInstance () { return new AspNetRenderBlock (); } - - public override string ToString () - { - return string.Format ("[AspNetRenderBlock Location='{0}'", this.Region); - } - - - public override string FriendlyPathRepresentation { - get { return "<% %>"; } - } - } - - public static class AspNetDomExtensions - { - static XName scriptName = new XName ("script"); - static XName runatName = new XName ("runat"); - static XName idName = new XName ("id"); - - public static bool IsRunatServer (this XElement el) - { - var val = el.Attributes.GetValue (runatName, true); - return string.Equals (val, "server", StringComparison.OrdinalIgnoreCase); - } - - public static string GetId (this IAttributedXObject el) - { - return el.Attributes.GetValue (idName, true); - } - - public static bool IsServerScriptTag (this XElement el) - { - return XName.Equals (el.Name, scriptName, true) && IsRunatServer (el); - } - - public static IEnumerable<T> WithName<T> (this IEnumerable<XNode> nodes, XName name, bool ignoreCase) where T : XNode, INamedXObject - { - return nodes.OfType<T> ().Where (el => XName.Equals (el.Name, name, ignoreCase)); - } - - public static IEnumerable<string> GetAllPlaceholderIds (this XDocument doc) - { - return doc.AllDescendentNodes - .WithName<XElement> (new XName ("asp", "ContentPlaceHolder"), true) - .Where (x => x.IsRunatServer ()) - .Select (x => x.GetId ()) - .Where (id => !string.IsNullOrEmpty (id)); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml deleted file mode 100644 index 4ca499a0b9..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml +++ /dev/null @@ -1,263 +0,0 @@ -<ExtensionModel>
-
- <Runtime>
- <Import file="Schemas/xhtml1-strict.xsd" />
- <Import file="Schemas/xhtml1-transitional.xsd" />
- <Import file="Schemas/xhtml1-frameset.xsd" />
- </Runtime>
-
- <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
- <DotNetProjectSubtype
- id="MonoDevelop.AspNet.AspNetAppProject"
- guid="{349c5851-65df-11da-9384-00065b846f21}"
- type="MonoDevelop.AspNet.AspNetAppProject"
- />
- </Extension>
-
- <ExtensionPoint path = "/MonoDevelop/Html/DocTypes">
- <ExtensionNode name = "DocType" type = "MonoDevelop.Html.DocTypeExtensionNode" />
- </ExtensionPoint>
-
- <ExtensionPoint path = "/MonoDevelop/Asp/CompletionBuilders">
- <ExtensionNode name="Class" />
- </ExtensionPoint>
-
- <Extension path = "/MonoDevelop/Ide/FileTemplates">
- <FileTemplate id = "WebForm-Empty"
- resource = "WebForm-Empty.xft.xml"/>
- <FileTemplate id = "WebForm-CodeBehind"
- resource = "WebForm-CodeBehind.xft.xml"/>
- <FileTemplate id = "WebForm-CodeBehindNonPartial"
- resource = "WebForm-CodeBehindNonPartial.xft.xml"/>
-
- <FileTemplate id = "WebHandler-Empty"
- resource = "WebHandler-Empty.xft.xml"/>
- <FileTemplate id = "WebHandler-CodeBehind"
- resource = "WebHandler-CodeBehind.xft.xml"/>
-
- <FileTemplate id = "WebControl-Empty"
- resource = "WebControl-Empty.xft.xml"/>
- <FileTemplate id = "WebControl-CodeBehind"
- resource = "WebControl-CodeBehind.xft.xml"/>
- <FileTemplate id = "WebControl-CodeBehindNonPartial"
- resource = "WebControl-CodeBehindNonPartial.xft.xml"/>
-
- <FileTemplate id = "WebService-Empty"
- resource = "WebService-Empty.xft.xml"/>
- <FileTemplate id = "WebService-CodeBehind"
- resource = "WebService-CodeBehind.xft.xml"/>
-
- <FileTemplate id = "MasterPage-Empty"
- resource = "MasterPage-Empty.xft.xml" />
- <FileTemplate id = "MasterPage-CodeBehind"
- resource = "MasterPage-CodeBehind.xft.xml" />
- <FileTemplate id = "MasterPage-CodeBehindNonPartial"
- resource = "MasterPage-CodeBehindNonPartial.xft.xml" />
-
- <FileTemplate id = "NestedMasterPage"
- resource = "NestedMasterPage.xft.xml" />
- <FileTemplate id = "NestedMasterPage-CodeBehind"
- resource = "NestedMasterPage-CodeBehind.xft.xml" />
-
- <FileTemplate id = "GlobalAsax-Empty"
- resource = "GlobalAsax-Empty.xft.xml" />
- <FileTemplate id = "GlobalAsax-CodeBehind"
- resource = "GlobalAsax-CodeBehind.xft.xml" />
-
- <FileTemplate id = "WebConfig-Application"
- resource = "WebConfig-Application.xft.xml" />
- <FileTemplate id = "WebConfig-SubDir"
- resource = "WebConfig-SubDir.xft.xml" />
-
- <FileTemplate id = "WebContentForm-CodeBehind"
- resource = "WebContentForm-CodeBehind.xft.xml" />
- <FileTemplate id = "WebContentForm"
- resource = "WebContentForm.xft.xml" />
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/FileTemplateTypes">
- <FileTemplateType name = "AspNetFile" class = "MonoDevelop.AspNet.AspNetFileDescriptionTemplate"/>
- <FileTemplateType name = "AspNetMasterContentFile" class = "MonoDevelop.AspNet.MasterContentFileDescriptionTemplate"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
- <ProjectTemplate id = "WebApplication" resource = "WebApplication.xpt.xml"/>
- <ProjectTemplate id = "WebApplication-Empty" resource = "WebApplication-Empty.xpt.xml"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/FileFilters">
- <FileFilter id = "AspNetWebFiles"
- insertafter = "Xml"
- _label = "ASP.NET Files"
- extensions = "*.aspx,*.ashx,*.asmx,*.ascx,*.master,*.asax" />
- <FileFilter id = "Html"
- _label = "HTML Files"
- extensions = "*.htm,*.html"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings">
- <ProjectBinding id = "AspNetApplication" class = "MonoDevelop.AspNet.AspNetAppProjectBinding" />
- </Extension>
-
- <Extension path = "/MonoDevelop/TypeSystem/Parser">
- <Parser class = "MonoDevelop.AspNet.Parser.AspNetParser" mimeType="application/x-aspx, application/x-ascx, application/x-master-page" />
- <Parser class = "MonoDevelop.Html.HtmlParser" mimeType="text/html, application/x-spark" /> - </Extension>
-
- <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
- <DataType class = "MonoDevelop.AspNet.AspNetAppProject" />
- <DataType class = "MonoDevelop.AspNet.AspNetAppProjectConfiguration" />
- <DataType class = "MonoDevelop.AspNet.AspNetToolboxNode" />
- </Extension>
-
- <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Run">
- <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
- <Section id = "XspOptions"
- _label = "XSP Web Server"
- class = "MonoDevelop.AspNet.Gui.XspOptionsPanel"/>
- </Condition>
- </Extension>
-
- <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build">
- <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
- <Section id = "AspNetConfiguration"
- _label = "ASP.NET Options"
- class = "MonoDevelop.AspNet.Gui.AspNetConfigurationPanel"/>
- </Condition>
- </Extension>
-
- <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Deployment">
- <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
- <Section id = "MonoDevelop.AspNet.Deployment"
- _label = "Web Deployment Targets"
- class = "MonoDevelop.AspNet.Deployment.WebDeployOptionsPanel"
- fill = "true" />
- </Condition>
- </Extension>
-
- <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
- <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
- <Class class = "MonoDevelop.AspNet.VerifyCodeBehindBuildStep" insertafter="MidStep" />
- </Condition>
- </Extension>
-
- <Extension path = "/MonoDevelop/DesignerSupport/ToolboxLoaders">
- <Class id="AspNetToolboxLoader" class="MonoDevelop.AspNet.AspNetToolboxLoader"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/DesignerSupport/ToolboxProviders">
- <Class id="AspNetDefaultControlToolboxProvider" class="MonoDevelop.AspNet.AspNetToolboxProvider"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/Commands">
- <Category _name = "ASP.NET" id = "AspNet">
- <Command id = "MonoDevelop.AspNet.AspNetCommands.AddAspNetDirectory"
- _label = "ASP.NET Directory"
- type="array" />
- <Command id = "MonoDevelop.AspNet.Deployment.WebDeployCommands.DeployProject"
- defaultHandler = "MonoDevelop.AspNet.Deployment.ProjectDeployHandler"
- _label = "Deploy to Web..." />
- </Category>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
- <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
- <ItemSet id = "AspNetDirectories" _label = "ASP.NET Directory" insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.NewFolder" autohide = "true">
- <CommandItem id = "MonoDevelop.AspNet.AspNetCommands.AddAspNetDirectory" />
- </ItemSet>
- </Condition>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
- <NodeBuilder id="MonoDevelop.AspNet.ProjectFolderNodeBuilderExtension" class = "MonoDevelop.AspNet.ProjectFolderNodeBuilderExtension"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Tools">
- <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
- <CommandItem id = "MonoDevelop.AspNet.Deployment.WebDeployCommands.DeployProject" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
- </Condition>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/MainMenu/Project">
- <CommandItem id = "MonoDevelop.AspNet.Deployment.WebDeployCommands.DeployProject" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/SourceEditor2/CustomModes">
- <SyntaxMode mimeTypes="application/x-aspx" class="MonoDevelop.AspNet.AspNetSyntaxMode"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/Core/MimeTypes">
- <MimeType id="application/x-aspx" _description="ASP.NET page" icon="md-html-file-icon" isText="true">
- <File pattern="*.aspx" />
- </MimeType>
- <MimeType id="application/x-ascx" _description="ASP.NET user control" icon="md-html-file-icon" isText="true">
- <File pattern="*.ascx" />
- </MimeType>
- <MimeType id="application/x-asax" _description="ASP.NET global application class" icon="md-html-file-icon" isText="true">
- <File pattern="*.asax" />
- </MimeType>
- <MimeType id="application/x-ashx" _description="ASP.NET handler" icon="md-html-file-icon" isText="true">
- <File pattern="*.ashx" />
- </MimeType>
- <MimeType id="application/x-asmx" _description="ASP.NET web service" icon="md-html-file-icon" isText="true">
- <File pattern="*.asmx" />
- </MimeType>
- <MimeType id="application/x-asix" _description="ASP.NET image generator" icon="md-html-file-icon" isText="true">
- <File pattern="*.asix" />
- </MimeType>
- <MimeType id="application/x-master-page" _description="ASP.NET master page" icon="md-html-file-icon" isText="true">
- <File pattern="*.master|*.Master" />
- </MimeType>
- <MimeType id="application/javascript" _description="Javascript source code" icon="md-html-file-icon" isText="true">
- <File pattern="*.js" />
- </MimeType>
- <MimeType id="text/css" _description="CSS document" icon="md-html-file-icon" isText="true">
- <File pattern="*.css" />
- </MimeType>
- <MimeType id="text/x-less" _description="LESS, CSS document" icon="md-html-file-icon" isText="true">
- <File pattern="*.less" />
- </MimeType>
- <MimeType id="text/html" _description="HTML document" icon="md-html-file-icon" isText="true">
- <File pattern="*.html|*.htm" />
- </MimeType>
- <MimeType id="application/x-spark" _description="Spark View template" icon="md-html-file-icon" isText="true"
- baseType="text/html">
- <File pattern="*.spark" />
- </MimeType>
- <MimeType id="application/typescript" _description="Typescript source code" icon="md-html-file-icon" isText="true">
- <File pattern="*.ts" />
- </MimeType>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
- <Class fileExtensions=".aspx, .ascx, .master" class = "MonoDevelop.AspNet.Gui.AspNetEditorExtension" />
- <Class fileExtensions=".html, .htm, .spark" class = "MonoDevelop.AspNet.Gui.HtmlEditorExtension" />
- </Extension>
-
- <Extension path = "/MonoDevelop/Html/DocTypes">
- <DocType name = "XHTML 1.0 Strict"
- fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">"
- xsdFile = "xhtml1-strict.xsd" />
- <DocType name = "XHTML 1.0 Transitional"
- fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"
- xsdFile = "xhtml1-transitional.xsd" />
- <DocType name = "XHTML 1.0 Frameset"
- fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">"
- xsdFile = "xhtml1-frameset.xsd" />
- </Extension>
-
- <Extension path = "/MonoDevelop/Deployment/DeployServiceExtensions">
- <Class id="AspNetDeploy" insertbefore="PrepareDeploy" class = "MonoDevelop.AspNet.Deployment.AspNetDeployServiceExtension" />
- </Extension>
-
- <Extension path = "/MonoDevelop/Core/ExecutionHandlers">
- <ExecutionHandler id="AspNet" class = "MonoDevelop.AspNet.AspNetExecutionHandler"/>
- </Extension>
-
- <Extension path = "/MonoDevelop/Ide/CompletionCharacters">
- <Complete language="Html" commitOnSpace="True" commitChars="{}[]().,:;+-*/%&|^!~=<>?@#'"\" />
- </Extension>
-</ExtensionModel>
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj deleted file mode 100644 index b1151bf720..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj +++ /dev/null @@ -1,322 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</ProjectGuid> - <OutputType>Library</OutputType> - <AssemblyName>MonoDevelop.AspNet</AssemblyName> - <RootNamespace>MonoDevelop.AspNet</RootNamespace> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>True</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.AspNet</OutputPath> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <Execution> - <Execution clr-version="Net_2_0" /> - </Execution> - <DefineConstants>DEBUG</DefineConstants> - <NoWarn>1591;1573</NoWarn> - <DocumentationFile>..\..\..\..\build\AddIns\MonoDevelop.AspNet\MonoDevelop.AspNet.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>True</Optimize> - <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.AspNet</OutputPath> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <Execution> - <Execution clr-version="Net_2_0" /> - </Execution> - <DebugSymbols>true</DebugSymbols> - <NoWarn>1591;1573</NoWarn> - <DocumentationFile>..\..\..\..\build\AddIns\MonoDevelop.AspNet\MonoDevelop.AspNet.xml</DocumentationFile> - </PropertyGroup> - <ItemGroup> - <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> - <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> - <Name>MonoDevelop.Ide</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj"> - <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project> - <Name>MonoDevelop.Core</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj"> - <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project> - <Name>MonoDevelop.DesignerSupport</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Deployment\MonoDevelop.Deployment\MonoDevelop.Deployment.csproj"> - <Project>{9BC670A8-1851-40EC-9685-279F4C98433D}</Project> - <Name>MonoDevelop.Deployment</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Deployment\MonoDevelop.Deployment.Linux\MonoDevelop.Deployment.Linux.csproj"> - <Project>{BA9020AD-A2D1-47C8-9A7C-756162C38296}</Project> - <Name>MonoDevelop.Deployment.Linux</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj"> - <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project> - <Name>MonoDevelop.XmlEditor</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj"> - <Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project> - <Name>Mono.TextEditor</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.Refactoring\MonoDevelop.Refactoring.csproj"> - <Project>{100568FC-F4E8-439B-94AD-41D11724E45B}</Project> - <Name>MonoDevelop.Refactoring</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj"> - <Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project> - <Name>MonoDevelop.SourceEditor</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj"> - <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project> - <Name>ICSharpCode.NRefactory</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj"> - <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project> - <Name>ICSharpCode.NRefactory.CSharp</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj"> - <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project> - <Name>MonoDevelop.Debugger</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj"> - <Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project> - <Name>Mono.Addins</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj"> - <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project> - <Name>Mono.Debugging</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\xwt\Xwt\Xwt.csproj"> - <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project> - <Name>Xwt</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Web" /> - <Reference Include="System.Drawing.Design" /> - <Reference Include="System.Design" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Configuration" /> - <Reference Include="System.Core" /> - <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> - <Reference Include="System.Xml.Linq" /> - <Reference Include="Mono.Posix" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="MonoDevelop.AspNet.addin.xml"> - <LogicalName>MonoDevelop.AspNet.addin.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebForm-Empty.xft.xml"> - <LogicalName>WebForm-Empty.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebHandler-Empty.xft.xml"> - <LogicalName>WebHandler-Empty.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebControl-Empty.xft.xml"> - <LogicalName>WebControl-Empty.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebControl-CodeBehind.xft.xml"> - <LogicalName>WebControl-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebForm-CodeBehind.xft.xml"> - <LogicalName>WebForm-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebHandler-CodeBehind.xft.xml"> - <LogicalName>WebHandler-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebApplication.xpt.xml"> - <LogicalName>WebApplication.xpt.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebService-Empty.xft.xml"> - <LogicalName>WebService-Empty.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebService-CodeBehind.xft.xml"> - <LogicalName>WebService-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\MasterPage-CodeBehind.xft.xml"> - <LogicalName>MasterPage-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\MasterPage-Empty.xft.xml"> - <LogicalName>MasterPage-Empty.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="gtk-gui\gui.stetic"> - <LogicalName>gui.stetic</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\GlobalAsax-CodeBehind.xft.xml"> - <LogicalName>GlobalAsax-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\GlobalAsax-Empty.xft.xml"> - <LogicalName>GlobalAsax-Empty.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\MasterPage-CodeBehindNonPartial.xft.xml"> - <LogicalName>MasterPage-CodeBehindNonPartial.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebControl-CodeBehindNonPartial.xft.xml"> - <LogicalName>WebControl-CodeBehindNonPartial.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebForm-CodeBehindNonPartial.xft.xml"> - <LogicalName>WebForm-CodeBehindNonPartial.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebApplication-Empty.xpt.xml"> - <LogicalName>WebApplication-Empty.xpt.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebConfig-Application.xft.xml"> - <LogicalName>WebConfig-Application.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebConfig-SubDir.xft.xml"> - <LogicalName>WebConfig-SubDir.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebContentForm-CodeBehind.xft.xml"> - <LogicalName>WebContentForm-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\NestedMasterPage.xft.xml"> - <LogicalName>NestedMasterPage.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\NestedMasterPage-CodeBehind.xft.xml"> - <LogicalName>NestedMasterPage-CodeBehind.xft.xml</LogicalName> - </EmbeddedResource> - <EmbeddedResource Include="Templates\WebContentForm.xft.xml"> - <LogicalName>WebContentForm.xft.xml</LogicalName> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <Compile Include="MonoDevelop.AspNet\AspNetAppProject.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetAppProjectBinding.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetAppProjectConfiguration.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetFileDescriptionTemplate.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\WebFormReferenceManager.cs" /> - <Compile Include="MonoDevelop.AspNet\XspParameters.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\XspOptionsPanel.cs" /> - <Compile Include="MonoDevelop.AspNet\VerifyCodeBehindBuildStep.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\AspNetConfigurationPanel.cs" /> - <Compile Include="gtk-gui\generated.cs" /> - <Compile Include="MonoDevelop.AspNet\CodeBehind.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\AspNetConfigurationPanelWidget.cs" /> - <Compile Include="MonoDevelop.AspNet\ProjectFolderNodeBuilderExtension.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetCommands.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\XspOptionsPanelWidget.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployOptionsPanelWidget.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployOptionsPanel.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployTargetCollection.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployTarget.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebTargetEditor.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Deployment.WebTargetEditor.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployTargetEditor.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Deployment.WebDeployTargetEditor.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployLaunchDialog.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployService.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployCommands.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\WebDeployResolver.cs" /> - <Compile Include="MonoDevelop.AspNet\WebTypeManager.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\DocumentReferenceManager.cs" /> - <Compile Include="MonoDevelop.AspNet\IAspNetLanguageBinding.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget.cs" /> - <Compile Include="gtk-gui\MonoDevelop.AspNet.Gui.XspOptionsPanelWidget.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\AspNetEditorExtension.cs" /> - <Compile Include="MonoDevelop.Html\HtmlSchemaService.cs" /> - <Compile Include="MonoDevelop.Html\HtmlSchema.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\Regexes.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\BrowserLauncher.cs" /> - <Compile Include="MonoDevelop.Html\DocTypeExtensionNode.cs" /> - <Compile Include="MonoDevelop.Html\DocTypeCompletionData.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\SuggestedHandlerCompletionData.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\AspNetFreeState.cs" /> - <Compile Include="MonoDevelop.Html\HtmlCompletionDataProvider.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\AspNetParser.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\AspNetParsedDocument.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\PageInfo.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetToolboxLoader.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetToolboxNode.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetToolboxProvider.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\AspNetExpressionState.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\AspNetDom.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\AspNetDirectiveState.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\AspNetServerCommentState.cs" /> - <Compile Include="MonoDevelop.AspNet.Deployment\AspNetDeployServiceExtension.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\Directive.cs" /> - <Compile Include="MonoDevelop.AspNet.Completion\SimpleLists.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\BaseHtmlEditorExtension.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\HtmlEditorExtension.cs" /> - <Compile Include="MonoDevelop.Html\HtmlParser.cs" /> - <Compile Include="MonoDevelop.Html\ElementTypes.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\HtmlTagState.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\HtmlClosingTagState.cs" /> - <Compile Include="AssemblyInfo.cs" /> - <Compile Include="MonoDevelop.AspNet\MasterContentFileDescriptionTemplate.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetExecutionCommand.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetExecutionHandler.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetSyntaxMode.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetMSBuildImportProvider.cs" /> - <Compile Include="MonoDevelop.Html\PathCompletion.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\ILanguageCompletionBuilder.cs" /> - <Compile Include="MonoDevelop.AspNet\LineInterceptingTextWriter.cs" /> - <Compile Include="MonoDevelop.AspNet.Gui\AspProjectDom.cs" /> - <Compile Include="MonoDevelop.AspNet\RegistrationCache.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\HtmlScriptBodyState.cs" /> - <Compile Include="MonoDevelop.AspNet.Parser\MemberListBuilder.cs" /> - <Compile Include="MonoDevelop.AspNet.StateEngine\AspNetAttributeValueState.cs" /> - <Compile Include="AddinInfo.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="Makefile.am" /> - </ItemGroup> - <ItemGroup> - <Content Include="Schemas\xhtml1-frameset.xsd"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Schemas\xhtml1-strict.xsd"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Schemas\xhtml1-transitional.xsd"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Schemas\readme.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Schemas\W3C-License.html"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -</Project> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetFileDescriptionTemplate.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetFileDescriptionTemplate.cs deleted file mode 100644 index 6d86d58b67..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetFileDescriptionTemplate.cs +++ /dev/null @@ -1,145 +0,0 @@ -// -// AspNetFileDescriptionTemplate.cs: Template that translates regions of C# -// into the current .NET language, and substitutes them into the template. -// -// Authors: -// Michael Hutchinson <m.j.hutchinson@gmail.com> -// -// Copyright (C) 2006 Michael Hutchinson -// -// -// This source code is licenced under The MIT License: -// -// 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 System.Collections; -using System.Collections.Generic; -using System.CodeDom; -using System.CodeDom.Compiler; -using System.Xml; -using System.IO; - -using MonoDevelop.Core; -using MonoDevelop.Ide.Templates; -using MonoDevelop.Projects; - -namespace MonoDevelop.AspNet -{ - - public class AspNetFileDescriptionTemplate : SingleFileDescriptionTemplate - { - string content; - Hashtable codeAreas = new Hashtable (); - - public override void Load (XmlElement filenode, FilePath baseDirectory) - { - //pull out the main area - XmlElement fileText = filenode ["FileText"]; - if (fileText == null) - throw new InvalidOperationException ("Invalid ASP.NET template: FileText element not found."); - content = fileText.InnerText; - - //collect all of the code substitution areas - foreach (XmlNode xn in filenode.GetElementsByTagName ("CodeTranslationFile")) { - XmlElement xe = xn as XmlElement; - if (xe == null) - continue; - - string name = xe.GetAttribute ("TagName"); - - if ((name == null) || (name.Length == 0)) - throw new InvalidOperationException ("Invalid ASP.NET template: CodeTranslationFile must have valid TagName."); - - //This is overzealous, but better safe than sorry - char [] forbiddenChars = "`-=[];'#,./\\¬!\"£$%^&*()_+{}:@~|<>?".ToCharArray (); - if (name.IndexOfAny (forbiddenChars) > -1) - throw new InvalidOperationException ("Invalid ASP.NET template: TagName must be alphanumeric."); - - if (codeAreas.ContainsKey (name)) - throw new InvalidOperationException ("Invalid ASP.NET template: all TagNames must be unique within the AspNetFile."); - - var templ = FileDescriptionTemplate.CreateTemplate (xe, baseDirectory) as CodeTranslationFileDescriptionTemplate; - - if (templ == null) - throw new InvalidOperationException ("Invalid ASP.NET template: invalid CodeTranslationFile."); - - codeAreas [name] = templ; - } - - base.Load (filenode, baseDirectory); - } - - public override string CreateContent (string language) - { - return content; - } - - public override void ModifyTags (SolutionItem policyParent, Project project, string language, string identifier, string fileName, ref Dictionary<string,string> tags) - { - tags ["Doctype"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; - - //get a language binding - IDotNetLanguageBinding langbinding = null; - if (project == null) { - langbinding = (IDotNetLanguageBinding) LanguageBindingService.GetBindingPerLanguageName (language); - } else { - DotNetProject dnp = (DotNetProject) project; - langbinding = dnp.LanguageBinding; - } - - // work out the ASP.NET language code. Although it's originally a hack around MD's VBNet language name - // not corresponding to any of the valid ASP.NET codes, we also provide an interface that - // non-core language bindings can implement to advertise that they support ASP.NET - string languageCode = language; - if (langbinding is IAspNetLanguageBinding) { - languageCode = ((IAspNetLanguageBinding) langbinding).AspNetLanguageCode; - } else if (language == "VBNet") { - languageCode = "VB"; - } else if (language != "C#") { - LoggingService.LogWarning ("The language binding '{0}' does not have explicit support for ASP.NET", language); - } - tags ["AspNetLanguage"] = languageCode; - - base.ModifyTags (policyParent, project, language, identifier, fileName, ref tags); - - //nothing after this point is relevant to tag substitution for filenames, - //and some will even crash, so drop out now - if (fileName == null) - return; - - // Build tags for ${CodeRegion:#} substitutions - foreach (string regionName in codeAreas.Keys) { - var templ = (CodeTranslationFileDescriptionTemplate) codeAreas [regionName]; - - //makes CodeTranslationFile's internal name substitition easier - var name = (string) tags ["Name"]; - templ.GetFileName (policyParent, project, language, project == null? null :project.BaseDirectory, name); - - Stream stream = templ.CreateFileContent (policyParent, project, language, fileName, identifier); - StreamReader reader = new StreamReader (stream); - tags ["CodeRegion:"+regionName] = reader.ReadToEnd (); - reader.Close (); - stream.Close (); - } - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/IAspNetLanguageBinding.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/IAspNetLanguageBinding.cs deleted file mode 100644 index 844eaa3cd0..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/IAspNetLanguageBinding.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// IAspNetLanguage.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2008 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.Projects; - -namespace MonoDevelop.AspNet -{ - - public interface IAspNetLanguageBinding : IDotNetLanguageBinding - { - string AspNetLanguageCode { get; } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/VerifyCodeBehindBuildStep.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/VerifyCodeBehindBuildStep.cs deleted file mode 100644 index 31bac16e8b..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/VerifyCodeBehindBuildStep.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// VerifyCodeBehindBuildStep.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2006-2007 Michael Hutchinson -// Copyright (C) 2007-2008 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 System.IO; -using System.Collections.Generic; - -using MonoDevelop.Projects; -using MonoDevelop.Core.ProgressMonitoring; -using MonoDevelop.Core; -using MonoDevelop.DesignerSupport; -using MonoDevelop.AspNet.Parser; -using MonoDevelop.Ide.TypeSystem; - -namespace MonoDevelop.AspNet -{ - - public class VerifyCodeBehindBuildStep : ProjectServiceExtension - { - public override bool SupportsItem (IBuildTarget item) - { - var aspProject = item as AspNetAppProject; - return aspProject != null && aspProject.LanguageBinding != null; - } - - protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem project, ConfigurationSelector configuration) - { - var aspProject = project as AspNetAppProject; - - //get the config object and validate - AspNetAppProjectConfiguration config = (AspNetAppProjectConfiguration)aspProject.GetConfiguration (configuration); - if (config == null || config.DisableCodeBehindGeneration) { - return base.Build (monitor, project, configuration); - } - - var writer = CodeBehindWriter.CreateForProject (monitor, aspProject); - if (!writer.SupportsPartialTypes) { - return base.Build (monitor, project, configuration); - } - - var result = new BuildResult (); - - monitor.BeginTask ("Updating CodeBehind designer files", 0); - - foreach (var file in aspProject.Files) { - ProjectFile designerFile = CodeBehind.GetDesignerFile (file); - if (designerFile == null) - continue; - - if (File.GetLastWriteTimeUtc (designerFile.FilePath) > File.GetLastWriteTimeUtc (file.FilePath)) - continue; - - monitor.Log.WriteLine ("Updating CodeBehind for file '{0}'", file); - result.Append (CodeBehind.UpdateDesignerFile (writer, aspProject, file, designerFile)); - } - - writer.WriteOpenFiles (); - - monitor.EndTask (); - - if (writer.WrittenCount > 0) - monitor.Log.WriteLine ("{0} CodeBehind designer classes updated.", writer.WrittenCount); - else - monitor.Log.WriteLine ("No changes made to CodeBehind classes."); - - if (result.Failed) - return result; - - return result.Append (base.Build (monitor, project, configuration)); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlCompletionDataProvider.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlCompletionDataProvider.cs deleted file mode 100644 index c05fb6add1..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlCompletionDataProvider.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// HtmlCompletionDataProvider.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2008 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 System.Collections.Generic; -using MonoDevelop.Ide.CodeCompletion; - -namespace MonoDevelop.Html -{ - /* - - public class HtmlTagCompletionDataProvider : IMutableCompletionDataProvider - { - string parentElement; - HtmlSchema schema; - - public string DefaultCompletionString { - get { return null; } - } - - public bool IsChanging { - get { return false; } - } - - public HtmlTagCompletionDataProvider (HtmlSchema schema, string parentElement) - { - this.parentElement = parentElement; - this.schema = schema; - } - - public void Dispose () - { - } - - public ICompletionData[] GenerateCompletionData (ICompletionWidget widget, char charTyped) - { - if (parentElement != null) - return schema.CompletionProvider.GetChildElementCompletionData (parentElement); - else - return schema.CompletionProvider.GetElementCompletionData (); - } - - public event EventHandler CompletionDataChanging; - - public event EventHandler CompletionDataChanged; - - public bool AutoCompleteUniqueMatch { - get { return false; } - } - }*/ -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-CodeBehindNonPartial.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-CodeBehindNonPartial.xft.xml deleted file mode 100644 index 4ebcee4f9d..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-CodeBehindNonPartial.xft.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="John Anderson" - Created="2007/02/03" - LastModified="2007/02/03"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>Master Page with CodeBehind</_Name> - <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> - <_Description>Creates an ASP.NET Master Page with a CodeBehind class.</_Description> - <ProjectType>AspNetApp</ProjectType> - </TemplateConfiguration> - - <Conditions> - <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" /> - <PartialTypeSupport Requirement="Disabled" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile name="${Name}.master"> - <FileText> - <![CDATA[<%@ Master Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %> -${Doctype} -<html> -<head runat="server"> - <title>${Name}</title> -</head> -<body> -<div id="container"> -<form runat="server"> - <asp:contentplaceholder id="contentPlaceHolder" runat="server" /> -</form> -</div> -</body> -</html>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="${Name}.master.${LanguageExtension}" DependsOn="${Name}.master" > -<![CDATA[using System; -using System.Web; -using System.Web.UI; -namespace ${Namespace} { - public class ${EscapedIdentifier} : System.Web.UI.MasterPage - { - } -} -]]> - </CodeTranslationFile> - </TemplateFiles> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-CodeBehindNonPartial.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-CodeBehindNonPartial.xft.xml deleted file mode 100644 index 2cfebf91ff..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-CodeBehindNonPartial.xft.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Michael Hutchinson" - Created="2006/06/06" - LastModified="2006/06/18"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>User Control with CodeBehind</_Name> - <_Category>ASP.NET</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> - <ProjectType>AspNetApp</ProjectType> - <_Description>Creates an ASP.NET user control with a CodeBehind class.</_Description> - </TemplateConfiguration> - - <Conditions> - <PartialTypeSupport Requirement="Disabled" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile DefaultExtension=".ascx" name="${Name}.ascx"> - <FileText> -<![CDATA[<%@ Control Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="${Name}.ascx.${LanguageExtension}" DependsOn="${Name}.ascx" > -<![CDATA[using System; -using System.Web; -using System.Web.UI; - -namespace ${Namespace} { - - public partial class ${EscapedIdentifier} : System.Web.UI.UserControl - { - } -}]]> - </CodeTranslationFile> - </TemplateFiles> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-CodeBehindNonPartial.xft.xml b/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-CodeBehindNonPartial.xft.xml deleted file mode 100644 index f9576b6e5d..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-CodeBehindNonPartial.xft.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Michael Hutchinson" - Created="2006/06/09" - LastModified="2007/09/05"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>Web Form with CodeBehind</_Name> - <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetApp</ProjectType> - <_Description>Creates an ASP.NET Web Form with a CodeBehind class.</_Description> - </TemplateConfiguration> - - <Conditions> - <PartialTypeSupport Requirement="Disabled" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile name="${Name}.aspx" DefaultExtension=".aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %> -${Doctype} -<html> -<head runat="server"> - <title>${Name}</title> -</head> -<body> - <form id="form1" runat="server"> - </form> -</body> -</html>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="${Name}.aspx.${LanguageExtension}" DependsOn="${Name}.aspx" > -<![CDATA[using System; -using System.Web; -using System.Web.UI; - -namespace ${Namespace} { - - public class ${EscapedIdentifier} : System.Web.UI.Page - { - - } -}]]> - </CodeTranslationFile> - </TemplateFiles> -</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog.cs deleted file mode 100644 index ddd94aeafd..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog.cs +++ /dev/null @@ -1,120 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace MonoDevelop.AspNet.Deployment -{ - public partial class WebDeployLaunchDialog - { - private global::Gtk.Label titleLabel; - private global::Gtk.Label label1; - private global::Gtk.ScrolledWindow scrolledwindow4; - private global::Gtk.TreeView targetView; - private global::Gtk.Button button6; - private global::Gtk.Button buttonCancel; - private global::Gtk.Button buttonDeploy; - - protected virtual void Build () - { - global::Stetic.Gui.Initialize (this); - // Widget MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog - this.Name = "MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog"; - this.Title = global::Mono.Unix.Catalog.GetString ("Deploy to Web"); - this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - this.Modal = true; - this.BorderWidth = ((uint)(9)); - // Internal child MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog.VBox - global::Gtk.VBox w1 = this.VBox; - w1.Name = "dialog1_VBox"; - w1.Spacing = 6; - w1.BorderWidth = ((uint)(2)); - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.titleLabel = new global::Gtk.Label (); - this.titleLabel.Name = "titleLabel"; - this.titleLabel.Xalign = 0F; - this.titleLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("<big><b>Deploying Web Project...</b></big>"); - this.titleLabel.UseMarkup = true; - w1.Add (this.titleLabel); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1 [this.titleLabel])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.Xalign = 0F; - this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Targets to which the project should be deployed:"); - w1.Add (this.label1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(w1 [this.label1])); - w3.Position = 1; - w3.Expand = false; - w3.Fill = false; - w3.Padding = ((uint)(4)); - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.scrolledwindow4 = new global::Gtk.ScrolledWindow (); - this.scrolledwindow4.CanFocus = true; - this.scrolledwindow4.Name = "scrolledwindow4"; - this.scrolledwindow4.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child scrolledwindow4.Gtk.Container+ContainerChild - this.targetView = new global::Gtk.TreeView (); - this.targetView.CanFocus = true; - this.targetView.Name = "targetView"; - this.scrolledwindow4.Add (this.targetView); - w1.Add (this.scrolledwindow4); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1 [this.scrolledwindow4])); - w5.Position = 2; - // Internal child MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog.ActionArea - global::Gtk.HButtonBox w6 = this.ActionArea; - w6.Name = "dialog1_ActionArea"; - w6.Spacing = 6; - w6.BorderWidth = ((uint)(5)); - w6.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.button6 = new global::Gtk.Button (); - this.button6.CanFocus = true; - this.button6.Name = "button6"; - this.button6.UseUnderline = true; - this.button6.Label = global::Mono.Unix.Catalog.GetString ("_Edit targets"); - global::Gtk.Image w7 = new global::Gtk.Image (); - w7.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-edit", global::Gtk.IconSize.Menu); - this.button6.Image = w7; - this.AddActionWidget (this.button6, -11); - global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w6 [this.button6])); - w8.Expand = false; - w8.Fill = false; - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonCancel = new global::Gtk.Button (); - this.buttonCancel.CanDefault = true; - this.buttonCancel.CanFocus = true; - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.UseStock = true; - this.buttonCancel.UseUnderline = true; - this.buttonCancel.Label = "gtk-cancel"; - this.AddActionWidget (this.buttonCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w6 [this.buttonCancel])); - w9.Position = 1; - w9.Expand = false; - w9.Fill = false; - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonDeploy = new global::Gtk.Button (); - this.buttonDeploy.CanDefault = true; - this.buttonDeploy.CanFocus = true; - this.buttonDeploy.Name = "buttonDeploy"; - this.buttonDeploy.UseUnderline = true; - this.buttonDeploy.Label = global::Mono.Unix.Catalog.GetString ("_Deploy"); - global::Gtk.Image w10 = new global::Gtk.Image (); - w10.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-ok", global::Gtk.IconSize.Menu); - this.buttonDeploy.Image = w10; - this.AddActionWidget (this.buttonDeploy, -5); - global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w6 [this.buttonDeploy])); - w11.Position = 2; - w11.Expand = false; - w11.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); - } - this.DefaultWidth = 511; - this.DefaultHeight = 353; - this.Hide (); - this.button6.Clicked += new global::System.EventHandler (this.editTargetsClicked); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget.cs deleted file mode 100644 index 61033baa13..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget.cs +++ /dev/null @@ -1,96 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace MonoDevelop.AspNet.Deployment -{ - public partial class WebDeployOptionsPanelWidget - { - private global::Gtk.HBox hbox1; - private global::Gtk.ScrolledWindow scrolledwindow1; - private global::Gtk.TreeView targetView; - private global::Gtk.VBox vbox2; - private global::Gtk.Button addButton; - private global::Gtk.Button editButton; - private global::Gtk.Button removeButton; - - protected virtual void Build () - { - global::Stetic.Gui.Initialize (this); - // Widget MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget - global::Stetic.BinContainer.Attach (this); - this.Name = "MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget"; - // Container child MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget.Gtk.Container+ContainerChild - this.hbox1 = new global::Gtk.HBox (); - this.hbox1.Name = "hbox1"; - this.hbox1.Spacing = 6; - // Container child hbox1.Gtk.Box+BoxChild - this.scrolledwindow1 = new global::Gtk.ScrolledWindow (); - this.scrolledwindow1.CanFocus = true; - this.scrolledwindow1.Name = "scrolledwindow1"; - this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child scrolledwindow1.Gtk.Container+ContainerChild - this.targetView = new global::Gtk.TreeView (); - this.targetView.CanFocus = true; - this.targetView.Name = "targetView"; - this.scrolledwindow1.Add (this.targetView); - this.hbox1.Add (this.scrolledwindow1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.scrolledwindow1])); - w2.Position = 0; - // Container child hbox1.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); - this.vbox2.Name = "vbox2"; - this.vbox2.Spacing = 6; - // Container child vbox2.Gtk.Box+BoxChild - this.addButton = new global::Gtk.Button (); - this.addButton.CanFocus = true; - this.addButton.Name = "addButton"; - this.addButton.UseStock = true; - this.addButton.UseUnderline = true; - this.addButton.Label = "gtk-add"; - this.vbox2.Add (this.addButton); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.addButton])); - w3.Position = 0; - w3.Expand = false; - w3.Fill = false; - // Container child vbox2.Gtk.Box+BoxChild - this.editButton = new global::Gtk.Button (); - this.editButton.CanFocus = true; - this.editButton.Name = "editButton"; - this.editButton.UseStock = true; - this.editButton.UseUnderline = true; - this.editButton.Label = "gtk-edit"; - this.vbox2.Add (this.editButton); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.editButton])); - w4.Position = 1; - w4.Expand = false; - w4.Fill = false; - // Container child vbox2.Gtk.Box+BoxChild - this.removeButton = new global::Gtk.Button (); - this.removeButton.CanFocus = true; - this.removeButton.Name = "removeButton"; - this.removeButton.UseStock = true; - this.removeButton.UseUnderline = true; - this.removeButton.Label = "gtk-remove"; - this.vbox2.Add (this.removeButton); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.removeButton])); - w5.Position = 2; - w5.Expand = false; - w5.Fill = false; - this.hbox1.Add (this.vbox2); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); - w6.Position = 1; - w6.Expand = false; - w6.Fill = false; - this.Add (this.hbox1); - if ((this.Child != null)) { - this.Child.ShowAll (); - } - this.Show (); - this.addButton.Activated += new global::System.EventHandler (this.AddActivated); - this.addButton.Clicked += new global::System.EventHandler (this.AddActivated); - this.editButton.Activated += new global::System.EventHandler (this.EditActivated); - this.editButton.Clicked += new global::System.EventHandler (this.EditActivated); - this.removeButton.Activated += new global::System.EventHandler (this.RemoveActivated); - this.removeButton.Clicked += new global::System.EventHandler (this.RemoveActivated); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployTargetEditor.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployTargetEditor.cs deleted file mode 100644 index 86f4a1a292..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebDeployTargetEditor.cs +++ /dev/null @@ -1,180 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace MonoDevelop.AspNet.Deployment -{ - public partial class WebDeployTargetEditor - { - private global::Gtk.Label label1; - private global::Gtk.HBox hbox2; - private global::Gtk.Label label4; - private global::Gtk.VBox vbox2; - private global::Gtk.Table table2; - private global::Gtk.Label label8; - private global::Gtk.Entry nameEntry; - private global::Gtk.Label label2; - private global::Gtk.HBox fileCopyHbox; - private global::Gtk.Label label5; - private global::Gtk.VBox vbox3; - private global::Gtk.HBox fileCopyBox; - private global::Gtk.Button buttonCancel; - private global::Gtk.Button buttonOk; - - protected virtual void Build () - { - global::Stetic.Gui.Initialize (this); - // Widget MonoDevelop.AspNet.Deployment.WebDeployTargetEditor - this.Name = "MonoDevelop.AspNet.Deployment.WebDeployTargetEditor"; - this.Title = global::Mono.Unix.Catalog.GetString ("Edit Web Deployment Target"); - this.TypeHint = ((global::Gdk.WindowTypeHint)(1)); - this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - this.Modal = true; - this.BorderWidth = ((uint)(9)); - // Internal child MonoDevelop.AspNet.Deployment.WebDeployTargetEditor.VBox - global::Gtk.VBox w1 = this.VBox; - w1.Name = "dialog1_VBox"; - w1.Spacing = 7; - w1.BorderWidth = ((uint)(2)); - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.Xalign = 0F; - this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>General Options</b>"); - this.label1.UseMarkup = true; - w1.Add (this.label1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1 [this.label1])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.hbox2 = new global::Gtk.HBox (); - this.hbox2.Name = "hbox2"; - // Container child hbox2.Gtk.Box+BoxChild - this.label4 = new global::Gtk.Label (); - this.label4.WidthRequest = 18; - this.label4.Name = "label4"; - this.hbox2.Add (this.label4); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label4])); - w3.Position = 0; - w3.Expand = false; - w3.Fill = false; - // Container child hbox2.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); - this.vbox2.Name = "vbox2"; - this.vbox2.Spacing = 6; - // Container child vbox2.Gtk.Box+BoxChild - this.table2 = new global::Gtk.Table (((uint)(2)), ((uint)(2)), false); - this.table2.Name = "table2"; - this.table2.RowSpacing = ((uint)(6)); - this.table2.ColumnSpacing = ((uint)(6)); - // Container child table2.Gtk.Table+TableChild - this.label8 = new global::Gtk.Label (); - this.label8.Name = "label8"; - this.label8.Xalign = 0F; - this.label8.LabelProp = global::Mono.Unix.Catalog.GetString ("Name:"); - this.table2.Add (this.label8); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table2 [this.label8])); - w4.XOptions = ((global::Gtk.AttachOptions)(4)); - w4.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table2.Gtk.Table+TableChild - this.nameEntry = new global::Gtk.Entry (); - this.nameEntry.CanFocus = true; - this.nameEntry.Name = "nameEntry"; - this.nameEntry.IsEditable = true; - this.nameEntry.InvisibleChar = '●'; - this.table2.Add (this.nameEntry); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table2 [this.nameEntry])); - w5.LeftAttach = ((uint)(1)); - w5.RightAttach = ((uint)(2)); - w5.YOptions = ((global::Gtk.AttachOptions)(4)); - this.vbox2.Add (this.table2); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table2])); - w6.Position = 0; - this.hbox2.Add (this.vbox2); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox2])); - w7.Position = 1; - w1.Add (this.hbox2); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox2])); - w8.Position = 1; - w8.Expand = false; - w8.Fill = false; - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.label2 = new global::Gtk.Label (); - this.label2.Name = "label2"; - this.label2.Xalign = 0F; - this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>File Copying</b>"); - this.label2.UseMarkup = true; - w1.Add (this.label2); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1 [this.label2])); - w9.Position = 2; - w9.Expand = false; - w9.Fill = false; - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.fileCopyHbox = new global::Gtk.HBox (); - this.fileCopyHbox.Name = "fileCopyHbox"; - // Container child fileCopyHbox.Gtk.Box+BoxChild - this.label5 = new global::Gtk.Label (); - this.label5.WidthRequest = 18; - this.label5.Name = "label5"; - this.fileCopyHbox.Add (this.label5); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.fileCopyHbox [this.label5])); - w10.Position = 0; - w10.Expand = false; - w10.Fill = false; - // Container child fileCopyHbox.Gtk.Box+BoxChild - this.vbox3 = new global::Gtk.VBox (); - this.vbox3.Name = "vbox3"; - this.vbox3.Spacing = 6; - // Container child vbox3.Gtk.Box+BoxChild - this.fileCopyBox = new global::Gtk.HBox (); - this.fileCopyBox.Name = "fileCopyBox"; - this.fileCopyBox.Spacing = 6; - this.vbox3.Add (this.fileCopyBox); - global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.fileCopyBox])); - w11.Position = 0; - this.fileCopyHbox.Add (this.vbox3); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.fileCopyHbox [this.vbox3])); - w12.Position = 1; - w1.Add (this.fileCopyHbox); - global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(w1 [this.fileCopyHbox])); - w13.Position = 3; - // Internal child MonoDevelop.AspNet.Deployment.WebDeployTargetEditor.ActionArea - global::Gtk.HButtonBox w14 = this.ActionArea; - w14.Name = "dialog1_ActionArea"; - w14.Spacing = 10; - w14.BorderWidth = ((uint)(5)); - w14.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonCancel = new global::Gtk.Button (); - this.buttonCancel.CanDefault = true; - this.buttonCancel.CanFocus = true; - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.UseStock = true; - this.buttonCancel.UseUnderline = true; - this.buttonCancel.Label = "gtk-cancel"; - this.AddActionWidget (this.buttonCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w15 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w14 [this.buttonCancel])); - w15.Expand = false; - w15.Fill = false; - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonOk = new global::Gtk.Button (); - this.buttonOk.CanDefault = true; - this.buttonOk.CanFocus = true; - this.buttonOk.Name = "buttonOk"; - this.buttonOk.UseStock = true; - this.buttonOk.UseUnderline = true; - this.buttonOk.Label = "gtk-ok"; - this.AddActionWidget (this.buttonOk, -5); - global::Gtk.ButtonBox.ButtonBoxChild w16 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w14 [this.buttonOk])); - w16.Position = 1; - w16.Expand = false; - w16.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); - } - this.DefaultWidth = 400; - this.DefaultHeight = 300; - this.buttonOk.HasDefault = true; - this.Hide (); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebTargetEditor.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebTargetEditor.cs deleted file mode 100644 index 2ab1dd683e..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Deployment.WebTargetEditor.cs +++ /dev/null @@ -1,22 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace MonoDevelop.AspNet.Deployment -{ - public partial class WebTargetEditor - { - protected virtual void Build () - { - global::Stetic.Gui.Initialize (this); - // Widget MonoDevelop.AspNet.Deployment.WebTargetEditor - this.Name = "MonoDevelop.AspNet.Deployment.WebTargetEditor"; - this.Title = "WebTargetEditor"; - this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - if ((this.Child != null)) { - this.Child.ShowAll (); - } - this.DefaultWidth = 400; - this.DefaultHeight = 300; - this.Hide (); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget.cs deleted file mode 100644 index 4df25876bd..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget.cs +++ /dev/null @@ -1,78 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace MonoDevelop.AspNet.Gui -{ - internal partial class AspNetConfigurationPanelWidget - { - private global::Gtk.VBox vbox1; - private global::Gtk.Label label1; - private global::Gtk.HBox hbox1; - private global::Gtk.Label label2; - private global::Gtk.VBox vbox2; - private global::Gtk.CheckButton disableCodeBehindGeneration; - - protected virtual void Build () - { - global::Stetic.Gui.Initialize (this); - // Widget MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget - global::Stetic.BinContainer.Attach (this); - this.Name = "MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget"; - // Container child MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox (); - this.vbox1.Name = "vbox1"; - this.vbox1.Spacing = 6; - // Container child vbox1.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.Xalign = 0F; - this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Code Generation"); - this.vbox1.Add (this.label1); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label1])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); - this.hbox1.Name = "hbox1"; - this.hbox1.Spacing = 6; - // Container child hbox1.Gtk.Box+BoxChild - this.label2 = new global::Gtk.Label (); - this.label2.WidthRequest = 18; - this.label2.Name = "label2"; - this.hbox1.Add (this.label2); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child hbox1.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); - this.vbox2.Name = "vbox2"; - this.vbox2.Spacing = 6; - // Container child vbox2.Gtk.Box+BoxChild - this.disableCodeBehindGeneration = new global::Gtk.CheckButton (); - this.disableCodeBehindGeneration.CanFocus = true; - this.disableCodeBehindGeneration.Name = "disableCodeBehindGeneration"; - this.disableCodeBehindGeneration.Label = global::Mono.Unix.Catalog.GetString ("Disable automatic updating of CodeBehind partial classes"); - this.disableCodeBehindGeneration.DrawIndicator = true; - this.disableCodeBehindGeneration.UseUnderline = true; - this.vbox2.Add (this.disableCodeBehindGeneration); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.disableCodeBehindGeneration])); - w3.Position = 0; - w3.Expand = false; - w3.Fill = false; - this.hbox1.Add (this.vbox2); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); - w4.Position = 1; - this.vbox1.Add (this.hbox1); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); - w5.Position = 1; - w5.Expand = false; - w5.Fill = false; - this.Add (this.vbox1); - if ((this.Child != null)) { - this.Child.ShowAll (); - } - this.Show (); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Gui.XspOptionsPanelWidget.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Gui.XspOptionsPanelWidget.cs deleted file mode 100644 index a089a05cf4..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/MonoDevelop.AspNet.Gui.XspOptionsPanelWidget.cs +++ /dev/null @@ -1,406 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace MonoDevelop.AspNet.Gui -{ - public partial class XspOptionsPanelWidget - { - private global::Gtk.VBox vbox1; - private global::Gtk.Label label1; - private global::Gtk.HBox hbox2; - private global::Gtk.Label label4; - private global::Gtk.VBox vbox2; - private global::Gtk.Table table2; - private global::Gtk.Entry ipAddress; - private global::Gtk.Label label15; - private global::Gtk.Label label7; - private global::Gtk.Label label8; - private global::Gtk.SpinButton portNumber; - private global::Gtk.CheckButton verboseCheck; - private global::Gtk.Label label2; - private global::Gtk.HBox hbox3; - private global::Gtk.Label label5; - private global::Gtk.Table table3; - private global::Gtk.Label label10; - private global::Gtk.Label label9; - private global::Gtk.ComboBox sslMode; - private global::Gtk.ComboBox sslProtocol; - private global::Gtk.Label label3; - private global::Gtk.HBox hbox4; - private global::Gtk.Label label6; - private global::Gtk.Table table4; - private global::MonoDevelop.Components.FileEntry certLocation; - private global::Gtk.HBox hbox5; - private global::Gtk.ComboBox keyType; - private global::Gtk.HBox hbox6; - private global::Gtk.ComboBox passwordOptions; - private global::Gtk.Entry passwordEntry; - private global::MonoDevelop.Components.FileEntry keyLocation; - private global::Gtk.Label label11; - private global::Gtk.Label label12; - private global::Gtk.Label label13; - private global::Gtk.Label label14; - - protected virtual void Build () - { - global::Stetic.Gui.Initialize (this); - // Widget MonoDevelop.AspNet.Gui.XspOptionsPanelWidget - global::Stetic.BinContainer.Attach (this); - this.Name = "MonoDevelop.AspNet.Gui.XspOptionsPanelWidget"; - // Container child MonoDevelop.AspNet.Gui.XspOptionsPanelWidget.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox (); - this.vbox1.Name = "vbox1"; - this.vbox1.Spacing = 12; - // Container child vbox1.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.Xalign = 0F; - this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>General Options</b>"); - this.label1.UseMarkup = true; - this.vbox1.Add (this.label1); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label1])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox2 = new global::Gtk.HBox (); - this.hbox2.Name = "hbox2"; - // Container child hbox2.Gtk.Box+BoxChild - this.label4 = new global::Gtk.Label (); - this.label4.WidthRequest = 18; - this.label4.Name = "label4"; - this.hbox2.Add (this.label4); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label4])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child hbox2.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); - this.vbox2.Name = "vbox2"; - this.vbox2.Spacing = 6; - // Container child vbox2.Gtk.Box+BoxChild - this.table2 = new global::Gtk.Table (((uint)(2)), ((uint)(3)), false); - this.table2.Name = "table2"; - this.table2.RowSpacing = ((uint)(6)); - this.table2.ColumnSpacing = ((uint)(6)); - // Container child table2.Gtk.Table+TableChild - this.ipAddress = new global::Gtk.Entry (); - this.ipAddress.CanFocus = true; - this.ipAddress.Name = "ipAddress"; - this.ipAddress.IsEditable = true; - this.ipAddress.InvisibleChar = '●'; - this.table2.Add (this.ipAddress); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table2 [this.ipAddress])); - w3.LeftAttach = ((uint)(1)); - w3.RightAttach = ((uint)(2)); - w3.XOptions = ((global::Gtk.AttachOptions)(4)); - w3.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table2.Gtk.Table+TableChild - this.label15 = new global::Gtk.Label (); - this.label15.Name = "label15"; - this.label15.LabelProp = global::Mono.Unix.Catalog.GetString ("0 = Random Port"); - this.table2.Add (this.label15); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table2 [this.label15])); - w4.TopAttach = ((uint)(1)); - w4.BottomAttach = ((uint)(2)); - w4.LeftAttach = ((uint)(2)); - w4.RightAttach = ((uint)(3)); - w4.XOptions = ((global::Gtk.AttachOptions)(4)); - w4.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table2.Gtk.Table+TableChild - this.label7 = new global::Gtk.Label (); - this.label7.Name = "label7"; - this.label7.Xalign = 0F; - this.label7.LabelProp = global::Mono.Unix.Catalog.GetString ("Port number:"); - this.table2.Add (this.label7); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table2 [this.label7])); - w5.TopAttach = ((uint)(1)); - w5.BottomAttach = ((uint)(2)); - w5.XOptions = ((global::Gtk.AttachOptions)(4)); - w5.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table2.Gtk.Table+TableChild - this.label8 = new global::Gtk.Label (); - this.label8.Name = "label8"; - this.label8.Xalign = 0F; - this.label8.LabelProp = global::Mono.Unix.Catalog.GetString ("IP address:"); - this.table2.Add (this.label8); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2 [this.label8])); - w6.XOptions = ((global::Gtk.AttachOptions)(4)); - w6.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table2.Gtk.Table+TableChild - this.portNumber = new global::Gtk.SpinButton (0, 32767, 1); - this.portNumber.CanFocus = true; - this.portNumber.Name = "portNumber"; - this.portNumber.Adjustment.PageIncrement = 10; - this.portNumber.ClimbRate = 1; - this.portNumber.Numeric = true; - this.table2.Add (this.portNumber); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table2 [this.portNumber])); - w7.TopAttach = ((uint)(1)); - w7.BottomAttach = ((uint)(2)); - w7.LeftAttach = ((uint)(1)); - w7.RightAttach = ((uint)(2)); - w7.XOptions = ((global::Gtk.AttachOptions)(4)); - w7.YOptions = ((global::Gtk.AttachOptions)(4)); - this.vbox2.Add (this.table2); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table2])); - w8.Position = 0; - w8.Expand = false; - w8.Fill = false; - // Container child vbox2.Gtk.Box+BoxChild - this.verboseCheck = new global::Gtk.CheckButton (); - this.verboseCheck.CanFocus = true; - this.verboseCheck.Name = "verboseCheck"; - this.verboseCheck.Label = global::Mono.Unix.Catalog.GetString ("Verbose console output"); - this.verboseCheck.DrawIndicator = true; - this.verboseCheck.UseUnderline = true; - this.vbox2.Add (this.verboseCheck); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.verboseCheck])); - w9.Position = 1; - w9.Expand = false; - w9.Fill = false; - this.hbox2.Add (this.vbox2); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox2])); - w10.Position = 1; - w10.Expand = false; - w10.Fill = false; - this.vbox1.Add (this.hbox2); - global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox2])); - w11.Position = 1; - w11.Expand = false; - w11.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.label2 = new global::Gtk.Label (); - this.label2.Name = "label2"; - this.label2.Xalign = 0F; - this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Security</b>"); - this.label2.UseMarkup = true; - this.vbox1.Add (this.label2); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label2])); - w12.Position = 2; - w12.Expand = false; - w12.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox3 = new global::Gtk.HBox (); - this.hbox3.Name = "hbox3"; - // Container child hbox3.Gtk.Box+BoxChild - this.label5 = new global::Gtk.Label (); - this.label5.WidthRequest = 18; - this.label5.Name = "label5"; - this.hbox3.Add (this.label5); - global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.label5])); - w13.Position = 0; - w13.Expand = false; - w13.Fill = false; - // Container child hbox3.Gtk.Box+BoxChild - this.table3 = new global::Gtk.Table (((uint)(2)), ((uint)(2)), false); - this.table3.Name = "table3"; - this.table3.RowSpacing = ((uint)(6)); - this.table3.ColumnSpacing = ((uint)(6)); - // Container child table3.Gtk.Table+TableChild - this.label10 = new global::Gtk.Label (); - this.label10.Name = "label10"; - this.label10.Xalign = 0F; - this.label10.LabelProp = global::Mono.Unix.Catalog.GetString ("SSL mode:"); - this.table3.Add (this.label10); - global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table3 [this.label10])); - w14.XOptions = ((global::Gtk.AttachOptions)(4)); - w14.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table3.Gtk.Table+TableChild - this.label9 = new global::Gtk.Label (); - this.label9.Name = "label9"; - this.label9.Xalign = 0F; - this.label9.LabelProp = global::Mono.Unix.Catalog.GetString ("SSL protocol:"); - this.table3.Add (this.label9); - global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table3 [this.label9])); - w15.TopAttach = ((uint)(1)); - w15.BottomAttach = ((uint)(2)); - w15.XOptions = ((global::Gtk.AttachOptions)(4)); - w15.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table3.Gtk.Table+TableChild - this.sslMode = global::Gtk.ComboBox.NewText (); - this.sslMode.Name = "sslMode"; - this.table3.Add (this.sslMode); - global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table3 [this.sslMode])); - w16.LeftAttach = ((uint)(1)); - w16.RightAttach = ((uint)(2)); - w16.XOptions = ((global::Gtk.AttachOptions)(4)); - w16.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table3.Gtk.Table+TableChild - this.sslProtocol = global::Gtk.ComboBox.NewText (); - this.sslProtocol.Name = "sslProtocol"; - this.table3.Add (this.sslProtocol); - global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table3 [this.sslProtocol])); - w17.TopAttach = ((uint)(1)); - w17.BottomAttach = ((uint)(2)); - w17.LeftAttach = ((uint)(1)); - w17.RightAttach = ((uint)(2)); - w17.XOptions = ((global::Gtk.AttachOptions)(4)); - w17.YOptions = ((global::Gtk.AttachOptions)(4)); - this.hbox3.Add (this.table3); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.table3])); - w18.Position = 1; - w18.Expand = false; - w18.Fill = false; - this.vbox1.Add (this.hbox3); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox3])); - w19.Position = 3; - w19.Expand = false; - w19.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.label3 = new global::Gtk.Label (); - this.label3.Name = "label3"; - this.label3.Xalign = 0F; - this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>SSL Key</b>"); - this.label3.UseMarkup = true; - this.vbox1.Add (this.label3); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label3])); - w20.Position = 4; - w20.Expand = false; - w20.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox4 = new global::Gtk.HBox (); - this.hbox4.Name = "hbox4"; - // Container child hbox4.Gtk.Box+BoxChild - this.label6 = new global::Gtk.Label (); - this.label6.WidthRequest = 18; - this.label6.Name = "label6"; - this.hbox4.Add (this.label6); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.label6])); - w21.Position = 0; - w21.Expand = false; - w21.Fill = false; - // Container child hbox4.Gtk.Box+BoxChild - this.table4 = new global::Gtk.Table (((uint)(4)), ((uint)(2)), false); - this.table4.Name = "table4"; - this.table4.RowSpacing = ((uint)(6)); - this.table4.ColumnSpacing = ((uint)(6)); - // Container child table4.Gtk.Table+TableChild - this.certLocation = new global::MonoDevelop.Components.FileEntry (); - this.certLocation.Name = "certLocation"; - this.table4.Add (this.certLocation); - global::Gtk.Table.TableChild w22 = ((global::Gtk.Table.TableChild)(this.table4 [this.certLocation])); - w22.TopAttach = ((uint)(2)); - w22.BottomAttach = ((uint)(3)); - w22.LeftAttach = ((uint)(1)); - w22.RightAttach = ((uint)(2)); - w22.XOptions = ((global::Gtk.AttachOptions)(4)); - w22.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.hbox5 = new global::Gtk.HBox (); - this.hbox5.Name = "hbox5"; - this.hbox5.Spacing = 6; - // Container child hbox5.Gtk.Box+BoxChild - this.keyType = global::Gtk.ComboBox.NewText (); - this.keyType.Name = "keyType"; - this.hbox5.Add (this.keyType); - global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox5 [this.keyType])); - w23.Position = 0; - w23.Expand = false; - w23.Fill = false; - this.table4.Add (this.hbox5); - global::Gtk.Table.TableChild w24 = ((global::Gtk.Table.TableChild)(this.table4 [this.hbox5])); - w24.LeftAttach = ((uint)(1)); - w24.RightAttach = ((uint)(2)); - w24.XOptions = ((global::Gtk.AttachOptions)(4)); - w24.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.hbox6 = new global::Gtk.HBox (); - this.hbox6.Name = "hbox6"; - this.hbox6.Spacing = 6; - // Container child hbox6.Gtk.Box+BoxChild - this.passwordOptions = global::Gtk.ComboBox.NewText (); - this.passwordOptions.Name = "passwordOptions"; - this.hbox6.Add (this.passwordOptions); - global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox6 [this.passwordOptions])); - w25.Position = 0; - w25.Expand = false; - w25.Fill = false; - // Container child hbox6.Gtk.Box+BoxChild - this.passwordEntry = new global::Gtk.Entry (); - this.passwordEntry.CanFocus = true; - this.passwordEntry.Name = "passwordEntry"; - this.passwordEntry.IsEditable = true; - this.passwordEntry.InvisibleChar = '●'; - this.hbox6.Add (this.passwordEntry); - global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox6 [this.passwordEntry])); - w26.Position = 1; - this.table4.Add (this.hbox6); - global::Gtk.Table.TableChild w27 = ((global::Gtk.Table.TableChild)(this.table4 [this.hbox6])); - w27.TopAttach = ((uint)(3)); - w27.BottomAttach = ((uint)(4)); - w27.LeftAttach = ((uint)(1)); - w27.RightAttach = ((uint)(2)); - w27.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.keyLocation = new global::MonoDevelop.Components.FileEntry (); - this.keyLocation.Name = "keyLocation"; - this.table4.Add (this.keyLocation); - global::Gtk.Table.TableChild w28 = ((global::Gtk.Table.TableChild)(this.table4 [this.keyLocation])); - w28.TopAttach = ((uint)(1)); - w28.BottomAttach = ((uint)(2)); - w28.LeftAttach = ((uint)(1)); - w28.RightAttach = ((uint)(2)); - w28.XOptions = ((global::Gtk.AttachOptions)(4)); - w28.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.label11 = new global::Gtk.Label (); - this.label11.Name = "label11"; - this.label11.Xalign = 0F; - this.label11.LabelProp = global::Mono.Unix.Catalog.GetString ("Key type:"); - this.table4.Add (this.label11); - global::Gtk.Table.TableChild w29 = ((global::Gtk.Table.TableChild)(this.table4 [this.label11])); - w29.XOptions = ((global::Gtk.AttachOptions)(4)); - w29.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.label12 = new global::Gtk.Label (); - this.label12.Name = "label12"; - this.label12.Xalign = 0F; - this.label12.LabelProp = global::Mono.Unix.Catalog.GetString ("Key location:"); - this.table4.Add (this.label12); - global::Gtk.Table.TableChild w30 = ((global::Gtk.Table.TableChild)(this.table4 [this.label12])); - w30.TopAttach = ((uint)(1)); - w30.BottomAttach = ((uint)(2)); - w30.XOptions = ((global::Gtk.AttachOptions)(4)); - w30.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.label13 = new global::Gtk.Label (); - this.label13.Name = "label13"; - this.label13.Xalign = 0F; - this.label13.LabelProp = global::Mono.Unix.Catalog.GetString ("Certificate location:"); - this.table4.Add (this.label13); - global::Gtk.Table.TableChild w31 = ((global::Gtk.Table.TableChild)(this.table4 [this.label13])); - w31.TopAttach = ((uint)(2)); - w31.BottomAttach = ((uint)(3)); - w31.XOptions = ((global::Gtk.AttachOptions)(4)); - w31.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table4.Gtk.Table+TableChild - this.label14 = new global::Gtk.Label (); - this.label14.Name = "label14"; - this.label14.Xalign = 0F; - this.label14.LabelProp = global::Mono.Unix.Catalog.GetString ("Password:"); - this.table4.Add (this.label14); - global::Gtk.Table.TableChild w32 = ((global::Gtk.Table.TableChild)(this.table4 [this.label14])); - w32.TopAttach = ((uint)(3)); - w32.BottomAttach = ((uint)(4)); - w32.XOptions = ((global::Gtk.AttachOptions)(4)); - w32.YOptions = ((global::Gtk.AttachOptions)(4)); - this.hbox4.Add (this.table4); - global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.table4])); - w33.Position = 1; - this.vbox1.Add (this.hbox4); - global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); - w34.Position = 5; - w34.Expand = false; - w34.Fill = false; - this.Add (this.vbox1); - if ((this.Child != null)) { - this.Child.ShowAll (); - } - this.Show (); - this.sslProtocol.Changed += new global::System.EventHandler (this.updateSensitivity); - this.sslMode.Changed += new global::System.EventHandler (this.updateSensitivity); - this.passwordOptions.Changed += new global::System.EventHandler (this.updateSensitivity); - this.keyType.Changed += new global::System.EventHandler (this.updateSensitivity); - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/generated.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/generated.cs deleted file mode 100644 index 5cdc11900b..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/generated.cs +++ /dev/null @@ -1,116 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace Stetic -{ - internal class Gui - { - private static bool initialized; - - internal static void Initialize (Gtk.Widget iconRenderer) - { - if ((Stetic.Gui.initialized == false)) { - Stetic.Gui.initialized = true; - } - } - } - - internal class BinContainer - { - private Gtk.Widget child; - - private Gtk.UIManager uimanager; - - public static BinContainer Attach (Gtk.Bin bin) - { - BinContainer bc = new BinContainer (); - bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested); - bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated); - bin.Added += new Gtk.AddedHandler (bc.OnAdded); - return bc; - } - - private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args) - { - if ((this.child != null)) { - args.Requisition = this.child.SizeRequest (); - } - } - - private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args) - { - if ((this.child != null)) { - this.child.Allocation = args.Allocation; - } - } - - private void OnAdded (object sender, Gtk.AddedArgs args) - { - this.child = args.Widget; - } - - public void SetUiManager (Gtk.UIManager uim) - { - this.uimanager = uim; - this.child.Realized += new System.EventHandler (this.OnRealized); - } - - private void OnRealized (object sender, System.EventArgs args) - { - if ((this.uimanager != null)) { - Gtk.Widget w; - w = this.child.Toplevel; - if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) { - ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup); - this.uimanager = null; - } - } - } - } - - internal class IconLoader - { - public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size) - { - Gdk.Pixbuf res = widget.RenderIcon (name, size, null); - if ((res != null)) { - return res; - } else { - int sz; - int sy; - global::Gtk.Icon.SizeLookup (size, out sz, out sy); - try { - return Gtk.IconTheme.Default.LoadIcon (name, sz, 0); - } catch (System.Exception) { - if ((name != "gtk-missing-image")) { - return Stetic.IconLoader.LoadIcon (widget, "gtk-missing-image", size); - } else { - Gdk.Pixmap pmap = new Gdk.Pixmap (Gdk.Screen.Default.RootWindow, sz, sz); - Gdk.GC gc = new Gdk.GC (pmap); - gc.RgbFgColor = new Gdk.Color (255, 255, 255); - pmap.DrawRectangle (gc, true, 0, 0, sz, sz); - gc.RgbFgColor = new Gdk.Color (0, 0, 0); - pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1)); - gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round); - gc.RgbFgColor = new Gdk.Color (255, 0, 0); - pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4))); - pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4))); - return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz); - } - } - } - } - } - - internal class ActionGroups - { - public static Gtk.ActionGroup GetActionGroup (System.Type type) - { - return Stetic.ActionGroups.GetActionGroup (type.FullName); - } - - public static Gtk.ActionGroup GetActionGroup (string name) - { - return null; - } - } -} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/gui.stetic b/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/gui.stetic deleted file mode 100644 index 499747ec0d..0000000000 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/gui.stetic +++ /dev/null @@ -1,1137 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<stetic-interface> - <configuration> - <images-root-path>..</images-root-path> - <target-gtk-version>2.12</target-gtk-version> - </configuration> - <import> - <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll" /> - <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" /> - <widget-library name="../../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" /> - <widget-library name="../../../../../build/AddIns/MonoDevelop.AspNet/MonoDevelop.AspNet.dll" internal="true" /> - </import> - <widget class="Gtk.Bin" id="MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget" design-size="496 300"> - <property name="MemberName" /> - <property name="GeneratePublic">False</property> - <child> - <widget class="Gtk.VBox" id="vbox1"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label1"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Code Generation</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> - <child> - <widget class="Gtk.HBox" id="hbox1"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label2"> - <property name="MemberName" /> - <property name="WidthRequest">18</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> - <child> - <widget class="Gtk.VBox" id="vbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.CheckButton" id="disableCodeBehindGeneration"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Label" translatable="yes">Disable automatic updating of CodeBehind partial classes</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</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> - <child> - <placeholder /> - </child> - <child> - <placeholder /> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - <child> - <placeholder /> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <placeholder /> - </child> - </widget> - </child> - </widget> - <widget class="Gtk.Bin" id="MonoDevelop.AspNet.Gui.XspOptionsPanelWidget" design-size="358 387"> - <property name="MemberName" /> - <child> - <widget class="Gtk.VBox" id="vbox1"> - <property name="MemberName" /> - <property name="Spacing">12</property> - <child> - <widget class="Gtk.Label" id="label1"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>General Options</b></property> - <property name="UseMarkup">True</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> - <child> - <widget class="Gtk.HBox" id="hbox2"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label4"> - <property name="MemberName" /> - <property name="WidthRequest">18</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> - <child> - <widget class="Gtk.VBox" id="vbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Table" id="table2"> - <property name="MemberName" /> - <property name="NRows">2</property> - <property name="NColumns">3</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <placeholder /> - </child> - <child> - <widget class="Gtk.Entry" id="ipAddress"> - <property name="MemberName" /> - <property name="CanFocus">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">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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label15"> - <property name="MemberName" /> - <property name="LabelProp" translatable="yes">0 = Random Port</property> - </widget> - <packing> - <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> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label7"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Port number:</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label8"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">IP address:</property> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.SpinButton" id="portNumber"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Upper">32767</property> - <property name="PageIncrement">10</property> - <property name="StepIncrement">1</property> - <property name="ClimbRate">1</property> - <property name="Numeric">True</property> - </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">False</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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.CheckButton" id="verboseCheck"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Label" translatable="yes">Verbose console output</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</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="Position">1</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label2"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Security</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox3"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label5"> - <property name="MemberName" /> - <property name="WidthRequest">18</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> - <child> - <widget class="Gtk.Table" id="table3"> - <property name="MemberName" /> - <property name="NRows">2</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="Gtk.Label" id="label10"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">SSL mode:</property> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label9"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">SSL protocol:</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.ComboBox" id="sslMode"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="updateSensitivity" /> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.ComboBox" id="sslProtocol"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="updateSensitivity" /> - </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> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - </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="Position">3</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label3"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>SSL Key</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">4</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox4"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label6"> - <property name="MemberName" /> - <property name="WidthRequest">18</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> - <child> - <widget class="Gtk.Table" id="table4"> - <property name="MemberName" /> - <property name="NRows">4</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="MonoDevelop.Components.FileEntry" id="certLocation"> - <property name="MemberName" /> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">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="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox5"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.ComboBox" id="keyType"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="updateSensitivity" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <placeholder /> - </child> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox6"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.ComboBox" id="passwordOptions"> - <property name="MemberName" /> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="updateSensitivity" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="passwordEntry"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - </packing> - </child> - </widget> - <packing> - <property name="TopAttach">3</property> - <property name="BottomAttach">4</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="MonoDevelop.Components.FileEntry" id="keyLocation"> - <property name="MemberName" /> - </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> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label11"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Key type:</property> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label12"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Key location:</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label13"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Certificate location:</property> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label14"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Password:</property> - </widget> - <packing> - <property name="TopAttach">3</property> - <property name="BottomAttach">4</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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">5</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <widget class="Gtk.Bin" id="MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget" design-size="300 300"> - <property name="MemberName" /> - <child> - <widget class="Gtk.HBox" id="hbox1"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.ScrolledWindow" id="scrolledwindow1"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="ShadowType">In</property> - <child> - <widget class="Gtk.TreeView" id="targetView"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - </widget> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Button" id="addButton"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-add</property> - <signal name="Activated" handler="AddActivated" /> - <signal name="Clicked" handler="AddActivated" /> - <property name="label">gtk-add</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> - <child> - <widget class="Gtk.Button" id="editButton"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-edit</property> - <signal name="Activated" handler="EditActivated" /> - <signal name="Clicked" handler="EditActivated" /> - <property name="label">gtk-edit</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> - <child> - <widget class="Gtk.Button" id="removeButton"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-remove</property> - <signal name="Activated" handler="RemoveActivated" /> - <signal name="Clicked" handler="RemoveActivated" /> - <property name="label">gtk-remove</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <placeholder /> - </child> - </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> - </child> - </widget> - <widget class="Gtk.Window" id="MonoDevelop.AspNet.Deployment.WebTargetEditor" design-size="400 300"> - <property name="MemberName" /> - <property name="Visible">False</property> - <property name="Title">WebTargetEditor</property> - <property name="WindowPosition">CenterOnParent</property> - <child> - <placeholder /> - </child> - </widget> - <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Deployment.WebDeployTargetEditor" design-size="400 300"> - <property name="MemberName" /> - <property name="Visible">False</property> - <property name="Title" translatable="yes">Edit Web Deployment Target</property> - <property name="TypeHint">Dialog</property> - <property name="WindowPosition">CenterOnParent</property> - <property name="Modal">True</property> - <property name="BorderWidth">9</property> - <property name="Buttons">2</property> - <property name="HelpButton">False</property> - <child internal-child="VBox"> - <widget class="Gtk.VBox" id="dialog1_VBox"> - <property name="MemberName" /> - <property name="Spacing">7</property> - <property name="BorderWidth">2</property> - <child> - <widget class="Gtk.Label" id="label1"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>General Options</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox2"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label4"> - <property name="MemberName" /> - <property name="WidthRequest">18</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> - <child> - <widget class="Gtk.VBox" id="vbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Table" id="table2"> - <property name="MemberName" /> - <property name="NRows">2</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <placeholder /> - </child> - <child> - <placeholder /> - </child> - <child> - <widget class="Gtk.Label" id="label8"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Name:</property> - </widget> - <packing> - <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">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="nameEntry"> - <property name="MemberName" /> - <property name="CanFocus">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="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - </packing> - </child> - <child> - <placeholder /> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label2"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>File Copying</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="fileCopyHbox"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label5"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox3"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.HBox" id="fileCopyBox"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <placeholder /> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">3</property> - <property name="AutoSize">False</property> - </packing> - </child> - <child> - <placeholder /> - </child> - </widget> - </child> - <child internal-child="ActionArea"> - <widget class="Gtk.HButtonBox" id="dialog1_ActionArea"> - <property name="MemberName" /> - <property name="Spacing">10</property> - <property name="BorderWidth">5</property> - <property name="Size">2</property> - <property name="LayoutStyle">End</property> - <child> - <widget class="Gtk.Button" id="buttonCancel"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-cancel</property> - <property name="ResponseId">-6</property> - <property name="label">gtk-cancel</property> - </widget> - <packing> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Button" id="buttonOk"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="HasDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-ok</property> - <property name="ResponseId">-5</property> - <property name="label">gtk-ok</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog" design-size="511 353"> - <property name="MemberName" /> - <property name="Visible">False</property> - <property name="Title" translatable="yes">Deploy to Web</property> - <property name="WindowPosition">CenterOnParent</property> - <property name="Modal">True</property> - <property name="BorderWidth">9</property> - <property name="Buttons">3</property> - <property name="HelpButton">False</property> - <child internal-child="VBox"> - <widget class="Gtk.VBox" id="dialog1_VBox"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <property name="BorderWidth">2</property> - <child> - <widget class="Gtk.Label" id="titleLabel"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><big><b>Deploying Web Project...</b></big></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label1"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Targets to which the project should be deployed:</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - <property name="Padding">4</property> - </packing> - </child> - <child> - <widget class="Gtk.ScrolledWindow" id="scrolledwindow4"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="ShadowType">In</property> - <child> - <widget class="Gtk.TreeView" id="targetView"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - </widget> - </child> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">True</property> - </packing> - </child> - </widget> - </child> - <child internal-child="ActionArea"> - <widget class="Gtk.HButtonBox" id="dialog1_ActionArea"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <property name="BorderWidth">5</property> - <property name="Size">3</property> - <property name="LayoutStyle">End</property> - <child> - <widget class="Gtk.Button" id="button6"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Type">TextAndIcon</property> - <property name="Icon">stock:gtk-edit Menu</property> - <property name="Label" translatable="yes">_Edit targets</property> - <property name="UseUnderline">True</property> - <property name="ResponseId">-11</property> - <signal name="Clicked" handler="editTargetsClicked" /> - </widget> - <packing> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Button" id="buttonCancel"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="UseStock">True</property> - <property name="Type">StockItem</property> - <property name="StockId">gtk-cancel</property> - <property name="ResponseId">-6</property> - <property name="label">gtk-cancel</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Button" id="buttonDeploy"> - <property name="MemberName" /> - <property name="CanDefault">True</property> - <property name="CanFocus">True</property> - <property name="Type">TextAndIcon</property> - <property name="Icon">stock:gtk-ok Menu</property> - <property name="Label" translatable="yes">_Deploy</property> - <property name="UseUnderline">True</property> - <property name="ResponseId">-5</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> -</stetic-interface>
\ No newline at end of file diff --git a/main/src/addins/CSharpBinding/AspNet/ASPNetReferenceFinder.cs b/main/src/addins/CSharpBinding/AspNet/ASPNetReferenceFinder.cs index 48c09c1ad0..1484fe7b1d 100644 --- a/main/src/addins/CSharpBinding/AspNet/ASPNetReferenceFinder.cs +++ b/main/src/addins/CSharpBinding/AspNet/ASPNetReferenceFinder.cs @@ -23,20 +23,13 @@ // 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 System.Collections.Generic; using MonoDevelop.Core; -using MonoDevelop.Ide; -using MonoDevelop.CSharp.Resolver; using MonoDevelop.Ide.FindInFiles; -using MonoDevelop.AspNet; -using MonoDevelop.CSharp.Completion; -using MonoDevelop.AspNet.Parser; -using MonoDevelop.AspNet.Gui; -using System.Linq; using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Ide.TypeSystem; +using MonoDevelop.AspNet.WebForms; namespace MonoDevelop.CSharp.Refactoring { diff --git a/main/src/addins/CSharpBinding/AspNet/AspLanguageBuilder.cs b/main/src/addins/CSharpBinding/AspNet/AspLanguageBuilder.cs index 8836afcfe9..4e1fc93617 100644 --- a/main/src/addins/CSharpBinding/AspNet/AspLanguageBuilder.cs +++ b/main/src/addins/CSharpBinding/AspNet/AspLanguageBuilder.cs @@ -25,22 +25,15 @@ // THE SOFTWARE. using System; -using System.Linq; -using MonoDevelop.AspNet.Gui; -using System.Text; using System.Collections.Generic; +using System.IO; +using System.Text; +using Mono.TextEditor; +using MonoDevelop.AspNet.WebForms; +using MonoDevelop.AspNet.WebForms.Dom; using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.Ide.Gui; -using Mono.TextEditor; using MonoDevelop.Ide.TypeSystem; -using ICSharpCode.NRefactory.TypeSystem; -using MonoDevelop.CSharp.Parser; -using System.IO; -using ICSharpCode.NRefactory.Completion; -using MonoDevelop.AspNet.StateEngine; -using MonoDevelop.Xml.StateEngine; - - namespace MonoDevelop.CSharp.Completion { @@ -89,7 +82,7 @@ namespace MonoDevelop.CSharp.Completion sb.AppendLine ("{"); //Console.WriteLine ("start:" + location.BeginLine +"/" +location.BeginColumn); foreach (var node in info.XExpressions) { - bool isBlock = node is AspNetRenderBlock; + bool isBlock = node is WebFormsRenderBlock; if (node.Region.Begin.Line > data.Caret.Line || node.Region.Begin.Line == data.Caret.Line && node.Region.Begin.Column > data.Caret.Column - 5) continue; @@ -126,7 +119,7 @@ namespace MonoDevelop.CSharp.Completion return result; } - public ICompletionDataList HandlePopupCompletion (MonoDevelop.Ide.Gui.Document realDocument, DocumentInfo info, LocalDocumentInfo localInfo) + public ICompletionDataList HandlePopupCompletion (Document realDocument, DocumentInfo info, LocalDocumentInfo localInfo) { CodeCompletionContext codeCompletionContext; using (var completion = CreateCompletion (realDocument, info, localInfo, out codeCompletionContext)) { @@ -134,7 +127,7 @@ namespace MonoDevelop.CSharp.Completion } } - public ICompletionDataList HandleCompletion (MonoDevelop.Ide.Gui.Document realDocument, CodeCompletionContext completionContext, DocumentInfo info, LocalDocumentInfo localInfo, char currentChar, ref int triggerWordLength) + public ICompletionDataList HandleCompletion (Document realDocument, CodeCompletionContext completionContext, DocumentInfo info, LocalDocumentInfo localInfo, char currentChar, ref int triggerWordLength) { CodeCompletionContext ccc; using (var completion = CreateCompletion (realDocument, info, localInfo, out ccc)) { @@ -142,7 +135,7 @@ namespace MonoDevelop.CSharp.Completion } } - public ParameterDataProvider HandleParameterCompletion (MonoDevelop.Ide.Gui.Document realDocument, CodeCompletionContext completionContext, DocumentInfo info, LocalDocumentInfo localInfo, char completionChar) + public ParameterDataProvider HandleParameterCompletion (Document realDocument, CodeCompletionContext completionContext, DocumentInfo info, LocalDocumentInfo localInfo, char completionChar) { CodeCompletionContext ccc; using (var completion = CreateCompletion (realDocument, info, localInfo, out ccc)) { @@ -150,7 +143,7 @@ namespace MonoDevelop.CSharp.Completion } } - public bool GetParameterCompletionCommandOffset (MonoDevelop.Ide.Gui.Document realDocument, DocumentInfo info, LocalDocumentInfo localInfo, out int cpos) + public bool GetParameterCompletionCommandOffset (Document realDocument, DocumentInfo info, LocalDocumentInfo localInfo, out int cpos) { CodeCompletionContext codeCompletionContext; using (var completion = CreateCompletion (realDocument, info, localInfo, out codeCompletionContext)) { @@ -158,14 +151,14 @@ namespace MonoDevelop.CSharp.Completion } } - public ICompletionWidget CreateCompletionWidget (MonoDevelop.Ide.Gui.Document realDocument, LocalDocumentInfo localInfo) + public ICompletionWidget CreateCompletionWidget (Document realDocument, LocalDocumentInfo localInfo) { return new AspCompletionWidget (realDocument, localInfo); } - CSharpCompletionTextEditorExtension CreateCompletion (MonoDevelop.Ide.Gui.Document realDocument, DocumentInfo info, LocalDocumentInfo localInfo, out CodeCompletionContext codeCompletionContext) + CSharpCompletionTextEditorExtension CreateCompletion (Document realDocument, DocumentInfo info, LocalDocumentInfo localInfo, out CodeCompletionContext codeCompletionContext) { - var doc = new Mono.TextEditor.TextDocument () { + var doc = new TextDocument () { Text = localInfo.LocalDocument, }; var documentLocation = doc.OffsetToLocation (localInfo.CaretPosition); @@ -183,10 +176,10 @@ namespace MonoDevelop.CSharp.Completion class AspCompletionWidget : ICompletionWidget { - MonoDevelop.Ide.Gui.Document realDocument; + Document realDocument; LocalDocumentInfo localInfo; - public AspCompletionWidget (MonoDevelop.Ide.Gui.Document realDocument, LocalDocumentInfo localInfo) + public AspCompletionWidget (Document realDocument, LocalDocumentInfo localInfo) { this.realDocument = realDocument; this.localInfo = localInfo; @@ -317,7 +310,7 @@ namespace MonoDevelop.CSharp.Completion //Console.WriteLine ("start:" + location.BeginLine +"/" +location.BeginColumn); foreach (var node in info.XExpressions) { - bool isBlock = node is AspNetRenderBlock; + bool isBlock = node is WebFormsRenderBlock; var start = data.Document.LocationToOffset (node.Region.Begin.Line, node.Region.Begin.Column) + 2; var end = data.Document.LocationToOffset (node.Region.End.Line, node.Region.End.Column) - 2; diff --git a/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj b/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj index 744f5f99e3..b18ea2c62f 100644 --- a/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj +++ b/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj @@ -46,13 +46,9 @@ <Compile Include="AspLanguageBuilder.cs" /> <Compile Include="ASPNetReferenceFinder.cs" /> <Compile Include="AddinInfo.cs" /> + <Compile Include="RazorCSharpCompletionBuilder.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\AspNet\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj"> <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project> <Name>MonoDevelop.Core</Name> @@ -123,6 +119,11 @@ <Name>Mono.Addins</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\..\Web\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> + <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> + <Name>MonoDevelop.AspNet</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <ItemGroup> diff --git a/main/src/addins/CSharpBinding/AspNet/ExtensionModel.addin.xml b/main/src/addins/CSharpBinding/AspNet/ExtensionModel.addin.xml index 047552a725..9b13555ae8 100644 --- a/main/src/addins/CSharpBinding/AspNet/ExtensionModel.addin.xml +++ b/main/src/addins/CSharpBinding/AspNet/ExtensionModel.addin.xml @@ -6,4 +6,7 @@ <ReferenceFinder supportedmimetypes = "application/x-aspx,application/x-ascx,application/x-asax,application/x-ashx,application/x-asmx,application/x-asix" class = "MonoDevelop.CSharp.Refactoring.ASPNetReferenceFinder" /> </Extension> + <Extension path = "/MonoDevelop/Razor/CompletionBuilders"> + <Class class = "MonoDevelop.CSharp.Completion.RazorCSharpCompletionBuilder" /> + </Extension> </ExtensionModel> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Completion/RazorCSharpCompletionBuilder.cs b/main/src/addins/CSharpBinding/AspNet/RazorCSharpCompletionBuilder.cs index e8341d7b12..019c79b18e 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Completion/RazorCSharpCompletionBuilder.cs +++ b/main/src/addins/CSharpBinding/AspNet/RazorCSharpCompletionBuilder.cs @@ -25,21 +25,17 @@ // THE SOFTWARE.
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using MonoDevelop.CSharp.Completion;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.AspNet.Gui;
-using ICSharpCode.NRefactory.Completion;
using Mono.TextEditor;
using MonoDevelop.Ide.Gui;
+using MonoDevelop.AspNet.Mvc.Completion;
-namespace MonoDevelop.AspNet.Mvc.Completion
+namespace MonoDevelop.CSharp.Completion
{
// Based on AspLanguageBuilder
- public class RazorCSharpCompletionBuilder : IRazorCompletionBuilder
+ class RazorCSharpCompletionBuilder : IRazorCompletionBuilder
{
public bool SupportsLanguage (string language)
{
diff --git a/main/src/addins/CSharpBinding/Autotools/Autotools.csproj b/main/src/addins/CSharpBinding/Autotools/Autotools.csproj index 268465bfb4..ad6a6ded44 100644 --- a/main/src/addins/CSharpBinding/Autotools/Autotools.csproj +++ b/main/src/addins/CSharpBinding/Autotools/Autotools.csproj @@ -70,11 +70,6 @@ <Name>MonoDevelop.Refactoring</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\AspNet\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj"> <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project> <Name>MonoDevelop.DesignerSupport</Name> @@ -85,6 +80,11 @@ <Name>Mono.Addins</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\..\Web\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> + <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> + <Name>MonoDevelop.AspNet</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <ItemGroup> <Reference Include="System" /> diff --git a/main/src/addins/Makefile.am b/main/src/addins/Makefile.am index 23aa5dfd52..a079855e87 100644 --- a/main/src/addins/Makefile.am +++ b/main/src/addins/Makefile.am @@ -14,7 +14,7 @@ SUBDIRS = \ MonoDevelop.Gettext \
MonoDevelop.XmlEditor \
TextTemplating \
- AspNet \
+ Web \
CSharpBinding \
ILAsmBinding \
NUnit \
diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/AspNetSoftDebuggerEngine.cs b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/AspNetSoftDebuggerEngine.cs index 1006bca8cc..61ea302cb4 100644 --- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/AspNetSoftDebuggerEngine.cs +++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/AspNetSoftDebuggerEngine.cs @@ -27,24 +27,23 @@ using System; using System.Collections.Generic; using System.IO; -using MonoDevelop.Debugger; +using Mono.Debugging.Client; +using Mono.Debugging.Soft; +using MonoDevelop.AspNet.Execution; using MonoDevelop.Core; +using MonoDevelop.Core.Assemblies; using MonoDevelop.Core.Execution; -using MonoDevelop.AspNet; -using Mono.Debugging.Client; +using MonoDevelop.Debugger; using MonoDevelop.Debugger.Soft; -using System.Net; -using MonoDevelop.Core.Assemblies; -using Mono.Debugging.Soft; namespace MonoDevelop.Debugger.Soft.AspNet { public class AspNetSoftDebuggerEngine: DebuggerEngineBackend { - public override bool CanDebugCommand (ExecutionCommand command) + public override bool CanDebugCommand (ExecutionCommand cmd) { - var cmd = command as AspNetExecutionCommand; - return cmd != null && SoftDebuggerEngine.CanDebugRuntime (cmd.TargetRuntime); + var command = cmd as AspNetExecutionCommand; + return command != null && SoftDebuggerEngine.CanDebugRuntime (command.TargetRuntime); } FilePath GetFxDir (MonoTargetRuntime runtime, ClrVersion version) diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj index afdec71223..91bc329e95 100644 --- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj +++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj @@ -62,11 +62,6 @@ <Name>Mono.TextEditor</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\AspNet\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj"> <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project> <Name>MonoDevelop.Debugger</Name> @@ -117,6 +112,11 @@ <Name>Mono.Addins</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\..\Web\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> + <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> + <Name>MonoDevelop.AspNet</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <ItemGroup> <Compile Include="AspNetSoftDebuggerEngine.cs" /> diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerEngine.cs b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerEngine.cs index 5f03f31278..9d1d77f225 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerEngine.cs +++ b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/CorDebuggerEngine.cs @@ -2,9 +2,9 @@ using System; using System.Collections.Generic;
using System.IO;
using Mono.Debugging.Client;
-using MonoDevelop.AspNet;
using MonoDevelop.Core;
using MonoDevelop.Core.Execution;
+using MonoDevelop.AspNet.Execution;
namespace MonoDevelop.Debugger.Win32
{
@@ -17,7 +17,7 @@ namespace MonoDevelop.Debugger.Win32 DotNetExecutionCommand cmd = command as DotNetExecutionCommand;
if (cmd != null)
return (cmd.TargetRuntime == null || cmd.TargetRuntime.RuntimeId == "MS.NET");
- AspNetExecutionCommand acmd = command as AspNetExecutionCommand;
+ var acmd = command as AspNetExecutionCommand;
if (acmd != null)
return (acmd.TargetRuntime == null || acmd.TargetRuntime.RuntimeId == "MS.NET");
return false;
@@ -37,7 +37,8 @@ namespace MonoDevelop.Debugger.Win32 }
return startInfo;
}
- AspNetExecutionCommand acmd = command as AspNetExecutionCommand;
+
+ var acmd = command as AspNetExecutionCommand;
if (acmd != null) {
DebuggerStartInfo startInfo = new DebuggerStartInfo ();
string xspName = AspNetExecutionHandler.GetXspName (acmd);
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj index a80ca234fb..d9c4808982 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj +++ b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj @@ -101,11 +101,6 @@ <Name>Mono.Debugging</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\AspNet\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj"> <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project> <Name>MonoDevelop.Debugger</Name> @@ -126,6 +121,11 @@ <Name>Mono.Addins</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\..\Web\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> + <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> + <Name>MonoDevelop.AspNet</Name> + <Private>False</Private> + </ProjectReference> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj b/main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj index c6d42cf208..d98baa7b76 100644 --- a/main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj +++ b/main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj @@ -141,6 +141,8 @@ <Compile Include="Parser\AttributeValueUnderCursorTests.cs" /> <Compile Include="MimeTypeHandledTests.cs" /> <Compile Include="Schema\SchemaAssociationTests.cs" /> + <Compile Include="StateEngine\ParsingTests.cs" /> + <Compile Include="StateEngine\TestParser.cs" /> </ItemGroup> <ItemGroup> <Folder Include="Parser\" /> @@ -152,6 +154,7 @@ <Folder Include="CompletionData\" /> <Folder Include="XPathQuery\" /> <Folder Include="FindSchemaObject\" /> + <Folder Include="StateEngine\" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Resources\xhtml1-strict-modified.xsd"> diff --git a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/ParsingTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/ParsingTests.cs index 3d09ae4610..3d09ae4610 100644 --- a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/ParsingTests.cs +++ b/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/ParsingTests.cs diff --git a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/TestParser.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/TestParser.cs index 5ec3eacb26..5ec3eacb26 100644 --- a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/TestParser.cs +++ b/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/TestParser.cs diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/generated.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/generated.cs index 3285e87c05..97249fd82d 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/generated.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/generated.cs @@ -1,82 +1,83 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace Stetic -{ - internal class Gui - { - private static bool initialized; - - internal static void Initialize (Gtk.Widget iconRenderer) - { - if ((Stetic.Gui.initialized == false)) { - Stetic.Gui.initialized = true; - } - } - } - - internal class BinContainer - { - private Gtk.Widget child; - - private Gtk.UIManager uimanager; - - public static BinContainer Attach (Gtk.Bin bin) - { - BinContainer bc = new BinContainer (); - bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested); - bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated); - bin.Added += new Gtk.AddedHandler (bc.OnAdded); - return bc; - } - - private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args) - { - if ((this.child != null)) { - args.Requisition = this.child.SizeRequest (); - } - } - - private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args) - { - if ((this.child != null)) { - this.child.Allocation = args.Allocation; - } - } - - private void OnAdded (object sender, Gtk.AddedArgs args) - { - this.child = args.Widget; - } - - public void SetUiManager (Gtk.UIManager uim) - { - this.uimanager = uim; - this.child.Realized += new System.EventHandler (this.OnRealized); - } - - private void OnRealized (object sender, System.EventArgs args) - { - if ((this.uimanager != null)) { - Gtk.Widget w; - w = this.child.Toplevel; - if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) { - ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup); - this.uimanager = null; - } - } - } - } - - internal class ActionGroups - { - public static Gtk.ActionGroup GetActionGroup (System.Type type) - { - return Stetic.ActionGroups.GetActionGroup (type.FullName); - } - - public static Gtk.ActionGroup GetActionGroup (string name) - { - return null; - } - } -} +
+// This file has been generated by the GUI designer. Do not modify.
+namespace Stetic
+{
+ internal class Gui
+ {
+ private static bool initialized;
+
+ internal static void Initialize (Gtk.Widget iconRenderer)
+ {
+ if ((Stetic.Gui.initialized == false)) {
+ Stetic.Gui.initialized = true;
+ }
+ }
+ }
+
+ internal class BinContainer
+ {
+ private Gtk.Widget child;
+
+ private Gtk.UIManager uimanager;
+
+ public static BinContainer Attach (Gtk.Bin bin)
+ {
+ BinContainer bc = new BinContainer ();
+ bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested);
+ bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated);
+ bin.Added += new Gtk.AddedHandler (bc.OnAdded);
+ return bc;
+ }
+
+ private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
+ {
+ if ((this.child != null)) {
+ args.Requisition = this.child.SizeRequest ();
+ }
+ }
+
+ private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
+ {
+ if ((this.child != null)) {
+ this.child.Allocation = args.Allocation;
+ }
+ }
+
+ private void OnAdded (object sender, Gtk.AddedArgs args)
+ {
+ this.child = args.Widget;
+ }
+
+ public void SetUiManager (Gtk.UIManager uim)
+ {
+ this.uimanager = uim;
+ this.child.Realized += new System.EventHandler (this.OnRealized);
+ }
+
+ private void OnRealized (object sender, System.EventArgs args)
+ {
+ if ((this.uimanager != null)) {
+ Gtk.Widget w;
+ w = this.child.Toplevel;
+ if (((w != null)
+ && typeof(Gtk.Window).IsInstanceOfType (w))) {
+ ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
+ this.uimanager = null;
+ }
+ }
+ }
+ }
+
+ internal class ActionGroups
+ {
+ public static Gtk.ActionGroup GetActionGroup (System.Type type)
+ {
+ return Stetic.ActionGroups.GetActionGroup (type.FullName);
+ }
+
+ public static Gtk.ActionGroup GetActionGroup (string name)
+ {
+ return null;
+ }
+ }
+}
diff --git a/main/src/addins/Web/Makefile.am b/main/src/addins/Web/Makefile.am new file mode 100644 index 0000000000..d9cd4205a7 --- /dev/null +++ b/main/src/addins/Web/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = \
+ MonoDevelop.AspNet
diff --git a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlImplicitClosingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs index 6bd053bcd0..6bd053bcd0 100644 --- a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlImplicitClosingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs diff --git a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs index d2c02c11ed..f6617c7a16 100644 --- a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs @@ -24,18 +24,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; -using System.Linq; -using MonoDevelop.AspNet.StateEngine; using NUnit.Framework; +using MonoDevelop.AspNet.Html.Parser; +using MonoDevelop.Xml.StateEngine; -namespace MonoDevelop.Xml.StateEngine +namespace MonoDevelop.AspNet.Tests.Html { - [TestFixture] - public class HtmlParsingTests : ParsingTests + class HtmlParsingTests : ParsingTests { - public override XmlFreeState CreateRootState () { return new XmlFreeState (new HtmlTagState (), new HtmlClosingTagState (true)); diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj b/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj new file mode 100644 index 0000000000..e6b36fa604 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{BEFADF93-EE92-4806-9C0B-937B25311C95}</ProjectGuid> + <OutputType>Library</OutputType> + <RootNamespace>MonoDevelop.AspNet.Tests</RootNamespace> + <AssemblyName>MonoDevelop.AspNet.Tests</AssemblyName> + <TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand> + <TestRunnerArgs>run-md-tests</TestRunnerArgs> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\..\..\..\build\tests</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\..\..\..\build\tests</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Razor\Dom\RazorCodeBlockParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorCodeFragmentsParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorCommentParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorDirectivesParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorExplicitExpressionsParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorImplicitExpressionsParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorParsingTests.cs" /> + <Compile Include="Razor\Dom\RazorStatementsParsingTests.cs" /> + <Compile Include="Razor\RazorCompletionTesting.cs" /> + <Compile Include="WebForms\WebFormsTesting.cs" /> + <Compile Include="WebForms\WebFormsParsingTests.cs" /> + <Compile Include="WebForms\WebFormsCompletionTests.cs" /> + <Compile Include="Razor\RazorCompletionTests.cs" /> + <Compile Include="Html\HtmlParsingTests.cs" /> + <Compile Include="Html\HtmlImplicitClosingTests.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <ItemGroup> + <ProjectReference Include="..\..\..\..\external\guiunit\src\framework\GuiUnit_NET_4_0.csproj"> + <Project>{E13A0A7B-4DE6-43ED-A139-41052D065A9B}</Project> + <Name>GuiUnit_NET_4_0</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj"> + <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project> + <Name>MonoDevelop.Core</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> + <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> + <Name>MonoDevelop.Ide</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj"> + <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project> + <Name>ICSharpCode.NRefactory</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj"> + <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project> + <Name>MonoDevelop.XmlEditor</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj"> + <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project> + <Name>MonoDevelop.DesignerSupport</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj"> + <Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project> + <Name>Mono.TextEditor</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.XmlEditor\Tests\MonoDevelop.XmlEditor.Tests.csproj"> + <Project>{8E47B77A-A649-494C-9BF2-B845E39CADE9}</Project> + <Name>MonoDevelop.XmlEditor.Tests</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\tests\UnitTests\UnitTests.csproj"> + <Project>{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}</Project> + <Name>UnitTests</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> + <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> + <Name>MonoDevelop.AspNet</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Folder Include="Razor\" /> + <Folder Include="Razor\Dom\" /> + <Folder Include="Html\" /> + </ItemGroup> + <ProjectExtensions> + <MonoDevelop> + <Properties> + <Policies> + <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileName" /> + </Policies> + </Properties> + </MonoDevelop> + </ProjectExtensions> +</Project> diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorCodeBlockParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs index d3bb0bb7a6..dce2a01aab 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorCodeBlockParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs @@ -24,14 +24,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using NUnit.Framework;
-using MonoDevelop.AspNet.Mvc.StateEngine;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorCodeBlockParsingTests : RazorParsingTests
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorCodeFragmentsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeFragmentsParsingTests.cs index 29c15a278f..54403e9e23 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorCodeFragmentsParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeFragmentsParsingTests.cs @@ -25,9 +25,9 @@ // THE SOFTWARE.
using NUnit.Framework;
-using MonoDevelop.AspNet.Mvc.StateEngine;
+using MonoDevelop.AspNet.Razor.Parser;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorCodeFragmentsParsingTests : RazorParsingTests
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorCommentParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs index 7bc2139a81..c77e2042a6 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorCommentParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs @@ -25,9 +25,9 @@ // THE SOFTWARE.
using NUnit.Framework;
-using MonoDevelop.AspNet.Mvc.StateEngine;
+using MonoDevelop.AspNet.Razor.Parser;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorCommentParsingTests : RazorParsingTests
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorDirectivesParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs index 172f91ddb4..b88d5778b6 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorDirectivesParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs @@ -24,10 +24,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.AspNet.Mvc.StateEngine;
using NUnit.Framework;
+using MonoDevelop.AspNet.Razor.Parser;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorDirectivesParsingTests : RazorParsingTests
@@ -83,7 +83,7 @@ namespace MonoDevelop.AspNet.Mvc.StateEngine [Test]
public void UsingDirective ()
{
- parser.Parse ("@using System.Foo.Bar$\n", () => {
+ parser.Parse ("@using System.Foo.Bar$\n$", () => {
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@using");
}, () => {
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorExplicitExpressionsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs index 5fef8773be..7e9c3d35d9 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorExplicitExpressionsParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs @@ -25,9 +25,10 @@ // THE SOFTWARE.
using NUnit.Framework;
-using MonoDevelop.AspNet.Mvc.StateEngine;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorExplicitExpressionsParsingTests : RazorParsingTests
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorImplicitExpressionsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs index 8e165dd28a..84831751e5 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorImplicitExpressionsParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs @@ -25,9 +25,10 @@ // THE SOFTWARE.
using NUnit.Framework;
-using MonoDevelop.AspNet.Mvc.StateEngine;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorImplicitExpressionsParsingTests : RazorParsingTests
@@ -67,7 +68,7 @@ namespace MonoDevelop.AspNet.Mvc.StateEngine [Test]
public void ImplicitExpressionQuotes ()
{
- parser.Parse ("@ViewData[\"Foo$\"]", 'X', () => {
+ parser.Parse ("@ViewData[\"Foo$\"]", () => {
parser.AssertStateIs<RazorExpressionState> ();
parser.AssertNodeIs<RazorImplicitExpression> ();
parser.AssertPath ("//@");
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs index e44ebbf4aa..f824b176da 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs @@ -25,10 +25,10 @@ // THE SOFTWARE.
using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.Mvc.StateEngine;
using NUnit.Framework;
+using MonoDevelop.AspNet.Razor.Parser;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public abstract class RazorParsingTests
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorStatementsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs index c22642e630..4dd3450bcf 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.StateEngine/RazorStatementsParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs @@ -25,10 +25,11 @@ // THE SOFTWARE.
using NUnit.Framework;
-using MonoDevelop.AspNet.Mvc.StateEngine;
using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public class RazorStatementsParsingTests : RazorParsingTests
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/RazorCompletionTesting.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/RazorCompletionTesting.cs index a3a983c65c..7da98546eb 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/RazorCompletionTesting.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/RazorCompletionTesting.cs @@ -24,23 +24,23 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Ide.CodeCompletion;
+using System.IO;
+using ICSharpCode.NRefactory.Completion;
+using MonoDevelop.AspNet.Projects;
+using MonoDevelop.AspNet.Razor;
+using MonoDevelop.AspNet.Razor.Parser;
using MonoDevelop.CSharpBinding;
using MonoDevelop.CSharpBinding.Tests;
-using MonoDevelop.AspNet.Mvc;
-using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Ide.Gui;
-using MonoDevelop.AspNet.Mvc.Parser;
-using System.IO;
-using MonoDevelop.AspNet.Mvc.Gui;
+using MonoDevelop.Ide.TypeSystem;
using MonoDevelop.Projects;
-using ICSharpCode.NRefactory.Completion;
-namespace MonoDevelop.AspNet.Mvc.Completion
+namespace MonoDevelop.AspNet.Tests.Razor
{
//largely copied from MonoDevelop.AspNet.Tests.AspNetTesting
- public static class RazorCompletionTesting
+ static class RazorCompletionTesting
{
static readonly string extension = ".cshtml";
@@ -92,7 +92,8 @@ namespace MonoDevelop.AspNet.Mvc.Completion cursorPosition = endPos - 1;
}
- var project = new AspMvc3Project ("C#");
+ var project = new AspNetAppProject ("C#");
+
project.FileName = UnitTests.TestBase.GetTempFile (".csproj");
string file = UnitTests.TestBase.GetTempFile (extension);
project.AddFile (file);
@@ -111,7 +112,7 @@ namespace MonoDevelop.AspNet.Mvc.Completion tww.ViewContent = sev;
var doc = new Document (tww);
- var parser = new RazorTestingParser () {
+ var parser = new RazorTestingParser {
Doc = doc
};
var parsedDoc = parser.Parse (false, sev.ContentName, new StringReader (parsedText), project);
diff --git a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/CompletionTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/RazorCompletionTests.cs index e1ab2783e5..98b36239c4 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/CompletionTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/RazorCompletionTests.cs @@ -27,10 +27,11 @@ using NUnit.Framework; using UnitTests; -namespace MonoDevelop.AspNet.Mvc.Completion +namespace MonoDevelop.AspNet.Tests.Razor { + [Ignore ("Not working")] [TestFixture] - public class CompletionTests : TestBase + class RazorCompletionTests : TestBase { [Test] public void HtmlTagsCompletion () diff --git a/main/tests/UnitTests/MonoDevelop.AspNet/AspNetCompletionTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsCompletionTests.cs index 5f5fa91d54..da65aeb6a5 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet/AspNetCompletionTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsCompletionTests.cs @@ -27,57 +27,56 @@ using System; using NUnit.Framework; -namespace MonoDevelop.AspNet.Tests +namespace MonoDevelop.AspNet.Tests.WebForms { - [TestFixture] - public class AspNetCompletionTests : UnitTests.TestBase + class WebFormsCompletionTests : UnitTests.TestBase { [Test] public void DirectiveCompletion () { - var provider = AspNetTesting.CreateProvider (@"<%@ $ %>", ".aspx"); + var provider = WebFormsTesting.CreateProvider (@"<%@ $ %>", ".aspx"); Assert.IsNotNull (provider); Assert.AreEqual (9, provider.Count); Assert.IsNotNull (provider.Find ("Page")); Assert.IsNotNull (provider.Find ("Register")); - provider = AspNetTesting.CreateProvider (@"<%@ $ %>", ".master"); + provider = WebFormsTesting.CreateProvider (@"<%@ $ %>", ".master"); Assert.IsNotNull (provider); Assert.AreEqual (7, provider.Count); Assert.IsNotNull (provider.Find ("Master")); Assert.IsNotNull (provider.Find ("Register")); - provider = AspNetTesting.CreateProvider (@"<%@ $ %>", ".ascx"); + provider = WebFormsTesting.CreateProvider (@"<%@ $ %>", ".ascx"); Assert.IsNotNull (provider); Assert.AreEqual (7, provider.Count); Assert.IsNotNull (provider.Find ("Control")); Assert.IsNotNull (provider.Find ("Register")); - provider = AspNetTesting.CreateProvider (@"<%@$ %>", ".aspx"); + provider = WebFormsTesting.CreateProvider (@"<%@$ %>", ".aspx"); Assert.IsNull (provider); - provider = AspNetTesting.CreateProvider (@"<%@ $ %>", ".aspx"); + provider = WebFormsTesting.CreateProvider (@"<%@ $ %>", ".aspx"); Assert.IsNull (provider); } [Test] public void DirectiveAttributeCompletion () { - var provider = AspNetTesting.CreateProvider (@"<%@ Page A$ %>", ".aspx"); + var provider = WebFormsTesting.CreateProvider (@"<%@ Page A$ %>", ".aspx"); Assert.IsNotNull (provider); Assert.AreEqual (41, provider.Count); Assert.IsNotNull (provider.Find ("StyleSheetTheme")); Assert.IsNotNull (provider.Find ("Inherits")); - provider = AspNetTesting.CreateProvider (@"<%@ Master A$ %>", ".master"); + provider = WebFormsTesting.CreateProvider (@"<%@ Master A$ %>", ".master"); Assert.IsNotNull (provider); Assert.AreEqual (18, provider.Count); Assert.IsNull (provider.Find ("StyleSheetTheme")); Assert.IsNotNull (provider.Find ("MasterPageFile")); Assert.IsNotNull (provider.Find ("Inherits")); - provider = AspNetTesting.CreateProvider (@"<%@ Control A$ %>", ".ascx"); + provider = WebFormsTesting.CreateProvider (@"<%@ Control A$ %>", ".ascx"); Assert.IsNotNull (provider); Assert.AreEqual (17, provider.Count); Assert.IsNull (provider.Find ("StyleSheetTheme")); @@ -88,20 +87,20 @@ namespace MonoDevelop.AspNet.Tests [Ignore ("Not working")] public void DirectiveAttributeCtrlSpaceCompletion () { - var provider = AspNetTesting.CreateProvider (@"<%@ Page $ %>", ".aspx", true); + var provider = WebFormsTesting.CreateProvider (@"<%@ Page $ %>", ".aspx", true); Assert.IsNotNull (provider); Assert.AreEqual (41, provider.Count); Assert.IsNotNull (provider.Find ("StyleSheetTheme")); Assert.IsNotNull (provider.Find ("Inherits")); - provider = AspNetTesting.CreateProvider (@"<%@ Master $ %>", ".master", true); + provider = WebFormsTesting.CreateProvider (@"<%@ Master $ %>", ".master", true); Assert.IsNotNull (provider); Assert.AreEqual (18, provider.Count); Assert.IsNull (provider.Find ("StyleSheetTheme")); Assert.IsNotNull (provider.Find ("MasterPageFile")); Assert.IsNotNull (provider.Find ("Inherits")); - provider = AspNetTesting.CreateProvider (@"<%@ Control $ %>", ".ascx", true); + provider = WebFormsTesting.CreateProvider (@"<%@ Control $ %>", ".ascx", true); Assert.IsNotNull (provider); Assert.AreEqual (17, provider.Count); Assert.IsNull (provider.Find ("StyleSheetTheme")); @@ -111,10 +110,10 @@ namespace MonoDevelop.AspNet.Tests void HeadBodyCompletion (bool ctrlSpace) { const string test = @"<%@ Page Language=""C#"" %> -<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""> +<!DOCTYPE html> <html> <$"; - var provider = AspNetTesting.CreateProvider (test, ".aspx", ctrlSpace); + var provider = WebFormsTesting.CreateProvider (test, ".aspx", ctrlSpace); Assert.IsNotNull (provider); Assert.IsNotNull (provider.Find ("head")); Assert.IsNotNull (provider.Find ("body")); diff --git a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/AspNetParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs index 9909196630..47df715cfa 100644 --- a/main/tests/UnitTests/MonoDevelop.Xml.StateEngine/AspNetParsingTests.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs @@ -24,19 +24,21 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; using System.Linq; -using MonoDevelop.AspNet.StateEngine; +using MonoDevelop.AspNet.WebForms.Dom; +using MonoDevelop.AspNet.WebForms.Parser; +using MonoDevelop.Xml.StateEngine; using NUnit.Framework; +using MonoDevelop.AspNet.Tests.Html; -namespace MonoDevelop.Xml.StateEngine +namespace MonoDevelop.AspNet.Tests.WebForms { [TestFixture] - public class AspNetParsingTests : HtmlParsingTests + class WebFormsParsingTests : HtmlParsingTests { public override XmlFreeState CreateRootState () { - return new AspNetFreeState (); + return new WebFormsFreeState (); } [Test] @@ -46,7 +48,7 @@ namespace MonoDevelop.Xml.StateEngine parser.Parse (@"<%@ Page Language=""C#"" Inherits=""SomeGenericType<int>"" %>"); parser.AssertNoErrors (); var doc = (XDocument) parser.Nodes.Peek (); - var directive = doc.Nodes.First () as AspNetDirective; + var directive = doc.Nodes.First () as WebFormsDirective; Assert.NotNull (directive); Assert.AreEqual ("Page", directive.Name.FullName); Assert.AreEqual (2, directive.Attributes.Count ()); @@ -67,17 +69,17 @@ foo='<%=5$%>' bar=""<%$$5$%><%--$--%>"" baz='<%#5$%>=<%:fhfjhf %0 $%>' quux = <% 5 $%> />", delegate { - parser.AssertNodeIs<AspNetRenderExpression> (); + parser.AssertNodeIs<WebFormsRenderExpression> (); }, delegate { - parser.AssertNodeIs<AspNetResourceExpression> (); + parser.AssertNodeIs<WebFormsResourceExpression> (); }, delegate { - parser.AssertNodeIs<AspNetServerComment> (); + parser.AssertNodeIs<WebFormsServerComment> (); }, delegate { - parser.AssertNodeIs<AspNetDataBindingExpression> (); + parser.AssertNodeIs<WebFormsBindingExpression> (); }, delegate { - parser.AssertNodeIs<AspNetHtmlEncodedExpression> (); + parser.AssertNodeIs<WebFormsHtmlEncodedExpression> (); }, delegate { - parser.AssertNodeIs<AspNetRenderBlock> (); + parser.AssertNodeIs<WebFormsRenderBlock> (); }); parser.AssertNoErrors (); var doc = (XDocument) parser.Nodes.Peek (); diff --git a/main/tests/UnitTests/MonoDevelop.AspNet/AspNetTesting.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsTesting.cs index 64726d19ce..4f8e2444d9 100644 --- a/main/tests/UnitTests/MonoDevelop.AspNet/AspNetTesting.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsTesting.cs @@ -24,21 +24,20 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; -using MonoDevelop.Ide.CodeCompletion; -using MonoDevelop.Projects; -using MonoDevelop.CSharpBinding.Tests; -using MonoDevelop.AspNet.Gui; -using MonoDevelop.Ide.TypeSystem; +using System.IO; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms; using MonoDevelop.CSharpBinding; +using MonoDevelop.CSharpBinding.Tests; +using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.Ide.Gui; -using MonoDevelop.AspNet.Parser; -using System.IO; +using MonoDevelop.Ide.TypeSystem; +using MonoDevelop.Projects; -namespace MonoDevelop.AspNet.Tests +namespace MonoDevelop.AspNet.Tests.WebForms { //largely copied from RazorCompletionTesting - public static class AspNetTesting + static class WebFormsTesting { public static CompletionDataList CreateProvider (string text, string extension, bool isCtrlSpace = false) { @@ -57,8 +56,7 @@ namespace MonoDevelop.AspNet.Tests return textEditorCompletion.HandleCodeCompletion (ctx, editorText[cursorPosition - 1], ref triggerWordLength) as CompletionDataList; } - - static AspNetTestingEditorExtension CreateEditor (string text, string extension, out string editorText, out TestViewContent sev) + static WebFormsTestingEditorExtension CreateEditor (string text, string extension, out string editorText, out TestViewContent sev) { string parsedText; int cursorPosition = text.IndexOf ('$'); @@ -93,16 +91,16 @@ namespace MonoDevelop.AspNet.Tests var doc = new TestDocument (tww); doc.Editor.Document.FileName = sev.ContentName; - var parser = new AspNetParser (); - var parsedDoc = (AspNetParsedDocument) parser.Parse (false, sev.ContentName, new StringReader (parsedText), project); + var parser = new WebFormsParser (); + var parsedDoc = (WebFormsParsedDocument) parser.Parse (false, sev.ContentName, new StringReader (parsedText), project); doc.HiddenParsedDocument = parsedDoc; - return new AspNetTestingEditorExtension (doc); + return new WebFormsTestingEditorExtension (doc); } - public class AspNetTestingEditorExtension : AspNetEditorExtension + public class WebFormsTestingEditorExtension : WebFormsEditorExtension { - public AspNetTestingEditorExtension (Document doc) + public WebFormsTestingEditorExtension (Document doc) { Initialize (doc); } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/ChangeLog b/main/src/addins/Web/MonoDevelop.AspNet/ChangeLog index 4b94c7347a..4b94c7347a 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/ChangeLog +++ b/main/src/addins/Web/MonoDevelop.AspNet/ChangeLog diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt index 50dd69e111..50dd69e111 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt +++ b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddController/Empty.tt b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddController/Empty.tt index 930da51a0e..930da51a0e 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddController/Empty.tt +++ b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddController/Empty.tt diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddView/Aspx/Empty.tt b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddView/Aspx/Empty.tt index 770de05a28..e2ac7c789c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddView/Aspx/Empty.tt +++ b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddView/Aspx/Empty.tt @@ -17,7 +17,8 @@ if (mvcHost.IsViewUserControl) { #> } } else if(mvcHost.IsViewPage) { #> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<#= dataTypeString #>" %> -<html xmlns="http://www.w3.org/1999/xhtml"> +<!DOCTYPE html> +<html> <head runat="server"> <title></title> </head> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddView/Razor/Empty.tt b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddView/Razor/Empty.tt index 9c53b0761f..9c53b0761f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddView/Razor/Empty.tt +++ b/main/src/addins/Web/MonoDevelop.AspNet/CodeTemplates/CSharp/AddView/Razor/Empty.tt diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/AddControllerDialog.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddControllerDialog.cs index ec709c532d..603e60dbf0 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/AddControllerDialog.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddControllerDialog.cs @@ -26,14 +26,21 @@ using System;
using System.Collections.Generic;
-namespace MonoDevelop.AspNet.Mvc.Gui
+using Gtk;
+using MonoDevelop.Core;
+using MonoDevelop.AspNet.Projects;
+
+namespace MonoDevelop.AspNet.Commands
{
- public partial class AddControllerDialog : Gtk.Dialog
+ class AddControllerDialog : Dialog
{
IList<string> loadedTemplateList;
System.CodeDom.Compiler.CodeDomProvider provider;
- #region Public Properties
+ Button buttonCancel;
+ Button buttonOk;
+ Entry nameEntry;
+ ComboBox templateCombo;
public string ControllerName {
get {
@@ -50,11 +57,9 @@ namespace MonoDevelop.AspNet.Mvc.Gui }
}
- #endregion
-
- public AddControllerDialog (AspMvcProject project)
+ public AddControllerDialog (AspNetAppProject project)
{
- this.Build ();
+ Build ();
provider = project.LanguageBinding.GetCodeDomProvider ();
@@ -81,6 +86,46 @@ namespace MonoDevelop.AspNet.Mvc.Gui Validate ();
}
+ void Build ()
+ {
+ DefaultWidth = 400;
+ DefaultHeight = 150;
+ BorderWidth = 6;
+ Resizable = false;
+
+ buttonCancel = new Button (Stock.Cancel);
+ AddActionWidget (buttonCancel, ResponseType.Cancel);
+ buttonOk = new Button (Stock.Ok);
+ AddActionWidget (buttonOk, ResponseType.Ok);
+
+ nameEntry = new Entry ();
+ templateCombo = ComboBox.NewText ();
+
+ var nameLabel = new Label {
+ TextWithMnemonic = GettextCatalog.GetString ("_Name:"),
+ Xalign = 0,
+ MnemonicWidget = nameEntry
+ };
+ var templateLabel = new Label {
+ TextWithMnemonic = GettextCatalog.GetString ("_Template:"),
+ Xalign = 0,
+ MnemonicWidget = templateCombo
+ };
+
+ var table = new Table (2, 2, false) {
+ RowSpacing = 6,
+ ColumnSpacing = 6
+ };
+
+ table.Attach (nameLabel, 0, 1, 0, 1, AttachOptions.Fill, 0, 0, 0);
+ table.Attach (nameEntry, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, 0, 0, 0);
+ table.Attach (templateLabel, 0, 1, 1, 2, AttachOptions.Fill, 0, 0, 0);
+ table.Attach (templateCombo, 1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, 0, 0, 0);
+ VBox.PackStart (table);
+
+ Child.ShowAll ();
+ }
+
protected virtual void Validate (object sender, EventArgs e)
{
Validate ();
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/AddViewDialog.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs index b3966789cc..05f6e94e11 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/AddViewDialog.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs @@ -25,41 +25,48 @@ // THE SOFTWARE. using System; -using System.Linq; using System.IO; using System.Collections.Generic; -using MonoDevelop.AspNet.StateEngine; +using MonoDevelop.AspNet.WebForms.Parser; using PP = System.IO.Path; -using MonoDevelop.AspNet.Gui; using MonoDevelop.Ide; -using MonoDevelop.AspNet.Parser; using MonoDevelop.Core; -using MonoDevelop.Components; using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Ide.TypeSystem; -using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Dom; +using MonoDevelop.AspNet.WebForms; +using Gtk; -namespace MonoDevelop.AspNet.Mvc.Gui +namespace MonoDevelop.AspNet.Commands { - - - public partial class AddViewDialog : Gtk.Dialog - { - AspMvcProject project;
+ class AddViewDialog : Dialog + { + readonly AspNetAppProject project;
IDictionary<string, IList<string>> loadedTemplateList;
- IDictionary<string, Gtk.ListStore> templateStore;
- Gtk.ListStore dataClassStore;
+ IDictionary<string, ListStore> templateStore;
+ ListStore dataClassStore;
string oldMaster;
string oldEngine;
- Gtk.ListStore primaryPlaceholderStore = new Gtk.ListStore (typeof (String));
+ ListStore primaryPlaceholderStore = new ListStore (typeof (String));
System.CodeDom.Compiler.CodeDomProvider provider;
TypeDataProvider classDataProvider; - - public AddViewDialog (AspMvcProject project) + + Button buttonCancel, buttonOk, masterButton; + Label placeholderLabel; + ComboBox viewEngineCombo, templateCombo; + ComboBoxEntry placeholderCombo, dataClassCombo; + Entry nameEntry; + Entry masterEntry; + CheckButton partialCheck, stronglyTypedCheck, masterCheck; + Alignment typePanel, masterPanel; + + public AddViewDialog (AspNetAppProject project) { this.project = project; - this.Build (); + + Build (); provider = project.LanguageBinding.GetCodeDomProvider ();
@@ -72,33 +79,160 @@ namespace MonoDevelop.AspNet.Mvc.Gui viewEngineCombo.Active = 0;
InitializeTemplateStore (loadedTemplateList); - + ContentPlaceHolders = new List<string> (); string siteMaster = project.VirtualToLocalPath ("~/Views/Shared/Site.master", null); if (project.Files.GetFile (siteMaster) != null) masterEntry.Text = "~/Views/Shared/Site.master"; - primaryPlaceholderCombo.Model = primaryPlaceholderStore; + placeholderCombo.Model = primaryPlaceholderStore; UpdateTypePanelSensitivity (null, null); UpdateMasterPanelSensitivity (null, null); Validate (); + } + + void Build () + { + DefaultWidth = 470; + DefaultHeight = 380; + BorderWidth = 6; + Resizable = false; + + VBox.Spacing = 6; + + buttonCancel = new Button (Gtk.Stock.Cancel); + AddActionWidget (buttonCancel, ResponseType.Cancel); + buttonOk = new Button (Gtk.Stock.Ok); + AddActionWidget (buttonOk, ResponseType.Ok); + + var table = new Table (3, 2, false) { ColumnSpacing = 6, RowSpacing = 6 }; + + nameEntry = new Entry { WidthRequest = 350 }; + viewEngineCombo = ComboBox.NewText (); + templateCombo = ComboBox.NewText (); + + var nameLabel = new Label (GettextCatalog.GetString ("_Name")) { + MnemonicWidget = nameEntry, + Xalign = 0 + }; + var templateLabel = new Label (GettextCatalog.GetString ("_Template:")) { + MnemonicWidget = nameEntry, + Xalign = 0 + }; + var engineLabel = new Label (GettextCatalog.GetString ("_View Engine:")) { + MnemonicWidget = nameEntry, + Xalign = 0 + }; + + const AttachOptions expandFill = AttachOptions.Expand | AttachOptions.Fill; + const AttachOptions fill = AttachOptions.Fill; + + table.Attach (nameLabel, 0, 1, 0, 1, fill, 0, 0, 0); + table.Attach (nameEntry, 1, 2, 0, 1, expandFill, 0, 0, 0); + table.Attach (templateLabel, 0, 1, 1, 2, fill, 0, 0, 0); + table.Attach (templateCombo, 1, 2, 1, 2, expandFill, 0, 0, 0); + table.Attach (engineLabel, 0, 1, 2, 3, fill, 0, 0, 0); + table.Attach (viewEngineCombo, 1, 2, 2, 3, expandFill, 0, 0, 0); + + VBox.PackStart (table, false, false, 0); + + var frame = new Frame (GettextCatalog.GetString ("Options")) { BorderWidth = 2 }; + var optionsVBox = new VBox { Spacing = 6 }; + var optionsAlignment = new Alignment (0.5f, 0.5f, 1f, 1f) { + Child = optionsVBox, + TopPadding = 4, + BottomPadding = 4, + RightPadding = 4, + LeftPadding = 4 + }; + frame.Add (optionsAlignment); + + partialCheck = new CheckButton (GettextCatalog.GetString ("_Partial view")) { UseUnderline = true }; + stronglyTypedCheck = new CheckButton (GettextCatalog.GetString ("_Strongly typed")) { UseUnderline = true }; + masterCheck = new CheckButton (GettextCatalog.GetString ("Has _master page or layout")) { UseUnderline = true }; + + dataClassCombo = ComboBoxEntry.NewText (); + masterEntry = new Entry { WidthRequest = 250 }; + placeholderCombo = ComboBoxEntry.NewText (); + masterButton = new Button ("..."); + + optionsVBox.PackStart (partialCheck); + optionsVBox.PackStart (stronglyTypedCheck); + typePanel = WithLabelAndLeftPadding (dataClassCombo, GettextCatalog.GetString ("_Data class:"), true, 24); + optionsVBox.PackStart (typePanel); + optionsVBox.PackStart (masterCheck); + + + var masterLabel = new Label (GettextCatalog.GetString ("_File:")) { + MnemonicWidget = masterEntry, + Xalign = 0, + UseUnderline = true + }; + + placeholderLabel = new Label (GettextCatalog.GetString ("P_rimary placeholder:")) { + MnemonicWidget = placeholderCombo, + Xalign = 0, + UseUnderline = true + }; + + var masterTable = new Table (2, 3, false) { RowSpacing = 6, ColumnSpacing = 6 }; + + masterTable.Attach (masterLabel, 0, 1, 0, 1, fill, 0, 0, 0); + masterTable.Attach (masterEntry, 1, 3, 0, 1, expandFill, 0, 0, 0); + masterTable.Attach (placeholderLabel, 0, 1, 1, 2, expandFill, 0, 0, 0); + masterTable.Attach (placeholderCombo, 1, 2, 1, 2, fill, 0, 0, 0); + masterTable.Attach (masterButton, 2, 3, 1, 2, fill, 0, 0, 0); + + masterPanel = new Alignment (0.5f, 0.5f, 1f, 1f) { LeftPadding = 24, Child = masterTable }; + optionsVBox.PackStart (masterPanel); + + VBox.PackStart (frame, false, false, 0); + + Child.ShowAll (); + + viewEngineCombo.Changed += ViewEngineChanged; + templateCombo.Changed += Validate; + nameEntry.Changed += Validate; + partialCheck.Toggled += UpdateMasterPanelSensitivity; + stronglyTypedCheck.Toggled += UpdateTypePanelSensitivity; + dataClassCombo.Changed += DataClassChanged; + masterCheck.Toggled += UpdateMasterPanelSensitivity; + masterEntry.Changed += MasterChanged; + masterButton.Clicked += ShowMasterSelectionDialog; + placeholderCombo.Changed += Validate; + + } + + static Alignment WithLabelAndLeftPadding (Widget w, string labelText, bool underline, uint leftPadding) + { + var label = new Label (labelText) { + MnemonicWidget = w, + Xalign = 0, + UseUnderline = underline + }; + + var box = new HBox (false, 6); + box.PackStart (label); + box.PackStart (w, true, true, 0); + + return new Alignment (0.5f, 0.5f, 1f, 1f) { LeftPadding = leftPadding, Child = box }; }
IEnumerable<string> GetProperViewEngines ()
{
yield return "Aspx";
- if (MvcVersion.CompareTo ("2.0.0.0") > 0)
+ if (project.SupportsRazorViewEngine)
yield return "Razor";
}
void InitializeTemplateStore (IDictionary<string, IList<string>> tempList)
{
- templateStore = new Dictionary<string, Gtk.ListStore> ();
+ templateStore = new Dictionary<string, ListStore> ();
foreach (var engine in tempList.Keys) {
bool foundEmptyTemplate = false;
- templateStore[engine] = new Gtk.ListStore (typeof (string));
+ templateStore[engine] = new ListStore (typeof (string));
foreach (string file in tempList[engine]) {
string name = PP.GetFileNameWithoutExtension (file);
@@ -135,23 +269,23 @@ namespace MonoDevelop.AspNet.Mvc.Gui buttonOk.Sensitive = IsValid (); } - protected virtual void UpdateMasterPanelSensitivity (object sender, EventArgs e) + protected void UpdateMasterPanelSensitivity (object sender, EventArgs e) { bool canHaveMaster = !IsPartialView; masterCheck.Sensitive = canHaveMaster; masterPanel.Sensitive = canHaveMaster && HasMaster;
- placeholderBox.Sensitive = masterPanel.Sensitive && ActiveViewEngine != "Razor"; + placeholderLabel.Sensitive = placeholderCombo.Sensitive = masterPanel.Sensitive && ActiveViewEngine != "Razor"; MasterChanged (null, null); Validate (); } - protected virtual void UpdateTypePanelSensitivity (object sender, EventArgs e) + protected void UpdateTypePanelSensitivity (object sender, EventArgs e) {
bool enabled = typePanel.Sensitive = stronglyTypedCheck.Active;
if (enabled && classDataProvider == null) {
classDataProvider = new TypeDataProvider (project);
- dataClassStore = new Gtk.ListStore (typeof (string));
+ dataClassStore = new ListStore (typeof (string));
foreach (var item in classDataProvider.TypeNamesList)
dataClassStore.AppendValues (item);
dataClassCombo.Model = dataClassStore;
@@ -174,7 +308,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui return false;
if (!IsPartialView && HasMaster && ActiveViewEngine != "Razor") {
- if (String.IsNullOrEmpty (MasterFile) || !System.IO.File.Exists (project.VirtualToLocalPath (oldMaster, null)))
+ if (String.IsNullOrEmpty (MasterFile) || !File.Exists (project.VirtualToLocalPath (oldMaster, null)))
return false;
//PrimaryPlaceHolder can be empty
//Layout Page can be empty in Razor Views - it's usually set in _ViewStart.cshtml file
@@ -191,15 +325,15 @@ namespace MonoDevelop.AspNet.Mvc.Gui return !String.IsNullOrEmpty (identifier) && provider.IsValidIdentifier (identifier); } - protected virtual void ShowMasterSelectionDialog (object sender, System.EventArgs e) + protected virtual void ShowMasterSelectionDialog (object sender, EventArgs e) {
string pattern, title;
if (ActiveViewEngine == "Razor") {
pattern = "*.cshtml";
- title = MonoDevelop.Core.GettextCatalog.GetString ("Select a Layout file...");
+ title = GettextCatalog.GetString ("Select a Layout file...");
} else {
pattern = "*.master";
- title = MonoDevelop.Core.GettextCatalog.GetString ("Select a Master Page...");
+ title = GettextCatalog.GetString ("Select a Master Page...");
}
var dialog = new MonoDevelop.Ide.Projects.ProjectFileSelectorDialog (project, null, pattern)
{
@@ -207,7 +341,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui TransientFor = this,
}; try { - if (MessageService.RunCustomDialog (dialog) == (int) Gtk.ResponseType.Ok) + if (MessageService.RunCustomDialog (dialog) == (int) ResponseType.Ok) masterEntry.Text = project.LocalToVirtualPath (dialog.SelectedFile.FilePath); } finally { dialog.Destroy (); @@ -230,8 +364,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui if (!File.Exists (realPath)) return; - var pd = TypeSystemService.ParseFile (project, realPath) - as AspNetParsedDocument; + var pd = TypeSystemService.ParseFile (project, realPath) as WebFormsParsedDocument; if (pd != null) { try { @@ -243,7 +376,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui if (placeholder.Contains ("main") || placeholder.Contains ("Main") || placeholder.Contains ("content") || placeholder.Contains ("Content")) - primaryPlaceholderCombo.Active = i; + placeholderCombo.Active = i; } } catch (Exception ex) { LoggingService.LogError ("Unhandled exception getting master regions for '" + realPath + "'", ex); @@ -296,7 +429,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui public string PrimaryPlaceHolder { get { - return primaryPlaceholderCombo.ActiveText; + return placeholderCombo.ActiveText; } } @@ -329,12 +462,6 @@ namespace MonoDevelop.AspNet.Mvc.Gui public string ActiveViewEngine {
get { return viewEngineCombo.ActiveText; }
- }
-
- public string MvcVersion {
- get { - return project.GetAspNetMvcVersion ();
- }
} #endregion
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewFromControllerCommandHandler.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewFromControllerCommandHandler.cs new file mode 100644 index 0000000000..0bf46856ec --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewFromControllerCommandHandler.cs @@ -0,0 +1,133 @@ +//
+// AddViewFromControllerCommandHandler.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo.
+//
+// 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.Components.Commands;
+using MonoDevelop.Ide;
+using MonoDevelop.AspNet.Projects;
+
+namespace MonoDevelop.AspNet.Commands
+{
+ class AddViewFromControllerCommandHandler : CommandHandler
+ {
+ protected override void Update (CommandInfo info)
+ {
+ MvcCommandsCommonHandler.Update (info);
+ }
+
+ protected override void Run ()
+ {
+ var doc = IdeApp.Workbench.ActiveDocument;
+ var project = (AspNetAppProject)doc.Project;
+ var currentLocation = doc.Editor.Caret.Location;
+
+ string controllerName = doc.ParsedDocument.GetTopLevelTypeDefinition (currentLocation).Name;
+ int pos = controllerName.LastIndexOf ("Controller", StringComparison.Ordinal);
+ if (pos > 0)
+ controllerName = controllerName.Remove (pos);
+
+ string path = doc.FileName.ParentDirectory.ParentDirectory.Combine ("Views", controllerName); + string actionName = doc.ParsedDocument.GetMember (currentLocation).Name;
+ AddView (project, path, actionName);
+ }
+
+ public static void AddView (AspNetAppProject project, string path, string name)
+ {
+ var provider = project.LanguageBinding.GetCodeDomProvider ();
+ if (provider == null)
+ throw new InvalidOperationException ("Project language has null CodeDOM provider");
+
+ string outputFile = null;
+ MvcTextTemplateHost host = null;
+ AddViewDialog dialog = null;
+
+ try {
+ dialog = new AddViewDialog (project);
+ dialog.ViewName = name;
+
+ bool fileGood = false;
+ while (!fileGood) {
+ var resp = (Gtk.ResponseType) MessageService.RunCustomDialog (dialog);
+ dialog.Hide ();
+ if (resp != Gtk.ResponseType.Ok || ! dialog.IsValid ())
+ return;
+
+ string ext = ".cshtml";
+ if (dialog.ActiveViewEngine == "Aspx")
+ ext = dialog.IsPartialView ? ".ascx" : ".aspx";
+
+ if (!System.IO.Directory.Exists (path))
+ System.IO.Directory.CreateDirectory (path);
+
+ outputFile = System.IO.Path.Combine (path, dialog.ViewName) + ext;
+
+ if (System.IO.File.Exists (outputFile)) {
+ fileGood = MessageService.AskQuestion ("Overwrite file?",
+ String.Format ("The file '{0}' already exists.\n", dialog.ViewName) +
+ "Would you like to overwrite it?", AlertButton.OverwriteFile, AlertButton.Cancel)
+ != AlertButton.Cancel;
+ } else
+ break;
+ }
+
+ host = new MvcTextTemplateHost {
+ LanguageExtension = provider.FileExtension,
+ ItemName = dialog.ViewName,
+ ViewDataTypeString = ""
+ };
+
+ if (dialog.HasMaster) {
+ host.IsViewContentPage = true;
+ host.ContentPlaceholder = dialog.PrimaryPlaceHolder;
+ host.MasterPage = dialog.MasterFile;
+ host.ContentPlaceHolders = dialog.ContentPlaceHolders;
+ }
+ else if (dialog.IsPartialView)
+ host.IsViewUserControl = true;
+ else
+ host.IsViewPage = true;
+
+ if (dialog.IsStronglyTyped)
+ host.ViewDataTypeString = dialog.ViewDataTypeString;
+
+ host.ProcessTemplate (dialog.TemplateFile, outputFile);
+ MonoDevelop.TextTemplating.TextTemplatingService.ShowTemplateHostErrors (host.Errors);
+
+ } finally {
+ if (host != null)
+ host.Dispose ();
+ if (dialog != null)
+ dialog.Destroy ();
+ }
+
+ if (System.IO.File.Exists (outputFile)) {
+ project.AddFile (outputFile);
+ IdeApp.ProjectOperations.Save (project);
+ }
+ }
+ }
+
+}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetCommands.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AspNetCommands.cs index f22838d13c..0962f498c3 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetCommands.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AspNetCommands.cs @@ -24,15 +24,15 @@ // 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.Components.Commands; - -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Commands { - public enum AspNetCommands { AddAspNetDirectory, + AddView, + AddController, + GoToView, + GoToController, + AddViewFromController } } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Commands/GoToControllerCommandHandler.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/GoToControllerCommandHandler.cs new file mode 100644 index 0000000000..ed2251cb31 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/GoToControllerCommandHandler.cs @@ -0,0 +1,66 @@ +//
+// GoToControllerCommandHandler.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Core;
+using MonoDevelop.Ide;
+using MonoDevelop.AspNet.Projects;
+
+namespace MonoDevelop.AspNet.Commands
+{
+
+ class GoToControllerCommandHandler : CommandHandler
+ {
+ protected override void Update (CommandInfo info)
+ {
+ var doc = IdeApp.Workbench.ActiveDocument;
+ AspNetAppProject project;
+ if (doc == null || (project = doc.Project as AspNetAppProject) == null || !project.IsAspMvcProject) {
+ info.Enabled = info.Visible = false;
+ return;
+ }
+ var baseDirectory = doc.FileName.ParentDirectory.ParentDirectory; + if (!string.Equals (baseDirectory.FileName, "Views")) + info.Enabled = info.Visible = false;
+ }
+
+ protected override void Run ()
+ {
+ var doc = IdeApp.Workbench.ActiveDocument;
+ var name = doc.FileName.ParentDirectory.FileName;
+ var controller = doc.ProjectContent.GetAllTypeDefinitions ().FirstOrDefault (t => t.Name == name + "Controller");
+
+ if (controller != null)
+ IdeApp.Workbench.OpenDocument (controller.UnresolvedFile.FileName, doc.Project);
+ else
+ MessageService.ShowError ("Matching controller cannot be found.");
+ }
+ }
+
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Commands/GoToViewCommandHandler.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/GoToViewCommandHandler.cs new file mode 100644 index 0000000000..cbdfed0257 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/GoToViewCommandHandler.cs @@ -0,0 +1,76 @@ +//
+// GoToViewCommandHandler.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 System.IO;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Core;
+using MonoDevelop.Ide;
+
+namespace MonoDevelop.AspNet.Commands
+{
+ class GoToViewCommandHandler : CommandHandler
+ {
+ protected override void Update (CommandInfo info)
+ {
+ MvcCommandsCommonHandler.Update (info);
+ }
+
+ protected override void Run ()
+ {
+ var doc = IdeApp.Workbench.ActiveDocument;
+ var currentLocation = doc.Editor.Caret.Location;
+
+ var controller = doc.ParsedDocument.GetTopLevelTypeDefinition (currentLocation); + string controllerName = controller.Name; + int pos = controllerName.LastIndexOf ("Controller", StringComparison.Ordinal);
+ if (pos > 0)
+ controllerName = controllerName.Remove (pos);
+ + var baseDirectory = doc.FileName.ParentDirectory.ParentDirectory; +
+ string actionName = doc.ParsedDocument.GetMember (currentLocation).Name;
+ var viewFoldersPaths = new [] {
+ baseDirectory.Combine ("Views", controllerName), + baseDirectory.Combine ("Views", "Shared") + };
+ var viewExtensions = new [] { ".aspx", ".cshtml" };
+
+ foreach (var folder in viewFoldersPaths) {
+ foreach (var ext in viewExtensions) {
+ var possibleFile = folder.Combine (actionName + ext);
+ if (File.Exists (possibleFile)) {
+ IdeApp.Workbench.OpenDocument (possibleFile, doc.Project);
+ return;
+ }
+ }
+ }
+
+ MessageService.ShowError ("Matching view cannot be found.");
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Commands/MvcCommandsCommonHandler.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/MvcCommandsCommonHandler.cs new file mode 100644 index 0000000000..03fa16fb63 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/MvcCommandsCommonHandler.cs @@ -0,0 +1,60 @@ +//
+// CommandHandlers.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Ide;
+using MonoDevelop.AspNet.Projects;
+
+namespace MonoDevelop.AspNet.Commands
+{
+ static class MvcCommandsCommonHandler
+ {
+ public static void Update (CommandInfo info)
+ {
+ var doc = IdeApp.Workbench.ActiveDocument;
+ AspNetAppProject project;
+ if (doc == null || (project = doc.Project as AspNetAppProject) == null || !project.IsAspMvcProject || doc.ParsedDocument == null) {
+ info.Enabled = info.Visible = false;
+ return;
+ }
+
+ var currentLocation = doc.Editor.Caret.Location;
+ var topLevelType = doc.ParsedDocument.GetTopLevelTypeDefinition (currentLocation);
+ if (topLevelType == null || !topLevelType.Name.EndsWith ("Controller", StringComparison.Ordinal)) { + info.Enabled = info.Visible = false;
+ return;
+ }
+
+ var correctReturnTypes = new [] { "ActionResult", "ViewResultBase", "ViewResult", "PartialViewResult" };
+ var member = doc.ParsedDocument.GetMember (currentLocation) as IUnresolvedMethod;
+ if (member == null || !member.IsPublic || correctReturnTypes.All (t => t != member.ReturnType.ToString ()))
+ info.Enabled = info.Visible = false;
+ }
+ }
+}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetExecutionCommand.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/AspNetExecutionCommand.cs index e8ab5aac6e..e1104e7ffd 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetExecutionCommand.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/AspNetExecutionCommand.cs @@ -24,22 +24,17 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; using MonoDevelop.Core; using MonoDevelop.Core.Execution; using MonoDevelop.Core.Assemblies; using System.Collections.Generic; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Execution { public class AspNetExecutionCommand: ExecutionCommand { IDictionary<string, string> environmentVariables; - - public AspNetExecutionCommand() - { - } - + public ClrVersion ClrVersion { get; set; } public XspParameters XspParameters { get; set; } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetExecutionHandler.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/AspNetExecutionHandler.cs index 0e341ea78b..2e0dcca894 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetExecutionHandler.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/AspNetExecutionHandler.cs @@ -26,13 +26,12 @@ using System; using System.Collections.Generic; -using MonoDevelop.Projects; +using System.IO; using MonoDevelop.Core; using MonoDevelop.Core.Assemblies; using MonoDevelop.Core.Execution; -using System.IO; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Execution { public class AspNetExecutionHandler: IExecutionHandler { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/BrowserLauncher.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/BrowserLauncher.cs index d5e27e66cc..6a03216721 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/BrowserLauncher.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/BrowserLauncher.cs @@ -31,10 +31,9 @@ using MonoDevelop.Core; using MonoDevelop.Core.Execution; using MonoDevelop.Ide; -namespace MonoDevelop.AspNet.Gui -{ - - public static class BrowserLauncher +namespace MonoDevelop.AspNet.Execution +{ + static class BrowserLauncher { public static IProcessAsyncOperation LaunchDefaultBrowser (string url) { @@ -47,5 +46,4 @@ namespace MonoDevelop.AspNet.Gui } } } - } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/LineInterceptingTextWriter.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/LineInterceptingTextWriter.cs index 02d7768ad6..b743e1cd6c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/LineInterceptingTextWriter.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/LineInterceptingTextWriter.cs @@ -27,16 +27,16 @@ using System; using System.IO; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Execution { /// <summary> /// This is used to watch for a specific lines in a textwriter. It wraps an (optional) real writer, /// parses lines, and raises events. /// </summary> - public class LineInterceptingTextWriter : TextWriter + class LineInterceptingTextWriter : TextWriter { - TextWriter innerWriter; + readonly TextWriter innerWriter; System.Text.StringBuilder sb = new System.Text.StringBuilder (); Action onNewLine; bool prevCharWasCR; @@ -49,8 +49,13 @@ namespace MonoDevelop.AspNet } public bool FinishedIntercepting { - get { return sb == null; } - set { sb = null; } + get { + return sb == null; + } + set { + if (value) + sb = null; + } } /// <summary> diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspBrowserLauncherConsole.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspBrowserLauncherConsole.cs new file mode 100644 index 0000000000..c62fea6de7 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspBrowserLauncherConsole.cs @@ -0,0 +1,90 @@ +//
+// XspBrowserLauncherConsole.cs
+//
+// Author:
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
+// 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 System.IO; +using MonoDevelop.Core.Execution; + +namespace MonoDevelop.AspNet.Execution +{ + class XspBrowserLauncherConsole : IConsole + { + readonly IConsole real; + LineInterceptingTextWriter outWriter; + Action <string> launchBrowser; + + const int MAX_WATCHED_LINES = 30; + + public XspBrowserLauncherConsole (IConsole real, Action <string> launchBrowser) + { + this.real = real; + this.launchBrowser = launchBrowser; + } + + public void Dispose () + { + real.Dispose (); + } + + public event EventHandler CancelRequested { + add { real.CancelRequested += value; } + remove { real.CancelRequested -= value; } + } + + public TextReader In { + get { return real.In; } + } + + public TextWriter Out { + get { + if (outWriter == null) + outWriter = new LineInterceptingTextWriter (real.Out, delegate { + string line = outWriter.GetLine(); + if (line.Contains ("Listening on port: ")) { + string port = System.Text.RegularExpressions.Regex.Match (line, "(?<=port: )[0-9]*(?= )").Value; + launchBrowser (port); + outWriter.FinishedIntercepting = true; + } else if (outWriter.LineCount > MAX_WATCHED_LINES) { + outWriter.FinishedIntercepting = true; + } + }); + return outWriter; + } + } + + public TextWriter Error { + get { return real.Error; } + } + + public TextWriter Log { + get { return real.Log; } + } + + public bool CloseOnDispose { + get { return real.CloseOnDispose; } + } + } +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/XspOptionsPanel.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspOptionsPanel.cs index 4d4d6a7e46..6bd97b965d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/XspOptionsPanel.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspOptionsPanel.cs @@ -29,16 +29,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using Gtk; -using MonoDevelop.Ide.Projects; -using MonoDevelop.Core; using MonoDevelop.Ide.Gui.Dialogs; +using MonoDevelop.AspNet.Projects; -namespace MonoDevelop.AspNet.Gui +namespace MonoDevelop.AspNet.Execution { - - public class XspOptionsPanel : ItemOptionsPanel + class XspOptionsPanel : ItemOptionsPanel { XspOptionsPanelWidget panel; diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspOptionsPanelWidget.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspOptionsPanelWidget.cs new file mode 100644 index 0000000000..18126f4836 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspOptionsPanelWidget.cs @@ -0,0 +1,202 @@ +// XspOptionsPanelWidget.cs +// +// Author: +// Michael Hutchinson <mhutchinson@novell.com> +// +// Copyright (C) 2007 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 Gtk; + +using MonoDevelop.Core; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.Components; + +namespace MonoDevelop.AspNet.Execution +{ + class XspOptionsPanelWidget : VBox + { + Entry ipAddress = new Entry { WidthChars = 39 }; // sized for IPv6 + SpinButton portNumber = new SpinButton (0, Int16.MaxValue, 1) { WidthChars = 5} ; + CheckButton verboseCheck = new CheckButton (); + readonly ComboBox sslMode = ComboBox.NewText (); + readonly ComboBox sslProtocol = ComboBox.NewText (); + readonly ComboBox keyType = ComboBox.NewText (); + readonly ComboBox passwordOptions = ComboBox.NewText (); + readonly FileEntry keyLocation = new FileEntry (); + readonly FileEntry certLocation = new FileEntry (); + readonly Entry passwordEntry = new Entry { InvisibleChar = '●' }; + + public XspOptionsPanelWidget (AspNetAppProject project) + { + Build (); + + XspParameters xPar = project.XspParameters; + + //index should be equivalent to XspSslMode enum + ((ListStore) sslMode.Model).Clear (); + sslMode.AppendText (GettextCatalog.GetString ("None")); + sslMode.AppendText (GettextCatalog.GetString ("Enabled")); + sslMode.AppendText (GettextCatalog.GetString ("Accept Client Certificates")); + sslMode.AppendText (GettextCatalog.GetString ("Require Client Certificates")); + + //index should be equivalent to XspSslProtocol enum + ((ListStore) sslProtocol.Model).Clear (); + sslProtocol.AppendText (GettextCatalog.GetString ("Default")); + sslProtocol.AppendText ("TLS"); + sslProtocol.AppendText ("SSL 2"); + sslProtocol.AppendText ("SSL 3"); + + ((ListStore) keyType.Model).Clear (); + keyType.AppendText (GettextCatalog.GetString ("None")); + keyType.AppendText ("Pkcs12"); + keyType.AppendText ("PVK"); + + ((ListStore) passwordOptions.Model).Clear (); + passwordOptions.AppendText (GettextCatalog.GetString ("None")); + passwordOptions.AppendText (GettextCatalog.GetString ("Ask")); + passwordOptions.AppendText (GettextCatalog.GetString ("Store (insecure)")); + + //load all options + ipAddress.Text = xPar.Address; + portNumber.Value = xPar.Port; + verboseCheck.Active = xPar.Verbose; + sslMode.Active = (int) xPar.SslMode; + sslProtocol.Active = (int) xPar.SslProtocol; + keyType.Active = (int) xPar.KeyType; + keyLocation.Path = xPar.PrivateKeyFile; + certLocation.Path = xPar.CertificateFile; + passwordOptions.Active = (int) xPar.PasswordOptions; + passwordEntry.Text = xPar.PrivateKeyPassword; + } + + void Build () + { + Spacing = 6; + + PackStart (new Label { Markup = "<b>" + GettextCatalog.GetString ("General Options") + "</b>", Xalign = 0 }); + + var gpadLabel = new Label { WidthRequest = 12 }; + var ipLabel = new Label (GettextCatalog.GetString ("IP address:")) { Xalign = 0 }; + var ipHint = new Label (GettextCatalog.GetString ("(blank = localhost)")) { Xalign = 0 }; + var ipHbox = new HBox (false, 6); + ipHbox.PackStart (ipAddress, false, false, 0); + ipHbox.PackStart (ipHint, false, false, 0); + var portLabel = new Label (GettextCatalog.GetString ("Port:")) { Xalign = 0 }; + var portHint = new Label (GettextCatalog.GetString ("(0 = random)")) { Xalign = 0 }; + var portHbox = new HBox (false, 6); + portHbox.PackStart (portNumber, false, false, 0); + portHbox.PackStart (portHint, false, false, 0); + verboseCheck.Label = GettextCatalog.GetString ("Verbose console output"); + verboseCheck.Xalign = 0; + + var ipTable = new Table (3, 3, false) { ColumnSpacing = 6, RowSpacing = 6 }; + ipTable.Attach (gpadLabel, 0, 1, 0, 1, AttachOptions.Fill, 0, 0, 0); + ipTable.Attach (ipLabel, 1, 2, 0, 1, AttachOptions.Fill, 0, 0, 0); + ipTable.Attach (ipHbox, 2, 3, 0, 1, AttachOptions.Fill, 0, 0, 0); + ipTable.Attach (portLabel, 1, 2, 1, 2, AttachOptions.Fill, 0, 0, 0); + ipTable.Attach (portHbox, 2, 3, 1, 2, AttachOptions.Fill, 0, 0, 0); + ipTable.Attach (verboseCheck, 1, 3, 2, 3, AttachOptions.Fill, 0, 0, 0); + PackStart (ipTable); + + PackStart (new Label { Markup = "<b>" + GettextCatalog.GetString ("Security") + "</b>", Xalign = 0 }); + + var sslPadLabel = new Label { WidthRequest = 12 }; + var sslModeLabel = new Label (GettextCatalog.GetString ("SSL mode:")) { Xalign = 0 }; + var sslModeAlign = new Alignment (0, 0, 0, 0) { Child = sslMode }; + var sslProtocolLabel = new Label (GettextCatalog.GetString ("SSL protocol:")) { Xalign = 0 }; + var sslProtocolAlign = new Alignment (0, 0, 0, 0) { Child = sslProtocol }; + + var sslTable = new Table (2, 3, false) { ColumnSpacing = 6, RowSpacing = 6 }; + sslTable.Attach (sslPadLabel, 0, 1, 0, 1, AttachOptions.Fill, 0, 0, 0); + sslTable.Attach (sslModeLabel, 1, 2, 0, 1, AttachOptions.Fill, 0, 0, 0); + sslTable.Attach (sslModeAlign, 2, 3, 0, 1, AttachOptions.Fill, 0, 0, 0); + sslTable.Attach (sslProtocolLabel, 1, 2, 1, 2, AttachOptions.Fill, 0, 0, 0); + sslTable.Attach (sslProtocolAlign, 2, 3, 1, 2, AttachOptions.Fill, 0, 0, 0); + PackStart (sslTable); + + PackStart (new Label { Markup = "<b>" + GettextCatalog.GetString ("SSL Key") + "</b>", Xalign = 0 }); + + var keyPadLabel = new Label { WidthRequest = 12 }; + var keyTypeLabel = new Label (GettextCatalog.GetString ("Key type:")) { Xalign = 0 }; + var keyTypeAlign = new Alignment (0, 0, 0, 0) { Child = keyType }; + var keyFileLabel = new Label (GettextCatalog.GetString ("Key file:")) { Xalign = 0 }; + var certFileLabel = new Label (GettextCatalog.GetString ("Certificate file:")) { Xalign = 0 }; + var passwordLabel = new Label (GettextCatalog.GetString ("Password:")) { Xalign = 0 }; + var passwordHbox = new HBox (false, 6); + passwordHbox.PackStart (passwordOptions, false, false, 0); + passwordHbox.PackStart (passwordEntry, true, true, 0); + + var keyTable = new Table (4, 4, false) { ColumnSpacing = 6, RowSpacing = 6 }; + keyTable.Attach (keyPadLabel, 0, 1, 0, 1, AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (keyTypeLabel, 1, 2, 0, 1, AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (keyTypeAlign, 2, 3, 0, 1, AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (keyFileLabel, 1, 2, 1, 2, AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (keyLocation, 2, 4, 1, 2, AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (certFileLabel, 1, 2, 2, 3, AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (certLocation, 2, 4, 2, 3, AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (passwordLabel, 1, 2, 3, 4, AttachOptions.Fill, 0, 0, 0); + keyTable.Attach (passwordHbox, 2, 4, 3, 4, AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0); + PackStart (keyTable); + + sslMode.Changed += UpdateSensitivity; + keyType.Changed += UpdateSensitivity; + passwordOptions.Changed += UpdateSensitivity; + + ShowAll (); + } + + public void Store (AspNetAppProject project) + { + XspParameters xPar = project.XspParameters; + + xPar.Address = ipAddress.Text; + xPar.Port = Convert.ToUInt16 (portNumber.Value); + xPar.Verbose = verboseCheck.Active; + xPar.SslMode = (XspSslMode) sslMode.Active; + xPar.SslProtocol = (XspSslProtocol) sslProtocol.Active; + xPar.KeyType = (XspKeyType) keyType.Active; + xPar.PrivateKeyFile = keyLocation.Path; + xPar.CertificateFile = certLocation.Path; + xPar.PasswordOptions = (XspPasswordOptions) passwordOptions.Active; + xPar.PrivateKeyPassword = passwordEntry.Text; + } + + void UpdateSensitivity (object sender, EventArgs e) + { + bool sslEnabled = ((XspSslMode) sslMode.Active) != XspSslMode.None; + sslProtocol.Sensitive = sslEnabled; + keyType.Sensitive = sslEnabled; + + bool keyEnabled = (sslEnabled) && (keyType.Active != 0); + keyLocation.Sensitive = keyEnabled; + passwordOptions.Sensitive = keyEnabled; + + bool certEnabled = (keyEnabled) && (keyType.Active == 2); + certLocation.Sensitive = certEnabled; + + passwordEntry.Sensitive = (keyEnabled) && (passwordOptions.Active == 2); + if (!passwordEntry.Sensitive) + passwordEntry.Text = ""; + } + } +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/XspParameters.cs b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspParameters.cs index 13516a70a4..e55fd0e541 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/XspParameters.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Execution/XspParameters.cs @@ -28,11 +28,12 @@ // 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.Ide.Gui; using MonoDevelop.Core.Serialization; +using MonoDevelop.Core; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Execution { [DataItem ("XspParameters")] public class XspParameters : ICloneable @@ -77,7 +78,7 @@ namespace MonoDevelop.AspNet get { return (int) port; } set { try { - port = System.Convert.ToUInt16 (value); + port = Convert.ToUInt16 (value); } catch (InvalidCastException) { throw new ArgumentException ("The port value is outside the permitted range"); } @@ -138,7 +139,7 @@ namespace MonoDevelop.AspNet public string GetXspParameters () { - System.Text.StringBuilder opt = new System.Text.StringBuilder (); + var opt = new System.Text.StringBuilder (); if (port == 0) opt.Append (" --random-port"); @@ -159,7 +160,7 @@ namespace MonoDevelop.AspNet } if (sslMode != XspSslMode.None) - opt.AppendFormat (" --protocols {0}", System.Enum.GetName (typeof (XspSslProtocol), sslProtocol)); + opt.AppendFormat (" --protocols {0}", Enum.GetName (typeof (XspSslProtocol), sslProtocol)); switch (keyType) { @@ -179,15 +180,14 @@ namespace MonoDevelop.AspNet //password for keyfile if ((keyType != XspKeyType.None) && (passwordOptions != XspPasswordOptions.None)) { - string pwtemp = ""; + string pwtemp = password; - if (passwordOptions == XspPasswordOptions.Store) - pwtemp = password; - else - //TODO: hide password chars (will need custom dialogue) + if (passwordOptions != XspPasswordOptions.Store) { pwtemp = MonoDevelop.Ide.MessageService.GetPassword ( - "Please enter the password for your private key for the XSP Web Server", - "XSP Private Key Password"); + GettextCatalog.GetString ("Please enter the password for your private key for the XSP Web Server"), + GettextCatalog.GetString ("XSP Private Key Password") + ); + } if (!string.IsNullOrEmpty (pwtemp)) opt.AppendFormat (" --pkpwd {0}", pwtemp); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/BaseHtmlEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs index 9cbbae106e..1e2ab29454 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/BaseHtmlEditorExtension.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs @@ -29,21 +29,14 @@ using System; using System.Linq; using System.Collections.Generic; -using System.Diagnostics; using MonoDevelop.Core; -using MonoDevelop.Projects; using MonoDevelop.Ide.CodeCompletion; -using MonoDevelop.Ide.Gui.Content; -using MonoDevelop.AspNet; -using MonoDevelop.AspNet.Parser; -using MonoDevelop.AspNet.StateEngine; -using MonoDevelop.Html; -using MonoDevelop.DesignerSupport; -using MonoDevelop.Xml.StateEngine; +using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.Html.Parser; -namespace MonoDevelop.AspNet.Gui +namespace MonoDevelop.AspNet.Html { public abstract class BaseHtmlEditorExtension : MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/DocTypeCompletionData.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/DocTypeCompletionData.cs index 3e77712bc7..583293ab43 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/DocTypeCompletionData.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/DocTypeCompletionData.cs @@ -30,7 +30,7 @@ using System; using MonoDevelop.Core; using MonoDevelop.Ide.CodeCompletion; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { public class DocTypeCompletionData : CompletionData { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/DocTypeExtensionNode.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/DocTypeExtensionNode.cs index abcfaeb0b5..82a3f5d5ab 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/DocTypeExtensionNode.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/DocTypeExtensionNode.cs @@ -29,9 +29,9 @@ using System; using Mono.Addins; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { - public class DocTypeExtensionNode : ExtensionNode + class DocTypeExtensionNode : ExtensionNode { #pragma warning disable 0649 diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/ElementTypes.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/ElementTypes.cs index 9a2633061b..b06136af76 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/ElementTypes.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/ElementTypes.cs @@ -29,10 +29,8 @@ using System; using System.Collections.Generic; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { - - public class ElementTypes { //element listings found at http://gigamonkeys.com/book/practical-an-html-generation-library-the-interpreter.html diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/HtmlEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs index 0416268cdb..edd3641310 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/HtmlEditorExtension.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs @@ -33,9 +33,8 @@ using MonoDevelop.Xml.StateEngine; using MonoDevelop.Ide.TypeSystem; using ICSharpCode.NRefactory.TypeSystem; -namespace MonoDevelop.AspNet.Gui +namespace MonoDevelop.AspNet.Html { - sealed class HtmlEditorExtension : BaseHtmlEditorExtension { //copied from MoonlightEditorExtension diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs index 2840453381..f980249519 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlParser.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs @@ -31,12 +31,12 @@ using System.IO; using System.Collections.Generic; using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; using MonoDevelop.Ide.TypeSystem; using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Projects; +using MonoDevelop.AspNet.Html.Parser; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { public class HtmlParser : TypeSystemParser { @@ -46,7 +46,7 @@ namespace MonoDevelop.Html doc.Flags = ParsedDocumentFlags.NonSerializable; try { - Parser xmlParser = new Parser ( + var xmlParser = new MonoDevelop.Xml.StateEngine.Parser ( new XmlFreeState (new HtmlTagState (), new HtmlClosingTagState (true)), true); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/PathCompletion.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlPathCompletion.cs index 06aea22eb3..b5b5596a70 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/PathCompletion.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlPathCompletion.cs @@ -31,11 +31,9 @@ using MonoDevelop.Core; using System.Text.RegularExpressions; using MonoDevelop.Ide; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { - - - public static class PathCompletion + public static class HtmlPathCompletion { public static CompletionDataList GetPathCompletion (Project proj, string pattern, @@ -51,14 +49,14 @@ namespace MonoDevelop.Html var dir = fromFile.ParentDirectory.ToString (); foreach (var pf in proj.Files) { string pathStr = pf.FilePath.ToString (); - if (pf.Subtype == Subtype.Directory || !pathStr.StartsWith (dir)) + if (pf.Subtype == Subtype.Directory || !pathStr.StartsWith (dir, StringComparison.Ordinal)) continue; int split = pathStr.LastIndexOf (System.IO.Path.DirectorySeparatorChar); if (split != dir.Length) continue; - if (regex.IsMatch (pf.FilePath.FileName.ToString ())) + if (regex.IsMatch (pf.FilePath.FileName)) list.Add (new FileCompletionData (pf, pathFunc)); } @@ -89,15 +87,15 @@ namespace MonoDevelop.Html public int CompareTo (CompletionData other) { - return DisplayText.CompareTo (other.DisplayText); + return string.Compare (DisplayText, other.DisplayText, StringComparison.Ordinal); } } class FilePickerCompletionData : CompletionData { - Project proj; - string pattern; - Func<ProjectFile,string> pathFunc; + readonly Project proj; + readonly string pattern; + readonly Func<ProjectFile,string> pathFunc; public FilePickerCompletionData (Project proj, string pattern, Func<ProjectFile,string> pathFunc) { @@ -111,7 +109,7 @@ namespace MonoDevelop.Html } public override string Description { - get { return GettextCatalog.GetString ("Choose a file from the project.");; } + get { return GettextCatalog.GetString ("Choose a file from the project."); } } public override string CompletionText { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlSchema.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs index afab884d03..35e18d6cdb 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlSchema.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs @@ -31,7 +31,7 @@ using System.Xml; using System.Collections.Generic; using MonoDevelop.XmlEditor.Completion; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { public class HtmlSchema diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlSchemaService.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs index edb2e22280..ee783c2a8f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlSchemaService.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs @@ -34,7 +34,7 @@ using MonoDevelop.Core; using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.XmlEditor.Completion; -namespace MonoDevelop.Html +namespace MonoDevelop.AspNet.Html { public static class HtmlSchemaService @@ -51,9 +51,7 @@ namespace MonoDevelop.Html schemas = new Dictionary<string, HtmlSchema> (); //load all the schemas from addin points - //NOTE: the first ([0]) schema must be the default schema (HTML4 transitional) - string schemaDir = Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly ().Location); - schemaDir = Path.Combine (schemaDir, "Schemas"); + //NOTE: the first ([0]) schema must be the default schema foreach (DocTypeExtensionNode node in Mono.Addins.AddinManager.GetExtensionNodes ("/MonoDevelop/Html/DocTypes")) { if (schemas.ContainsKey (node.Name)) @@ -61,7 +59,7 @@ namespace MonoDevelop.Html "HtmlSchemaService cannot register duplicate doctype with the name '{0}'", node.Name); if (!string.IsNullOrEmpty (node.XsdFile)) { - string path = Path.Combine (schemaDir, node.XsdFile); + string path = node.Addin.GetFilePath (node.XsdFile); try { IXmlCompletionProvider provider = new XmlSchemaCompletionData (path); schemas.Add (node.Name, new HtmlSchema (node.Name, node.FullName, provider)); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlClosingTagState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs index 059cced7bb..4316740a1f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlClosingTagState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs @@ -27,13 +27,9 @@ // using System; -using System.Collections.Generic; -using System.Diagnostics; - using MonoDevelop.Xml.StateEngine; -using MonoDevelop.Html; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.Html.Parser { public class HtmlClosingTagState : XmlClosingTagState diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlScriptBodyState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs index 8473d949d1..859e0c0fea 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlScriptBodyState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs @@ -27,7 +27,7 @@ using System; using MonoDevelop.Xml.StateEngine; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.Html.Parser { public class HtmlScriptBodyState : State { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlTagState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs index e1d6591392..ba8566fd57 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlTagState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs @@ -27,14 +27,11 @@ // using System; -using System.Diagnostics; -using MonoDevelop.Html; using MonoDevelop.Xml.StateEngine; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.Html.Parser { - public class HtmlTagState : XmlTagState { HtmlScriptBodyState ScriptState; diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/W3C-License.html b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/W3C-License.html index 2edbb1ad27..fc5db13b69 100755..100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/W3C-License.html +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/W3C-License.html @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html> <head> <title>W3C Software License</title> <style type="text/css"> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/readme.txt b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/readme.txt index a6158b05b9..a6158b05b9 100755..100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/readme.txt +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/readme.txt diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/xhtml1-frameset.xsd b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/xhtml1-frameset.xsd index 0518a6145d..0518a6145d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/xhtml1-frameset.xsd +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/xhtml1-frameset.xsd diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/xhtml1-strict.xsd b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/xhtml1-strict.xsd index 93b80b6678..93b80b6678 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/xhtml1-strict.xsd +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/xhtml1-strict.xsd diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/xhtml1-transitional.xsd b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/xhtml1-transitional.xsd index 8ce44fb9af..8ce44fb9af 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Schemas/xhtml1-transitional.xsd +++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Schemas/xhtml1-transitional.xsd diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile.am b/main/src/addins/Web/MonoDevelop.AspNet/Makefile.am index b8a06787c8..b8a06787c8 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile.am +++ b/main/src/addins/Web/MonoDevelop.AspNet/Makefile.am diff --git a/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj b/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj new file mode 100644 index 0000000000..19450ca280 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj @@ -0,0 +1,492 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</ProjectGuid> + <OutputType>Library</OutputType> + <AssemblyName>MonoDevelop.AspNet</AssemblyName> + <RootNamespace>MonoDevelop.AspNet</RootNamespace> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>True</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.AspNet</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" /> + </Execution> + <DefineConstants>DEBUG</DefineConstants> + <NoWarn>1591;1573</NoWarn> + <DocumentationFile>..\..\..\..\build\AddIns\MonoDevelop.AspNet\MonoDevelop.AspNet.xml</DocumentationFile> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>True</Optimize> + <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.AspNet</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" /> + </Execution> + <DebugSymbols>true</DebugSymbols> + <NoWarn>1591;1573</NoWarn> + <DocumentationFile>..\..\..\..\build\AddIns\MonoDevelop.AspNet\MonoDevelop.AspNet.xml</DocumentationFile> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> + <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> + <Name>MonoDevelop.Ide</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj"> + <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project> + <Name>MonoDevelop.Core</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj"> + <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project> + <Name>MonoDevelop.DesignerSupport</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj"> + <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project> + <Name>MonoDevelop.XmlEditor</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj"> + <Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project> + <Name>Mono.TextEditor</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.Refactoring\MonoDevelop.Refactoring.csproj"> + <Project>{100568FC-F4E8-439B-94AD-41D11724E45B}</Project> + <Name>MonoDevelop.Refactoring</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj"> + <Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project> + <Name>MonoDevelop.SourceEditor</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj"> + <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project> + <Name>ICSharpCode.NRefactory</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj"> + <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project> + <Name>ICSharpCode.NRefactory.CSharp</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj"> + <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project> + <Name>MonoDevelop.Debugger</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj"> + <Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project> + <Name>Mono.Addins</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj"> + <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project> + <Name>Mono.Debugging</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\..\..\external\xwt\Xwt\Xwt.csproj"> + <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project> + <Name>Xwt</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\TextTemplating\MonoDevelop.TextTemplating\MonoDevelop.TextTemplating.csproj"> + <Project>{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}</Project> + <Name>MonoDevelop.TextTemplating</Name> + <Private>False</Private> + </ProjectReference> + <ProjectReference Include="..\..\TextTemplating\Mono.TextTemplating\Mono.TextTemplating.csproj"> + <Project>{A2364D6A-00EF-417C-80A6-815726C70032}</Project> + <Name>Mono.TextTemplating</Name> + <Private>False</Private> + </ProjectReference> + <Reference Include="System.Web.Razor"> + <HintPath>..\..\..\..\packages\Microsoft.AspNet.Razor.2.0.30506.0\lib\net40\System.Web.Razor.dll</HintPath> + </Reference> + <Reference Include="System.Web.Helpers"> + <HintPath>..\..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.Helpers.dll</HintPath> + </Reference> + <Reference Include="System.Web.WebPages.Deployment"> + <HintPath>..\..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath> + </Reference> + <Reference Include="System.Web.WebPages"> + <HintPath>..\..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.dll</HintPath> + </Reference> + <Reference Include="System.Web.WebPages.Razor"> + <HintPath>..\..\..\..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath> + </Reference> + <Reference Include="System.Web.Mvc"> + <HintPath>..\..\..\..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Web" /> + <Reference Include="System.Drawing.Design" /> + <Reference Include="System.Design" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Configuration" /> + <Reference Include="System.Core" /> + <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="System.Xml.Linq" /> + <Reference Include="Mono.Posix" /> + <Reference Include="System.ServiceModel" /> + <Reference Include="System.Runtime.Serialization" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Properties\MonoDevelop.AspNet.addin.xml"> + <LogicalName>MonoDevelop.AspNet.addin.xml</LogicalName> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <Compile Include="Html\HtmlSchemaService.cs" /> + <Compile Include="Html\HtmlSchema.cs" /> + <Compile Include="Html\DocTypeExtensionNode.cs" /> + <Compile Include="Html\DocTypeCompletionData.cs" /> + <Compile Include="Html\HtmlParser.cs" /> + <Compile Include="Html\ElementTypes.cs" /> + <Compile Include="Razor\Parser\RazorCSharpParsedDocument.cs" /> + <Compile Include="Razor\Parser\RazorCSharpParser.cs" /> + <Compile Include="Razor\Parser\RazorPageInfo.cs" /> + <Compile Include="Razor\Parser\RazorSymbols.cs" /> + <Compile Include="Razor\Parser\RazorUtils.cs" /> + <Compile Include="Razor\RazorSyntaxMode.cs" /> + <Compile Include="Razor\RazorCSharpFormatter.cs" /> + <Compile Include="Razor\EditorParserFixed\BackgroundParser.cs" /> + <Compile Include="Razor\EditorParserFixed\CommonResources.Designer.cs" /> + <Compile Include="Razor\EditorParserFixed\DisposableAction.cs" /> + <Compile Include="Razor\EditorParserFixed\RazorEditorParser.cs" /> + <Compile Include="Razor\EditorParserFixed\RazorEditorTrace.cs" /> + <Compile Include="Razor\EditorParserFixed\RazorResources.Designer.cs" /> + <Compile Include="Projects\AspMvcProject.cs" /> + <Compile Include="Projects\AspMvcProjectConfiguration.cs" /> + <Compile Include="Projects\AspNetAppProject.cs" /> + <Compile Include="Projects\AspNetAppProjectBinding.cs" /> + <Compile Include="Projects\AspNetAppProjectConfiguration.cs" /> + <Compile Include="Projects\AspNetMSBuildImportProvider.cs" /> + <Compile Include="WebForms\MasterContentFileDescriptionTemplate.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\AddinInfo.cs" /> + <Compile Include="WebForms\ILanguageCompletionBuilder.cs" /> + <Compile Include="Html\HtmlEditorExtension.cs" /> + <Compile Include="Html\Parser\HtmlClosingTagState.cs" /> + <Compile Include="Html\Parser\HtmlScriptBodyState.cs" /> + <Compile Include="Html\Parser\HtmlTagState.cs" /> + <Compile Include="Projects\MvcTextTemplateHost.cs" /> + <Compile Include="Html\BaseHtmlEditorExtension.cs" /> + <Compile Include="Razor\Parser\RazorCodeBlockState.cs" /> + <Compile Include="Razor\Parser\RazorCodeFragmentState.cs" /> + <Compile Include="Razor\Parser\RazorCommentState.cs" /> + <Compile Include="Razor\Parser\RazorDirectiveState.cs" /> + <Compile Include="Razor\Parser\RazorExpressionState.cs" /> + <Compile Include="Razor\Parser\RazorFreeState.cs" /> + <Compile Include="Razor\Parser\RazorSpeculativeState.cs" /> + <Compile Include="Razor\Parser\RazorState.cs" /> + <Compile Include="Razor\Parser\RazorStatementState.cs" /> + <Compile Include="Razor\Parser\StateEngineService.cs" /> + <Compile Include="Razor\IRazorCompletionBuilder.cs" /> + <Compile Include="Razor\RazorCompletion.cs" /> + <Compile Include="Razor\RazorCSharpEditorExtension.cs" /> + <Compile Include="Projects\WebSubtype.cs" /> + <Compile Include="WebForms\DocumentReferenceManager.cs" /> + <Compile Include="Execution\AspNetExecutionCommand.cs" /> + <Compile Include="Execution\AspNetExecutionHandler.cs" /> + <Compile Include="Execution\LineInterceptingTextWriter.cs" /> + <Compile Include="Execution\XspParameters.cs" /> + <Compile Include="Execution\BrowserLauncher.cs" /> + <Compile Include="Execution\XspOptionsPanel.cs" /> + <Compile Include="Execution\XspOptionsPanelWidget.cs" /> + <Compile Include="Execution\XspBrowserLauncherConsole.cs" /> + <Compile Include="Html\HtmlPathCompletion.cs" /> + <Compile Include="WebForms\WebFormsEditorExtension.cs" /> + <Compile Include="WebForms\WebFormsSyntaxMode.cs" /> + <Compile Include="WebForms\WebFormsToolboxLoader.cs" /> + <Compile Include="WebForms\WebFormsToolboxNode.cs" /> + <Compile Include="WebForms\WebFormsMemberListBuilder.cs" /> + <Compile Include="WebForms\WebFormsRegistrationCache.cs" /> + <Compile Include="WebForms\WebFormsToolboxProvider.cs" /> + <Compile Include="WebForms\WebFormsCodeBehind.cs" /> + <Compile Include="WebForms\WebFormsCodeBehindTypeNameCache.cs" /> + <Compile Include="WebForms\Parser\WebFormsAttributeValueState.cs" /> + <Compile Include="WebForms\Parser\WebFormsServerCommentState.cs" /> + <Compile Include="WebForms\Parser\WebFormsFreeState.cs" /> + <Compile Include="WebForms\Parser\WebFormsDirectiveState.cs" /> + <Compile Include="WebForms\Parser\WebFormsDirectiveAttributeState.cs" /> + <Compile Include="WebForms\Parser\WebFormsExpressionState.cs" /> + <Compile Include="WebForms\Dom\WebFormsDirective.cs" /> + <Compile Include="WebForms\Dom\WebFormsExpression.cs" /> + <Compile Include="WebForms\Dom\WebFormsRenderExpression.cs" /> + <Compile Include="WebForms\Dom\WebFormsHtmlEncodedExpression.cs" /> + <Compile Include="WebForms\Dom\WebFormsBindingExpression.cs" /> + <Compile Include="WebForms\Dom\WebFormsResourceExpression.cs" /> + <Compile Include="WebForms\Dom\WebFormsServerComment.cs" /> + <Compile Include="WebForms\Dom\WebFormsDomExtensions.cs" /> + <Compile Include="WebForms\Dom\WebFormsRenderBlock.cs" /> + <Compile Include="Razor\Dom\RazorComment.cs" /> + <Compile Include="Razor\Dom\RazorCodeFragment.cs" /> + <Compile Include="Razor\Dom\RazorCodeBlock.cs" /> + <Compile Include="Razor\Dom\RazorDirective.cs" /> + <Compile Include="Razor\Dom\RazorStatement.cs" /> + <Compile Include="Razor\Dom\RazorImplicitExpression.cs" /> + <Compile Include="Razor\Dom\RazorExplicitExpression.cs" /> + <Compile Include="Razor\Dom\RazorExpression.cs" /> + <Compile Include="WebForms\WebFormsDirectiveCompletion.cs" /> + <Compile Include="WebForms\WebFormsTypeContext.cs" /> + <Compile Include="Razor\Parser\RazorOutlineNode.cs" /> + <Compile Include="Commands\AddControllerDialog.cs" /> + <Compile Include="Commands\AddViewDialog.cs" /> + <Compile Include="Commands\AspNetCommands.cs" /> + <Compile Include="Commands\GoToViewCommandHandler.cs" /> + <Compile Include="Commands\AddViewFromControllerCommandHandler.cs" /> + <Compile Include="Commands\GoToControllerCommandHandler.cs" /> + <Compile Include="Commands\MvcCommandsCommonHandler.cs" /> + <Compile Include="ProjectPad\AspNetFolderNodeBuilderExtension.cs" /> + <Compile Include="ProjectPad\AspNetFolderNodeCommandHandler.cs" /> + <Compile Include="ProjectPad\AspNetProjectNodeBuilderExtension.cs" /> + <Compile Include="ProjectPad\AspNetProjectNodeCommandHandler.cs" /> + <Compile Include="Razor\Generator\FileUtil.cs" /> + <Compile Include="Razor\Generator\MarkupRewriter.cs" /> + <Compile Include="Razor\Generator\PreprocessedAttributeBlockCodeGenerator.cs" /> + <Compile Include="Razor\Generator\PreprocessedAttributeRewriter.cs" /> + <Compile Include="Razor\Generator\PreprocessedCSharpRazorCodeParser.cs" /> + <Compile Include="Razor\Generator\PreprocessedDynamicAttributeBlockCodeGenerator.cs" /> + <Compile Include="Razor\Generator\PreprocessedLiteralAttributeCodeGenerator.cs" /> + <Compile Include="Razor\Generator\PreprocessedRazorHost.cs" /> + <Compile Include="Razor\Generator\PreprocessedTemplateCodeTransformer.cs" /> + <Compile Include="Razor\Generator\RazorTemplatePreprocessor.cs" /> + <Compile Include="Razor\Generator\RazorWriterHelper.cs" /> + <Compile Include="Razor\Generator\RewritingRazorTemplateEngine.cs" /> + <Compile Include="Projects\AspNetMvcFileTemplateCondition.cs" /> + <Compile Include="WebForms\WebFormsParser.cs" /> + <Compile Include="WebForms\WebFormsParsedDocument.cs" /> + <Compile Include="WebForms\WebFormsPageInfo.cs" /> + <Compile Include="WebForms\SuggestedHandlerCompletionData.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="Makefile.am" /> + <None Include="packages.config" /> + <None Include="Razor\Razor-templates.xml"> + <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="CodeTemplates\CSharp\AddController\ControllerWithEmptyReadAndWriteActions.tt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="CodeTemplates\CSharp\AddController\Empty.tt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="CodeTemplates\CSharp\AddView\Aspx\Empty.tt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="CodeTemplates\CSharp\AddView\Razor\Empty.tt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\Controller.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\GlobalAsax.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\LayoutPage.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\PartialViewPageRazor.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\UserControl.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\ViewContentPage.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\ViewMasterPage.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\ViewPage.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\ViewPageRazor.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\WebConfigApp.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Mvc\WebConfigViews.xft.xml"> + <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebConfig-Application.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebConfig-SubDir.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\GlobalAsax-Empty.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\GlobalAsax-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\MasterPage-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\MasterPage-Empty.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\NestedMasterPage.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebContentForm.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebControl-Empty.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebForm-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\NestedMasterPage-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebControl-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebForm-Empty.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebHandler-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebService-Empty.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebService-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebHandler-Empty.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\WebForms\WebContentForm-CodeBehind.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\PreprocessedRazorTemplate.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\_Layout.cshtml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\_ViewStart.cshtml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\Error.cshtml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\HomeController.cs"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\HomeControllerTest.cs"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\Index.cshtml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\MvcCommon\ViewPageRazor.cshtml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\MvcProjectWithUnitTest.xpt.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\MvcProject.xpt.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\EmptyProject.xpt.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\EmptyMvcProject.xpt.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\MvcRazorProject.xpt.xml"> + <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\MvcRazorProjectWithUnitTest.xpt.xml"> + <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\Projects\WebApplication.xpt.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + </ItemGroup> + <ItemGroup> + <Content Include="Html\Schemas\readme.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Html\Schemas\W3C-License.html"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Html\Schemas\xhtml1-frameset.xsd"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Html\Schemas\xhtml1-strict.xsd"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Html\Schemas\xhtml1-transitional.xsd"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <ProjectExtensions> + <MonoDevelop> + <Properties> + <Policies> + <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileName" /> + </Policies> + </Properties> + </MonoDevelop> + </ProjectExtensions> + <ItemGroup> + <Folder Include="WebForms\" /> + <Folder Include="Razor\" /> + <Folder Include="Templates\WebForms\" /> + <Folder Include="Projects\" /> + <Folder Include="Properties\" /> + <Folder Include="Html\Parser\" /> + <Folder Include="Html\Schemas\" /> + <Folder Include="Execution\" /> + <Folder Include="WebForms\Dom\" /> + <Folder Include="Razor\Dom\" /> + <Folder Include="Commands\" /> + <Folder Include="ProjectPad\" /> + <Folder Include="Templates\Projects\" /> + </ItemGroup> +</Project> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcCommands.cs b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetFolderNodeBuilderExtension.cs index 39f3b9351d..1792b6da63 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcCommands.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetFolderNodeBuilderExtension.cs @@ -1,5 +1,5 @@ // -// AspMvcCommands.cs +// AspNetFolderNodeBuilderExtension.cs // // Author: // Michael Hutchinson <mhutchinson@novell.com> @@ -25,17 +25,20 @@ // THE SOFTWARE. using System; +using MonoDevelop.Ide.Gui.Components; +using MonoDevelop.Ide.Gui.Pads.ProjectPad; -namespace MonoDevelop.AspNet.Mvc +namespace MonoDevelop.AspNet.ProjectPad { - - - public enum AspMvcCommands + class AspNetFolderNodeBuilderExtension : NodeBuilderExtension { - AddView, - AddController,
- GoToView,
- GoToController,
- AddViewFromController + public override bool CanBuildNode (Type dataType) + { + return typeof (ProjectFolder).IsAssignableFrom (dataType); + } + + public override Type CommandHandlerType { + get { return typeof (AspNetFolderNodeCommandHandler); } + } } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/FolderNodeBuilderExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetFolderNodeCommandHandler.cs index 26a046ac03..30e870fccc 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/FolderNodeBuilderExtension.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetFolderNodeCommandHandler.cs @@ -1,58 +1,47 @@ -// -// FolderNodeBuilderExtension.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (c) 2009 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. +//
+// AspNetFolderNodeCommandHandler.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (c) 2009 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.Components.Commands; using MonoDevelop.Core; using MonoDevelop.Ide.Gui.Components; using MonoDevelop.Ide.Gui.Pads.ProjectPad; -using MonoDevelop.AspNet.Mvc.TextTemplating; using MonoDevelop.Ide; +using MonoDevelop.AspNet.Projects;
+using MonoDevelop.AspNet.Commands; -namespace MonoDevelop.AspNet.Mvc.Gui +namespace MonoDevelop.AspNet.ProjectPad { - class FolderNodeBuilderExtension : NodeBuilderExtension + class AspNetFolderNodeCommandHandler : NodeCommandHandler { - public override bool CanBuildNode (Type dataType) - { - return typeof (ProjectFolder).IsAssignableFrom (dataType); - } - - public override Type CommandHandlerType { - get { return typeof (FolderCommandHandler); } - } - } - - class FolderCommandHandler : NodeCommandHandler - { - [CommandUpdateHandler (AspMvcCommands.AddController)] + [CommandUpdateHandler (AspNetCommands.AddController)] public void AddControllerUpdate (CommandInfo info) { - var project = CurrentNode.GetParentDataItem (typeof (AspMvcProject), true) as AspMvcProject; - if (project == null) { + var project = CurrentNode.GetParentDataItem (typeof (AspNetAppProject), true) as AspNetAppProject; + if (project == null || !project.IsAspMvcProject) { info.Enabled = info.Visible = false; return; } @@ -62,10 +51,10 @@ namespace MonoDevelop.AspNet.Mvc.Gui info.Enabled = info.Visible = (pf.Path == rootName || pf.Path.IsChildPathOf (rootName)); } - [CommandHandler (AspMvcCommands.AddController)] + [CommandHandler (AspNetCommands.AddController)] public void AddController () { - var project = (AspMvcProject) CurrentNode.GetParentDataItem (typeof (AspMvcProject), true); + var project = (AspNetAppProject) CurrentNode.GetParentDataItem (typeof (AspNetAppProject), true); object currentItem = CurrentNode.DataItem;
@@ -79,7 +68,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui nav.Expanded = true; } - public static void AddController (AspMvcProject project, string path, string name) + public static void AddController (AspNetAppProject project, string path, string name) {
var provider = project.LanguageBinding.GetCodeDomProvider ();
if (provider == null)
@@ -134,11 +123,11 @@ namespace MonoDevelop.AspNet.Mvc.Gui } } - [CommandUpdateHandler (AspMvcCommands.AddView)] + [CommandUpdateHandler (AspNetCommands.AddView)] public void AddViewUpdate (CommandInfo info) { - var project = CurrentNode.GetParentDataItem (typeof (AspMvcProject), true) as AspMvcProject; - if (project == null) { + var project = CurrentNode.GetParentDataItem (typeof (AspNetAppProject), true) as AspNetAppProject; + if (project == null || !project.IsAspMvcProject) { info.Enabled = info.Visible = false; return; } @@ -148,96 +137,21 @@ namespace MonoDevelop.AspNet.Mvc.Gui info.Enabled = info.Visible = (pf.Path == rootName || pf.Path.IsChildPathOf (rootName)); } - [CommandHandler (AspMvcCommands.AddView)] + [CommandHandler (AspNetCommands.AddView)] public void AddView () { - var project = (AspMvcProject) CurrentNode.GetParentDataItem (typeof (AspMvcProject), true); + var project = (AspNetAppProject) CurrentNode.GetParentDataItem (typeof (AspNetAppProject), true); object currentItem = CurrentNode.DataItem; var folder = CurrentNode.GetParentDataItem (typeof(ProjectFolder), true) as ProjectFolder; string path = folder != null? folder.Path : project.BaseDirectory; - AddView (project, path, null); + AddViewFromControllerCommandHandler.AddView (project, path, null); ITreeNavigator nav = Tree.GetNodeAtObject (currentItem); if (nav != null) nav.Expanded = true; } - - public static void AddView (AspMvcProject project, string path, string name) - { - var provider = project.LanguageBinding.GetCodeDomProvider (); - if (provider == null) - throw new InvalidOperationException ("Project language has null CodeDOM provider"); - - string outputFile = null; - MvcTextTemplateHost host = null; - AddViewDialog dialog = null; - - try { - dialog = new AddViewDialog (project); - dialog.ViewName = name; - - bool fileGood = false; - while (!fileGood) { - var resp = (Gtk.ResponseType) MessageService.RunCustomDialog (dialog); - dialog.Hide (); - if (resp != Gtk.ResponseType.Ok || ! dialog.IsValid ()) - return;
-
- string ext = ".cshtml";
- if (dialog.ActiveViewEngine == "Aspx")
- ext = dialog.IsPartialView ? ".ascx" : ".aspx";
-
- if (!System.IO.Directory.Exists (path))
- System.IO.Directory.CreateDirectory (path);
-
- outputFile = System.IO.Path.Combine (path, dialog.ViewName) + ext;
-
- if (System.IO.File.Exists (outputFile)) {
- fileGood = MessageService.AskQuestion ("Overwrite file?",
- String.Format ("The file '{0}' already exists.\n", dialog.ViewName) +
- "Would you like to overwrite it?", AlertButton.OverwriteFile, AlertButton.Cancel)
- != AlertButton.Cancel;
- } else
- break; - } - - host = new MvcTextTemplateHost { - LanguageExtension = provider.FileExtension, - ItemName = dialog.ViewName, - ViewDataTypeString = "" - }; - - if (dialog.HasMaster) { - host.IsViewContentPage = true; - host.ContentPlaceholder = dialog.PrimaryPlaceHolder; - host.MasterPage = dialog.MasterFile; - host.ContentPlaceHolders = dialog.ContentPlaceHolders; - } - else if (dialog.IsPartialView) - host.IsViewUserControl = true; - else - host.IsViewPage = true; - - if (dialog.IsStronglyTyped)
- host.ViewDataTypeString = dialog.ViewDataTypeString; - - host.ProcessTemplate (dialog.TemplateFile, outputFile); - MonoDevelop.TextTemplating.TextTemplatingService.ShowTemplateHostErrors (host.Errors); - - } finally { - if (host != null) - host.Dispose (); - if (dialog != null) - dialog.Destroy (); - } - - if (System.IO.File.Exists (outputFile)) { - project.AddFile (outputFile); - IdeApp.ProjectOperations.Save (project); - } - } } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebTargetEditor.cs b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetProjectNodeBuilderExtension.cs index 8ff3f73827..da125b8376 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebTargetEditor.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetProjectNodeBuilderExtension.cs @@ -1,8 +1,9 @@ -// WebTargetEditor.cs -// +// +// ProjectFolderNodeBuilderExtension.cs +// // Author: // Michael Hutchinson <mhutchinson@novell.com> -// +// // Copyright (C) 2007 Novell, Inc (http://www.novell.com) // // Permission is hereby granted, free of charge, to any person obtaining @@ -26,17 +27,20 @@ using System; -namespace MonoDevelop.AspNet.Deployment +using MonoDevelop.Ide.Gui.Components; +using MonoDevelop.AspNet.Projects; + +namespace MonoDevelop.AspNet.ProjectPad { - - - public partial class WebTargetEditor : Gtk.Window + class AspNetProjectNodeBuilderExtension: NodeBuilderExtension { - - public WebTargetEditor() : - base(Gtk.WindowType.Toplevel) + public override bool CanBuildNode (Type dataType) { - this.Build(); + return typeof(AspNetAppProject).IsAssignableFrom (dataType); + } + + public override Type CommandHandlerType { + get { return typeof (AspNetProjectNodeCommandHandler); } } } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/ProjectFolderNodeBuilderExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs index faeb2c6ff2..3bf027f7c8 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/ProjectFolderNodeBuilderExtension.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs @@ -1,55 +1,42 @@ -// ProjectFolderNodeBuilderExtension.cs -// -// Author: -// Michael Hutchinson <mhutchinson@novell.com> -// -// Copyright (C) 2007 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. +//
+// AspNetProjectNodeCommandHandler.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2007 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 System.Collections.Generic; -using MonoDevelop.Projects; -using MonoDevelop.Core; -using MonoDevelop.Ide.Gui.Pads.ProjectPad; using MonoDevelop.Components.Commands; -using MonoDevelop.Ide.Gui.Components; +using MonoDevelop.Core; using MonoDevelop.Ide; +using MonoDevelop.Ide.Gui.Components; +using MonoDevelop.Projects; +using MonoDevelop.AspNet.Commands; +using MonoDevelop.AspNet.Projects; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.ProjectPad { - - public class ProjectFolderNodeBuilderExtension: NodeBuilderExtension - { - public override bool CanBuildNode (Type dataType) - { - return typeof(AspNetAppProject).IsAssignableFrom (dataType); - } - - public override Type CommandHandlerType { - get { return typeof (ProjectFolderCommandHandler); } - } - } - - class ProjectFolderCommandHandler: NodeCommandHandler + class AspNetProjectNodeCommandHandler: NodeCommandHandler { [CommandHandler (AspNetCommands.AddAspNetDirectory)] @@ -82,8 +69,7 @@ namespace MonoDevelop.AspNet foreach (string dir in dirs) { if (!fullPaths.Contains (proj.BaseDirectory.Combine (dir))) continue; - - CommandInfo cmd = info.Add (dir.Replace("_", "__"), dir); + info.Add (dir.Replace("_", "__"), dir); } }
@@ -105,5 +91,4 @@ namespace MonoDevelop.AspNet } } - } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspMvcProject.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspMvcProject.cs new file mode 100644 index 0000000000..8161c25ee2 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspMvcProject.cs @@ -0,0 +1,173 @@ +// +// AspMvcProject.cs +// +// Author: +// Michael Hutchinson <mhutchinson@novell.com> +// +// Copyright (c) 2009 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 System.Collections.Generic; +using System.Xml; +using MonoDevelop.Projects; + +namespace MonoDevelop.AspNet.Projects +{ + abstract class AspMvcProject : AspNetAppProject + { + protected AspMvcProject () + { + } + + protected AspMvcProject (string languageName) + : base (languageName) + { + } + + protected AspMvcProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions) + : base (languageName, info, projectOptions) + { + } + + public override SolutionItemConfiguration CreateConfiguration (string name) + { + var conf = new AspMvcProjectConfiguration (name); + conf.CopyFrom (base.CreateConfiguration (name)); + return conf; + } + + public override IEnumerable<string> GetProjectTypes () + { + yield return "AspNetMvc"; + foreach (var t in base.GetProjectTypes ()) + yield return t; + } + + public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework) + { + return framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_3_5); + } + + public override bool IsAspMvcProject { + get { + return true; + } + } + }
+
+ class AspMvc1Project : AspMvcProject
+ {
+ public AspMvc1Project ()
+ {
+ }
+
+ public AspMvc1Project (string languageName)
+ : base (languageName)
+ {
+ }
+
+ public AspMvc1Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
+ : base (languageName, info, projectOptions)
+ {
+ } + + protected override string GetDefaultAspNetMvcVersion () + { + return "1.0.0.0"; + }
+ }
+
+ class AspMvc2Project : AspMvcProject
+ {
+ public AspMvc2Project ()
+ {
+ }
+
+ public AspMvc2Project (string languageName)
+ : base (languageName)
+ {
+ }
+
+ public AspMvc2Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
+ : base (languageName, info, projectOptions)
+ {
+ } + + protected override string GetDefaultAspNetMvcVersion () + { + return "2.0.0.0"; + }
+ }
+
+ class AspMvc3Project : AspMvcProject
+ {
+ public AspMvc3Project ()
+ {
+ }
+
+ public AspMvc3Project (string languageName)
+ : base (languageName)
+ {
+ }
+
+ public AspMvc3Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
+ : base (languageName, info, projectOptions)
+ {
+ }
+
+ public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework)
+ {
+ return framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0);
+ } + + protected override string GetDefaultAspNetMvcVersion () + { + return "3.0.0.0"; + }
+ } + + class AspMvc4Project : AspMvcProject + { + public AspMvc4Project () + { + } + + public AspMvc4Project (string languageName) + : base (languageName) + { + } + + public AspMvc4Project (string languageName, ProjectCreateInformation info, XmlElement projectOptions) + : base (languageName, info, projectOptions) + { + } + + public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework) + { + return framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0); + } + + protected override string GetDefaultAspNetMvcVersion () + { + return "4.0.0.0"; + } + } +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProjectConfiguration.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspMvcProjectConfiguration.cs index ebd9499bfc..743a6109fc 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/AspMvcProjectConfiguration.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspMvcProjectConfiguration.cs @@ -26,7 +26,7 @@ using System; -namespace MonoDevelop.AspNet.Mvc +namespace MonoDevelop.AspNet.Projects { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProject.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetAppProject.cs index 53de5999e2..791ac001e2 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProject.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetAppProject.cs @@ -30,44 +30,35 @@ // using System; +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Reflection; using System.Xml; -using System.Collections.Generic; + +using ICSharpCode.NRefactory.TypeSystem; + using MonoDevelop.Core; +using MonoDevelop.Core.Assemblies; using MonoDevelop.Core.Execution; using MonoDevelop.Core.ProgressMonitoring; -using MonoDevelop.Projects; using MonoDevelop.Core.Serialization; -using MonoDevelop.Deployment; -using MonoDevelop.Core.Assemblies; - -using MonoDevelop.AspNet.Parser; -using MonoDevelop.AspNet.Deployment; -using MonoDevelop.AspNet.Gui; -using ICSharpCode.NRefactory.TypeSystem; -using MonoDevelop.Ide.TypeSystem; using MonoDevelop.Ide; +using MonoDevelop.Ide.TypeSystem; +using MonoDevelop.Projects; +using MonoDevelop.AspNet.Execution; +using MonoDevelop.AspNet.WebForms; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Projects { [DataInclude (typeof(AspNetAppProjectConfiguration))] public class AspNetAppProject : DotNetAssemblyProject { [ItemProperty("XspParameters", IsExternal=true)] - protected XspParameters xspParameters = new XspParameters (); - - [ItemProperty ("VerifyCodeBehindFields", IsExternal=true)] - protected bool verifyCodeBehindFields = true; - - [ItemProperty ("VerifyCodeBehindEvents", IsExternal=true)] - protected bool verifyCodeBehindEvents = true; - - [ItemProperty("WebDeployTargets", IsExternal=true)] - [ItemProperty ("Target", ValueType=typeof(WebDeployTarget), Scope="*")] - protected WebDeployTargetCollection webDeployTargets = new WebDeployTargetCollection (); - - RegistrationCache registrationCache; - CodeBehindTypeNameCache codebehindTypeNameCache; + XspParameters xspParameters = new XspParameters (); + + WebFormsRegistrationCache registrationCache; + WebFormsCodeBehindTypeNameCache codebehindTypeNameCache; #region properties @@ -82,40 +73,14 @@ namespace MonoDevelop.AspNet get { return true; } } - protected override void OnEndLoad () - { - base.OnEndLoad (); - - //FIX: old version of MD didn't set CompileTarget to Library for ASP.NET projects, - // but implicitly assumed they were always libraries. This is not compatible with VS/MSBuild, - // so we automatically "upgrade" this value. - if (CompileTarget != CompileTarget.Library) - CompileTarget = CompileTarget.Library; - } - public XspParameters XspParameters { get { return xspParameters; } } - public bool VerifyCodeBehindFields { - get { return verifyCodeBehindFields; } - set { verifyCodeBehindFields = value; } - } - - //TODO: make this do something - public bool VerifyCodeBehindEvents { - get { return verifyCodeBehindEvents; } - set { verifyCodeBehindEvents = value; } - } - - public WebDeployTargetCollection WebDeployTargets { - get { return webDeployTargets; } - } - - internal RegistrationCache RegistrationCache { + internal WebFormsRegistrationCache RegistrationCache { get { if (registrationCache == null) - registrationCache = new RegistrationCache (this); + registrationCache = new WebFormsRegistrationCache (this); return registrationCache; } } @@ -141,7 +106,7 @@ namespace MonoDevelop.AspNet Init (); var binPath = info == null? (FilePath)"bin" : info.BinPath; - foreach (AspNetAppProjectConfiguration cfg in Configurations) + foreach (var cfg in Configurations.Cast<AspNetAppProjectConfiguration> ()) cfg.OutputDirectory = binPath; } @@ -149,13 +114,18 @@ namespace MonoDevelop.AspNet { var conf = new AspNetAppProjectConfiguration (name); conf.CopyFrom (base.CreateConfiguration (name)); - conf.OutputDirectory = BaseDirectory.IsNullOrEmpty? "bin" : (string)BaseDirectory.Combine ("bin"); + conf.OutputDirectory = BaseDirectory.IsNullOrEmpty? "bin" : (string)BaseDirectory.Combine ("bin"); return conf; } void Init () { - codebehindTypeNameCache = new CodeBehindTypeNameCache (this); + codebehindTypeNameCache = new WebFormsCodeBehindTypeNameCache (this); + } + + public new AspNetAppProjectConfiguration GetConfiguration (ConfigurationSelector configuration) + { + return (AspNetAppProjectConfiguration) base.GetConfiguration (configuration); } #endregion @@ -184,37 +154,35 @@ namespace MonoDevelop.AspNet if (needsCompile) return base.DoBuild (monitor, configuration); - else - return new BuildResult (); + return new BuildResult (); } ExecutionCommand CreateExecutionCommand (ConfigurationSelector config, AspNetAppProjectConfiguration configuration) { - return new AspNetExecutionCommand () { + return new AspNetExecutionCommand { ClrVersion = configuration.ClrVersion, DebugMode = configuration.DebugMode, XspParameters = XspParameters, BaseDirectory = BaseDirectory, TargetRuntime = TargetRuntime, TargetFramework = TargetFramework, - UserAssemblyPaths = this.GetUserAssemblyPaths (config), + UserAssemblyPaths = GetUserAssemblyPaths (config), EnvironmentVariables = configuration.EnvironmentVariables, }; } - protected override bool OnGetCanExecute (MonoDevelop.Projects.ExecutionContext context, ConfigurationSelector config) + protected override bool OnGetCanExecute (ExecutionContext context, ConfigurationSelector configuration) { - var configuration = (AspNetAppProjectConfiguration) GetConfiguration (config); - var cmd = CreateExecutionCommand (config, configuration); + var cmd = CreateExecutionCommand (configuration, GetConfiguration (configuration)); return context.ExecutionHandler.CanExecute (cmd); } - protected override void DoExecute (IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector config) + protected override void DoExecute (IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration) { //check XSP is available - var configuration = (AspNetAppProjectConfiguration) GetConfiguration (config); - var cmd = CreateExecutionCommand (config, configuration); + var cfg = GetConfiguration (configuration); + var cmd = CreateExecutionCommand (configuration, cfg); IConsole console = null; var operationMonitor = new AggregatedOperationMonitor (monitor); @@ -234,13 +202,13 @@ namespace MonoDevelop.AspNet } } - if (configuration.ExternalConsole) - console = context.ExternalConsoleFactory.CreateConsole (!configuration.PauseConsoleOutput); + if (cfg.ExternalConsole) + console = context.ExternalConsoleFactory.CreateConsole (!cfg.PauseConsoleOutput); else - console = context.ConsoleFactory.CreateConsole (!configuration.PauseConsoleOutput); + console = context.ConsoleFactory.CreateConsole (!cfg.PauseConsoleOutput); // The running Port value is now captured in the XspBrowserLauncherConsole object - string url = String.Format ("http://{0}", this.XspParameters.Address); + string url = String.Format ("http://{0}", XspParameters.Address); if (isXsp) { @@ -286,7 +254,7 @@ namespace MonoDevelop.AspNet public static WebSubtype DetermineWebSubtype (string fileName) { - string extension = System.IO.Path.GetExtension (fileName); + string extension = Path.GetExtension (fileName); if (extension == null) return WebSubtype.None; extension = extension.ToUpperInvariant ().TrimStart ('.'); @@ -342,6 +310,8 @@ namespace MonoDevelop.AspNet return WebSubtype.Svg; case "STYL": return WebSubtype.Stylus; + case "CSHTML": + return WebSubtype.Razor; default: return WebSubtype.None; } @@ -369,7 +339,7 @@ namespace MonoDevelop.AspNet } else if (reference.ReferenceType == ReferenceType.Project && parsed.Name == reference.Reference) { var p = ParentSolution.FindProjectByName (reference.Reference) as DotNetProject; if (p == null) { - LoggingService.LogWarning ("Project '{0}' referenced from '{1}' could not be found", reference.Reference, this.Name); + LoggingService.LogWarning ("Project '{0}' referenced from '{1}' could not be found", reference.Reference, Name); continue; } return TypeSystemService.GetCompilation (p); @@ -421,7 +391,7 @@ namespace MonoDevelop.AspNet virtualPath = virtualPath.Substring (2); else virtualPath = virtualPath.Substring (1); - relativeToDir = this.BaseDirectory; + relativeToDir = BaseDirectory; } else { relativeToDir = String.IsNullOrEmpty (relativeToFile) ? BaseDirectory @@ -494,7 +464,7 @@ namespace MonoDevelop.AspNet if (webConfig == null || !File.Exists (webConfig.FilePath)) return; - var textFile = MonoDevelop.Ide.TextFileProvider.Instance.GetEditableTextFile (webConfig.FilePath); + var textFile = TextFileProvider.Instance.GetEditableTextFile (webConfig.FilePath); //use textfile API because it's write safe (writes out to another file then moves) if (textFile == null) textFile = MonoDevelop.Projects.Text.TextFile.ReadFile (webConfig.FilePath); @@ -502,7 +472,7 @@ namespace MonoDevelop.AspNet //can't use System.Web.Configuration.WebConfigurationManager, as it can only access virtual paths within an app //so need full manual handling try { - System.Xml.XmlDocument doc = new XmlDocument (); + XmlDocument doc = new XmlDocument (); //FIXME: PreserveWhitespace doesn't handle whitespace in attribute lists //doc.PreserveWhitespace = true; @@ -527,8 +497,8 @@ namespace MonoDevelop.AspNet int index = 0; bool found = false; while (index < existingAdds.Count) { - XmlNode node = existingAdds[index]; - XmlAttribute att = (XmlAttribute) node.Attributes.GetNamedItem ("assembly"); + XmlNode node = existingAdds [index]; + XmlAttribute att = (XmlAttribute)node.Attributes.GetNamedItem ("assembly"); if (att == null) continue; string refAtt = att.Value; @@ -536,9 +506,8 @@ namespace MonoDevelop.AspNet existingAdds.RemoveAt (index); found = true; break; - } else { - index++; } + index++; } if (!found) { XmlElement newAdd = doc.CreateElement ("add"); @@ -564,7 +533,7 @@ namespace MonoDevelop.AspNet if (tf != null) tf.Save (); } catch (Exception e) { - LoggingService.LogWarning ("Could not modify application web.config in project " + this.Name, e); + LoggingService.LogWarning ("Could not modify application web.config in project " + Name, e); } } @@ -587,8 +556,8 @@ namespace MonoDevelop.AspNet ProjectFile GetWebConfig () { - var webConf = this.BaseDirectory.Combine ("web.config"); - foreach (var file in this.Files) + var webConf = BaseDirectory.Combine ("web.config"); + foreach (var file in Files) if (string.Compare (file.FilePath.ToString (), webConf, StringComparison.OrdinalIgnoreCase) == 0) return file; return null; @@ -596,19 +565,19 @@ namespace MonoDevelop.AspNet bool IsWebConfig (FilePath file) { - var webConf = this.BaseDirectory.Combine ("web.config"); + var webConf = BaseDirectory.Combine ("web.config"); return (string.Compare (file, webConf, StringComparison.OrdinalIgnoreCase) == 0); } bool IsSystemReference (string reference) { foreach (string defaultPrefix in defaultAssemblyRefPrefixes) - if (reference.StartsWith (defaultPrefix)) + if (reference.StartsWith (defaultPrefix, StringComparison.Ordinal)) return true; return false; } - static string[] defaultAssemblyRefPrefixes = new string[] { + static string[] defaultAssemblyRefPrefixes = { "mscorlib", "System,", "System.Configuration,", @@ -671,12 +640,14 @@ namespace MonoDevelop.AspNet { WebSubtype type = DetermineWebSubtype (fileName); - if (type == WebSubtype.Code) + switch (type) { + case WebSubtype.Code: return BuildAction.Compile; - if (type != WebSubtype.None) - return BuildAction.Content; - else + case WebSubtype.None: return base.GetDefaultBuildAction (fileName); + default: + return BuildAction.Content; + } } static string[] groupedExtensions = { ".aspx", ".master", ".ashx", ".ascx", ".asmx", ".asax" }; @@ -685,13 +656,17 @@ namespace MonoDevelop.AspNet public virtual IEnumerable<string> GetSpecialDirectories () { - if (TargetFramework.ClrVersion != MonoDevelop.Core.ClrVersion.Net_2_0) - yield break; yield return "App_Browsers"; yield return "App_Data"; yield return "App_GlobalResources"; yield return "App_LocalResources"; yield return "Theme"; + + if (IsAspMvcProject) { + yield return "Views"; + yield return "Models"; + yield return "Controllers"; + } // For "web site" projects // "App_WebReferences", "App_Resources","App_Themes", "App_Code", @@ -699,7 +674,7 @@ namespace MonoDevelop.AspNet protected override IList<string> GetCommonBuildActions () { - return new string[] { + return new [] { BuildAction.None, BuildAction.Compile, BuildAction.Content, @@ -723,114 +698,93 @@ namespace MonoDevelop.AspNet lock (codebehindTypeNameCache) return codebehindTypeNameCache.GetCodeBehindTypeName (fileName); } - - class CodeBehindTypeNameCache : ProjectFileCache<AspNetAppProject,string> + + public IList<string> GetCodeTemplates (string type, string subtype = null) { - public CodeBehindTypeNameCache (AspNetAppProject proj) : base (proj) - { - } - - protected override string GenerateInfo (string filename) - { - try { - var doc = TypeSystemService.ParseFile (filename, DesktopService.GetMimeTypeForUri (filename), File.ReadAllText (filename)) as AspNetParsedDocument; - if (doc != null && !string.IsNullOrEmpty (doc.Info.InheritedClass)) - return doc.Info.InheritedClass; - } catch (Exception ex) { - LoggingService.LogError ("Error reading codebehind name for file '" + filename + "'", ex); - } - return null; + var files = new List<string> (); + var names = new HashSet<string> (); + + string asmDir = Path.GetDirectoryName (typeof (AspNetAppProject).Assembly.Location); + string lang = LanguageName; + if (lang == "C#") { + lang = "CSharp"; } - - public string GetCodeBehindTypeName (string fileName) - { - return Get (fileName); + + if (subtype != null) { + type = Path.Combine (type, subtype); } + + var dirs = new [] { + Path.Combine (BaseDirectory, "CodeTemplates", type), + Path.Combine (BaseDirectory, "CodeTemplates", lang, type), + Path.Combine (asmDir, "CodeTemplates", type), + Path.Combine (asmDir, "CodeTemplates", lang, type), + }; + + foreach (string directory in dirs) + if (Directory.Exists (directory)) + foreach (string file in Directory.GetFiles (directory, "*.tt", SearchOption.TopDirectoryOnly)) + if (names.Add (Path.GetFileName (file))) + files.Add (file); + + return files; } - } - - public enum WebSubtype - { - None = 0, - Code, - WebForm, - WebService, - WebControl, - MasterPage, - WebHandler, - WebSkin, - WebImage, - BrowserDefinition, - Sitemap, - Global, - Config, - Axd, - Css, - Html, - JavaScript, - Less, - Font, - Svg, - Sass, - Stylus - } - - - class XspBrowserLauncherConsole : IConsole - { - IConsole real; - LineInterceptingTextWriter outWriter; - Action <string> launchBrowser; - - const int MAX_WATCHED_LINES = 30; - - public XspBrowserLauncherConsole (IConsole real, Action <string> launchBrowser) + + protected override void PopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration) { - this.real = real; - this.launchBrowser = launchBrowser; + base.PopulateSupportFileList (list, configuration); + + //HACK: workaround for MD not local-copying package references + foreach (MonoDevelop.Projects.ProjectReference projectReference in References) { + if (projectReference.Package != null && projectReference.Package.Name == "system.web.mvc") { + if (projectReference.ReferenceType == ReferenceType.Package) + foreach (SystemAssembly assem in projectReference.Package.Assemblies) + list.Add (assem.Location); + break; + } + } } - - public void Dispose () + + public string GetAspNetMvcVersion () { - real.Dispose (); - } - - public event EventHandler CancelRequested { - add { real.CancelRequested += value; } - remove { real.CancelRequested -= value; } - } - - public TextReader In { - get { return real.In; } + foreach (var pref in References) { + if (pref.Reference.IndexOf ("System.Web.Mvc", StringComparison.OrdinalIgnoreCase) < 0) + continue; + switch (pref.ReferenceType) { + case ReferenceType.Assembly: + case ReferenceType.Package: + foreach (var f in pref.GetReferencedFileNames (null)) { + if (Path.GetFileNameWithoutExtension (f) != "System.Web.Mvc" || !File.Exists (f)) + continue; + return AssemblyName.GetAssemblyName (f).Version.ToString (); + } + break; + default: + continue; + } + } + + if (IsAspMvcProject) + return GetDefaultAspNetMvcVersion (); + + return null; } - - public TextWriter Out { + + public bool SupportsRazorViewEngine { get { - if (outWriter == null) - outWriter = new LineInterceptingTextWriter (real.Out, delegate { - string line = outWriter.GetLine(); - if (line.Contains ("Listening on port: ")) { - string port = System.Text.RegularExpressions.Regex.Match (line, "(?<=port: )[0-9]*(?= )").Value; - launchBrowser (port); - outWriter.FinishedIntercepting = true; - } else if (outWriter.LineCount > MAX_WATCHED_LINES) { - outWriter.FinishedIntercepting = true; - } - }); - return outWriter; + return References.Any (r => r.Reference.StartsWith ("System.Web.WebPages.Razor", StringComparison.Ordinal)); } } - - public TextWriter Error { - get { return real.Error; } - } - - public TextWriter Log { - get { return real.Log; } + + protected virtual string GetDefaultAspNetMvcVersion () + { + return "5.1.2"; } - - public bool CloseOnDispose { - get { return real.CloseOnDispose; } + + public virtual bool IsAspMvcProject { + get { + return References.Any (r => r.Reference.StartsWith ("System.Web.Mvc", StringComparison.Ordinal)); + } } } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProjectBinding.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetAppProjectBinding.cs index 7393ada07c..3a89feac81 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProjectBinding.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetAppProjectBinding.cs @@ -36,7 +36,7 @@ using MonoDevelop.Projects; using MonoDevelop.Core.Serialization; using System.Xml; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Projects { //based heavily on DotNetProjectBinding public class AspNetAppProjectBinding : IProjectBinding diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProjectConfiguration.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetAppProjectConfiguration.cs index 07a8e6e268..cc20b7151b 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProjectConfiguration.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetAppProjectConfiguration.cs @@ -30,13 +30,10 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; -using MonoDevelop.Core; using MonoDevelop.Projects; -using MonoDevelop.Core.Serialization; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.Projects { public class AspNetAppProjectConfiguration : DotNetProjectConfiguration { @@ -44,25 +41,16 @@ namespace MonoDevelop.AspNet { } - public AspNetAppProjectConfiguration () : base () + public AspNetAppProjectConfiguration () { } - [ItemProperty ("AspNet/DisableCodeBehindGeneration", DefaultValue = false)] - bool disableCodeBehindGeneration = false; - - public bool DisableCodeBehindGeneration { - get { return disableCodeBehindGeneration; } - set { disableCodeBehindGeneration = value; } - } - public override void CopyFrom (ItemConfiguration configuration) { base.CopyFrom (configuration); var cfg = configuration as AspNetAppProjectConfiguration; if (cfg == null) return; - disableCodeBehindGeneration = cfg.disableCodeBehindGeneration; } } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetMSBuildImportProvider.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetMSBuildImportProvider.cs index 0d6ba65c72..e297eeebef 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetMSBuildImportProvider.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetMSBuildImportProvider.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using MonoDevelop.Projects; using MonoDevelop.Projects.Formats.MSBuild; using Mono.Addins; +using MonoDevelop.AspNet.Projects; namespace MonoDevelop.AspNet { @@ -45,7 +46,7 @@ namespace MonoDevelop.AspNet imports.Remove (target08); imports.Remove (target10); - AspNetAppProject project = item as AspNetAppProject; + var project = item as AspNetAppProject; if (project != null) { if (project.FileFormat.Id == "MSBuild05") imports.Add (target05); diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetMvcFileTemplateCondition.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetMvcFileTemplateCondition.cs new file mode 100644 index 0000000000..0a4f581ad1 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/AspNetMvcFileTemplateCondition.cs @@ -0,0 +1,72 @@ +//
+// AspNetMvcFileTemplateCondition.cs
+//
+// Author:
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
+// 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 System.Xml;
+using MonoDevelop.Ide.Templates;
+using MonoDevelop.Projects;
+
+namespace MonoDevelop.AspNet.Projects
+{
+ class AspNetMvcFileTemplateCondition : FileTemplateCondition
+ {
+ Version minVersion;
+ bool razor;
+
+ public override void Load (XmlElement element)
+ {
+ if (element.HasAttribute ("minVersion"))
+ minVersion = Version.Parse (element.GetAttribute ("minVersion"));
+
+ if (element.HasAttribute ("razor"))
+ razor = bool.Parse (element.GetAttribute ("razor"));
+ }
+
+ public override bool ShouldEnableFor (Project proj, string projectPath)
+ {
+ if (proj == null)
+ return true;
+
+ var aspProj = proj as AspNetAppProject;
+ if (aspProj == null)
+ return false;
+
+ var versionStr = aspProj.GetAspNetMvcVersion ();
+ if (versionStr == null)
+ return false;
+
+ Version version;
+ if (minVersion != null && Version.TryParse (versionStr, out version) && version < minVersion)
+ return false;
+
+ if (razor)
+ return aspProj.SupportsRazorViewEngine;
+
+ return true;
+ }
+ }
+}
+
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/TextTemplating/MvcTextTemplateHost.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/MvcTextTemplateHost.cs index 437c029a69..6e0af3934f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/TextTemplating/MvcTextTemplateHost.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/MvcTextTemplateHost.cs @@ -28,14 +28,14 @@ using System; using System.Collections.Generic; using MonoDevelop.TextTemplating; -namespace MonoDevelop.AspNet.Mvc.TextTemplating +namespace MonoDevelop.AspNet.Projects { public class MvcTextTemplateHost : MonoDevelopTemplatingHost { public MvcTextTemplateHost () { AddMonoDevelopHostImport (); - Imports.Add ("MonoDevelop.AspNet.Mvc.TextTemplating"); + Imports.Add (typeof (MvcTextTemplateHost).Namespace); Refs.Add (typeof (MvcTextTemplateHost).Assembly.Location); } @@ -61,7 +61,7 @@ namespace MonoDevelop.AspNet.Mvc.TextTemplating public string ContentPlaceholder { get; set; } - public List<System.String> ContentPlaceHolders { get; set; } + public List<string> ContentPlaceHolders { get; set; } public string LanguageExtension { get; set; } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Projects/WebSubtype.cs b/main/src/addins/Web/MonoDevelop.AspNet/Projects/WebSubtype.cs new file mode 100644 index 0000000000..24bd85dbb4 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Projects/WebSubtype.cs @@ -0,0 +1,59 @@ +//
+// WebSubtype.cs
+//
+// Author:
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
+// 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.
+ + + +namespace MonoDevelop.AspNet.Projects +{ + + public enum WebSubtype + { + None = 0, + Code, + WebForm, + WebService, + WebControl, + MasterPage, + WebHandler, + WebSkin, + WebImage, + BrowserDefinition, + Sitemap, + Global, + Config, + Axd, + Css, + Html, + JavaScript, + Less, + Font, + Svg, + Sass, + Stylus,
+ Razor + } + +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/AddinInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs index 96022feac1..4c50051688 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/AddinInfo.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs @@ -3,17 +3,16 @@ using System; using Mono.Addins; using Mono.Addins.Description; -[assembly:Addin ("AspNet", +[assembly:Addin ("Web", Namespace = "MonoDevelop", Version = MonoDevelop.BuildInfo.Version, Category = "Web Development")] -[assembly:AddinName ("ASP.NET Project Support")] -[assembly:AddinDescription ("Support for ASP.NET projects, including editing, compiling, previewing and deploying to remote servers")] +[assembly:AddinName ("Web Project Support")] +[assembly:AddinDescription ("Support for ASP.NET projects, including editing, compiling and previewing")] [assembly:AddinDependency ("Core", MonoDevelop.BuildInfo.Version)] [assembly:AddinDependency ("Ide", MonoDevelop.BuildInfo.Version)] [assembly:AddinDependency ("DesignerSupport", MonoDevelop.BuildInfo.Version)] -[assembly:AddinDependency ("Deployment", MonoDevelop.BuildInfo.Version)] [assembly:AddinDependency ("XmlEditor", MonoDevelop.BuildInfo.Version)] [assembly:AddinDependency ("SourceEditor2", MonoDevelop.BuildInfo.Version)] diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/AssemblyInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/Properties/AssemblyInfo.cs index 6508a7210d..6508a7210d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/AssemblyInfo.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Properties/AssemblyInfo.cs diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Properties/MonoDevelop.AspNet.addin.xml b/main/src/addins/Web/MonoDevelop.AspNet/Properties/MonoDevelop.AspNet.addin.xml new file mode 100644 index 0000000000..6d6a7a49c0 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Properties/MonoDevelop.AspNet.addin.xml @@ -0,0 +1,394 @@ +<ExtensionModel>
+
+ <Runtime>
+ <Import file = "Html/Schemas/xhtml1-strict.xsd" />
+ <Import file = "Html/Schemas/xhtml1-transitional.xsd" />
+ <Import file = "Html/Schemas/xhtml1-frameset.xsd" />
+
+ <Import file = "Templates/WebForms/GlobalAsax-Empty.xft.xml"/>
+ <Import file = "Templates/WebForms/GlobalAsax-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/MasterPage-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/MasterPage-Empty.xft.xml"/>
+ <Import file = "Templates/WebForms/NestedMasterPage.xft.xml"/>
+ <Import file = "Templates/WebForms/WebContentForm.xft.xml"/>
+ <Import file = "Templates/WebForms/WebControl-Empty.xft.xml"/>
+ <Import file = "Templates/WebForms/WebForm-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/NestedMasterPage-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/WebControl-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/WebForm-Empty.xft.xml"/>
+ <Import file = "Templates/WebForms/WebHandler-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/WebService-Empty.xft.xml"/>
+ <Import file = "Templates/WebForms/WebService-CodeBehind.xft.xml"/>
+ <Import file = "Templates/WebForms/WebHandler-Empty.xft.xml"/>
+ <Import file = "Templates/WebForms/WebContentForm-CodeBehind.xft.xml"/>
+
+ <Import file = "Templates/Mvc/Controller.xft.xml"/>
+ <Import file = "Templates/Mvc/ViewPage.xft.xml"/>
+ <Import file = "Templates/Mvc/ViewContentPage.xft.xml"/>
+ <Import file = "Templates/Mvc/UserControl.xft.xml"/>
+ <Import file = "Templates/Mvc/ViewMasterPage.xft.xml" />
+ <Import file = "Templates/Mvc/GlobalAsax.xft.xml"/>
+ <Import file = "Templates/Mvc/WebConfigApp.xft.xml"/>
+ <Import file = "Templates/Mvc/WebConfigViews.xft.xml"/>
+ <Import file = "Templates/Mvc/LayoutPage.xft.xml" />
+ <Import file = "Templates/Mvc/ViewPageRazor.xft.xml" />
+ <Import file = "Templates/Mvc/PartialViewPageRazor.xft.xml" />
+
+ <Import file = "Templates/Projects/EmptyMvcProject.xpt.xml" />
+ <Import file = "Templates/Projects/EmptyProject.xpt.xml" />
+ <Import file = "Templates/Projects/MvcProject.xpt.xml" />
+ <Import file = "Templates/Projects/MvcProjectWithUnitTest.xpt.xml" />
+ <Import file = "Templates/Projects/MvcRazorProject.xpt.xml" />
+ <Import file = "Templates/Projects/MvcRazorProjectWithUnitTest.xpt.xml"/>
+ <Import file = "Templates/Projects/WebApplication.xpt.xml"/>
+
+ <Import file = "Templates/MvcCommon/_Layout.cshtml"/>
+ <Import file = "Templates/MvcCommon/_ViewStart.cshtml"/>
+ <Import file = "Templates/MvcCommon/Error.cshtml"/>
+ <Import file = "Templates/MvcCommon/HomeController.cs"/>
+ <Import file = "Templates/MvcCommon/HomeControllerTest.cs"/>
+ <Import file = "Templates/MvcCommon/Index.cshtml"/>
+ <Import file = "Templates/MvcCommon/ViewPageRazor.cshtml"/>
+
+ <Import file = "Templates/WebConfig-Application.xft.xml"/>
+ <Import file = "Templates/WebConfig-SubDir.xft.xml"/>
+
+ <Import file = "Templates/PreprocessedRazorTemplate.xft.xml" />
+
+ <Import file = "CodeTemplates/CSharp/AddView/Aspx/Empty.tt" />
+ <Import file = "CodeTemplates/CSharp/AddView/Razor/Empty.tt" />
+ <Import file = "CodeTemplates/CSharp/AddController/Empty.tt" />
+ <Import file = "CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt" />
+
+ <Import file = "Razor/Razor-templates.xml" />
+ </Runtime>
+
+ <ExtensionPoint path = "/MonoDevelop/Html/DocTypes">
+ <ExtensionNode name = "DocType" type = "MonoDevelop.AspNet.Html.DocTypeExtensionNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Asp/CompletionBuilders">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Razor/CompletionBuilders">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "AspNet-EmptyMvcProject"
+ file = "Templates/Projects/EmptyMvcProject.xpt.xml" />
+ <ProjectTemplate id = "AspNet-EmptyProject"
+ file = "Templates/Projects/EmptyProject.xpt.xml" />
+ <ProjectTemplate id = "AspNet-MvcProject"
+ file = "Templates/Projects/MvcProject.xpt.xml" />
+ <ProjectTemplate id = "AspNet-MvcProjectWithUnitTest"
+ file = "Templates/Projects/MvcProjectWithUnitTest.xpt.xml" />
+ <ProjectTemplate id = "AspNet-MvcRazorProject"
+ file = "Templates/Projects/MvcRazorProject.xpt.xml" />
+ <ProjectTemplate id = "AspNet-MvcRazorProjectWithUnitTest"
+ file = "Templates/Projects/MvcRazorProjectWithUnitTest.xpt.xml"/>
+ <ProjectTemplate id = "AspNet-WebApplication"
+ file = "Templates/Projects/WebApplication.xpt.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "WebForm-Empty"
+ file = "Templates/WebForms/WebForm-Empty.xft.xml"/>
+ <FileTemplate id = "WebForm-CodeBehind"
+ file = "Templates/WebForms/WebForm-CodeBehind.xft.xml"/>
+
+ <FileTemplate id = "WebHandler-Empty"
+ file = "Templates/WebForms/WebHandler-Empty.xft.xml"/>
+ <FileTemplate id = "WebHandler-CodeBehind"
+ file = "Templates/WebForms/WebHandler-CodeBehind.xft.xml"/>
+
+ <FileTemplate id = "WebControl-Empty"
+ file = "Templates/WebForms/WebControl-Empty.xft.xml"/>
+ <FileTemplate id = "WebControl-CodeBehind"
+ file = "Templates/WebForms/WebControl-CodeBehind.xft.xml"/>
+
+ <FileTemplate id = "WebService-Empty"
+ file = "Templates/WebForms/WebService-Empty.xft.xml"/>
+ <FileTemplate id = "WebService-CodeBehind"
+ file = "Templates/WebForms/WebService-CodeBehind.xft.xml"/>
+
+ <FileTemplate id = "MasterPage-Empty"
+ file = "Templates/WebForms/MasterPage-Empty.xft.xml" />
+ <FileTemplate id = "MasterPage-CodeBehind"
+ file = "Templates/WebForms/MasterPage-CodeBehind.xft.xml" />
+
+ <FileTemplate id = "NestedMasterPage"
+ file = "Templates/WebForms/NestedMasterPage.xft.xml" />
+ <FileTemplate id = "NestedMasterPage-CodeBehind"
+ file = "Templates/WebForms/NestedMasterPage-CodeBehind.xft.xml" />
+
+ <FileTemplate id = "GlobalAsax-Empty"
+ file = "Templates/WebForms/GlobalAsax-Empty.xft.xml" />
+ <FileTemplate id = "GlobalAsax-CodeBehind"
+ file = "Templates/WebForms/GlobalAsax-CodeBehind.xft.xml" />
+
+ <FileTemplate id = "WebConfig-Application"
+ file = "Templates/WebConfig-Application.xft.xml" />
+ <FileTemplate id = "WebConfig-SubDir"
+ file = "Templates/WebConfig-SubDir.xft.xml" />
+
+ <FileTemplate id = "WebContentForm-CodeBehind"
+ file = "Templates/WebForms/WebContentForm-CodeBehind.xft.xml" />
+ <FileTemplate id = "WebContentForm"
+ file = "Templates/WebForms/WebContentForm.xft.xml" />
+
+ <FileTemplate id = "AspMvcController"
+ file = "Templates/Mvc/Controller.xft.xml"/>
+ <FileTemplate id = "AspMvcViewPage"
+ file = "Templates/Mvc/ViewPage.xft.xml"/>
+ <FileTemplate id = "AspMvcViewContentPage"
+ file = "Templates/Mvc/ViewContentPage.xft.xml"/>
+ <FileTemplate id = "AspMvcUserControl"
+ file = "Templates/Mvc/UserControl.xft.xml"/>
+ <FileTemplate id = "AspMvcViewMasterPage"
+ file = "Templates/Mvc/ViewMasterPage.xft.xml" />
+ <FileTemplate id = "AspMvcGlobalAsax"
+ file = "Templates/Mvc/GlobalAsax.xft.xml" />
+ <FileTemplate id = "AspMvcWebConfigApp"
+ file = "Templates/Mvc/WebConfigApp.xft.xml" />
+ <FileTemplate id = "AspMvcWebConfigViews"
+ file = "Templates/Mvc/WebConfigViews.xft.xml" />
+ <FileTemplate id = "AspMvcViewPageRazor"
+ file = "Templates/Mvc/ViewPageRazor.xft.xml" />
+ <FileTemplate id = "AspMvcLayoutPage"
+ file = "Templates/Mvc/LayoutPage.xft.xml" />
+ <FileTemplate id = "AspMvcPartialViewPageRazor"
+ file = "Templates/Mvc/PartialViewPageRazor.xft.xml" />
+ <FileTemplate id = "PreprocessedRazorTemplate"
+ file = "Templates/PreprocessedRazorTemplate.xft.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplateTypes">
+ <FileTemplateType name = "AspNetMasterContentFile" class = "MonoDevelop.AspNet.WebForms.MasterContentFileDescriptionTemplate"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "AspNetWebFiles"
+ insertafter = "Xml"
+ _label = "ASP.NET Files"
+ extensions = "*.aspx,*.ashx,*.asmx,*.ascx,*.master,*.asax,*.cshtml" />
+ <FileFilter id = "Html"
+ _label = "HTML Files"
+ extensions = "*.htm,*.html"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings">
+ <ProjectBinding id = "AspNetApp" class = "MonoDevelop.AspNet.Projects.AspNetAppProjectBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <DotNetProjectSubtype
+ guid="{603C0E0B-DB56-11DC-BE95-000D561079B0}"
+ type="MonoDevelop.AspNet.Projects.AspMvc1Project"
+ />
+ <DotNetProjectSubtype
+ guid="{F85E285D-A4E0-4152-9332-AB1D724D3325}"
+ type="MonoDevelop.AspNet.Projects.AspMvc2Project"
+ />
+ <DotNetProjectSubtype
+ guid="{E53F8FEA-EAE0-44A6-8774-FFD645390401}"
+ type="MonoDevelop.AspNet.Projects.AspMvc3Project"
+ />
+ <DotNetProjectSubtype
+ guid="{E3E379DF-F4C6-4180-9B81-6769533ABE47}"
+ type="MonoDevelop.AspNet.Projects.AspMvc4Project"
+ />
+ <DotNetProjectSubtype
+ id="MonoDevelop.AspNet.Projects.AspNetAppProject"
+ guid="{349C5851-65DF-11DA-9384-00065B846F21}"
+ type="MonoDevelop.AspNet.Projects.AspNetAppProject"
+ />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class = "MonoDevelop.AspNet.WebForms.WebFormsParser" mimeType="application/x-aspx, application/x-ascx, application/x-master-page" />
+ <Parser class = "MonoDevelop.AspNet.Html.HtmlParser" mimeType="text/html, application/x-spark" />
+ <Parser class = "MonoDevelop.AspNet.Razor.RazorCSharpParser" mimeType="text/x-cshtml" /> + </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.AspNet.WebForms.WebFormsToolboxNode" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Run">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.Projects.AspNetAppProject">
+ <Section id = "XspOptions"
+ _label = "XSP Web Server"
+ class = "MonoDevelop.AspNet.Execution.XspOptionsPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxLoaders">
+ <Class id="AspNetWebFormsToolboxLoader" class="MonoDevelop.AspNet.WebForms.WebFormsToolboxLoader"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxProviders">
+ <Class id="AspNetWebFormsToolboxProvider" class="MonoDevelop.AspNet.WebForms.WebFormsToolboxProvider"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "ASP.NET" id = "AspNet">
+ <Command id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddAspNetDirectory"
+ _label = "ASP.NET Directory"
+ type="array" />
+ <Command id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddController"
+ _label = "Controller..."
+ _description = "Add an ASP.NET MVC controller" />
+ <Command id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddView"
+ _label = "View..."
+ _description = "Add an ASP.NET MVC view" />
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/TextEditor">
+ <Command id = "MonoDevelop.AspNet.Commands.AspNetCommands.GoToView"
+ _label = "Go To View"
+ defaultHandler = "MonoDevelop.AspNet.Commands.GoToViewCommandHandler"
+ description = "Go to the corresponding view file" />
+ <Command id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddViewFromController"
+ _label = "Add View..."
+ defaultHandler = "MonoDevelop.AspNet.Commands.AddViewFromControllerCommandHandler"
+ description = "Add an ASP.NET MVC view" />
+ <Command id = "MonoDevelop.AspNet.Commands.AspNetCommands.GoToController"
+ _label = "Go To Controller"
+ defaultHandler = "MonoDevelop.AspNet.Commands.GoToControllerCommandHandler"
+ description = "Go to the corresponding controller file" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.Projects.AspNetAppProject">
+ <ItemSet id = "AspNetDirectories" _label = "ASP.NET Directory" insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.NewFolder" autohide = "true">
+ <CommandItem id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddAspNetDirectory" />
+ </ItemSet>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
+ <CommandItem id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddController" insertbefore="MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" disabledVisible="false"/>
+ <CommandItem id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddView" disabledVisible="false" />
+ <SeparatorItem id = "MvcAddSeparator" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id="AspNetProjectNodeBuilderExtension" class = "MonoDevelop.AspNet.ProjectPad.AspNetProjectNodeBuilderExtension"/>
+ <NodeBuilder id="AspNetFolderNodeBuilderExtension" class = "MonoDevelop.AspNet.ProjectPad.AspNetFolderNodeBuilderExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/CustomModes">
+ <SyntaxMode mimeTypes="application/x-aspx" class="MonoDevelop.AspNet.WebForms.WebFormsSyntaxMode"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="application/x-aspx" _description="ASP.NET page" icon="md-html-file-icon" isText="true">
+ <File pattern="*.aspx" />
+ </MimeType>
+ <MimeType id="application/x-ascx" _description="ASP.NET user control" icon="md-html-file-icon" isText="true">
+ <File pattern="*.ascx" />
+ </MimeType>
+ <MimeType id="application/x-asax" _description="ASP.NET global application class" icon="md-html-file-icon" isText="true">
+ <File pattern="*.asax" />
+ </MimeType>
+ <MimeType id="application/x-ashx" _description="ASP.NET handler" icon="md-html-file-icon" isText="true">
+ <File pattern="*.ashx" />
+ </MimeType>
+ <MimeType id="application/x-asmx" _description="ASP.NET web service" icon="md-html-file-icon" isText="true">
+ <File pattern="*.asmx" />
+ </MimeType>
+ <MimeType id="application/x-asix" _description="ASP.NET image generator" icon="md-html-file-icon" isText="true">
+ <File pattern="*.asix" />
+ </MimeType>
+ <MimeType id="application/x-master-page" _description="ASP.NET master page" icon="md-html-file-icon" isText="true">
+ <File pattern="*.master|*.Master" />
+ </MimeType>
+ <MimeType id="application/javascript" _description="Javascript source code" icon="md-html-file-icon" isText="true">
+ <File pattern="*.js" />
+ </MimeType>
+ <MimeType id="text/css" _description="CSS document" icon="md-html-file-icon" isText="true">
+ <File pattern="*.css" />
+ </MimeType>
+ <MimeType id="text/x-less" _description="LESS, CSS document" icon="md-html-file-icon" isText="true">
+ <File pattern="*.less" />
+ </MimeType>
+ <MimeType id="text/html" _description="HTML document" icon="md-html-file-icon" isText="true">
+ <File pattern="*.html|*.htm" />
+ </MimeType>
+ <MimeType id="application/x-spark" _description="Spark View template" icon="md-html-file-icon" isText="true"
+ baseType="text/html">
+ <File pattern="*.spark" />
+ </MimeType>
+ <MimeType id="application/typescript" _description="Typescript source code" icon="md-html-file-icon" isText="true">
+ <File pattern="*.ts" />
+ </MimeType>
+ <MimeType id="text/x-cshtml" _description="Razor template" icon="md-html-file-icon" isText="true">
+ <File pattern="*.cshtml" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class fileExtensions=".aspx, .ascx, .master" class = "MonoDevelop.AspNet.WebForms.WebFormsEditorExtension" />
+ <Class fileExtensions=".html, .htm, .spark" class = "MonoDevelop.AspNet.Html.HtmlEditorExtension" />
+ <Class fileExtensions=".cshtml" class = "MonoDevelop.AspNet.Razor.RazorCSharpEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Html/DocTypes">
+ <DocType name = "HTML 5.0"
+ fullName = "<!DOCTYPE html>"
+ xsdFile = "Html/Schemas/xhtml1-transitional.xsd" />;
+ <DocType name = "XHTML 1.0 Strict"
+ fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">"
+ xsdFile = "Html/Schemas/xhtml1-strict.xsd" />
+ <DocType name = "XHTML 1.0 Transitional"
+ fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"
+ xsdFile = "Html/Schemas/xhtml1-transitional.xsd" />
+ <DocType name = "XHTML 1.0 Frameset"
+ fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">"
+ xsdFile = "Html/Schemas/xhtml1-frameset.xsd" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/ExecutionHandlers">
+ <ExecutionHandler id="AspNet" class = "MonoDevelop.AspNet.Execution.AspNetExecutionHandler"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CompletionCharacters">
+ <Complete language="Html" commitOnSpace="True" commitChars="{}[]().,:;+-*/%&|^!~=<>?@#'"\" />
+ <Complete language="Razor" commitOnSpace="True" commitChars="{}[]().,:;+-*/%&|^!~=<>?@#'"\"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+ <Condition id="FileType" fileExtensions=".cs">
+ <CommandItem id = "MonoDevelop.AspNet.Commands.AspNetCommands.GoToView" insertbefore="MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <CommandItem id = "MonoDevelop.AspNet.Commands.AspNetCommands.AddViewFromController" />
+ <SeparatorItem id = "MvcSeparator1" />
+ </Condition>
+ <Condition id="FileType" fileExtensions=".cshtml,.aspx">
+ <CommandItem id = "MonoDevelop.AspNet.Commands.AspNetCommands.GoToController" insertbefore="MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <SeparatorItem id = "MvcSeparator2" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CodeTemplates">
+ <CodeTemplate file="Razor/Razor-templates.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CodeFormatters">
+ <Formatter mimeType="text/x-cshtml" class="MonoDevelop.AspNet.Razor.RazorCSharpFormatter" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CustomTools">
+ <!-- NOTE: we explicitly do no call this "RazorGenerator" to avoid conflicts with http://razorgenerator.codeplex.com/ -->
+ <Tool name="RazorTemplatePreprocessor" type="MonoDevelop.AspNet.Razor.Generator.RazorTemplatePreprocessor"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplateConditionTypes">
+ <FileTemplateConditionType name = "AspNetMvc" class = "MonoDevelop.AspNet.Projects.AspNetMvcFileTemplateCondition"/>
+ </Extension>
+</ExtensionModel>
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs new file mode 100644 index 0000000000..ea80a989ae --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs @@ -0,0 +1,56 @@ +//
+// RazorCodeBlock.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public class RazorCodeBlock : RazorCodeFragment
+ {
+ public RazorCodeBlock (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorCodeBlock ()
+ {
+ }
+
+ protected override XObject NewInstance ()
+ {
+ return new RazorCodeBlock ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[RazorCodeBlock Location='{0}'", this.Region);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@{ }"; }
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs new file mode 100644 index 0000000000..7328793922 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs @@ -0,0 +1,86 @@ +//
+// RazorCodeFragment.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory;
+using Mono.TextEditor;
+using MonoDevelop.Ide;
+using System.Linq;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public abstract class RazorCodeFragment : XContainer
+ {
+ protected RazorCodeFragment (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorCodeFragment ()
+ {
+ }
+
+ public string Name { get; set; }
+
+ public TextLocation? FirstBracket { get; set; }
+
+ public TextDocument Document {
+ get {
+ if (IdeApp.Workbench.ActiveDocument != null && IdeApp.Workbench.ActiveDocument.Editor != null)
+ return IdeApp.Workbench.ActiveDocument.Editor.Document;
+ return null;
+ }
+ }
+
+ public bool IsEndingBracket (TextLocation bracketLocation)
+ {
+ // If document isn't entirely loaded
+ if (Document == null || Document.Lines.Count () < Region.BeginLine)
+ return false;
+
+ if (!FirstBracket.HasValue && !FindFirstBracket (bracketLocation))
+ return false;
+
+ int firstBracketOffset = Document.GetOffset (FirstBracket.Value);
+ int currentBracketOffset = Document.GetOffset (bracketLocation);
+
+ return Document.GetMatchingBracketOffset (firstBracketOffset) == currentBracketOffset;
+ }
+
+ public bool FindFirstBracket (TextLocation currentLocation)
+ {
+ if (Document.Lines.Count () < Region.BeginLine)
+ return false;
+
+ int firstBracketPosition = Document.GetTextBetween (Region.Begin, currentLocation).IndexOf ('{');
+ if (firstBracketPosition == -1)
+ return false;
+
+ int beginOffset = Document.LocationToOffset (Region.Begin);
+ FirstBracket = Document.OffsetToLocation (beginOffset + firstBracketPosition);
+ return true;
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs new file mode 100644 index 0000000000..b09d087635 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs @@ -0,0 +1,62 @@ +//
+// RazorComment.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public class RazorComment : XNode
+ {
+ public RazorComment (DomRegion region) : base (region)
+ {
+ }
+
+ public RazorComment (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorComment ()
+ {
+ }
+
+ protected override XObject NewInstance ()
+ {
+ return new RazorComment ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[RazorComment Location='{0}'", this.Region);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@* *@"; }
+ }
+ }
+
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs new file mode 100644 index 0000000000..b080069c18 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs @@ -0,0 +1,58 @@ +//
+// RazorDirective.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public class RazorDirective : RazorCodeFragment
+ {
+ public RazorDirective (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorDirective ()
+ {
+ }
+
+ protected override XObject NewInstance ()
+ {
+ return new RazorDirective ();
+ }
+
+ public bool IsSimpleDirective { get; set; }
+
+ public override string ToString ()
+ {
+ return string.Format ("[RazorDirective Location='{0}'", this.Region);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@" + Name; }
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs new file mode 100644 index 0000000000..88f4bdbca5 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs @@ -0,0 +1,61 @@ +//
+// RazorExplicitExpression.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public class RazorExplicitExpression : RazorExpression
+ {
+ public RazorExplicitExpression (DomRegion region) : base (region)
+ {
+ }
+
+ public RazorExplicitExpression (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorExplicitExpression ()
+ {
+ }
+
+ protected override XObject NewInstance ()
+ {
+ return new RazorExplicitExpression ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[RazorExplicitExpression Location='{0}'", Region);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@( )"; }
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs new file mode 100644 index 0000000000..bf3982f9a3 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs @@ -0,0 +1,47 @@ +//
+// RazorDom.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public abstract class RazorExpression : XNode
+ {
+ protected RazorExpression (DomRegion region) : base (region)
+ {
+ }
+
+ protected RazorExpression (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorExpression ()
+ {
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs new file mode 100644 index 0000000000..9ccff34a09 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs @@ -0,0 +1,61 @@ +//
+// RazorImplicitExpression.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+ public class RazorImplicitExpression : RazorExpression
+ {
+ public RazorImplicitExpression (DomRegion region) : base (region)
+ {
+ }
+
+ public RazorImplicitExpression (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorImplicitExpression ()
+ {
+ }
+
+ protected override XObject NewInstance ()
+ {
+ return new RazorImplicitExpression ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[RazorImplicitExpression Location='{0}'", this.Region);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@"; }
+ }
+ }
+}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs new file mode 100644 index 0000000000..1a015b156d --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs @@ -0,0 +1,57 @@ +//
+// RazorStatement.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd@gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.AspNet.Razor.Dom
+{
+
+ public class RazorStatement : RazorCodeFragment
+ {
+ public RazorStatement (TextLocation start) : base (start)
+ {
+ }
+
+ protected RazorStatement ()
+ {
+ }
+
+ protected override XObject NewInstance ()
+ {
+ return new RazorStatement ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[RazorStatement Location='{0}'", Region);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@" + Name; }
+ }
+ }
+}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/BackgroundParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/BackgroundParser.cs index ffaecc1d2c..368931efe7 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/BackgroundParser.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/BackgroundParser.cs @@ -17,7 +17,7 @@ using System.Web.Razor.Utils; using System.Web.Razor; using System.Web.Razor.Editor; -namespace RazorEditorParserFixed +namespace MonoDevelop.Web.Razor.EditorParserFixed { internal class BackgroundParser : IDisposable { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/CommonResources.Designer.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/CommonResources.Designer.cs index 27534d7ab1..1527fef53c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/CommonResources.Designer.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/CommonResources.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace RazorEditorParserFixed { +namespace MonoDevelop.Web.Razor.EditorParserFixed { using System; using System.Linq; diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/DisposableAction.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/DisposableAction.cs index 8c8fa7b2f8..231fc3bd43 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/DisposableAction.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/DisposableAction.cs @@ -3,7 +3,7 @@ using System; -namespace RazorEditorParserFixed +namespace MonoDevelop.Web.Razor.EditorParserFixed { internal class DisposableAction : IDisposable { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/RazorEditorParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/RazorEditorParser.cs index c264379ef2..bdc3002b95 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/RazorEditorParser.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/RazorEditorParser.cs @@ -17,7 +17,7 @@ using Microsoft.Internal.Web.Utils; using System; using System.Web.Razor; -namespace RazorEditorParserFixed +namespace MonoDevelop.Web.Razor.EditorParserFixed { /// <summary> /// Parser used by editors to avoid reparsing the entire document on each text change diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/RazorEditorTrace.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/RazorEditorTrace.cs index 629ac6e005..ac95e87226 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/RazorEditorTrace.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/RazorEditorTrace.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; using System.Web.Razor.Resources; using System.Web.Razor.Text; -namespace RazorEditorParserFixed +namespace MonoDevelop.Web.Razor.EditorParserFixed { internal static class RazorEditorTrace { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/RazorResources.Designer.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/RazorResources.Designer.cs index a3edc5e771..69ff4f38c0 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/RazorResources.Designer.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/EditorParserFixed/RazorResources.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace RazorEditorParserFixed { +namespace MonoDevelop.Web.Razor.EditorParserFixed { using System; diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/FileUtil.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/FileUtil.cs index f98ee378a5..cd90db11f7 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/FileUtil.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/FileUtil.cs @@ -26,7 +26,7 @@ using System; using System.IO; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { static class FileUtil { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/MarkupRewriter.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/MarkupRewriter.cs index b21652cd2e..4afe676141 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/MarkupRewriter.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/MarkupRewriter.cs @@ -6,7 +6,7 @@ using System.Web.Razor.Parser.SyntaxTree; using System.Web.Razor.Parser;
using System;
-namespace MonoDevelop.RazorGenerator
+namespace MonoDevelop.AspNet.Razor.Generator
{
// based on System.Web.Razor.Parser.MarkupRewriter
// Copyright (c) Microsoft Open Technologies, Inc.
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedAttributeBlockCodeGenerator.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedAttributeBlockCodeGenerator.cs index 85505faa42..7589cf278f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedAttributeBlockCodeGenerator.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedAttributeBlockCodeGenerator.cs @@ -28,7 +28,7 @@ using System.Web.Razor.Parser.SyntaxTree; using System.Web.Razor.Generator; using System.Text; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { // based on base implementation // Copyright (c) Microsoft Open Technologies, Inc. diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedAttributeRewriter.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedAttributeRewriter.cs index 63cc7c7dc7..0828885e63 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedAttributeRewriter.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedAttributeRewriter.cs @@ -27,7 +27,7 @@ using System.Web.Razor.Parser.SyntaxTree; using System.Web.Razor.Generator; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { class PreprocessedAttributeRewriter : MarkupRewriter { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedCSharpRazorCodeParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedCSharpRazorCodeParser.cs index b5d1a239a0..b82323703d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedCSharpRazorCodeParser.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedCSharpRazorCodeParser.cs @@ -17,7 +17,7 @@ using System.Web.Razor.Parser; using System.Web.Razor.Parser.SyntaxTree; using System.Web.Razor.Text; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { class PreprocessedCSharpRazorCodeParser : CSharpCodeParser { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedDynamicAttributeBlockCodeGenerator.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedDynamicAttributeBlockCodeGenerator.cs index 78ec3c5a95..28c3e99179 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedDynamicAttributeBlockCodeGenerator.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedDynamicAttributeBlockCodeGenerator.cs @@ -29,7 +29,7 @@ using System.Web.Razor.Generator; using System.Text; using System.Linq; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { // based on base implementation // Copyright (c) Microsoft Open Technologies, Inc. diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedLiteralAttributeCodeGenerator.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedLiteralAttributeCodeGenerator.cs index 22310dbc43..34c9849604 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedLiteralAttributeCodeGenerator.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedLiteralAttributeCodeGenerator.cs @@ -29,7 +29,7 @@ using System.Web.Razor.Text; using System.Web.Razor.Generator; using System.Text; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { // based on base implementation // Copyright (c) Microsoft Open Technologies, Inc. diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedRazorHost.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedRazorHost.cs index ba7a8165f3..d636cf94a4 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedRazorHost.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedRazorHost.cs @@ -8,7 +8,7 @@ using System.Web.Razor.Parser; using System.Web.Razor.Parser.SyntaxTree; using System.Collections.Generic; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { class PreprocessedRazorHost : RazorEngineHost { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedTemplateCodeTransformer.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedTemplateCodeTransformer.cs index 252a827adf..4d85f4947e 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/PreprocessedTemplateCodeTransformer.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/PreprocessedTemplateCodeTransformer.cs @@ -12,7 +12,7 @@ using System.CodeDom; using System.Linq; using System; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { static class PreprocessedTemplateCodeTransformers { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/RazorTemplatePreprocessor.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/RazorTemplatePreprocessor.cs index 04529cf869..32a8a31ff2 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/RazorTemplatePreprocessor.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/RazorTemplatePreprocessor.cs @@ -31,7 +31,7 @@ using MonoDevelop.Projects; using MonoDevelop.Core; using MonoDevelop.TextTemplating; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { class RazorTemplatePreprocessor : ISingleFileCustomTool { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/RazorWriterHelper.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/RazorWriterHelper.cs index 5f37c5eb18..117f2696ac 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/RazorWriterHelper.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/RazorWriterHelper.cs @@ -30,7 +30,7 @@ using System.Globalization; using System.Web.Razor.Generator; using System.Reflection; -namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { static class RazorWriterHelper { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/RewritingRazorTemplateEngine.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/RewritingRazorTemplateEngine.cs index 3d50d5d244..99d80a402f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorGenerator/RewritingRazorTemplateEngine.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Generator/RewritingRazorTemplateEngine.cs @@ -32,7 +32,7 @@ using System.Web.Razor.Text; using System.Web.Razor.Generator;
using System.Web.Razor.Parser;
-namespace MonoDevelop.RazorGenerator +namespace MonoDevelop.AspNet.Razor.Generator { class RewritingRazorTemplateEngine : RazorTemplateEngine { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Completion/IRazorCompletionBuilder.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/IRazorCompletionBuilder.cs index d62a790399..d62a790399 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Completion/IRazorCompletionBuilder.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/IRazorCompletionBuilder.cs diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParsedDocument.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParsedDocument.cs index 6ae0a7c9a2..cf975f8688 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParsedDocument.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParsedDocument.cs @@ -30,7 +30,7 @@ using System.Linq; using System.Text;
using MonoDevelop.Ide.TypeSystem;
-namespace MonoDevelop.AspNet.Mvc.Parser
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorCSharpParsedDocument : DefaultParsedDocument
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs index c0bb8449b0..fd56eab016 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParser.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs @@ -26,41 +26,41 @@ using System; using System.Collections.Generic; +using System.Configuration; +using System.IO; using System.Linq; using System.Text; -using MonoDevelop.Ide.TypeSystem; -using System.Web.Razor; -using System.Web.Mvc.Razor; using System.Threading; -using System.Web.Razor.Text; -using MonoDevelop.Ide; -using Mono.TextEditor; -using MonoDevelop.Ide.Gui; -using ICSharpCode.NRefactory.TypeSystem; +using System.Web.Configuration; +using System.Web.Mvc.Razor; +using System.Web.Razor; using System.Web.Razor.Parser; using System.Web.Razor.Parser.SyntaxTree; -using System.IO; -using MonoDevelop.Core; -using MonoDevelop.AspNet.Parser; -using System.Web.Configuration; -using System.Web.WebPages.Razor.Configuration; +using System.Web.Razor.Text; using System.Web.WebPages.Razor; -using System.Configuration; -using MonoDevelop.Projects; -using MonoDevelop.AspNet.StateEngine; +using System.Web.WebPages.Razor.Configuration; +using ICSharpCode.NRefactory.TypeSystem; using ICSharpCode.NRefactory.TypeSystem.Implementation; +using Mono.TextEditor; +using MonoDevelop.Core; +using MonoDevelop.Ide; +using MonoDevelop.Ide.Gui; +using MonoDevelop.Ide.TypeSystem; +using MonoDevelop.Projects; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; -namespace MonoDevelop.AspNet.Mvc.Parser +namespace MonoDevelop.AspNet.Razor.Parser { public class RazorCSharpParser : TypeSystemParser { - RazorEditorParserFixed.RazorEditorParser editorParser; + MonoDevelop.Web.Razor.EditorParserFixed.RazorEditorParser editorParser; DocumentParseCompleteEventArgs capturedArgs; AutoResetEvent parseComplete; ChangeInfo lastChange; string lastParsedFile; TextDocument currentDocument; - AspMvcProject aspProject; + AspNetAppProject aspProject; DotNetProject project; IList<TextDocument> openDocuments; @@ -78,7 +78,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser }; } - public override ParsedDocument Parse (bool storeAst, string fileName, System.IO.TextReader content, Projects.Project project = null) + public override ParsedDocument Parse (bool storeAst, string fileName, System.IO.TextReader content, Project project = null) { currentDocument = openDocuments.FirstOrDefault (d => d != null && d.FileName == fileName); // We need document and project to be loaded to correctly initialize Razor Host. @@ -86,7 +86,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser if (currentDocument == null && !TryAddDocument (fileName)) return new RazorCSharpParsedDocument (fileName, new RazorCSharpPageInfo ()); - this.aspProject = project as AspMvcProject; + this.aspProject = project as AspNetAppProject; EnsureParserInitializedFor (fileName); @@ -109,7 +109,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser RazorHostKind kind = RazorHostKind.WebPage; if (editorParser.Host is WebCodeRazorHost) { kind = RazorHostKind.WebCode; - } else if (editorParser.Host is MonoDevelop.RazorGenerator.PreprocessedRazorHost) { + } else if (editorParser.Host is MonoDevelop.AspNet.Razor.Generator.PreprocessedRazorHost) { kind = RazorHostKind.Template; } @@ -171,7 +171,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser void CreateParserFor (string fileName) { - editorParser = new RazorEditorParserFixed.RazorEditorParser (CreateRazorHost (fileName), fileName); + editorParser = new MonoDevelop.Web.Razor.EditorParserFixed.RazorEditorParser (CreateRazorHost (fileName), fileName); parseComplete = new AutoResetEvent (false); editorParser.DocumentParseComplete += (sender, args) => @@ -188,7 +188,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser if (project != null) { var projectFile = project.GetProjectFile (fileName); if (projectFile != null && projectFile.Generator == "RazorTemplatePreprocessor") { - return new MonoDevelop.RazorGenerator.PreprocessedRazorHost (fileName) { + return new MonoDevelop.AspNet.Razor.Generator.PreprocessedRazorHost (fileName) { DesignTimeMode = true, EnableLinePragmas = false, }; @@ -307,7 +307,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser editorParser.CurrentParseTree.Accept (new CallbackVisitor (action)); - var parser = new Xml.StateEngine.Parser (new AspNetFreeState (), true); + var parser = new Xml.StateEngine.Parser (new WebFormsFreeState (), true); try { parser.Parse (new StringReader (sb.ToString ())); @@ -330,7 +330,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser void GetHtmlFoldingRegions (List<FoldingRegion> foldingRegions) { if (htmlParsedDocument != null) { - var d = new AspNetParsedDocument (null, WebSubtype.Html, null, htmlParsedDocument); + var d = new MonoDevelop.AspNet.WebForms.WebFormsParsedDocument (null, WebSubtype.Html, null, htmlParsedDocument); foldingRegions.AddRange (d.Foldings); } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorCodeBlockState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs index 774f88e044..964bce31a1 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorCodeBlockState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs @@ -26,8 +26,9 @@ using System.Linq;
using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorCodeBlockState : RazorCodeFragmentState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorCodeFragmentState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs index 1819f02b38..8dd10717da 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorCodeFragmentState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs @@ -27,10 +27,10 @@ using System;
using System.Text;
using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.StateEngine;
-using MonoDevelop.AspNet.Mvc.Parser;
+using MonoDevelop.AspNet.Html.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public abstract class RazorCodeFragmentState : RazorState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorCommentState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs index a6f7908293..f2c02f644f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorCommentState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs @@ -25,8 +25,9 @@ // THE SOFTWARE.
using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorCommentState : XmlCommentState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorDirectiveState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs index 0eef762742..de0941eb90 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorDirectiveState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs @@ -28,8 +28,9 @@ using System; using System.Linq;
using MonoDevelop.Xml.StateEngine;
using System.Diagnostics;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorDirectiveState : RazorCodeFragmentState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorExpressionState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs index a9cc09414e..d4c8062c5e 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorExpressionState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs @@ -27,8 +27,9 @@ using System;
using System.Linq;
using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorExpressionState : RazorState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorFreeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorFreeState.cs index 98f2acdab0..e7e701681b 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorFreeState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorFreeState.cs @@ -26,9 +26,9 @@ using System;
using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.StateEngine;
+using MonoDevelop.AspNet.Html.Parser;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorFreeState : XmlFreeState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/OutlineNode.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs index 2d24bbf67e..789e1e5a10 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/OutlineNode.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs @@ -24,23 +24,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using ICSharpCode.NRefactory.TypeSystem;
using System.Web.Razor.Parser.SyntaxTree;
+using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.StateEngine;
+using MonoDevelop.AspNet.WebForms.Dom;
-namespace MonoDevelop.AspNet.Mvc.Parser
+namespace MonoDevelop.AspNet.Razor.Parser
{
- public class OutlineNode
+ class RazorOutlineNode
{
public string Name { get; set; }
public DomRegion Location { get; set; }
- public OutlineNode (XElement el)
+ public RazorOutlineNode (XElement el)
{
Name = el.Name.FullName;
string id = el.GetId ();
@@ -52,7 +48,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser Location = el.Region;
}
- public OutlineNode (Block block)
+ public RazorOutlineNode (Block block)
{
Name = RazorUtils.GetShortName (block);
}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorPageInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs index 73086429be..3fbe9d89ef 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorPageInfo.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs @@ -25,12 +25,12 @@ // THE SOFTWARE.
using System.Collections.Generic;
+using System.Web.Razor;
+using System.Web.Razor.Parser.SyntaxTree;
using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Ide.TypeSystem;
-using System.Web.Razor.Parser.SyntaxTree;
-using System.Web.Razor;
-namespace MonoDevelop.AspNet.Mvc.Parser
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorPageInfo
{
@@ -47,7 +47,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser public RazorPageInfo ()
{
// TODO: extract doctype from view or layout page
- DocType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
+ DocType = "<!DOCTYPE html>";
}
}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorSpeculativeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs index 729369fc4f..b27b51f627 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorSpeculativeState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs @@ -26,9 +26,10 @@ using System;
using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.Mvc.Parser;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorSpeculativeState : RazorState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs index a37792c636..526e808857 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs @@ -26,7 +26,7 @@ using MonoDevelop.Xml.StateEngine;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorState : State
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorStatementState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs index 7b346a4549..dc614a175c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/RazorStatementState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs @@ -29,9 +29,10 @@ using System.Collections.Generic; using System.Linq;
using MonoDevelop.Xml.StateEngine;
using System.Diagnostics;
-using MonoDevelop.AspNet.Mvc.Parser;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorStatementState : RazorCodeFragmentState
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorSymbols.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSymbols.cs index a825801f32..815c3bc394 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorSymbols.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSymbols.cs @@ -29,12 +29,12 @@ using System.Collections.Generic; using System.Linq;
using System.Text;
-namespace MonoDevelop.AspNet.Mvc.Parser
+namespace MonoDevelop.AspNet.Razor.Parser
{
- public class RazorSymbols
+ public static class RazorSymbols
{
// Single line directives
- static string[] simpleDirectives = new string[] {
+ static string[] simpleDirectives = {
"inherits",
"sessionstate",
"model",
@@ -47,7 +47,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser };
// Block directives
- static string[] complexDirectives = new string[] {
+ static string[] complexDirectives = {
"functions",
"section",
"helper",
@@ -55,7 +55,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser static IEnumerable<string> directives = complexDirectives.Concat (simpleDirectives);
- static string[] statements = new string[] {
+ static string[] statements = {
"for",
"foreach",
"while",
@@ -88,13 +88,12 @@ namespace MonoDevelop.AspNet.Mvc.Parser public static bool CanBeStatementOrDirective(string name)
{
- if (statements.Any (s => s.StartsWith (name)))
+ if (statements.Any (s => s.StartsWith (name, StringComparison.Ordinal)))
return true;
- else
- return directives.Any (d => d.StartsWith (name));
+ return directives.Any (d => d.StartsWith (name, StringComparison.Ordinal));
}
- public static string[] continuedKeywords = new string[] {
+ static string[] continuedKeywords = {
"if", "else", "else if", "try", "catch"
};
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorUtils.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorUtils.cs index 86e39909b8..310051afd3 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorUtils.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorUtils.cs @@ -27,7 +27,7 @@ using System.Linq;
using System.Web.Razor.Parser.SyntaxTree;
-namespace MonoDevelop.AspNet.Mvc.Parser
+namespace MonoDevelop.AspNet.Razor.Parser
{
public static class RazorUtils
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/StateEngineService.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs index a8ec7b5e7b..621299d714 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/StateEngine/StateEngineService.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs @@ -29,7 +29,7 @@ using ICSharpCode.NRefactory; using System.Diagnostics;
using MonoDevelop.Core;
-namespace MonoDevelop.AspNet.Mvc.StateEngine
+namespace MonoDevelop.AspNet.Razor.Parser
{
public static class StateEngineService
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Razor-templates.xml b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Razor-templates.xml index e7b2a4e42b..e7b2a4e42b 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Razor-templates.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Razor-templates.xml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/RazorCSharpEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs index f2d6b553ab..a5740e15bf 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Gui/RazorCSharpEditorExtension.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs @@ -27,24 +27,24 @@ using System;
using System.Collections.Generic;
using System.Linq;
-using MonoDevelop.AspNet.Gui;
-using MonoDevelop.Ide.TypeSystem;
-using MonoDevelop.AspNet.Mvc.Parser;
-using ICSharpCode.NRefactory.TypeSystem;
-using Mono.TextEditor;
+using System.Text.RegularExpressions;
+using System.Web.Razor.Generator;
using System.Web.Razor.Parser.SyntaxTree;
using ICSharpCode.NRefactory;
-using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.Mvc.StateEngine;
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.AspNet.Mvc.Completion;
using ICSharpCode.NRefactory.Completion;
-using MonoDevelop.Ide.Gui;
-using System.Web.Razor.Generator;
-using System.Text.RegularExpressions;
+using ICSharpCode.NRefactory.TypeSystem;
+using Mono.TextEditor;
using MonoDevelop.Core;
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.AspNet.Html;
+using MonoDevelop.AspNet.Mvc.Completion;
+using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.AspNet.Razor.Dom;
-namespace MonoDevelop.AspNet.Mvc.Gui
+namespace MonoDevelop.AspNet.Razor
{
public class RazorCSharpEditorExtension : BaseHtmlEditorExtension
{
@@ -163,7 +163,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui void CreateDocType ()
{
- DocType = new MonoDevelop.Xml.StateEngine.XDocType (TextLocation.Empty);
+ DocType = new XDocType (TextLocation.Empty);
var matches = DocTypeRegex.Match (razorDocument.PageInfo.DocType);
if (matches.Success) {
DocType.PublicFpi = matches.Groups ["fpi"].Value;
@@ -583,7 +583,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui protected override void OutlineSelectionChanged (object selection)
{
- SelectNode ((OutlineNode)selection);
+ SelectNode ((RazorOutlineNode)selection);
}
void BuildTreeChildren (Gtk.TreeStore store, Gtk.TreeIter parent, XContainer p, IList<Block> blocks)
@@ -599,7 +599,7 @@ namespace MonoDevelop.AspNet.Mvc.Gui && n.Start.AbsoluteIndex <= doc.GetOffset (endLoc));
foreach (var block in blocksBetween) {
- var outlineNode = new OutlineNode (block) {
+ var outlineNode = new RazorOutlineNode (block) {
Location = new DomRegion (doc.OffsetToLocation (block.Start.AbsoluteIndex),
doc.OffsetToLocation (block.Start.AbsoluteIndex + block.Length))
};
@@ -613,9 +613,9 @@ namespace MonoDevelop.AspNet.Mvc.Gui Gtk.TreeIter childIter;
if (!parent.Equals (Gtk.TreeIter.Zero))
- childIter = store.AppendValues (parent, new OutlineNode(el));
+ childIter = store.AppendValues (parent, new RazorOutlineNode(el));
else
- childIter = store.AppendValues (new OutlineNode(el));
+ childIter = store.AppendValues (new RazorOutlineNode(el));
BuildTreeChildren (store, childIter, el, blocks);
}
@@ -624,11 +624,11 @@ namespace MonoDevelop.AspNet.Mvc.Gui void OutlineTreeDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText txtRenderer = (Gtk.CellRendererText)cell;
- OutlineNode n = (OutlineNode)model.GetValue (iter, 0);
+ RazorOutlineNode n = (RazorOutlineNode)model.GetValue (iter, 0);
txtRenderer.Text = n.Name;
}
- void SelectNode (OutlineNode n)
+ void SelectNode (RazorOutlineNode n)
{
EditorSelect (n.Location);
}
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Formatting/RazorCSharpFormatter.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpFormatter.cs index 7154e82a7d..560408db69 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Formatting/RazorCSharpFormatter.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpFormatter.cs @@ -24,25 +24,23 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using MonoDevelop.Ide.CodeFormatting;
+using MonoDevelop.Projects.Policies;
-namespace MonoDevelop.AspNet.Mvc.Formatting
+namespace MonoDevelop.AspNet.Razor
{
public class RazorCSharpFormatter : AbstractAdvancedFormatter
{
public override bool SupportsOnTheFlyFormatting { get { return true; } }
public override bool SupportsCorrectingIndent { get { return true; } }
- public override void CorrectIndenting (Projects.Policies.PolicyContainer policyParent,
+ public override void CorrectIndenting (PolicyContainer policyParent,
IEnumerable<string> mimeTypeChain, Mono.TextEditor.TextEditorData data, int line)
{
}
- public override string FormatText (Projects.Policies.PolicyContainer policyParent,
+ public override string FormatText (PolicyContainer policyParent,
IEnumerable<string> mimeTypeChain, string input, int startOffset, int endOffset)
{
return null;
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Completion/RazorCompletion.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCompletion.cs index 24cf74a958..8f01adc47f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Completion/RazorCompletion.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCompletion.cs @@ -30,7 +30,7 @@ using System.Linq; using System.Text;
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Core;
-using MonoDevelop.AspNet.Mvc.Parser;
+using MonoDevelop.AspNet.Razor.Parser;
namespace MonoDevelop.AspNet.Mvc.Completion
{
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorSyntaxMode.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorSyntaxMode.cs index 6301cc3e32..1a07191a9e 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorSyntaxMode.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorSyntaxMode.cs @@ -36,12 +36,12 @@ using System.Web.Razor.Tokenizer; using System.Web.Razor.Tokenizer.Symbols; using System.Web.Razor.Parser; using System.Web.Mvc.Razor; -using MonoDevelop.AspNet.Mvc.Parser; +using MonoDevelop.AspNet.Razor.Parser; using MonoDevelop.Ide; using RazorSpan = System.Web.Razor.Parser.SyntaxTree.Span; using MonoDevelop.Ide.Gui; -namespace MonoDevelop.AspNet.Mvc +namespace MonoDevelop.AspNet.Razor { public class RazorSyntaxMode : SyntaxMode, IDisposable { diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/Controller.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/Controller.xft.xml new file mode 100644 index 0000000000..e2400f2b16 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/Controller.xft.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<Template originator="Michael Hutchinson" + created="2009/02/17" + lastModified="2009/02/17"> + + <!-- Template Header --> + <TemplateConfiguration> + <_Name>ASP.NET MVC Controller</_Name> + <Icon>md-html-file-icon</Icon> + <_Category>ASP.NET MVC</_Category> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> + <_Description>Creates an ASP.NET MVC Controller.</_Description> + </TemplateConfiguration> + + <Conditions> + <AspNetMvc /> + </Conditions> + + <!-- Template Content --> + <TemplateFiles> + <File name="${Name}.cshtml"> +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Mvc.Ajax; + +namespace ${Namespace}.Controllers +{ + public class ${EscapedIdentifier} : Controller + { + } +} +]]> + </File> + </TemplateFiles> +</Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/GlobalAsaxMvc3.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/GlobalAsax.xft.xml index 72cc6be92f..666cbdd11b 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/GlobalAsaxMvc3.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/GlobalAsax.xft.xml @@ -1,68 +1,68 @@ -<?xml version="1.0"?> -<Template Originator="Piotr Dowgiallo" - Created="2012/05/16" - LastModified="2012/05/16"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 3 Global.asax</_Name> - <_Category>ASP.NET MVC</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>C#</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <DefaultFilename IsFixed="True">Global.asax</DefaultFilename> - <_Description>Creates an ASP.NET MVC 3 Global.asax file.</_Description> - </TemplateConfiguration> - - <Conditions> - <ParentProject PermittedCreationPaths="" ExcludedFiles="/Global.asax" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile name="Global.asax"> - <FileText> -<![CDATA[<%@ Application Inherits="${Namespace}.MvcApplication" %>]]> - </FileText> - </AspNetFile> - <File name="Global.asax.cs" DependsOn="Global.asax" > -<![CDATA[ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; - -namespace ${Namespace} -{ - public class MvcApplication : System.Web.HttpApplication - { - public static void RegisterRoutes(RouteCollection routes) - { - routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); - - routes.MapRoute( - "Default", - "{controller}/{action}/{id}", - new { controller = "Home", action = "Index", id = "" } - ); - - } - - public static void RegisterGlobalFilters(GlobalFilterCollection filters) - { - filters.Add(new HandleErrorAttribute()); - } - - protected void Application_Start() - { - AreaRegistration.RegisterAllAreas(); - RegisterGlobalFilters(GlobalFilters.Filters); - RegisterRoutes(RouteTable.Routes); - } - } -}]]> - </File> - </TemplateFiles> -</Template> +<?xml version="1.0"?>
+<Template Originator="Piotr Dowgiallo"
+ Created="2012/05/16"
+ LastModified="2012/05/16">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>ASP.NET MVC Global.asax</_Name>
+ <_Category>ASP.NET MVC</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>C#</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">Global.asax</DefaultFilename>
+ <_Description>Creates an ASP.NET MVC Global.asax file.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="/Global.asax" />
+ <AspNetMvc />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <File name="Global.asax">
+<![CDATA[<%@ Application Inherits="${Namespace}.MvcApplication" %>
+]]>
+ </File>
+ <File name="Global.asax.cs" DependsOn="Global.asax" >
+<![CDATA[
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using System.Web.Routing;
+
+namespace ${Namespace}
+{
+ public class MvcApplication : System.Web.HttpApplication
+ {
+ public static void RegisterRoutes(RouteCollection routes)
+ {
+ routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
+
+ routes.MapRoute(
+ "Default",
+ "{controller}/{action}/{id}",
+ new { controller = "Home", action = "Index", id = "" }
+ );
+
+ }
+
+ public static void RegisterGlobalFilters(GlobalFilterCollection filters)
+ {
+ filters.Add(new HandleErrorAttribute());
+ }
+
+ protected void Application_Start()
+ {
+ AreaRegistration.RegisterAllAreas();
+ RegisterGlobalFilters(GlobalFilters.Filters);
+ RegisterRoutes(RouteTable.Routes);
+ }
+ }
+}]]>
+ </File>
+ </TemplateFiles>
+</Template>
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/LayoutPage.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/LayoutPage.xft.xml index af2531c42f..e1f9de4447 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/LayoutPage.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/LayoutPage.xft.xml @@ -8,13 +8,17 @@ <_Name>ASP.NET MVC Layout Page (Razor)</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an MVC Razor Layout page.</_Description> </TemplateConfiguration> + <Conditions> + <AspNetMvc razor = "true" /> + </Conditions> + <!-- Template Content --> <TemplateFiles> - <File name="${Name}.cshtml" src="Common/_Layout.cshtml" /> + <File name="${Name}.cshtml" src="../MvcCommon/_Layout.cshtml" /> </TemplateFiles> </Template>
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/PartialViewPageRazor.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/PartialViewPageRazor.xft.xml index 2e13b3448b..53a45900c6 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/PartialViewPageRazor.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/PartialViewPageRazor.xft.xml @@ -8,11 +8,15 @@ <_Name>ASP.NET MVC Partial View Page (Razor)</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an MVC Razor Partial View page.</_Description> </TemplateConfiguration> + <Conditions> + <AspNetMvc razor = "true" /> + </Conditions> + <!-- Template Content --> <TemplateFiles> <File name="${Name}.cshtml" /> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/UserControl.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/UserControl.xft.xml index 500f7fd97e..aa83a81f14 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/UserControl.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/UserControl.xft.xml @@ -8,19 +8,21 @@ <_Name>ASP.NET MVC View User Control</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET MVC User Control.</_Description> </TemplateConfiguration> + + <Conditions> + <AspNetMvc /> + </Conditions> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.ascx"> - <FileText> - <![CDATA[<%@ Control Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewUserControl" %> - - ]]> - </FileText> - </AspNetFile> + <File name="${Name}.ascx"> +<![CDATA[<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> + +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewContentPage.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewContentPage.xft.xml index ede305cf8a..4240c01a8c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewContentPage.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewContentPage.xft.xml @@ -8,16 +8,20 @@ <_Name>ASP.NET MVC View Content</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET MVC View Content page.</_Description> </TemplateConfiguration> + + <Conditions> + <AspNetMvc /> + </Conditions> <!-- Template Content --> <TemplateFiles> <AspNetMasterContentFile name="${Name}.aspx" DefaultExtension=".aspx"> <FileText> - <![CDATA[<%@ Page Title="" Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="${AspNetMaster}" %> + <![CDATA[<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="${AspNetMaster}" %> ${AspNetMasterContent} ]]> </FileText> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewMasterPage.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewMasterPage.xft.xml index f7d32398c9..6b37db3e46 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewMasterPage.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewMasterPage.xft.xml @@ -8,18 +8,21 @@ <_Name>ASP.NET MVC Master Page</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET MVC Master Page.</_Description> </TemplateConfiguration> + + <Conditions> + <AspNetMvc /> + </Conditions> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.master"> - <FileText> - <![CDATA[<%@ Master Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewMasterPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> + <File name="${Name}.master"> + <![CDATA[<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> +<!DOCTYPE html> +<html> <head runat="server"> <asp:ContentPlaceHolder ID="head" runat="server"> <title></title> @@ -32,7 +35,6 @@ ${Doctype} </body> </html> ]]> - </FileText> - </AspNetFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewPage.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewPage.xft.xml index 3dd1ebca4f..2426bc8b4c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewPage.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewPage.xft.xml @@ -8,18 +8,21 @@ <_Name>ASP.NET MVC View Page</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an MVC View page.</_Description> </TemplateConfiguration> + + <Conditions> + <AspNetMvc /> + </Conditions> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> + <File name="${Name}.aspx"> + <![CDATA[<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> +<!DOCTYPE html> +<html> <head runat="server"> <title></title> </head> @@ -28,8 +31,8 @@ ${Doctype} </div> </body> -</html>]]> - </FileText> - </AspNetFile> +</html> +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewPageRazor.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewPageRazor.xft.xml index 3ccd83652f..7d347c26b1 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ViewPageRazor.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/ViewPageRazor.xft.xml @@ -8,14 +8,18 @@ <_Name>ASP.NET MVC View Page (Razor)</_Name> <Icon>md-html-file-icon</Icon> <_Category>ASP.NET MVC</_Category> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> + <LanguageName>C#</LanguageName> + <ProjectType>AspNetApp</ProjectType> <_Description>Creates an MVC Razor View page.</_Description> </TemplateConfiguration> + <Conditions> + <AspNetMvc razor = "true" /> + </Conditions> + <!-- Template Content --> <TemplateFiles> - <File name="${Name}.cshtml" src="Common/ViewPageRazor.cshtml" /> + <File name="${Name}.cshtml" src="../MvcCommon/ViewPageRazor.cshtml" /> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigAppMvc3.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/WebConfigApp.xft.xml index 9af8e817bc..a71dfd6def 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigAppMvc3.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/WebConfigApp.xft.xml @@ -1,151 +1,151 @@ -<?xml version="1.0"?> -<Template - Originator="Piotr Dowgiallo" - Created="2012/05/16" - LastModified="2012/05/16"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 3 Application Configuration</_Name> - <_Category>ASP.NET MVC</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <DefaultFilename IsFixed="True">Web.config</DefaultFilename> - <_Description>Creates an ASP.NET MVC 3 Web.config file for an application.</_Description> - </TemplateConfiguration> - - <Conditions> - <ParentProject PermittedCreationPaths="" ExcludedFiles="Web.config" RequireProject="True"/> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <AspNetFile name="Web.config"> - <FileText> -<![CDATA[<?xml version="1.0" ?> -<!-- -Web.config file for ${ProjectName}. - -The settings that can be used in this file are documented at -http://www.mono-project.com/Config_system.web and -http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx ---> -<configuration> - <configSections> - <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> - <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> - <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> - <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> - <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> - </sectionGroup> - </sectionGroup> - </sectionGroup> - </configSections> - <system.web> - <!-- - Set compilation debug="true" to insert debugging - symbols into the compiled page. Because this - affects performance, set this value to true only - during development. - --> - <compilation defaultLanguage="${AspNetLanguage}" debug="false"> - <assemblies> - <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> - <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> - <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> - <add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - </assemblies> - </compilation> - - <customErrors mode="RemoteOnly"> - </customErrors> - <pages> - <controls> - <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - </controls> - - <namespaces> - <add namespace="System.Web.Mvc"/> - <add namespace="System.Web.Mvc.Ajax"/> - <add namespace="System.Web.Mvc.Html"/> - <add namespace="System.Web.Routing"/> - <add namespace="System.Web.Helpers" /> - <add namespace="System.Web.WebPages"/> - <add namespace="System.Linq"/> - <add namespace="System.Collections.Generic"/> - </namespaces> - </pages> - - <authorization> - <allow users="*" /> - </authorization> - - <httpHandlers> - <remove verb="*" path="*.asmx"/> - <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> - <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - </httpHandlers> - - <httpModules> - <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - </httpModules> - - <trace - enabled="false" - localOnly="true" - pageOutput="false" - requestLimit="10" - traceMode="SortByTime" - /> - - <globalization - requestEncoding="utf-8" - responseEncoding="utf-8" - /> - - </system.web> - - <system.codedom> - <compilers> - <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" - type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <providerOption name="CompilerVersion" value="v4.0"/> - <providerOption name="WarnAsError" value="false"/> - </compiler> - <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" - type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <providerOption name="CompilerVersion" value="v4.0"/> - <providerOption name="OptionInfer" value="true"/> - <providerOption name="WarnAsError" value="false"/> - </compiler> - </compilers> - </system.codedom> - - <system.web.extensions/> - - <appSettings> - <add key="webpages:Version" value="1.0.0.0"/> - <add key="ClientValidationEnabled" value="true"/> - <add key="UnobtrusiveJavaScriptEnabled" value="true"/> - </appSettings> -</configuration>]]> - </FileText> - </AspNetFile> - </TemplateFiles> -</Template> - +<?xml version="1.0"?>
+<Template
+ Originator="Piotr Dowgiallo"
+ Created="2012/05/16"
+ LastModified="2012/05/16">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>ASP.NET MVC Application Configuration</_Name>
+ <_Category>ASP.NET MVC</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>C#</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">Web.config</DefaultFilename>
+ <_Description>Creates an ASP.NET MVC Web.config file for an application.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="Web.config" RequireProject="True"/>
+ <AspNetMvc />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <File name="Web.config">
+<![CDATA[<?xml version="1.0" ?>
+<!--
+Web.config file for ${ProjectName}.
+
+The settings that can be used in this file are documented at
+http://www.mono-project.com/Config_system.web and
+http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
+-->
+<configuration>
+ <configSections>
+ <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
+ <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
+ <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
+ <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
+ <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
+ </sectionGroup>
+ </sectionGroup>
+ </sectionGroup>
+ </configSections>
+ <system.web>
+ <!--
+ Set compilation debug="true" to insert debugging
+ symbols into the compiled page. Because this
+ affects performance, set this value to true only
+ during development.
+ -->
+ <compilation defaultLanguage="C#" debug="false">
+ <assemblies>
+ <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+ <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+ <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+ <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+ <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+ <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
+ <add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ </assemblies>
+ </compilation>
+
+ <customErrors mode="RemoteOnly">
+ </customErrors>
+ <pages>
+ <controls>
+ <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ </controls>
+
+ <namespaces>
+ <add namespace="System.Web.Mvc"/>
+ <add namespace="System.Web.Mvc.Ajax"/>
+ <add namespace="System.Web.Mvc.Html"/>
+ <add namespace="System.Web.Routing"/>
+ <add namespace="System.Web.Helpers" />
+ <add namespace="System.Web.WebPages"/>
+ <add namespace="System.Linq"/>
+ <add namespace="System.Collections.Generic"/>
+ </namespaces>
+ </pages>
+
+ <authorization>
+ <allow users="*" />
+ </authorization>
+
+ <httpHandlers>
+ <remove verb="*" path="*.asmx"/>
+ <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
+ <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ </httpHandlers>
+
+ <httpModules>
+ <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+ </httpModules>
+
+ <trace
+ enabled="false"
+ localOnly="true"
+ pageOutput="false"
+ requestLimit="10"
+ traceMode="SortByTime"
+ />
+
+ <globalization
+ requestEncoding="utf-8"
+ responseEncoding="utf-8"
+ />
+
+ </system.web>
+
+ <system.codedom>
+ <compilers>
+ <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
+ type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <providerOption name="CompilerVersion" value="v4.0"/>
+ <providerOption name="WarnAsError" value="false"/>
+ </compiler>
+ <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
+ type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <providerOption name="CompilerVersion" value="v4.0"/>
+ <providerOption name="OptionInfer" value="true"/>
+ <providerOption name="WarnAsError" value="false"/>
+ </compiler>
+ </compilers>
+ </system.codedom>
+
+ <system.web.extensions/>
+
+ <appSettings>
+ <add key="webpages:Version" value="1.0.0.0"/>
+ <add key="ClientValidationEnabled" value="true"/>
+ <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
+ </appSettings>
+</configuration>
+]]>
+ </File>
+ </TemplateFiles>
+</Template>
+
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigViewsMvc3.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/WebConfigViews.xft.xml index 70b96b5795..aa0d8020b5 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/WebConfigViewsMvc3.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Mvc/WebConfigViews.xft.xml @@ -1,79 +1,80 @@ -<?xml version="1.0"?> -<Template - Originator="Piotr Dowgiallo" - Created="2012/05/16" - LastModified="2012/05/16"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 3 Views Configuration</_Name> - <_Category>ASP.NET MVC</_Category> - <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> - <ProjectType>AspNetMvc</ProjectType> - <DefaultFilename IsFixed="True">Web.config</DefaultFilename> - <_Description>Creates an ASP.NET MVC 3 Web.config file for the Views directory.</_Description> - </TemplateConfiguration> - - <Conditions> - <ParentProject PermittedCreationPaths="/Views" ExcludedFiles="Web.config" /> - </Conditions> - - <!-- Template Content --> - <TemplateFiles> - <File name="Web.config"> -<![CDATA[<?xml version="1.0"?> -<configuration> - <configSections> - <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> - <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> - </sectionGroup> - </configSections> - - <system.web> - <httpHandlers> - <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> - </httpHandlers> - - <!-- - Enabling request validation in view pages would cause validation to occur - after the input has already been processed by the controller. By default - MVC performs request validation before a controller processes the input. - To change this behavior apply the ValidateInputAttribute to a - controller or action. - --> - <pages validateRequest="false" - pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" - pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" - userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> - <controls> - <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> - </controls> - </pages> - </system.web> - - <system.webServer> - <validation validateIntegratedModeConfiguration="false"/> - <handlers> - <remove name="BlockViewHandler"/> - <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/> - </handlers> - </system.webServer> - - <system.web.webPages.razor> - <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> - <pages pageBaseType="System.Web.Mvc.WebViewPage"> - <namespaces> - <add namespace="System.Web.Mvc" /> - <add namespace="System.Web.Mvc.Ajax" /> - <add namespace="System.Web.Mvc.Html" /> - <add namespace="System.Web.Routing" /> - </namespaces> - </pages> - </system.web.webPages.razor> - -</configuration>]]> - </File> - </TemplateFiles> +<?xml version="1.0"?>
+<Template
+ Originator="Piotr Dowgiallo"
+ Created="2012/05/16"
+ LastModified="2012/05/16">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>ASP.NET MVC Views Configuration</_Name>
+ <_Category>ASP.NET MVC</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>C#</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">Web.config</DefaultFilename>
+ <_Description>Creates an ASP.NET MVC Web.config file for the Views directory.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="/Views" ExcludedFiles="Web.config" />
+ <AspNetMvc razor = "true" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <File name="Web.config">
+<![CDATA[<?xml version="1.0"?>
+<configuration>
+ <configSections>
+ <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
+ <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
+ </sectionGroup>
+ </configSections>
+
+ <system.web>
+ <httpHandlers>
+ <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
+ </httpHandlers>
+
+ <!--
+ Enabling request validation in view pages would cause validation to occur
+ after the input has already been processed by the controller. By default
+ MVC performs request validation before a controller processes the input.
+ To change this behavior apply the ValidateInputAttribute to a
+ controller or action.
+ -->
+ <pages validateRequest="false"
+ pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
+ pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
+ userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <controls>
+ <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
+ </controls>
+ </pages>
+ </system.web>
+
+ <system.webServer>
+ <validation validateIntegratedModeConfiguration="false"/>
+ <handlers>
+ <remove name="BlockViewHandler"/>
+ <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
+ </handlers>
+ </system.webServer>
+
+ <system.web.webPages.razor>
+ <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+ <pages pageBaseType="System.Web.Mvc.WebViewPage">
+ <namespaces>
+ <add namespace="System.Web.Mvc" />
+ <add namespace="System.Web.Mvc.Ajax" />
+ <add namespace="System.Web.Mvc.Html" />
+ <add namespace="System.Web.Routing" />
+ </namespaces>
+ </pages>
+ </system.web.webPages.razor>
+
+</configuration>]]>
+ </File>
+ </TemplateFiles>
</Template>
\ No newline at end of file diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/Error.cshtml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/Error.cshtml index c02f534fac..c02f534fac 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/Error.cshtml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/Error.cshtml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/HomeController.cs b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/HomeController.cs index 0d4e1a6b35..0d4e1a6b35 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/HomeController.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/HomeController.cs diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/HomeControllerTest.cs b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/HomeControllerTest.cs index b98cbbe901..b98cbbe901 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/HomeControllerTest.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/HomeControllerTest.cs diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/Index.cshtml index e17c85e1ce..e17c85e1ce 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/Index.cshtml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/ViewPageRazor.cshtml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/ViewPageRazor.cshtml index 3b3e97a009..3b3e97a009 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/ViewPageRazor.cshtml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/ViewPageRazor.cshtml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/_Layout.cshtml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/_Layout.cshtml index 547f680145..547f680145 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/_Layout.cshtml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/_Layout.cshtml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/_ViewStart.cshtml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/_ViewStart.cshtml index 9c30ccf2ac..9c30ccf2ac 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/Common/_ViewStart.cshtml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/MvcCommon/_ViewStart.cshtml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/PreprocessedRazorTemplate.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/PreprocessedRazorTemplate.xft.xml index b25949a496..b25949a496 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/PreprocessedRazorTemplate.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/PreprocessedRazorTemplate.xft.xml diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/EmptyProject.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/EmptyMvcProject.xpt.xml index ac686d8723..7d31cf26f0 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/EmptyProject.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/EmptyMvcProject.xpt.xml @@ -5,11 +5,11 @@ <!-- Template Header --> <TemplateConfiguration> - <_Name>Empty ASP.NET MVC 2 Project</_Name> + <_Name>Empty ASP.NET MVC Project</_Name> <_Category>C#/ASP.NET</_Category> <Icon>md-project-web</Icon> <LanguageName>C#</LanguageName> - <_Description>Creates an empty ASP.NET MVC 2 Web Project.</_Description> + <_Description>Creates an empty ASP.NET MVC Web Project.</_Description> </TemplateConfiguration> <!-- Actions --> @@ -22,8 +22,8 @@ <StartupProject>${ProjectName}</StartupProject> </Options> - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc2"> - <Options TargetFrameworkVersion = "4.0" /> + <Project name = "${ProjectName}" directory = "." type = "AspNetApp"> + <Options TargetFrameworkVersion = "4.5" /> <References> <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> @@ -33,11 +33,15 @@ <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> <Reference type="Package" refto="System.Xml.Linq" /> + <Reference type="Package" refto="System.Core" /> + <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </References> + <Packages> + <Package Id="Microsoft.AspNet.Mvc" Version="5.1.2"/> + </Packages> <Files> <Directory name="Content" /> <Directory name="Controllers" /> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebApplication-Empty.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/EmptyProject.xpt.xml index f1befb17f6..3112571b5f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebApplication-Empty.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/EmptyProject.xpt.xml @@ -5,10 +5,10 @@ <!-- Template Header --> <TemplateConfiguration> - <_Name>Empty Web Application</_Name> - <_Category>ASP.NET</_Category> + <_Name>Empty ASP.NET Project</_Name> + <_Category>C#/ASP.NET</_Category> <Icon>md-project-web</Icon> - <LanguageName>C#,VBNet</LanguageName> + <LanguageName>C#</LanguageName> <_Description>Creates an empty ASP.NET Web Application project.</_Description> </TemplateConfiguration> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcProject.xpt.xml index 8f910e96c5..06abf8e767 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcProject.xpt.xml @@ -1,97 +1,96 @@ -<?xml version="1.0"?> -<Template originator="Piotr Dowgiallo" - created="2012/05/16" - lastModified="2012/05/16"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 3 Project</_Name> - <_Category>C#/ASP.NET</_Category> - <Icon>md-project-web</Icon> - <LanguageName>C#</LanguageName> - <_Description>Creates an ASP.NET MVC 3 Web Project.</_Description> - </TemplateConfiguration> - - - <!-- Actions --> - <Actions> - <Open filename = "Controllers/HomeController.cs"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc3"> - <Options TargetFrameworkVersion = "4.0" /> - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - </References> - <Files> - <Directory name="Content" /> - <Directory name="Controllers"> - <File name="HomeController.cs" src="Common/HomeController.cs" /> - </Directory> - <Directory name="Models" /> - <Directory name="Scripts" /> - <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvc3WebConfigViews" name="Web.config" SuppressAutoOpen="true" /> - <Directory name="Home"> - <AspNetFile name="Index.aspx"> - <FileText> -<![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title></title> -</head> -<body> - <div> - <%= Html.Encode(ViewData["Message"]) %> - </div> -</body> -]]> - </FileText> - </AspNetFile> - </Directory> - <Directory name="Shared"> - <AspNetFile name="Error.aspx"> - <FileText> -<![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Error</title> -</head> -<body> - <div> - <h2>An error occurred while processing your request.</h2> - </div> -</body> -]]> - </FileText> - </AspNetFile> - </Directory> - </Directory> - <FileTemplateReference TemplateID="AspMvc3WebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvc3GlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> - </Files> - </Project> - </Combine> -</Template> +<?xml version="1.0"?>
+<Template originator="Piotr Dowgiallo"
+ created="2012/05/16"
+ lastModified="2012/05/16">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>ASP.NET MVC Project</_Name>
+ <_Category>C#/ASP.NET</_Category>
+ <Icon>md-project-web</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates an ASP.NET MVC Web Project.</_Description>
+ </TemplateConfiguration>
+
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Controllers/HomeController.cs"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = "." type = "AspNetApp">
+ <Options TargetFrameworkVersion = "4.5" />
+ <References>
+ <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Core" />
+ <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Xml.Linq" />
+ <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ </References>
+ <Packages>
+ <Package ID="Microsoft.AspNet.Mvc" Version="5.1.2" />
+ </Packages>
+ <Files>
+ <Directory name="Content" />
+ <Directory name="Controllers">
+ <File name="HomeController.cs" src="../MvcCommon/HomeController.cs" />
+ </Directory>
+ <Directory name="Models" />
+ <Directory name="Scripts" />
+ <Directory name="Views">
+ <FileTemplateReference TemplateID="AspMvcWebConfigViews" name="Web.config" SuppressAutoOpen="true" />
+ <Directory name="Home">
+ <File name="Index.aspx">
+<![CDATA[<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
+<!DOCTYPE html>
+<html>
+<head runat="server">
+ <title></title>
+</head>
+<body>
+ <div>
+ <%= Html.Encode(ViewData["Message"]) %>
+ </div>
+</body>
+]]>
+ </File>
+ </Directory>
+ <Directory name="Shared">
+ <File name="Error.aspx">
+<![CDATA[<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Error</title>
+</head>
+<body>
+ <div>
+ <h2>An error occurred while processing your request.</h2>
+ </div>
+</body>
+]]>
+ </File>
+ </Directory>
+ </Directory>
+ <FileTemplateReference TemplateID="AspMvcWebConfigApp" name="Web.config" SuppressAutoOpen="true" />
+ <FileTemplateReference TemplateID="AspMvcGlobalAsax" name="Global.asax" SuppressAutoOpen="true" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3WithUnitTest.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcProjectWithUnitTest.xpt.xml index 2675e62477..4e722cc86a 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3WithUnitTest.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcProjectWithUnitTest.xpt.xml @@ -1,126 +1,126 @@ -<?xml version="1.0"?> -<Template originator="Piotr Dowgiallo" - created="2012/06/05" - lastModified="2012/06/05"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>ASP.NET MVC 3 with Unit Test Project</_Name> - <_Category>C#/ASP.NET</_Category> - <Icon>md-project-web</Icon> - <LanguageName>C#</LanguageName> - <_Description>Creates an ASP.NET MVC 3 Web Project with Unit Test Project.</_Description> - </TemplateConfiguration> - - - <!-- Actions --> - <Actions> - <Open filename = "Controllers/HomeController.cs"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc3"> - <Options TargetFrameworkVersion = "4.0" /> - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - </References> - <Files> - <Directory name="Content" /> - <Directory name="Controllers"> - <File name="HomeController.cs" src="Common/HomeController.cs" /> - </Directory> - <Directory name="Models" /> - <Directory name="Scripts" /> - <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvc3WebConfigViews" name="Web.config" SuppressAutoOpen="true" /> - <Directory name="Home"> - <AspNetFile name="Index.aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title></title> -</head> -<body> - <div> - <%= Html.Encode(ViewData["Message"]) %> - </div> -</body> -]]> - </FileText> - </AspNetFile> - </Directory> - <Directory name="Shared"> - <AspNetFile name="Error.aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="System.Web.Mvc.ViewPage" %> -${Doctype} -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Error</title> -</head> -<body> - <div> - <h2>An error occurred while processing your request.</h2> - </div> -</body> -]]> - </FileText> - </AspNetFile> - </Directory> - </Directory> - <FileTemplateReference TemplateID="AspMvc3WebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvc3GlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> - </Files> - </Project> - <Project name = "${ProjectName}.Tests" directory = "${ProjectName}.Tests"> - <Options Target = "Library" /> - - <References> - <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <Reference type="Package" refto="System.Core" /> - <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> - <Reference type="Package" refto="System.Xml.Linq" /> - <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="nunit.framework" SpecificVersion = "false" LocalCopy = "false" /> - <Reference type="Project" refto="${ProjectName}" /> - </References> - - <Files> - <Directory name="Controllers"> - <File name="HomeControllerTest.cs" src="Common/HomeControllerTest.cs" /> - </Directory> - </Files> - </Project> - </Combine> -</Template> +<?xml version="1.0"?>
+<Template originator="Piotr Dowgiallo"
+ created="2012/06/05"
+ lastModified="2012/06/05">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>ASP.NET MVC Project with Unit Tests</_Name>
+ <_Category>C#/ASP.NET</_Category>
+ <Icon>md-project-web</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates an ASP.NET MVC Web Project with a Unit Test Project.</_Description>
+ </TemplateConfiguration>
+
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Controllers/HomeController.cs"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = "." type = "AspNetApp">
+ <Options TargetFrameworkVersion = "4.5" />
+ <References>
+ <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Core" />
+ <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Xml.Linq" />
+ <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ </References>
+ <Packages>
+ <Package ID="Microsoft.AspNet.Mvc" Version="5.1.2" />
+ </Packages>
+ <Files>
+ <Directory name="Content" />
+ <Directory name="Controllers">
+ <File name="HomeController.cs" src="../MvcCommon/HomeController.cs" />
+ </Directory>
+ <Directory name="Models" />
+ <Directory name="Scripts" />
+ <Directory name="Views">
+ <FileTemplateReference TemplateID="AspMvcWebConfigViews" name="Web.config" SuppressAutoOpen="true" />
+ <Directory name="Home">
+ <File name="Index.aspx">
+<![CDATA[<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
+<!DOCTYPE html>
+<html>
+<head runat="server">
+ <title></title>
+</head>
+<body>
+ <div>
+ <%= Html.Encode(ViewData["Message"]) %>
+ </div>
+</body>
+]]>
+ </File>
+ </Directory>
+ <Directory name="Shared">
+ <File name="Error.aspx">
+<![CDATA[<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Error</title>
+</head>
+<body>
+ <div>
+ <h2>An error occurred while processing your request.</h2>
+ </div>
+</body>
+]]>
+ </File>
+ </Directory>
+ </Directory>
+ <FileTemplateReference TemplateID="AspMvcWebConfigApp" name="Web.config" SuppressAutoOpen="true" />
+ <FileTemplateReference TemplateID="AspMvcGlobalAsax" name="Global.asax" SuppressAutoOpen="true" />
+ </Files>
+ </Project>
+ <Project name = "${ProjectName}.Tests" directory = "${ProjectName}.Tests">
+ <Options Target = "Library" TargetFrameworkVersion = "4.5" />
+ <References>
+ <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Core" />
+ <Reference type="Package" refto="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" />
+ <Reference type="Package" refto="System.Xml.Linq" />
+ <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Project" refto="${ProjectName}" />
+ </References>
+ <Packages>
+ <Package ID="Microsoft.AspNet.Mvc" Version="5.1.2" />
+ <Package ID="NUnit" Version="2.6.3" />
+ </Packages>
+ <Files>
+ <Directory name="Controllers">
+ <File name="HomeControllerTest.cs" src="../MvcCommon/HomeControllerTest.cs" />
+ </Directory>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
\ No newline at end of file diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3Razor.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcRazorProject.xpt.xml index b4da04a76a..4401945c33 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3Razor.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcRazorProject.xpt.xml @@ -5,11 +5,11 @@ <!-- Template Header --> <TemplateConfiguration> - <_Name>ASP.NET MVC 3 Project (Razor)</_Name> + <_Name>ASP.NET MVC Razor Project</_Name> <_Category>C#/ASP.NET</_Category> <Icon>md-project-web</Icon> <LanguageName>C#</LanguageName> - <_Description>Creates an ASP.NET MVC 3 Web Project with Razor Views.</_Description> + <_Description>Creates an ASP.NET MVC Project with Razor Views.</_Description> </TemplateConfiguration> @@ -24,8 +24,8 @@ <StartupProject>${ProjectName}</StartupProject> </Options> - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc3"> - <Options TargetFrameworkVersion = "4.0" /> + <Project name = "${ProjectName}" directory = "." type = "AspNetApp"> + <Options TargetFrameworkVersion = "4.5" /> <References> <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> @@ -43,26 +43,29 @@ <Reference type="Package" refto="System.Xml.Linq" /> <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </References> + <Packages> + <Package ID="Microsoft.AspNet.Mvc" Version="5.1.2" /> + </Packages> <Files> <Directory name="Content" /> <Directory name="Controllers"> - <File name="HomeController.cs" src="Common/HomeController.cs" /> + <File name="HomeController.cs" src="../MvcCommon/HomeController.cs" /> </Directory> <Directory name="Models" /> <Directory name="Scripts" /> <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvc3WebConfigViews" name="Web.config" SuppressAutoOpen="true" /> + <FileTemplateReference TemplateID="AspMvcWebConfigViews" name="Web.config" SuppressAutoOpen="true" /> <Directory name="Home"> - <File name="Index.cshtml" src="Common/Index.cshtml" /> + <File name="Index.cshtml" src="../MvcCommon/Index.cshtml" /> </Directory> <Directory name="Shared"> - <File name="_Layout.cshtml" src="Common/_Layout.cshtml" /> - <File name="Error.cshtml" src="Common/Error.cshtml" /> + <File name="_Layout.cshtml" src="../MvcCommon/_Layout.cshtml" /> + <File name="Error.cshtml" src="../MvcCommon/Error.cshtml" /> </Directory> - <File name="_ViewStart.cshtml" src="Common/_ViewStart.cshtml" /> + <File name="_ViewStart.cshtml" src="../MvcCommon/_ViewStart.cshtml" /> </Directory> - <FileTemplateReference TemplateID="AspMvc3WebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvc3GlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> + <FileTemplateReference TemplateID="AspMvcWebConfigApp" name="Web.config" SuppressAutoOpen="true" /> + <FileTemplateReference TemplateID="AspMvcGlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> </Files> </Project> </Combine> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3RazorWithUnitTest.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcRazorProjectWithUnitTest.xpt.xml index 8f7bd3f8d5..f795160ddc 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3RazorWithUnitTest.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/MvcRazorProjectWithUnitTest.xpt.xml @@ -5,11 +5,11 @@ <!-- Template Header --> <TemplateConfiguration> - <_Name>ASP.NET MVC 3 (Razor) with Unit Test Project</_Name> + <_Name>ASP.NET MVC Razor Project with Unit Tests</_Name> <_Category>C#/ASP.NET</_Category> <Icon>md-project-web</Icon> <LanguageName>C#</LanguageName> - <_Description>Creates an ASP.NET MVC 3 Web Project with Razor Views and Unit Test Project.</_Description> + <_Description>Creates an ASP.NET MVC Web Project with Razor Views and a Unit Test Project.</_Description> </TemplateConfiguration> @@ -24,8 +24,8 @@ <StartupProject>${ProjectName}</StartupProject> </Options> - <Project name = "${ProjectName}" directory = "." type = "AspNetMvc3"> - <Options TargetFrameworkVersion = "4.0" /> + <Project name = "${ProjectName}" directory = "." type = "AspNetApp"> + <Options TargetFrameworkVersion = "4.5" /> <References> <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> @@ -43,31 +43,33 @@ <Reference type="Package" refto="System.Xml.Linq" /> <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </References> + <Packages> + <Package ID="Microsoft.AspNet.Mvc" Version="5.1.2" /> + </Packages> <Files> <Directory name="Content" /> <Directory name="Controllers"> - <File name="HomeController.cs" src="Common/HomeController.cs" /> + <File name="HomeController.cs" src="../MvcCommon/HomeController.cs" /> </Directory> <Directory name="Models" /> <Directory name="Scripts" /> <Directory name="Views"> - <FileTemplateReference TemplateID="AspMvc3WebConfigViews" name="Web.config" SuppressAutoOpen="true" /> + <FileTemplateReference TemplateID="AspMvcWebConfigViews" name="Web.config" SuppressAutoOpen="true" /> <Directory name="Home"> - <File name="Index.cshtml" src="Common/Index.cshtml" /> + <File name="Index.cshtml" src="../MvcCommon/Index.cshtml" /> </Directory> <Directory name="Shared"> - <File name="_Layout.cshtml" src="Common/_Layout.cshtml" /> - <File name="Error.cshtml" src="Common/Error.cshtml" /> + <File name="_Layout.cshtml" src="../MvcCommon/_Layout.cshtml" /> + <File name="Error.cshtml" src="../MvcCommon/Error.cshtml" /> </Directory> - <File name="_ViewStart.cshtml" src="Common/_ViewStart.cshtml" /> + <File name="_ViewStart.cshtml" src="../MvcCommon/_ViewStart.cshtml" /> </Directory> - <FileTemplateReference TemplateID="AspMvc3WebConfigApp" name="Web.config" SuppressAutoOpen="true" /> - <FileTemplateReference TemplateID="AspMvc3GlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> + <FileTemplateReference TemplateID="AspMvcWebConfigApp" name="Web.config" SuppressAutoOpen="true" /> + <FileTemplateReference TemplateID="AspMvcGlobalAsax" name="Global.asax" SuppressAutoOpen="true" /> </Files> </Project> <Project name = "${ProjectName}.Tests" directory = "${ProjectName}.Tests"> - <Options Target = "Library" /> - + <Options Target = "Library" TargetFrameworkVersion = "4.5" /> <References> <Reference type="Package" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <Reference type="Package" refto="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> @@ -84,13 +86,15 @@ <Reference type="Package" refto="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" SpecificVersion="false" /> <Reference type="Package" refto="System.Xml.Linq" /> <Reference type="Package" refto="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <Reference type="Package" refto="nunit.framework" SpecificVersion = "false" LocalCopy = "false" /> <Reference type="Project" refto="${ProjectName}" /> </References> - + <Packages> + <Package ID="Microsoft.AspNet.Mvc" Version="5.1.2" /> + <Package ID="NUnit" Version="2.6.3" /> + </Packages> <Files> <Directory name="Controllers"> - <File name="HomeControllerTest.cs" src="Common/HomeControllerTest.cs" /> + <File name="HomeControllerTest.cs" src="../MvcCommon/HomeControllerTest.cs" /> </Directory> </Files> </Project> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebApplication.xpt.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/WebApplication.xpt.xml index 665a936f5d..6504b0a3d9 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebApplication.xpt.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/Projects/WebApplication.xpt.xml @@ -5,10 +5,10 @@ <!-- Template Header --> <TemplateConfiguration> - <_Name>Web Application</_Name> - <_Category>ASP.NET</_Category> + <_Name>ASP.NET Project</_Name> + <_Category>C#/ASP.NET</_Category> <Icon>md-project-web</Icon> - <LanguageName>C#,VBNet</LanguageName> + <LanguageName>C#</LanguageName> <_Description>Creates a new ASP.NET Web Application project.</_Description> </TemplateConfiguration> @@ -35,10 +35,9 @@ <FileTemplateReference TemplateID="GlobalAsax-CodeBehind" name="Global.asax" /> <FileTemplateReference TemplateID="WebConfig-Application" name="web.config" /> - <AspNetFile name="Default.aspx" DefaultExtension=".aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %> -${Doctype} + <File name="Default.aspx" DefaultExtension=".aspx"> +<![CDATA[<%@ Page Language="C#" Inherits="${Namespace}.${EscapedIdentifier}" %> +<!DOCTYPE html> <html> <head runat="server"> <title>${Name}</title> @@ -48,11 +47,10 @@ ${Doctype} <asp:Button id="button1" runat="server" Text="Click me!" OnClick="button1Clicked" /> </form> </body> -</html>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="Default.aspx.${LanguageExtension}"> +</html> +]]> + </File> + <File name="Default.aspx.cs"> <![CDATA[using System; using System.Web; using System.Web.UI; @@ -66,12 +64,10 @@ namespace ${Namespace} { button1.Text = "You clicked me"; } } -}]]> - </CodeTranslationFile> - <CodeTranslationFile name="Default.aspx.designer.${LanguageExtension}" - ShowAutogenerationNotice="True" - AddStandardHeader="False" - SuppressAutoOpen="True"> +} +]]> + </File> + <File name="Default.aspx.designer.cs" ShowAutogenerationNotice="True" AddStandardHeader="False" SuppressAutoOpen="True"> <![CDATA[using System; using System.Web; using System.Web.UI; @@ -82,8 +78,9 @@ namespace ${Namespace} { { protected System.Web.UI.WebControls.Button button1; } -}]]> - </CodeTranslationFile> +} +]]> + </File> </Files> </Project> </Combine> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebConfig-Application.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebConfig-Application.xft.xml index 604310389b..954d3d418c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebConfig-Application.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebConfig-Application.xft.xml @@ -9,7 +9,7 @@ <_Name>Web Application Configuration</_Name> <_Category>ASP.NET</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <DefaultFilename IsFixed="True">web.config</DefaultFilename> <_Description>Creates an ASP.NET web.config file for an application.</_Description> @@ -21,8 +21,7 @@ <!-- Template Content --> <TemplateFiles> - <AspNetFile name="web.config"> - <FileText> + <File name="web.config"> <![CDATA[<?xml version="1.0" ?> <!-- Web.config file for ${ProjectName}. @@ -34,7 +33,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx <configuration> <system.web> <compilation - defaultLanguage="${AspNetLanguage}" + defaultLanguage="C#" debug="true" > <assemblies> @@ -80,8 +79,8 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx <pages> </pages> </system.web> -</configuration>]]> - </FileText> - </AspNetFile> +</configuration> +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebConfig-SubDir.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebConfig-SubDir.xft.xml index dcde19b992..f4a0add313 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebConfig-SubDir.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebConfig-SubDir.xft.xml @@ -9,7 +9,7 @@ <_Name>Subdirectory Web Configuration</_Name> <_Category>ASP.NET</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <DefaultFilename IsFixed="True">web.config</DefaultFilename> <_Description>Creates an ASP.NET web.config file for a subdirectory.</_Description> @@ -21,8 +21,7 @@ <!-- Template Content --> <TemplateFiles> - <AspNetFile name="web.config"> - <FileText> + <File name="web.config"> <![CDATA[<?xml version="1.0" encoding="utf-8"?> <!-- Web.config file for ${ProjectRelativeDirectory}. @@ -35,8 +34,8 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx <system.web> </system.web> -</configuration>]]> - </FileText> - </AspNetFile> +</configuration> +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/GlobalAsax-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/GlobalAsax-CodeBehind.xft.xml index a316ac0371..caf20e8713 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/GlobalAsax-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/GlobalAsax-CodeBehind.xft.xml @@ -6,9 +6,9 @@ <!-- Template Header --> <TemplateConfiguration> <_Name>Global.asax with CodeBehind</_Name> - <_Category>ASP.NET</_Category> + <_Category>ASP.NET Web Forms</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <DefaultFilename IsFixed="True">Global.asax</DefaultFilename> <_Description>Creates an ASP.NET Global.asax file with a CodeBehind class.</_Description> @@ -20,12 +20,10 @@ <!-- Template Content --> <TemplateFiles> - <AspNetFile name="Global.asax"> - <FileText> + <File name="Global.asax"> <![CDATA[<%@ Application Inherits="${Namespace}.Global" %>]]> - </FileText> - </AspNetFile> - <CodeTranslationFile name="Global.asax.${LanguageExtension}" DependsOn="Global.asax" > + </File> + <File name="Global.asax.cs" DependsOn="Global.asax" > <![CDATA[using System; using System.Collections; using System.ComponentModel; @@ -77,6 +75,6 @@ namespace ${Namespace} } } }]]> - </CodeTranslationFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/GlobalAsax-Empty.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/GlobalAsax-Empty.xft.xml index 4cb76fbf27..f525d6722c 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/GlobalAsax-Empty.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/GlobalAsax-Empty.xft.xml @@ -6,9 +6,9 @@ <!-- Template Header --> <TemplateConfiguration> <_Name>Global.asax</_Name> - <_Category>ASP.NET</_Category> + <_Category>ASP.NET Web Forms</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <DefaultFilename IsFixed="True">Global.asax</DefaultFilename> <_Description>Creates an ASP.NET Global.asax file.</_Description> @@ -20,16 +20,10 @@ <!-- Template Content --> <TemplateFiles> - <AspNetFile name="Global.asax"> - <FileText> -<![CDATA[<%@ Application Language="${AspNetLanguage}" %> + <File name="Global.asax"> +<![CDATA[<%@ Application Language="C#" %> <script runat="server"> -${CodeRegion:script1} -</script> -]]> - </FileText> - <CodeTranslationFile TagName="script1"> -<![CDATA[using System; +using System; using System.Collections; using System.ComponentModel; using System.Web; @@ -80,7 +74,6 @@ namespace ${Namespace} } } }]]> - </CodeTranslationFile> - </AspNetFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/MasterPage-CodeBehind.xft.xml index 861f7aea63..7a5848aa9e 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/MasterPage-CodeBehind.xft.xml @@ -7,23 +7,17 @@ <TemplateConfiguration> <_Name>Master Page with CodeBehind</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <_Description>Creates an ASP.NET Master Page with a CodeBehind class.</_Description> <ProjectType>AspNetApp</ProjectType> </TemplateConfiguration> - - <Conditions> - <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" /> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> - + <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.master"> - <FileText> - <![CDATA[<%@ Master Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %> -${Doctype} + <File name="${Name}.master"> +<![CDATA[<%@ Master Language="C#" Inherits="${Namespace}.${EscapedIdentifier}" %> +<!DOCTYPE html> <html> <head runat="server"> <title>${Name}</title> @@ -35,11 +29,11 @@ ${Doctype} </form> </div> </body> -</html>]]> - </FileText> - </AspNetFile> +</html> +]]> + </File> - <CodeTranslationFile name="${Name}.master.${LanguageExtension}" DependsOn="${Name}.master" > + <File name="${Name}.master.cs" DependsOn="${Name}.master" > <![CDATA[using System; using System.Web; using System.Web.UI; @@ -49,8 +43,8 @@ namespace ${Namespace} { } } ]]> - </CodeTranslationFile> - <CodeTranslationFile name="${Name}.master.designer.${LanguageExtension}" ShowAutogenerationNotice="True" + </File> + <File name="${Name}.master.designer.cs" ShowAutogenerationNotice="True" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.master" > <![CDATA[using System; using System.Web; @@ -61,6 +55,6 @@ namespace ${Namespace} { } } ]]> - </CodeTranslationFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-Empty.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/MasterPage-Empty.xft.xml index 48c8a1cd6c..9c3e845d88 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/MasterPage-Empty.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/MasterPage-Empty.xft.xml @@ -7,22 +7,17 @@ <TemplateConfiguration> <_Name>Master Page without CodeBehind</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Master Page.</_Description> </TemplateConfiguration> - - <Conditions> - <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" /> - </Conditions> - + <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.master"> - <FileText> - <![CDATA[<%@ Master Language="${AspNetLanguage}"%> -${Doctype} + <File name="${Name}.master"> +<![CDATA[<%@ Master Language="C#"%> +<!DOCTYPE html> <html> <head runat="server"> <title>${Name}</title> @@ -34,8 +29,8 @@ ${Doctype} </form> </div> </body> -</html>]]> - </FileText> - </AspNetFile> +</html> +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/NestedMasterPage-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/NestedMasterPage-CodeBehind.xft.xml index 9099b87c07..1a7476f11d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/NestedMasterPage-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/NestedMasterPage-CodeBehind.xft.xml @@ -7,29 +7,24 @@ <TemplateConfiguration> <_Name>Nested Master Page with CodeBehind</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <_Description>Creates an ASP.NET Nested Master Page with a CodeBehind class.</_Description> <ProjectType>AspNetApp</ProjectType> </TemplateConfiguration> - - <Conditions> - <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" /> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> - + <!-- Template Content --> <TemplateFiles> <AspNetMasterContentFile name="${Name}.master"> <FileText> - <![CDATA[<%@ Master Language="${AspNetLanguage}" MasterPageFile="${AspNetMaster}" Inherits="${Namespace}.${Name}" %> + <![CDATA[<%@ Master Language="C#" MasterPageFile="${AspNetMaster}" Inherits="${Namespace}.${EscapedIdentifier}" %> <%@ MasterType VirtualPath="${AspNetMaster}" %> ${AspNetMasterContent} ]]> </FileText> </AspNetMasterContentFile> - <CodeTranslationFile name="${Name}.master.${LanguageExtension}" DependsOn="${Name}.master" > + <File name="${Name}.master.cs" DependsOn="${Name}.master" > <![CDATA[using System; using System.Web; using System.Web.UI; @@ -39,8 +34,8 @@ namespace ${Namespace} { } } ]]> - </CodeTranslationFile> - <CodeTranslationFile name="${Name}.master.designer.${LanguageExtension}" ShowAutogenerationNotice="True" + </File> + <File name="${Name}.master.designer.cs" ShowAutogenerationNotice="True" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.master" > <![CDATA[using System; using System.Web; @@ -51,6 +46,6 @@ namespace ${Namespace} { } } ]]> - </CodeTranslationFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/NestedMasterPage.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/NestedMasterPage.xft.xml index 8204878b4e..47338eaea7 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/NestedMasterPage.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/NestedMasterPage.xft.xml @@ -7,22 +7,17 @@ <TemplateConfiguration> <_Name>Nested Master Page</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <_Description>Creates an ASP.NET Nested Master Page.</_Description> <ProjectType>AspNetApp</ProjectType> </TemplateConfiguration> - - <Conditions> - <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" /> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> - + <!-- Template Content --> <TemplateFiles> <AspNetMasterContentFile name="${Name}.master"> <FileText> - <![CDATA[<%@ Master Language="${AspNetLanguage}" MasterPageFile="${AspNetMaster}" %> + <![CDATA[<%@ Master Language="C#" MasterPageFile="${AspNetMaster}" %> ${AspNetMasterContent} ]]> </FileText> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebContentForm-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebContentForm-CodeBehind.xft.xml index 8810beee87..88d5a3c23d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebContentForm-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebContentForm-CodeBehind.xft.xml @@ -7,27 +7,23 @@ <TemplateConfiguration> <_Name>Web Content Form with CodeBehind</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Web Form that is the child of a Master Page, with a CodeBehind class.</_Description> </TemplateConfiguration> - - <Conditions> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> - + <!-- Template Content --> <TemplateFiles> <AspNetMasterContentFile name="${Name}.aspx" DefaultExtension=".aspx"> <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" MasterPageFile="${AspNetMaster}" %> +<![CDATA[<%@ Page Language="C#" Inherits="${Namespace}.${EscapedIdentifier}" MasterPageFile="${AspNetMaster}" %> <%@ MasterType VirtualPath="${AspNetMaster}" %> ${AspNetMasterContent} ]]> </FileText> </AspNetMasterContentFile> - <CodeTranslationFile name="${Name}.aspx.${LanguageExtension}" DependsOn="${Name}.aspx" > + <File name="${Name}.aspx.cs" DependsOn="${Name}.aspx" > <![CDATA[using System; using System.Web; using System.Web.UI; @@ -37,8 +33,8 @@ namespace ${Namespace} { } } ]]> - </CodeTranslationFile> - <CodeTranslationFile name="${Name}.aspx.designer.${LanguageExtension}" ShowAutogenerationNotice="True" + </File> + <File name="${Name}.aspx.designer.cs" ShowAutogenerationNotice="True" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.aspx" > <![CDATA[using System; using System.Web; @@ -49,6 +45,6 @@ namespace ${Namespace} { } } ]]> - </CodeTranslationFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebContentForm.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebContentForm.xft.xml index 651ab782f4..8ecab6b0ab 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebContentForm.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebContentForm.xft.xml @@ -7,21 +7,17 @@ <TemplateConfiguration> <_Name>Web Content Form</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Web Form that is the child of a Master Page.</_Description> </TemplateConfiguration> - - <Conditions> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> - + <!-- Template Content --> <TemplateFiles> <AspNetMasterContentFile name="${Name}.aspx" DefaultExtension=".aspx"> <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" MasterPageFile="${AspNetMaster}" %> +<![CDATA[<%@ Page Language="C#" MasterPageFile="${AspNetMaster}" %> ${AspNetMasterContent} ]]> </FileText> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebControl-CodeBehind.xft.xml index 08e441e081..d05c3ee8e2 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebControl-CodeBehind.xft.xml @@ -6,26 +6,20 @@ <!-- Template Header --> <TemplateConfiguration> <_Name>User Control with CodeBehind</_Name> - <_Category>ASP.NET</_Category> + <_Category>ASP.NET Web Forms</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET user control with a CodeBehind class.</_Description> </TemplateConfiguration> - - <Conditions> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> <!-- Template Content --> <TemplateFiles> - <AspNetFile DefaultExtension=".ascx" name="${Name}.ascx"> - <FileText> -<![CDATA[<%@ Control Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="${Name}.ascx.${LanguageExtension}" DependsOn="${Name}.ascx" > + <File DefaultExtension=".ascx" name="${Name}.ascx"> +<![CDATA[<%@ Control Language="C#" Inherits="${Namespace}.${EscapedIdentifier}" %> +]]> + </File> + <File name="${Name}.ascx.cs" DependsOn="${Name}.ascx" > <![CDATA[using System; using System.Web; using System.Web.UI; @@ -35,9 +29,10 @@ namespace ${Namespace} { public partial class ${EscapedIdentifier} : System.Web.UI.UserControl { } -}]]> - </CodeTranslationFile> - <CodeTranslationFile name="${Name}.ascx.designer.${LanguageExtension}" ShowAutogenerationNotice="True" +} +]]> + </File> + <File name="${Name}.ascx.designer.cs" ShowAutogenerationNotice="True" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.ascx" > <![CDATA[using System; using System.Web; @@ -48,7 +43,8 @@ namespace ${Namespace} { public partial class ${EscapedIdentifier} { } -}]]> - </CodeTranslationFile> +} +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-Empty.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebControl-Empty.xft.xml index 9876b2fa68..70f6733a7a 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebControl-Empty.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebControl-Empty.xft.xml @@ -6,23 +6,22 @@ <!-- Template Header --> <TemplateConfiguration> <_Name>User Control</_Name> - <_Category>ASP.NET</_Category> + <_Category>ASP.NET Web Forms</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an empty ASP.NET user control.</_Description> </TemplateConfiguration> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.ascx"> - <FileText> -<![CDATA[<%@ Control Language="${AspNetLanguage}" ClassName="${Namespace}.${Name}" %> + <File name="${Name}.ascx"> +<![CDATA[<%@ Control Language="C#" ClassName="${Namespace}.${Name}" %> <script runat="server"> -</script>]]> - </FileText> - </AspNetFile> +</script> +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebForm-CodeBehind.xft.xml index 0f09abbccc..32d0625e56 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebForm-CodeBehind.xft.xml @@ -7,22 +7,17 @@ <TemplateConfiguration> <_Name>Web Form with CodeBehind</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Web Form with a CodeBehind class.</_Description> </TemplateConfiguration> - <Conditions> - <PartialTypeSupport Requirement="Enabled" /> - </Conditions> - <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.aspx" DefaultExtension=".aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %> -${Doctype} + <File name="${Name}.aspx" DefaultExtension=".aspx"> +<![CDATA[<%@ Page Language="C#" Inherits="${Namespace}.${EscapedIdentifier}" %> +<!DOCTYPE html> <html> <head runat="server"> <title>${Name}</title> @@ -31,11 +26,10 @@ ${Doctype} <form id="form1" runat="server"> </form> </body> -</html>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="${Name}.aspx.${LanguageExtension}" DependsOn="${Name}.aspx" > +</html> +]]> + </File> + <File name="${Name}.aspx.cs" DependsOn="${Name}.aspx" > <![CDATA[using System; using System.Web; using System.Web.UI; @@ -46,9 +40,10 @@ namespace ${Namespace} { { } -}]]> - </CodeTranslationFile> - <CodeTranslationFile name="${Name}.aspx.designer.${LanguageExtension}" ShowAutogenerationNotice="True" +} +]]> + </File> + <File name="${Name}.aspx.designer.cs" ShowAutogenerationNotice="True" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.aspx" > <![CDATA[using System; using System.Web; @@ -60,7 +55,8 @@ namespace ${Namespace} { { } -}]]> - </CodeTranslationFile> +} +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-Empty.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebForm-Empty.xft.xml index db8ed37e3d..25f85c13af 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebForm-Empty.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebForm-Empty.xft.xml @@ -7,18 +7,17 @@ <TemplateConfiguration> <_Name>Web Form</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Web Form.</_Description> </TemplateConfiguration> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.aspx"> - <FileText> - <![CDATA[<%@ Page Language="${AspNetLanguage}" %> -${Doctype} + <File name="${Name}.aspx"> +<![CDATA[<%@ Page Language="C#" %> +<!DOCTYPE html> <html> <head runat="server"> <title>${Name}</title> @@ -31,8 +30,8 @@ ${Doctype} </form> </body> -</html>]]> - </FileText> - </AspNetFile> +</html> +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebHandler-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebHandler-CodeBehind.xft.xml index 54f7de044b..90ad050459 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebHandler-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebHandler-CodeBehind.xft.xml @@ -7,21 +7,20 @@ <TemplateConfiguration> <_Name>Web Handler with CodeBehind</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Web Handler with a CodeBehind class.</_Description> </TemplateConfiguration> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.ashx"> - <FileText> -<![CDATA[<%@ WebHandler Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %>]]> - </FileText> - </AspNetFile> + <File name="${Name}.ashx"> +<![CDATA[<%@ WebHandler Language="C#" Class="${Namespace}.${EscapedIdentifier}" %> +]]> + </File> - <CodeTranslationFile name="${Name}.ashx.${LanguageExtension}" DependsOn="${Name}.ashx" > + <File name="${Name}.ashx.cs" DependsOn="${Name}.ashx" > <![CDATA[using System; using System.Web; using System.Web.UI; @@ -43,7 +42,8 @@ namespace ${Namespace} } } } -}]]> - </CodeTranslationFile> +} + ]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebHandler-Empty.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebHandler-Empty.xft.xml index 7aadf98d5c..c72cd119ae 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebHandler-Empty.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebHandler-Empty.xft.xml @@ -7,21 +7,17 @@ <TemplateConfiguration> <_Name>Web Handler</_Name> <Icon>md-html-file-icon</Icon> - <_Category>ASP.NET</_Category> - <LanguageName>*</LanguageName> + <_Category>ASP.NET Web Forms</_Category> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET Web Handler.</_Description> </TemplateConfiguration> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.ashx"> - <FileText> -<![CDATA[<%@ WebHandler Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %> -${CodeRegion:script1} -]]> </FileText> - <CodeTranslationFile TagName="script1"> -<![CDATA[using System; + <File name="${Name}.ashx"> +<![CDATA[<%@ WebHandler Language="C#" Class="${Namespace}.${EscapedIdentifier}" %> +using System; using System.Web; namespace ${Namespace} @@ -41,7 +37,6 @@ namespace ${Namespace} } } }]]> - </CodeTranslationFile> - </AspNetFile> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebService-CodeBehind.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebService-CodeBehind.xft.xml index f1411944ac..b4138b2175 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebService-CodeBehind.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebService-CodeBehind.xft.xml @@ -6,22 +6,20 @@ <!-- Template Header --> <TemplateConfiguration> <_Name>Web Service with CodeBehind</_Name> - <_Category>ASP.NET</_Category> + <_Category>ASP.NET Web Forms</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET web service with a CodeBehind class.</_Description> </TemplateConfiguration> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.asmx"> - <FileText> -<![CDATA[<%@ WebService Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %>]]> - </FileText> - </AspNetFile> - - <CodeTranslationFile name="${Name}.asmx.${LanguageExtension}" DependsOn="${Name}.asmx" > + <File name="${Name}.asmx"> +<![CDATA[<%@ WebService Language="C#" Class="${Namespace}.${EscapedIdentifier}" %> +]]> + </File> + <File name="${Name}.asmx.cs" DependsOn="${Name}.asmx" > <![CDATA[using System; using System.Web; using System.Web.Services; @@ -32,7 +30,8 @@ namespace ${Namespace} { } -}]]> - </CodeTranslationFile> +} +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebService-Empty.xft.xml b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebService-Empty.xft.xml index 8a1f4bea5b..15ef51f31a 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Templates/WebService-Empty.xft.xml +++ b/main/src/addins/Web/MonoDevelop.AspNet/Templates/WebForms/WebService-Empty.xft.xml @@ -6,23 +6,18 @@ <!-- Template Header --> <TemplateConfiguration> <_Name>Web Service</_Name> - <_Category>ASP.NET</_Category> + <_Category>ASP.NET Web Forms</_Category> <Icon>md-html-file-icon</Icon> - <LanguageName>*</LanguageName> + <LanguageName>C#</LanguageName> <ProjectType>AspNetApp</ProjectType> <_Description>Creates an ASP.NET web service.</_Description> </TemplateConfiguration> <!-- Template Content --> <TemplateFiles> - <AspNetFile name="${Name}.asmx"> - <FileText> -<![CDATA[<%@ WebService Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %> -${CodeRegion:script1} -]]> - </FileText> - <CodeTranslationFile TagName="script1"> -<![CDATA[using System; + <File name="${Name}.asmx"> +<![CDATA[<%@ WebService Language="C#" Class="${Namespace}.${EscapedIdentifier}" %> +using System; using System.Web.Services; namespace ${Namespace} @@ -30,8 +25,8 @@ namespace ${Namespace} class ${EscapedIdentifier} { } -}]]> - </CodeTranslationFile> - </AspNetFile> +} +]]> + </File> </TemplateFiles> </Template> diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/Test/Test.cs b/main/src/addins/Web/MonoDevelop.AspNet/Test/Test.cs index e69de29bb2..e69de29bb2 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/Test/Test.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/Test/Test.cs diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/DocumentReferenceManager.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs index 1ddfec16b4..73050d2254 100755..100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/DocumentReferenceManager.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs @@ -31,40 +31,35 @@ using System; using System.Collections.Generic; -using System.Globalization; - -using MonoDevelop.Core; -//using MonoDevelop.AspNet.Parser.Dom; -using MonoDevelop.Projects.Text; -using MonoDevelop.Ide.CodeCompletion; -using MonoDevelop.Ide.Gui; using System.IO; using System.Linq; -using Mono.TextEditor; + using ICSharpCode.NRefactory.TypeSystem; +using Mono.TextEditor; +using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.Ide.TypeSystem; using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { - - public class DocumentReferenceManager { public DocumentReferenceManager (AspNetAppProject project) { this.Project = project; - TypeCtx = new WebTypeContext (project); + TypeCtx = new WebFormsTypeContext (project); } - protected IEnumerable<RegisterDirective> RegisteredTags { + protected IEnumerable<WebFormsPageInfo.RegisterDirective> RegisteredTags { get { return Doc.Info.RegisteredTags; } } - public AspNetParsedDocument Doc { get; set; } + public WebFormsParsedDocument Doc { get; set; } public AspNetAppProject Project { get; private set; } - public WebTypeContext TypeCtx { get; private set; } + public WebFormsTypeContext TypeCtx { get; private set; } string DirectoryPath { get { return Path.GetDirectoryName (Doc.FileName); } } @@ -76,7 +71,7 @@ namespace MonoDevelop.AspNet.Parser public string GetTypeName (string tagPrefix, string tagName, string htmlTypeAttribute)
{ if (tagPrefix == null || tagPrefix.Length < 1) - return WebTypeContext.HtmlControlLookup (tagName, htmlTypeAttribute); + return WebFormsTypeContext.HtmlControlLookup (tagName, htmlTypeAttribute); if (0 == string.Compare (tagPrefix, "asp", StringComparison.OrdinalIgnoreCase)) { string systemType = TypeCtx.SystemTypeNameLookup (tagName); @@ -88,18 +83,18 @@ namespace MonoDevelop.AspNet.Parser if (string.Compare (rd.TagPrefix, tagPrefix, StringComparison.OrdinalIgnoreCase) != 0) continue; - var ard = rd as AssemblyRegisterDirective; + var ard = rd as WebFormsPageInfo.AssemblyRegisterDirective; if (ard != null) { var dom = TypeCtx.ResolveAssembly (ard.Assembly); if (dom == null) continue; - string fullName = WebTypeContext.AssemblyTypeNameLookup (dom, ard.Namespace, tagName); + string fullName = WebFormsTypeContext.AssemblyTypeNameLookup (dom, ard.Namespace, tagName); if (fullName != null) return fullName; } - var crd = rd as ControlRegisterDirective; + var crd = rd as WebFormsPageInfo.ControlRegisterDirective; if (crd != null && string.Compare (crd.TagName, tagName, StringComparison.OrdinalIgnoreCase) == 0) { string fullName = TypeCtx.GetUserControlTypeName (crd.Src, Doc.FileName); if (fullName != null) @@ -126,18 +121,18 @@ namespace MonoDevelop.AspNet.Parser if (string.Compare (rd.TagPrefix, tagPrefix, StringComparison.OrdinalIgnoreCase) != 0) continue; - var ard = rd as AssemblyRegisterDirective; + var ard = rd as WebFormsPageInfo.AssemblyRegisterDirective; if (ard != null) { var dom = TypeCtx.ResolveAssembly (ard.Assembly); if (dom != null) { - var type = WebTypeContext.AssemblyTypeLookup (dom, ard.Namespace, tagName); + var type = WebFormsTypeContext.AssemblyTypeLookup (dom, ard.Namespace, tagName); if (type != null) return type; } continue; } - var crd = rd as ControlRegisterDirective; + var crd = rd as WebFormsPageInfo.ControlRegisterDirective; if (crd != null && string.Compare (crd.TagName, tagName, StringComparison.OrdinalIgnoreCase) == 0) { var type = TypeCtx.GetUserControlType (crd.Src, Doc.FileName); if (type != null) @@ -159,21 +154,21 @@ namespace MonoDevelop.AspNet.Parser bool isSWC = baseType.FullName == "System.Web.UI.Control"; string aspPrefix = "asp:"; - foreach (IType cls in WebTypeContext.ListSystemControlClasses (baseType, Project)) + foreach (IType cls in WebFormsTypeContext.ListSystemControlClasses (baseType, Project)) yield return new AspTagCompletionData (aspPrefix, cls); foreach (var rd in RegisteredTags) { if (!rd.IsValid ()) continue; - var ard = rd as AssemblyRegisterDirective; + var ard = rd as WebFormsPageInfo.AssemblyRegisterDirective; if (ard != null) { var dom = TypeCtx.ResolveAssembly (ard.Assembly); if (dom == null) continue; string prefix = ard.TagPrefix + ":"; - foreach (IType cls in WebTypeContext.ListControlClasses (baseType, dom, ard.Namespace)) + foreach (IType cls in WebFormsTypeContext.ListControlClasses (baseType, dom, ard.Namespace)) yield return new AspTagCompletionData (prefix, cls); continue; } @@ -181,7 +176,7 @@ namespace MonoDevelop.AspNet.Parser if (!isSWC) continue; - ControlRegisterDirective cd = rd as ControlRegisterDirective; + var cd = rd as WebFormsPageInfo.ControlRegisterDirective; if (cd != null) { yield return new CompletionData (string.Concat (cd.TagPrefix, ":", cd.TagName), Gtk.Stock.GoForward); @@ -209,18 +204,18 @@ namespace MonoDevelop.AspNet.Parser if (string.Compare (rd.TagPrefix, tagPrefix, StringComparison.OrdinalIgnoreCase) != 0) continue; - AssemblyRegisterDirective ard = rd as AssemblyRegisterDirective; + var ard = rd as WebFormsPageInfo.AssemblyRegisterDirective; if (ard != null) { var dom = TypeCtx.ResolveAssembly (ard.Assembly); if (dom == null) continue; - type = WebTypeContext.AssemblyTypeLookup (dom, ard.Namespace, tagName); + type = WebFormsTypeContext.AssemblyTypeLookup (dom, ard.Namespace, tagName); if (type != null) return type; continue; } - var crd = rd as ControlRegisterDirective; + var crd = rd as WebFormsPageInfo.ControlRegisterDirective; if (crd != null && string.Compare (crd.TagName, tagName, StringComparison.OrdinalIgnoreCase) == 0) { return TypeCtx.GetUserControlType (crd.Src, Doc.FileName); } @@ -238,7 +233,7 @@ namespace MonoDevelop.AspNet.Parser return string.Empty; foreach (var rd in RegisteredTags) { - var ard = rd as AssemblyRegisterDirective; + var ard = rd as WebFormsPageInfo.AssemblyRegisterDirective; if (ard != null && ard.Namespace == control.Namespace) return ard.TagPrefix; } @@ -247,7 +242,7 @@ namespace MonoDevelop.AspNet.Parser return TypeCtx.GetControlPrefix (DirectoryPath, control); } - IEnumerable<RegisterDirective> GetDirectivesForPrefix (string prefix) + IEnumerable<WebFormsPageInfo.RegisterDirective> GetDirectivesForPrefix (string prefix) { return RegisteredTags.Where (t => string.Equals (t.TagPrefix, prefix, StringComparison.OrdinalIgnoreCase)); } @@ -256,7 +251,7 @@ namespace MonoDevelop.AspNet.Parser /// Gets a tag prefix, also returning the directive that would have to be added if necessary. /// </summary> public string GetTagPrefixWithNewDirective (IType control, string assemblyName, string desiredPrefix, - out RegisterDirective directiveNeededToAdd) + out WebFormsPageInfo.RegisterDirective directiveNeededToAdd) { directiveNeededToAdd = null; string existingPrefix = GetTagPrefix (control); @@ -270,7 +265,7 @@ namespace MonoDevelop.AspNet.Parser var an = MonoDevelop.Core.Assemblies.SystemAssemblyService.ParseAssemblyName (assemblyName); - directiveNeededToAdd = new AssemblyRegisterDirective (prefix, control.Namespace, an.Name); + directiveNeededToAdd = new WebFormsPageInfo.AssemblyRegisterDirective (prefix, control.Namespace, an.Name); return prefix; } @@ -342,7 +337,7 @@ namespace MonoDevelop.AspNet.Parser string trial = trialPrefix; for (int trialSuffix = 1; trialSuffix < int.MaxValue; trialSuffix++) { - using (IEnumerator<RegisterDirective> en = GetDirectivesForPrefix (trial).GetEnumerator()) + using (var en = GetDirectivesForPrefix (trial).GetEnumerator()) if (!en.MoveNext ()) return trial; trial = trialPrefix + trialSuffix; @@ -352,11 +347,11 @@ namespace MonoDevelop.AspNet.Parser string ExprToStr (System.CodeDom.CodeExpression expr) { - System.CodeDom.CodePrimitiveExpression p = expr as System.CodeDom.CodePrimitiveExpression; + var p = expr as System.CodeDom.CodePrimitiveExpression; return p != null? p.Value as string : null; } - public void AddRegisterDirective (RegisterDirective directive, TextEditorData editor, bool preserveCaretPosition) + public void AddRegisterDirective (WebFormsPageInfo.RegisterDirective directive, TextEditorData editor, bool preserveCaretPosition) { var node = GetRegisterInsertionPointNode (); if (node == null) @@ -379,12 +374,11 @@ namespace MonoDevelop.AspNet.Parser } } - AspNetDirective GetRegisterInsertionPointNode () + WebFormsDirective GetRegisterInsertionPointNode () { foreach (XNode node in Doc.XDocument.AllDescendentNodes) { - if (node is AspNetDirective) { - AspNetDirective directive = node as AspNetDirective; - + var directive = node as WebFormsDirective; + if (directive != null) { switch (directive.Name.Name.ToLower ()) { case "page": case "control": @@ -392,8 +386,6 @@ namespace MonoDevelop.AspNet.Parser case "register": return directive; } - } else if (node is XElement) { - return null; } } return null; diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs new file mode 100644 index 0000000000..2fb88d9605 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs @@ -0,0 +1,62 @@ +//
+// WebFormsBindingExpression.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.Xml.StateEngine; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + public class WebFormsBindingExpression : WebFormsExpression
+ { + public WebFormsBindingExpression (DomRegion region) : base (region)
+ {
+ } +
+ public WebFormsBindingExpression (TextLocation start) : base (start)
+ {
+ } +
+ protected WebFormsBindingExpression ()
+ {
+ } + + protected override XObject NewInstance ()
+ {
+ return new WebFormsBindingExpression ();
+ } + + public override string ToString ()
+ { + return string.Format ("[WebFormsBindingExpression Location='{0}'", Region); + } + + public override string FriendlyPathRepresentation { + get { return "<%# %>"; } + } + } + +} diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs new file mode 100644 index 0000000000..f87f996b10 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs @@ -0,0 +1,108 @@ +//
+// WebFormsDirective.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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.Diagnostics; +using System.Text; +using ICSharpCode.NRefactory; +using MonoDevelop.Xml.StateEngine; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + public class WebFormsDirective : XNode, IAttributedXObject
+ { + XName name; + XAttributeCollection attributes; + + public WebFormsDirective (TextLocation start) : base (start)
+ { + attributes = new XAttributeCollection (this); + } + + public WebFormsDirective (TextLocation start, XName name) : this (start)
+ { + this.name = name; + } + + protected WebFormsDirective ()
+ { + attributes = new XAttributeCollection (this); + } + + public XAttributeCollection Attributes { + get { return attributes; } + } + + public XName Name { + get { return name; } + set { + Debug.Assert (!IsNamed, "Should not name node more than once."); + name = value; + } + } + + public override bool IsComplete { get { return base.IsComplete && IsNamed; } } +
+ public bool IsNamed { get { return name.IsValid; } } + + protected override XObject NewInstance ()
+ { + return new WebFormsDirective (); + } + + protected override void ShallowCopyFrom (XObject copyFrom)
+ { + base.ShallowCopyFrom (copyFrom); + WebFormsDirective copyFromEl = (WebFormsDirective)copyFrom; + name = copyFromEl.name; //XName is immutable value type + } + + public override string ToString ()
+ { + return string.Format ("[WebFormsDirective Name='{0}' Location='{1}'", name.FullName, Region); + } + + public override void BuildTreeString (StringBuilder builder, int indentLevel)
+ { + builder.Append (' ', indentLevel * 2); + builder.AppendFormat ("[WebFormsDirective Name='{0}' Location='{1}' Children=", name.FullName, Region); + builder.AppendLine (); + + builder.Append (' ', indentLevel * 2); + builder.Append ("Attributes="); + builder.AppendLine (); + + foreach (XAttribute att in Attributes)
+ att.BuildTreeString (builder, indentLevel + 1); + + builder.Append (' ', indentLevel * 2); + builder.AppendLine ("]"); + } + + public override string FriendlyPathRepresentation { + get { return "<%@ " + name.FullName + " %>"; } + } + } +} diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs new file mode 100644 index 0000000000..bc56ca702c --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs @@ -0,0 +1,71 @@ +//
+// WebFormsDomExtensions.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 System.Collections.Generic; +using System.Linq; +using MonoDevelop.Xml.StateEngine; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + public static class WebFormsDomExtensions
+ { + static XName scriptName = new XName ("script"); + static XName runatName = new XName ("runat"); + static XName idName = new XName ("id"); + + public static bool IsRunatServer (this XElement el)
+ { + var val = el.Attributes.GetValue (runatName, true); + return string.Equals (val, "server", StringComparison.OrdinalIgnoreCase); + } + + public static string GetId (this IAttributedXObject el)
+ { + return el.Attributes.GetValue (idName, true); + } + + public static bool IsServerScriptTag (this XElement el)
+ { + return XName.Equals (el.Name, scriptName, true) && IsRunatServer (el); + } + + public static IEnumerable<T> WithName<T> (this IEnumerable<XNode> nodes, XName name, bool ignoreCase)
+ where T : XNode, INamedXObject
+ { + return nodes.OfType<T> ().Where (el => XName.Equals (el.Name, name, ignoreCase)); + } + + public static IEnumerable<string> GetAllPlaceholderIds (this XDocument doc)
+ { + return doc.AllDescendentNodes + .WithName<XElement> (new XName ("asp", "ContentPlaceHolder"), true) + .Where (x => x.IsRunatServer ()) + .Select (x => x.GetId ()) + .Where (id => !string.IsNullOrEmpty (id)); + } + } +} diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs new file mode 100644 index 0000000000..612f76e744 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs @@ -0,0 +1,48 @@ +//
+// WebFormsExpression.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 MonoDevelop.Xml.StateEngine; +using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.NRefactory; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + public abstract class WebFormsExpression : XNode
+ { + protected WebFormsExpression (DomRegion region) : base (region)
+ {
+ } +
+ protected WebFormsExpression (TextLocation start) : base (start)
+ {
+ } +
+ protected WebFormsExpression ()
+ {
+ } + } +} diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs new file mode 100644 index 0000000000..001e4fa448 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs @@ -0,0 +1,63 @@ +//
+// WebFormsHtmlEncodedExpression.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 MonoDevelop.Xml.StateEngine; +using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.NRefactory; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + + public class WebFormsHtmlEncodedExpression : WebFormsExpression
+ { + public WebFormsHtmlEncodedExpression (DomRegion region) : base (region)
+ {
+ } +
+ public WebFormsHtmlEncodedExpression (TextLocation start) : base (start)
+ {
+ } +
+ protected WebFormsHtmlEncodedExpression ()
+ {
+ } + + protected override XObject NewInstance ()
+ {
+ return new WebFormsHtmlEncodedExpression ();
+ } + + public override string ToString ()
+ { + return string.Format ("[WebFormsHtmlEncodedExpression Location='{0}'", Region); + } + + public override string FriendlyPathRepresentation { + get { return "<%: %>"; } + } + } + +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Completion/SimpleLists.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs index af68ac6919..2b09245369 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Completion/SimpleLists.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs @@ -1,8 +1,8 @@ // -// SimpleLists.cs +// WebFormsRenderBlock.cs // // Author: -// Michael Hutchinson <mhutchinson@novell.com> +// Michael Hutchinson <m.j.hutchinson@gmail.com> // // Copyright (C) 2008 Novell, Inc (http://www.novell.com) // @@ -26,32 +26,39 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; -using System.Collections.Generic; -using System.Linq; +using ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.Xml.StateEngine; -using MonoDevelop.Ide.CodeCompletion; - -namespace MonoDevelop.AspNet.Completion +namespace MonoDevelop.AspNet.WebForms.Dom { - - - static class SimpleList + public class WebFormsRenderBlock : XNode { - - public static void AddBoolean (CompletionDataList list, bool defaultValue) + public WebFormsRenderBlock (DomRegion region) : base (region) { - list.Add ("true", "md-literal"); - list.Add ("false", "md-literal"); - list.DefaultCompletionString = defaultValue? "true" : "false"; } - - public static void AddEnum<T> (CompletionDataList list, T defaultValue) + + public WebFormsRenderBlock (TextLocation start) : base (start) + { + } + + protected WebFormsRenderBlock () + { + } + + protected override XObject NewInstance () + { + return new WebFormsRenderBlock (); + } + + public override string ToString () { - foreach (string name in Enum.GetNames (typeof (T))) { - list.Add (name, "md-literal"); - } - list.DefaultCompletionString = defaultValue.ToString (); + return string.Format ("[WebFormsRenderBlock Location='{0}'", Region); + } + + + public override string FriendlyPathRepresentation { + get { return "<% %>"; } } } } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs new file mode 100644 index 0000000000..49e918cfde --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs @@ -0,0 +1,61 @@ +//
+// WebFormsRenderExpression.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 MonoDevelop.Xml.StateEngine; +using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.NRefactory; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + public class WebFormsRenderExpression : WebFormsExpression
+ { + public WebFormsRenderExpression (DomRegion region) : base (region)
+ {
+ } +
+ public WebFormsRenderExpression (TextLocation start) : base (start)
+ {
+ } +
+ protected WebFormsRenderExpression ()
+ {
+ } + + protected override XObject NewInstance ()
+ {
+ return new WebFormsRenderExpression ();
+ } + + public override string ToString ()
+ { + return string.Format ("[WebFormsRenderExpression Location='{0}'", Region); + } + + public override string FriendlyPathRepresentation { + get { return "<%= %>"; } + } + } +} diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs new file mode 100644 index 0000000000..3f719d5ea2 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs @@ -0,0 +1,61 @@ +//
+// WebFormsResourceExpression.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.Xml.StateEngine; + +namespace MonoDevelop.AspNet.WebForms.Dom
+{ + public class WebFormsResourceExpression : WebFormsExpression
+ { + public WebFormsResourceExpression (DomRegion region) : base (region)
+ {
+ } +
+ public WebFormsResourceExpression (TextLocation start) : base (start)
+ {
+ } +
+ protected WebFormsResourceExpression ()
+ {
+ } + + protected override XObject NewInstance ()
+ {
+ return new WebFormsResourceExpression ();
+ } + + public override string ToString ()
+ { + return string.Format ("[WebFormsResourceExpression Location='{0}'", Region); + } + + public override string FriendlyPathRepresentation { + get { return "<%$ %>"; } + } + } +} diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs new file mode 100644 index 0000000000..e81248fa16 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs @@ -0,0 +1,62 @@ +//
+// WebFormsServerComment.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (C) 2008 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 ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.Xml.StateEngine; + +namespace MonoDevelop.AspNet.WebForms.Dom +{ + public class WebFormsServerComment : XNode + { + public WebFormsServerComment (DomRegion region) : base (region)
+ {
+ }
+ + public WebFormsServerComment (TextLocation start) : base (start)
+ {
+ }
+ + protected WebFormsServerComment ()
+ {
+ } + + protected override XObject NewInstance ()
+ {
+ return new WebFormsServerComment ();
+ } + + public override string ToString () + { + return string.Format ("[WebFormsServerComment Location='{0}'", Region); + } + + public override string FriendlyPathRepresentation { + get { return "<%-- --%>"; } + } + } +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/ILanguageCompletionBuilder.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs index 3532335013..ad52e8d8d3 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/ILanguageCompletionBuilder.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs @@ -26,15 +26,16 @@ using System; using System.Collections.Generic; -using MonoDevelop.AspNet.Parser; using S = MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; +using MonoDevelop.AspNet.WebForms.Parser; using Mono.TextEditor; using MonoDevelop.Ide.TypeSystem; using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Ide.CodeCompletion; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.Gui +namespace MonoDevelop.AspNet.WebForms { /// <summary> @@ -86,7 +87,7 @@ namespace MonoDevelop.AspNet.Gui /// </summary> public class DocumentInfo { - public DocumentInfo (ICompilation dom, AspNetParsedDocument aspNetParsedDocument, IEnumerable<string> imports, + public DocumentInfo (ICompilation dom, WebFormsParsedDocument aspNetParsedDocument, IEnumerable<string> imports, IList<ICompilation> references) { this.Dom = dom; @@ -97,7 +98,7 @@ namespace MonoDevelop.AspNet.Gui } public ICompilation Dom { get; private set; } - public AspNetParsedDocument AspNetDocument { get; private set; } + public WebFormsParsedDocument AspNetDocument { get; private set; } public ParsedDocument ParsedDocument { get; set; } public IList<ICompilation> References { get; set; } public IEnumerable<string> Imports { get; private set; } @@ -118,14 +119,14 @@ namespace MonoDevelop.AspNet.Gui } } - static string GetDefaultBaseClass (MonoDevelop.AspNet.WebSubtype type) + static string GetDefaultBaseClass (WebSubtype type) { switch (type) { - case MonoDevelop.AspNet.WebSubtype.WebForm: + case WebSubtype.WebForm: return "System.Web.UI.Page"; - case MonoDevelop.AspNet.WebSubtype.MasterPage: + case WebSubtype.MasterPage: return "System.Web.UI.MasterPage"; - case MonoDevelop.AspNet.WebSubtype.WebControl: + case WebSubtype.WebControl: return "System.Web.UI.UserControl"; } throw new InvalidOperationException (string.Format ("Unexpected filetype '{0}'", type)); @@ -142,7 +143,7 @@ namespace MonoDevelop.AspNet.Gui XScriptBlocks = new List<S.XElement> (); foreach (S.XNode node in AspNetDocument.XDocument.AllDescendentNodes) { - if (node is AspNetRenderExpression || node is AspNetHtmlEncodedExpression || node is AspNetRenderBlock) { + if (node is WebFormsRenderExpression || node is WebFormsHtmlEncodedExpression || node is WebFormsRenderBlock) { XExpressions.Add (node); continue; } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/MasterContentFileDescriptionTemplate.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/MasterContentFileDescriptionTemplate.cs index d30ec450e9..bced906b6d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/MasterContentFileDescriptionTemplate.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/MasterContentFileDescriptionTemplate.cs @@ -26,20 +26,19 @@ using System; using System.Collections.Generic; -using MonoDevelop.AspNet.Gui; -using MonoDevelop.AspNet.Parser; using MonoDevelop.Core; -using MonoDevelop.Projects; using MonoDevelop.Ide.TypeSystem; -using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; -using System.Linq; +using MonoDevelop.Projects; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; +using MonoDevelop.Ide.Templates; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { - public class MasterContentFileDescriptionTemplate : AspNetFileDescriptionTemplate + public class MasterContentFileDescriptionTemplate : SingleFileDescriptionTemplate { - public override void ModifyTags (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, string language, string identifier, string fileName, ref Dictionary<string,string> tags) + public override void ModifyTags (SolutionItem policyParent, Project project, string language, string identifier, string fileName, ref Dictionary<string,string> tags) { base.ModifyTags (policyParent, project, language, identifier, fileName, ref tags); if (fileName == null) @@ -70,7 +69,7 @@ namespace MonoDevelop.AspNet try { var pd = TypeSystemService.ParseFile (project, masterPage.FilePath) - as AspNetParsedDocument; + as WebFormsParsedDocument; if (pd == null) return; diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetAttributeValueState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs index 5c233a7fb4..f484a868b9 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetAttributeValueState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs @@ -28,10 +28,11 @@ using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.WebForms.Parser { - public class AspNetAttributeValueState : XmlAttributeValueState + public class WebFormsAttributeValueState : XmlAttributeValueState { enum AttState { Incoming = 0, @@ -81,12 +82,12 @@ namespace MonoDevelop.AspNet.StateEngine rollback = "<%"; return Parent; } - AspNetExpressionState.AddExpressionNode (c, context); + WebFormsExpressionState.AddExpressionNode (c, context); SetTag (context, AttState.Expression); return null; case AttState.PercentDash: if (c == '-') { - context.Nodes.Push (new AspNetServerComment (context.LocationMinus (4))); + context.Nodes.Push (new WebFormsServerComment (context.LocationMinus (4))); SetTag (context, AttState.Comment); return null; } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs new file mode 100644 index 0000000000..f399058692 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs @@ -0,0 +1,47 @@ +//
+// WebFormsDirectiveAttributeState.cs
+//
+// Author:
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
+// 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 System.Diagnostics; + +using MonoDevelop.Xml.StateEngine; + +namespace MonoDevelop.AspNet.WebForms.Parser +{ + public class WebFormsDirectiveAttributeState : XmlAttributeValueState
+ {
+ public override State PushChar (char c, IParseContext context, ref string rollback)
+ { + // allow < in values
+ if (context.StateTag != '\0' && context.CurrentStateLength > 1 && c == '<') {
+ context.KeywordBuilder.Append (c); + return null;
+ }
+ return base.PushChar (c, context, ref rollback);
+ }
+ } + +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetDirectiveState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs index c4d1c8dd05..6a24098fae 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetDirectiveState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs @@ -30,52 +30,40 @@ using System; using System.Diagnostics; using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.StateEngine -{ - public class AspNetDirectiveAttributeState : XmlAttributeValueState
- {
- public override State PushChar (char c, IParseContext context, ref string rollback)
- { - // allow < in values
- if (context.StateTag != '\0' && context.CurrentStateLength > 1 && c == '<') {
- context.KeywordBuilder.Append (c); - return null;
- }
- return base.PushChar (c, context, ref rollback);
- }
- } - - public class AspNetDirectiveState : State +namespace MonoDevelop.AspNet.WebForms.Parser +{ + public class WebFormsDirectiveState : State { readonly XmlAttributeState AttributeState; readonly XmlNameState NameState; - public AspNetDirectiveState () : this ( + public WebFormsDirectiveState () : this ( new XmlNameState (), - new XmlAttributeState (new XmlNameState (), new AspNetDirectiveAttributeState ()) + new XmlAttributeState (new XmlNameState (), new WebFormsDirectiveAttributeState ()) )
{
} - public AspNetDirectiveState (XmlNameState nameState, XmlAttributeState attributeState) + public WebFormsDirectiveState (XmlNameState nameState, XmlAttributeState attributeState) { this.AttributeState = attributeState; this.NameState = nameState; Adopt (this.AttributeState); Adopt (this.NameState); -
+
} const int ENDING = 1; public override State PushChar (char c, IParseContext context, ref string rollback) { - AspNetDirective directive = context.Nodes.Peek () as AspNetDirective; + var directive = context.Nodes.Peek () as WebFormsDirective; if (directive == null || directive.IsComplete) { - directive = new AspNetDirective (context.LocationMinus (4)); // 4 == <%@ + current char + directive = new WebFormsDirective (context.LocationMinus (4)); // 4 == <%@ + current char context.Nodes.Push (directive); } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetExpressionState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs index 8ba27eb549..b15c6427cf 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetExpressionState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs @@ -26,14 +26,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Diagnostics; using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.WebForms.Parser { - public class AspNetExpressionState : State + public class WebFormsExpressionState : State { const int NONE = 0; const int PERCENT = 1; @@ -75,23 +75,23 @@ namespace MonoDevelop.AspNet.StateEngine switch (c) { //DATABINDING EXPRESSION <%# case '#': - context.Nodes.Push (new AspNetDataBindingExpression (context.LocationMinus (3))); + context.Nodes.Push (new WebFormsBindingExpression (context.LocationMinus (3))); break; //RESOURCE EXPRESSION <%$ case '$': - context.Nodes.Push (new AspNetResourceExpression (context.LocationMinus (3))); + context.Nodes.Push (new WebFormsResourceExpression (context.LocationMinus (3))); break; //RENDER EXPRESSION <%= case '=': - context.Nodes.Push (new AspNetRenderExpression (context.LocationMinus (3))); + context.Nodes.Push (new WebFormsRenderExpression (context.LocationMinus (3))); break; //HTML ENCODED EXPRESSION <%: case ':': - context.Nodes.Push (new AspNetHtmlEncodedExpression (context.LocationMinus (3))); + context.Nodes.Push (new WebFormsHtmlEncodedExpression (context.LocationMinus (3))); break; // RENDER BLOCK default: - context.Nodes.Push (new AspNetRenderBlock (context.LocationMinus (3))); + context.Nodes.Push (new WebFormsRenderBlock (context.LocationMinus (3))); break; } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetFreeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsFreeState.cs index f6aa07cbba..0ebef79065 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetFreeState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsFreeState.cs @@ -26,43 +26,41 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; - using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.Html.Parser; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.WebForms.Parser { - - public class AspNetFreeState : XmlFreeState + public class WebFormsFreeState : XmlFreeState { protected const int BRACKET_PERCENT = MAXCONST + 1; - readonly AspNetExpressionState expressionState; - readonly AspNetDirectiveState directiveState; - readonly AspNetServerCommentState serverCommentState; + readonly WebFormsExpressionState expressionState; + readonly WebFormsDirectiveState directiveState; + readonly WebFormsServerCommentState serverCommentState; - public AspNetFreeState () : this ( - new HtmlTagState (new XmlAttributeState (new XmlNameState (), new AspNetAttributeValueState ())), + public WebFormsFreeState () : this ( + new HtmlTagState (new XmlAttributeState (new XmlNameState (), new WebFormsAttributeValueState ())), new HtmlClosingTagState (true), new XmlCommentState (), new XmlCDataState (), new XmlDocTypeState (), new XmlProcessingInstructionState (), - new AspNetExpressionState (), - new AspNetDirectiveState (), - new AspNetServerCommentState () + new WebFormsExpressionState (), + new WebFormsDirectiveState (), + new WebFormsServerCommentState () ) { } - public AspNetFreeState ( + public WebFormsFreeState ( HtmlTagState tagState, HtmlClosingTagState closingTagState, XmlCommentState commentState, XmlCDataState cDataState, XmlDocTypeState docTypeState, XmlProcessingInstructionState processingInstructionState, - AspNetExpressionState expressionState, - AspNetDirectiveState directiveState, - AspNetServerCommentState serverCommentState + WebFormsExpressionState expressionState, + WebFormsDirectiveState directiveState, + WebFormsServerCommentState serverCommentState ) : base (tagState, closingTagState, commentState, cDataState, docTypeState, processingInstructionState)
{ @@ -75,15 +73,15 @@ namespace MonoDevelop.AspNet.StateEngine Adopt (this.ServerCommentState);
} - protected AspNetExpressionState ExpressionState { + protected WebFormsExpressionState ExpressionState { get { return expressionState; } } - protected AspNetDirectiveState DirectiveState { + protected WebFormsDirectiveState DirectiveState { get { return directiveState; } } - protected AspNetServerCommentState ServerCommentState { + protected WebFormsServerCommentState ServerCommentState { get { return serverCommentState; } }
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetServerCommentState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs index 7df1075e30..f3e655fc51 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/AspNetServerCommentState.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs @@ -29,10 +29,11 @@ using System; using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.StateEngine +namespace MonoDevelop.AspNet.WebForms.Parser { - public class AspNetServerCommentState : XmlCommentState + public class WebFormsServerCommentState : XmlCommentState { const int NOMATCH = 0; @@ -43,7 +44,7 @@ namespace MonoDevelop.AspNet.StateEngine public override State PushChar (char c, IParseContext context, ref string rollback)
{ if (context.CurrentStateLength == 1) { - context.Nodes.Push (new AspNetServerComment (context.LocationMinus (context.CurrentStateLength + "<%--".Length))); + context.Nodes.Push (new WebFormsServerComment (context.LocationMinus (context.CurrentStateLength + "<%--".Length))); } switch (context.StateTag) { @@ -68,7 +69,7 @@ namespace MonoDevelop.AspNet.StateEngine case PERCENT: if (c == '>') { - AspNetServerComment comment = (AspNetServerComment) context.Nodes.Pop (); + var comment = (WebFormsServerComment) context.Nodes.Pop (); comment.End (context.Location); if (context.BuildTree) { XObject ob = context.Nodes.Peek (); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/SuggestedHandlerCompletionData.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/SuggestedHandlerCompletionData.cs index 6776d8a017..1e7d7dca23 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/SuggestedHandlerCompletionData.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/SuggestedHandlerCompletionData.cs @@ -35,14 +35,14 @@ using MonoDevelop.DesignerSupport; using ICSharpCode.NRefactory.TypeSystem; using System.Linq; -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { - public class SuggestedHandlerCompletionData : CompletionData + class SuggestedHandlerCompletionData : CompletionData { - Project project; - CodeMemberMethod methodInfo; - IType codeBehindClass; - IUnresolvedTypeDefinition codeBehindClassPart; + readonly Project project; + readonly CodeMemberMethod methodInfo; + readonly IType codeBehindClass; + readonly IUnresolvedTypeDefinition codeBehindClassPart; public SuggestedHandlerCompletionData (Project project, CodeMemberMethod methodInfo, IType codeBehindClass, IUnresolvedTypeDefinition codeBehindClassPart) { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs index 64206272b0..4598da3537 100755..100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs @@ -30,23 +30,21 @@ // using System; -using System.Linq; -using System.IO; -using System.Collections; +using System.CodeDom; using System.Collections.Generic; +using System.Linq; +using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Core; -using MonoDevelop.Projects; using MonoDevelop.DesignerSupport; - -using MonoDevelop.AspNet.Parser; -using System.CodeDom; -using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Ide.TypeSystem; +using MonoDevelop.Projects; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { - public static class CodeBehind + static class WebFormsCodeBehind { public static string GetCodeBehindClassName (ProjectFile file) { @@ -77,7 +75,7 @@ namespace MonoDevelop.AspNet var result = new BuildResult (); //parse the ASP.NET file - var parsedDocument = TypeSystemService.ParseFile (project, file.FilePath) as AspNetParsedDocument; + var parsedDocument = TypeSystemService.ParseFile (project, file.FilePath) as WebFormsParsedDocument; if (parsedDocument == null) { result.AddError (string.Format ("Failed to parse file '{0}'", file.Name)); return result; @@ -107,7 +105,7 @@ namespace MonoDevelop.AspNet public static BuildResult GenerateCodeBehind ( AspNetAppProject project, string filename, - AspNetParsedDocument document, + WebFormsParsedDocument document, out CodeCompileUnit ccu) { ccu = null; @@ -121,7 +119,7 @@ namespace MonoDevelop.AspNet return result; var refman = new DocumentReferenceManager (project) { Doc = document }; - var memberList = new MemberListBuilder (refman, document.XDocument); + var memberList = new WebFormsMemberListBuilder (refman, document.XDocument); memberList.Build (); AddErrorsToResult (result, filename, memberList.Errors); @@ -153,9 +151,9 @@ namespace MonoDevelop.AspNet } else if (!String.IsNullOrEmpty (document.Info.MasterPageTypeVPath)) { try { ProjectFile resolvedMaster = project.ResolveVirtualPath (document.Info.MasterPageTypeVPath, document.FileName); - AspNetParsedDocument masterParsedDocument = null; + WebFormsParsedDocument masterParsedDocument = null; if (resolvedMaster != null) - masterParsedDocument = TypeSystemService.ParseFile (project, resolvedMaster.FilePath) as AspNetParsedDocument; + masterParsedDocument = TypeSystemService.ParseFile (project, resolvedMaster.FilePath) as WebFormsParsedDocument; if (masterParsedDocument != null && !String.IsNullOrEmpty (masterParsedDocument.Info.InheritedClass)) masterTypeName = masterParsedDocument.Info.InheritedClass; } catch (Exception ex) { @@ -204,8 +202,6 @@ namespace MonoDevelop.AspNet /// <param name="members">Full list of CodeBehind members</param> /// <param name="cls">The class to which these members' partial class will be added.</param> /// <param name="designerFile">Members in this file will be ignored.</param> - /// <param name="resolveDom">The ITypeResolveContext to use for resolving base types.</param> - /// <param name="internalDom">The ITypeResolveContext to use for checking whether members are accessible as internal.</param> /// <returns>The filtered list of non-conflicting members.</returns> // TODO: check compatibilty with existing members public static IEnumerable<CodeBehindMember> GetDesignerMembers ( @@ -222,7 +218,7 @@ namespace MonoDevelop.AspNet continue; existingMembers.Add (member.Name); } - if (!cls.DirectBaseTypes.Any (t => t.Kind != TypeKind.Interface)) + if (cls.DirectBaseTypes.All (t => t.Kind == TypeKind.Interface)) break; cls = cls.DirectBaseTypes.First(t => t.Kind != TypeKind.Interface); } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehindTypeNameCache.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehindTypeNameCache.cs new file mode 100644 index 0000000000..15b1bd77e7 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehindTypeNameCache.cs @@ -0,0 +1,62 @@ +//
+// CodeBehindTypeNameCache.cs
+//
+// Author:
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
+// 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 System.IO; +using MonoDevelop.Core; + +using MonoDevelop.Ide.TypeSystem; +using MonoDevelop.Ide; +using MonoDevelop.AspNet.WebForms.Parser; +using MonoDevelop.AspNet.WebForms;
+using MonoDevelop.AspNet.Projects; + +namespace MonoDevelop.AspNet.WebForms +{ + class WebFormsCodeBehindTypeNameCache : ProjectFileCache<AspNetAppProject,string> + { + public WebFormsCodeBehindTypeNameCache (AspNetAppProject proj) : base (proj) + { + } + + protected override string GenerateInfo (string filename) + { + try { + var doc = TypeSystemService.ParseFile (filename, DesktopService.GetMimeTypeForUri (filename), File.ReadAllText (filename)) as WebFormsParsedDocument; + if (doc != null && !string.IsNullOrEmpty (doc.Info.InheritedClass)) + return doc.Info.InheritedClass; + } catch (Exception ex) { + LoggingService.LogError ("Error reading codebehind name for file '" + filename + "'", ex); + } + return null; + } + + public string GetCodeBehindTypeName (string fileName) + { + return Get (fileName); + } + } +} diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/Directive.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsDirectiveCompletion.cs index c35dd52786..54839d53ae 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/Directive.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsDirectiveCompletion.cs @@ -34,16 +34,28 @@ using System.Text; using System.Web.UI; using MonoDevelop.Core; -using MonoDevelop.Ide.Gui.Content; -using MonoDevelop.Projects; using MonoDevelop.Ide.CodeCompletion; +using MonoDevelop.AspNet.Projects; -using MonoDevelop.AspNet.Completion; - -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { - static class DirectiveCompletion + static class WebFormsDirectiveCompletion { + static void AddBoolean (CompletionDataList list, bool defaultValue) + { + list.Add ("true", "md-literal"); + list.Add ("false", "md-literal"); + list.DefaultCompletionString = defaultValue? "true" : "false"; + } + + static void AddEnum<T> (CompletionDataList list, T defaultValue) + { + foreach (string name in Enum.GetNames (typeof (T))) { + list.Add (name, "md-literal"); + } + list.DefaultCompletionString = defaultValue.ToString (); + } + // // NOTE: MS' documentation for directives is at http://msdn.microsoft.com/en-us/library/t8syafc7.aspx // @@ -203,7 +215,7 @@ namespace MonoDevelop.AspNet.Parser case "smartnavigation": case "strict": //VB ONLY case "trace": - SimpleList.AddBoolean (list, false); + AddBoolean (list, false); break; // @@ -218,7 +230,7 @@ namespace MonoDevelop.AspNet.Parser case "enableviewstatemac": case "validaterequest": //enabled in machine.config case "debug": - SimpleList.AddBoolean (list, true); + AddBoolean (list, true); break; // @@ -230,7 +242,7 @@ namespace MonoDevelop.AspNet.Parser break; case "compilationmode": - SimpleList.AddEnum (list, System.Web.UI.CompilationMode.Always); + AddEnum (list, System.Web.UI.CompilationMode.Always); break; case "culture": @@ -265,7 +277,7 @@ namespace MonoDevelop.AspNet.Parser break; case "viewstateencryptionmode": - SimpleList.AddEnum (list, ViewStateEncryptionMode.Auto); + AddEnum (list, ViewStateEncryptionMode.Auto); break; case "warninglevel": @@ -275,7 +287,7 @@ namespace MonoDevelop.AspNet.Parser case "masterpagefile": return project != null - ? MonoDevelop.Html.PathCompletion.GetPathCompletion (project, "*.master", fromFile, + ? MonoDevelop.AspNet.Html.HtmlPathCompletion.GetPathCompletion (project, "*.master", fromFile, x => "~/" + x.ProjectVirtualPath.ToString ().Replace (System.IO.Path.PathSeparator, '/')) : null; @@ -339,7 +351,7 @@ namespace MonoDevelop.AspNet.Parser switch (attribute.ToLowerInvariant ()) { case "src": return project != null - ? MonoDevelop.Html.PathCompletion.GetPathCompletion (project, "*.ascx", fromFile, + ? MonoDevelop.AspNet.Html.HtmlPathCompletion.GetPathCompletion (project, "*.ascx", fromFile, x => "~/" + x.ProjectVirtualPath.ToString ().Replace (System.IO.Path.PathSeparator, '/')) : null; } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs index 325e9305d1..d3d41ab2e0 100755..100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs @@ -27,32 +27,33 @@ // using System; -using System.Linq; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; +using System.Text.RegularExpressions; + +using ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Core; +using MonoDevelop.DesignerSupport; using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.Ide.Gui.Content; - -using MonoDevelop.AspNet; -using MonoDevelop.AspNet.Parser; -using MonoDevelop.DesignerSupport; - -using S = MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; -using System.Text.RegularExpressions; -using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Ide.TypeSystem; -using ICSharpCode.NRefactory; +using MonoDevelop.AspNet.Html; +using MonoDevelop.AspNet.Html.Parser; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; +using S = MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.Gui +namespace MonoDevelop.AspNet.WebForms { - public class AspNetEditorExtension : BaseHtmlEditorExtension + public class WebFormsEditorExtension : BaseHtmlEditorExtension { static readonly Regex DocTypeRegex = new Regex (@"(?:PUBLIC|public)\s+""(?<fpi>[^""]*)""\s+""(?<uri>[^""]*)"""); - AspNetParsedDocument aspDoc; + WebFormsParsedDocument aspDoc; AspNetAppProject project; DocumentReferenceManager refman; @@ -69,7 +70,7 @@ namespace MonoDevelop.AspNet.Gui protected override S.RootState CreateRootState () { - return new AspNetFreeState (); + return new WebFormsFreeState (); } #endregion @@ -77,7 +78,7 @@ namespace MonoDevelop.AspNet.Gui protected override void OnParsedDocumentUpdated () { base.OnParsedDocumentUpdated (); - aspDoc = CU as AspNetParsedDocument; + aspDoc = CU as WebFormsParsedDocument; var newProj = base.Document.Project as AspNetAppProject; if (newProj == null) @@ -103,12 +104,12 @@ namespace MonoDevelop.AspNet.Gui static IUnresolvedTypeDefinition CreateCodeBesideClass (DocumentInfo info, DocumentReferenceManager refman) { - var memberList = new MemberListBuilder (refman, info.AspNetDocument.XDocument); + var memberList = new WebFormsMemberListBuilder (refman, info.AspNetDocument.XDocument); memberList.Build (); var t = new ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultUnresolvedTypeDefinition (info.ClassName); var dom = refman.TypeCtx.Compilation; var baseType = ReflectionHelper.ParseReflectionName (info.BaseType).Resolve (dom); - foreach (var m in CodeBehind.GetDesignerMembers (memberList.Members.Values, baseType, null)) { + foreach (var m in WebFormsCodeBehind.GetDesignerMembers (memberList.Members.Values, baseType, null)) { t.Members.Add (new ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultUnresolvedField (t, m.Name) { Accessibility = Accessibility.Protected, ReturnType = m.Type.ToTypeReference () @@ -127,27 +128,27 @@ namespace MonoDevelop.AspNet.Gui //directive names - if (Tracker.Engine.CurrentState is AspNetDirectiveState) { - var directive = Tracker.Engine.Nodes.Peek () as AspNetDirective; + if (Tracker.Engine.CurrentState is WebFormsDirectiveState) { + var directive = Tracker.Engine.Nodes.Peek () as WebFormsDirective; if (HasDoc && directive != null && directive.Region.BeginLine == completionContext.TriggerLine && directive.Region.BeginColumn + 3 == completionContext.TriggerLineOffset) { - return DirectiveCompletion.GetDirectives (aspDoc.Type); + return WebFormsDirectiveCompletion.GetDirectives (aspDoc.Type); } return null; } - if (Tracker.Engine.CurrentState is S.XmlNameState && Tracker.Engine.CurrentState.Parent is AspNetDirectiveState) { - var directive = Tracker.Engine.Nodes.Peek () as AspNetDirective; + if (Tracker.Engine.CurrentState is S.XmlNameState && Tracker.Engine.CurrentState.Parent is WebFormsDirectiveState) { + var directive = Tracker.Engine.Nodes.Peek () as WebFormsDirective; if (HasDoc && directive != null && directive.Region.BeginLine == completionContext.TriggerLine && directive.Region.BeginColumn + 4 == completionContext.TriggerLineOffset && char.IsLetter (currentChar)) { triggerWordLength = 1; - return DirectiveCompletion.GetDirectives (aspDoc.Type); + return WebFormsDirectiveCompletion.GetDirectives (aspDoc.Type); } return null; } - bool isAspExprState = Tracker.Engine.CurrentState is AspNetExpressionState; + bool isAspExprState = Tracker.Engine.CurrentState is WebFormsExpressionState; //non-xml tag completion if (currentChar == '<' && !(isAspExprState || Tracker.Engine.CurrentState is S.XmlFreeState)) { @@ -233,7 +234,7 @@ namespace MonoDevelop.AspNet.Gui { //completion for ASP.NET expressions // TODO: Detect <script> state here !!! - if (documentBuilder != null && Tracker.Engine.CurrentState is AspNetExpressionState) { + if (documentBuilder != null && Tracker.Engine.CurrentState is WebFormsExpressionState) { InitializeCodeCompletion ('\0'); return documentBuilder.HandlePopupCompletion (defaultDocument, documentInfo, localDocumentInfo); } @@ -260,7 +261,7 @@ namespace MonoDevelop.AspNet.Gui if (file == null) return; - var designerFile = CodeBehind.GetDesignerFile (file); + var designerFile = WebFormsCodeBehind.GetDesignerFile (file); if (designerFile == null) return; @@ -269,7 +270,7 @@ namespace MonoDevelop.AspNet.Gui GettextCatalog.GetString ("Updating ASP.NET Designer File..."), null, false)) { var writer = CodeBehindWriter.CreateForProject (monitor, project); - var result = CodeBehind.UpdateDesignerFile (writer, project, file, designerFile); + var result = WebFormsCodeBehind.UpdateDesignerFile (writer, project, file, designerFile); //don't worry about reporting error's here for now //if the user wants to see errors, they can compile if (!result.Failed) @@ -290,7 +291,7 @@ namespace MonoDevelop.AspNet.Gui public override bool KeyPress (Gdk.Key key, char keyChar, Gdk.ModifierType modifier) { Tracker.UpdateEngine (); - bool isAspExprState = Tracker.Engine.CurrentState is AspNetExpressionState; + bool isAspExprState = Tracker.Engine.CurrentState is WebFormsExpressionState; if (documentBuilder == null || !isAspExprState) return base.KeyPress (key, keyChar, modifier); InitializeCodeCompletion ('\0'); @@ -354,7 +355,7 @@ namespace MonoDevelop.AspNet.Gui AddAspBeginExpressions (list); string aspPrefix = "asp:"; var type = ReflectionHelper.ParseReflectionName ("System.Web.UI.Control").Resolve (TypeSystemService.GetCompilation (project)); - foreach (var cls in WebTypeContext.ListSystemControlClasses (type, project)) + foreach (var cls in WebFormsTypeContext.ListSystemControlClasses (type, project)) list.Add (new AspTagCompletionData (aspPrefix, cls)); base.GetElementCompletions (list); @@ -504,8 +505,8 @@ namespace MonoDevelop.AspNet.Gui AddAspAttributeCompletionData (list, attributedOb.Name, existingAtts); } - } else if (attributedOb is AspNetDirective) { - return DirectiveCompletion.GetAttributes (project, attributedOb.Name.FullName, existingAtts); + } else if (attributedOb is WebFormsDirective) { + return WebFormsDirectiveCompletion.GetAttributes (project, attributedOb.Name.FullName, existingAtts); } return list.Count > 0? list : null; } @@ -520,8 +521,8 @@ namespace MonoDevelop.AspNet.Gui id = null; AddAspAttributeValueCompletionData (list, ob.Name, att.Name, id); } - } else if (ob is AspNetDirective) { - return DirectiveCompletion.GetAttributeValues (project, Document.FileName, ob.Name.FullName, att.Name.FullName); + } else if (ob is WebFormsDirective) { + return WebFormsDirectiveCompletion.GetAttributeValues (project, Document.FileName, ob.Name.FullName, att.Name.FullName); } return list.Count > 0? list : null; } @@ -530,9 +531,9 @@ namespace MonoDevelop.AspNet.Gui get { return project.TargetFramework.ClrVersion; } } - CompletionDataList HandleExpressionCompletion (AspNetExpression expr) + CompletionDataList HandleExpressionCompletion (WebFormsExpression expr) { - if (!(expr is AspNetDataBindingExpression || expr is AspNetRenderExpression)) + if (!(expr is WebFormsBindingExpression || expr is WebFormsRenderExpression)) return null; IType codeBehindClass; ICompilation projectDatabase; @@ -637,7 +638,7 @@ namespace MonoDevelop.AspNet.Gui if (controlClass == null) { LoggingService.LogWarning ("Could not obtain IType for {0}", tagName.FullName); - var database = WebTypeContext.GetSystemWebDom (project); + var database = WebFormsTypeContext.GetSystemWebDom (project); controlClass = ReflectionHelper.ParseReflectionName ("System.Web.UI.WebControls.WebControl").Resolve (database); if (controlClass == null) { @@ -689,7 +690,7 @@ namespace MonoDevelop.AspNet.Gui } if (projectDatabase == null) { - projectDatabase = WebTypeContext.GetSystemWebDom (project); + projectDatabase = WebFormsTypeContext.GetSystemWebDom (project); if (projectDatabase == null) { LoggingService.LogWarning ("Could not obtain type database in AddAspAttributeCompletionData"); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListBuilder.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs index 9df010d6dd..f2cb166c88 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListBuilder.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs @@ -32,26 +32,29 @@ using System; using System.Collections.Generic; +using System.Linq; -using MonoDevelop.Core; -using ICSharpCode.NRefactory.TypeSystem; using ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; + +using MonoDevelop.Core; using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; -using System.Linq; +using MonoDevelop.AspNet.WebForms; +using MonoDevelop.AspNet.WebForms.Parser; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { //purpose is to find all named tags for code completion and compilation of base class - public class MemberListBuilder + class WebFormsMemberListBuilder { - DocumentReferenceManager docRefMan; + readonly DocumentReferenceManager docRefMan; XDocument xDocument; public IDictionary<string,CodeBehindMember> Members { get; private set; } public IList<Error> Errors { get; private set; } - public MemberListBuilder (DocumentReferenceManager refMan, XDocument xDoc) + public WebFormsMemberListBuilder (DocumentReferenceManager refMan, XDocument xDoc) { docRefMan = refMan; xDocument = xDoc; @@ -66,7 +69,7 @@ namespace MonoDevelop.AspNet.Parser foreach (XElement el in xDocument.Nodes.OfType<XElement> ()) AddMember (el); } catch (Exception ex) { - Errors.Add (new Error (ErrorType.Error, "Unknown parser error: " + ex.ToString ())); + Errors.Add (new Error (ErrorType.Error, "Unknown parser error: " + ex)); } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/PageInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs index a35fc72f73..cad19601bf 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/PageInfo.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs @@ -30,18 +30,15 @@ using System; using System.Collections.Generic; using ICSharpCode.NRefactory.TypeSystem; -using MonoDevelop.AspNet.StateEngine; +using MonoDevelop.AspNet.WebForms.Parser; using MonoDevelop.Xml.StateEngine; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Dom; -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { - - public class PageInfo + public class WebFormsPageInfo { - public PageInfo () - { - } - List<RegisterDirective> registeredTags = new List<RegisterDirective> (); List<string> imports = new List<string> (); List<string> implements = new List<string> (); @@ -67,8 +64,8 @@ namespace MonoDevelop.AspNet.Parser public void Populate (XDocument xDoc, List<Error> errors) { foreach (XNode node in xDoc.AllDescendentNodes) { - if (node is AspNetDirective) { - HandleDirective (node as AspNetDirective, errors); + if (node is WebFormsDirective) { + HandleDirective (node as WebFormsDirective, errors); } else if (node is XDocType) { HandleDocType (node as XDocType); } else if (node is XElement) { @@ -83,7 +80,7 @@ namespace MonoDevelop.AspNet.Parser return attributes.GetValue (new XName (key), true) ?? string.Empty; } - void HandleDirective (AspNetDirective directive, List<Error> errors) + void HandleDirective (WebFormsDirective directive, List<Error> errors) { switch (directive.Name.Name.ToLowerInvariant ()) { case "page": @@ -176,7 +173,7 @@ namespace MonoDevelop.AspNet.Parser } } - void SetSubtype (WebSubtype type, AspNetDirective directive, List<Error> errors) + void SetSubtype (WebSubtype type, WebFormsDirective directive, List<Error> errors) { if (Subtype != WebSubtype.None) { errors.Add (new Error (ErrorType.Error, "Unexpected directive " + directive.Name.FullName, directive.Region)); @@ -204,93 +201,92 @@ namespace MonoDevelop.AspNet.Parser } #endregion - } - - public abstract class RegisterDirective - { - public RegisterDirective (string tagPrefix) - { - this.TagPrefix = tagPrefix; - } - - public string TagPrefix { get; private set; } - - public virtual bool IsValid () + + public abstract class RegisterDirective { - if (string.IsNullOrEmpty (TagPrefix)) - return false; - - foreach (char c in TagPrefix) - if (!Char.IsLetterOrDigit (c)) + public RegisterDirective (string tagPrefix) + { + this.TagPrefix = tagPrefix; + } + + public string TagPrefix { get; private set; } + + public virtual bool IsValid () + { + if (string.IsNullOrEmpty (TagPrefix)) return false; - - return true; - } - } - - public class AssemblyRegisterDirective : RegisterDirective - { - public AssemblyRegisterDirective (string tagPrefix, string @namespace, string assembly) : base (tagPrefix) - { - this.Namespace = @namespace; - this.Assembly = assembly; - } - - public string Namespace { get; private set; } - public string Assembly { get; private set; } - - public override string ToString () - { - return String.Format ("<%@ Register TagPrefix=\"{0}\" Namespace=\"{1}\" Assembly=\"{2}\" %>", TagPrefix, Namespace, Assembly); - } - - public override bool IsValid () - { - if (string.IsNullOrEmpty (Assembly) || string.IsNullOrEmpty (Namespace) || !base.IsValid ()) - return false; - return true; + + foreach (char c in TagPrefix) + if (!Char.IsLetterOrDigit (c)) + return false; + + return true; + } } - } - - public class ControlRegisterDirective : RegisterDirective - { - public ControlRegisterDirective (string tagPrefix, string tagName, string src) : base (tagPrefix) + + public class AssemblyRegisterDirective : RegisterDirective { - this.TagName = tagName; - this.Src = src; - } - - public string TagName { get; private set; } - public string Src { get; private set; } - - public override string ToString () - { - return String.Format ("<%@ Register {0}=\"{1}\" {2}=\"{3}\" {4}=\"{5}\" %>", "TagPrefix", TagPrefix, "TagName", TagName, "Src", Src); + public AssemblyRegisterDirective (string tagPrefix, string @namespace, string assembly) : base (tagPrefix) + { + this.Namespace = @namespace; + this.Assembly = assembly; + } + + public string Namespace { get; private set; } + public string Assembly { get; private set; } + + public override string ToString () + { + return String.Format ("<%@ Register TagPrefix=\"{0}\" Namespace=\"{1}\" Assembly=\"{2}\" %>", TagPrefix, Namespace, Assembly); + } + + public override bool IsValid () + { + if (string.IsNullOrEmpty (Assembly) || string.IsNullOrEmpty (Namespace) || !base.IsValid ()) + return false; + return true; + } } - - public override bool IsValid () + + public class ControlRegisterDirective : RegisterDirective { - if (string.IsNullOrEmpty (TagName) || string.IsNullOrEmpty (Src) || !base.IsValid ()) - return false; - return true; + public ControlRegisterDirective (string tagPrefix, string tagName, string src) : base (tagPrefix) + { + this.TagName = tagName; + this.Src = src; + } + + public string TagName { get; private set; } + public string Src { get; private set; } + + public override string ToString () + { + return String.Format ("<%@ Register {0}=\"{1}\" {2}=\"{3}\" {4}=\"{5}\" %>", "TagPrefix", TagPrefix, "TagName", TagName, "Src", Src); + } + + public override bool IsValid () + { + if (string.IsNullOrEmpty (TagName) || string.IsNullOrEmpty (Src) || !base.IsValid ()) + return false; + return true; + } } - } - - public class AssemblyDirective - { - public AssemblyDirective (string name, string src) - { - this.Name = name; - this.Src = src; - } - - public string Name { get; private set; } - public string Src { get; private set; } - - public bool IsValid () - { - return string.IsNullOrEmpty (Name) ^ string.IsNullOrEmpty (Src); + + public class AssemblyDirective + { + public AssemblyDirective (string name, string src) + { + this.Name = name; + this.Src = src; + } + + public string Name { get; private set; } + public string Src { get; private set; } + + public bool IsValid () + { + return string.IsNullOrEmpty (Name) ^ string.IsNullOrEmpty (Src); + } } } - } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParsedDocument.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs index 9ed7baf748..d767a40716 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParsedDocument.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs @@ -29,17 +29,19 @@ using System; using System.Collections.Generic; +using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Ide.TypeSystem; using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; -using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Dom; +using MonoDevelop.AspNet.WebForms.Parser; -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { - public class AspNetParsedDocument : XmlParsedDocument + public class WebFormsParsedDocument : XmlParsedDocument { // Constructor used for testing the XDOM - public AspNetParsedDocument (string fileName, WebSubtype type, PageInfo info, XDocument xDoc) : + public WebFormsParsedDocument (string fileName, WebSubtype type, WebFormsPageInfo info, XDocument xDoc) : base (fileName) { Flags |= ParsedDocumentFlags.NonSerializable; @@ -48,7 +50,7 @@ namespace MonoDevelop.AspNet.Parser XDocument = xDoc; } - public PageInfo Info { get; private set; } + public WebFormsPageInfo Info { get; private set; } public WebSubtype Type { get; private set; } public override IEnumerable<FoldingRegion> Foldings { @@ -88,7 +90,7 @@ namespace MonoDevelop.AspNet.Parser } continue; } - if (node is XComment || node is AspNetServerComment || node is AspNetDirective || node is AspNetExpression || node is AspNetRenderBlock) { + if (node is XComment || node is WebFormsServerComment || node is WebFormsDirective || node is WebFormsExpression || node is WebFormsRenderBlock) { if ((node.Region.EndLine - node.Region.BeginLine) > 2) yield return new FoldingRegion (node.FriendlyPathRepresentation, node.Region); continue; diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs index fd5903eed7..94633356ae 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParser.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs @@ -27,27 +27,28 @@ // using System; +using System.Collections.Generic; using System.IO; -using System.Collections.Generic; +using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Core; using MonoDevelop.Ide.TypeSystem; -using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Projects; using MonoDevelop.Xml.StateEngine; -using MonoDevelop.AspNet.StateEngine; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; -namespace MonoDevelop.AspNet.Parser +namespace MonoDevelop.AspNet.WebForms { - public class AspNetParser : TypeSystemParser + public class WebFormsParser : TypeSystemParser { public override ParsedDocument Parse (bool storeAst, string fileName, TextReader tr, Project project = null) { - var info = new PageInfo (); + var info = new WebFormsPageInfo (); var errors = new List<Error> (); Xml.StateEngine.Parser parser = new Xml.StateEngine.Parser ( - new AspNetFreeState (), + new WebFormsFreeState (), true ); @@ -75,7 +76,7 @@ namespace MonoDevelop.AspNet.Parser } } - var result = new AspNetParsedDocument (fileName, type, info, xDoc); + var result = new WebFormsParsedDocument (fileName, type, info, xDoc); result.Add (errors); return result; diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/RegistrationCache.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsRegistrationCache.cs index 51f04209f2..bce2ad28f5 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/RegistrationCache.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsRegistrationCache.cs @@ -28,21 +28,21 @@ using System; using System.Collections.Generic; -using System.IO; using System.Xml; using System.Xml.Linq; using System.Linq; + using MonoDevelop.Core; using MonoDevelop.Projects; +using MonoDevelop.AspNet.Projects; -namespace MonoDevelop.AspNet -{ - - class RegistrationCache : ProjectFileCache<AspNetAppProject,RegistrationInfo> +namespace MonoDevelop.AspNet.WebForms +{ + class WebFormsRegistrationCache : ProjectFileCache<AspNetAppProject,RegistrationInfo> { RegistrationInfo machineRegistrationInfo; - public RegistrationCache (AspNetAppProject project) : base (project) + public WebFormsRegistrationCache (AspNetAppProject project) : base (project) { machineRegistrationInfo = GetMachineInfo (); } @@ -265,8 +265,7 @@ namespace MonoDevelop.AspNet /// When a project file with that name is cached in any way, the cache item will be flushed. /// </summary> /// <remarks>Not safe for multithreaded access.</remarks> - abstract class ProjectFileCache<T,U> : IDisposable - where T : MonoDevelop.Projects.Project + abstract class ProjectFileCache<T,U> : IDisposable where T : Project { protected T Project { get; private set; } @@ -274,7 +273,7 @@ namespace MonoDevelop.AspNet /// <summary>Creates a ProjectFileCache</summary> /// <param name="project">The project the cache is bound to</param> - public ProjectFileCache (T project) + protected ProjectFileCache (T project) { this.Project = project; cache = new Dictionary<string, U> (); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetSyntaxMode.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsSyntaxMode.cs index 39b95db634..fb7261cf2a 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetSyntaxMode.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsSyntaxMode.cs @@ -24,22 +24,20 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; -using System.Linq; -using Mono.TextEditor.Highlighting; using System.Collections.Generic; -using Mono.TextEditor; -using System.Xml; +using System.Linq; using System.Text; -using MonoDevelop.AspNet.Parser; +using Mono.TextEditor; +using Mono.TextEditor.Highlighting; +using MonoDevelop.AspNet.WebForms.Parser; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { - public class AspNetSyntaxMode : Mono.TextEditor.Highlighting.SyntaxMode + public class WebFormsSyntaxMode : SyntaxMode { // SyntaxMode charpMode; - public AspNetSyntaxMode () + public WebFormsSyntaxMode () { var provider = new ResourceStreamProvider (typeof(ResourceStreamProvider).Assembly, "AspNetSyntaxMode.xml"); using (var reader = provider.Open ()) { @@ -108,7 +106,7 @@ namespace MonoDevelop.AspNet { var ideDocument = doc.Tag as MonoDevelop.Ide.Gui.Document; if (ideDocument != null && ideDocument.ParsedDocument != null) { - var parsedDocument = ideDocument.ParsedDocument as AspNetParsedDocument; + var parsedDocument = ideDocument.ParsedDocument as WebFormsParsedDocument; if (parsedDocument != null) return GetMimeForLanguage (parsedDocument.Info.Language) ?? "text/x-csharp"; } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetToolboxLoader.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsToolboxLoader.cs index b593cb6145..828e6600d0 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetToolboxLoader.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsToolboxLoader.cs @@ -28,7 +28,6 @@ using System; using System.ComponentModel; -using System.Collections.Generic; using System.Drawing.Design; using MonoDevelop.DesignerSupport.Toolbox; @@ -36,18 +35,15 @@ using MonoDevelop.Core.Assemblies; using MonoDevelop.Core; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { - - - public class AspNetToolboxLoader : ToolboxItemToolboxLoader + public class WebFormsToolboxLoader : ToolboxItemToolboxLoader { - public override ItemToolboxNode GetNode (Type t, ToolboxItemAttribute tba, - string attributeCategory, string fullPath, MonoDevelop.Core.ClrVersion referencedRuntime) + string attributeCategory, string fullPath, ClrVersion referencedRuntime) { - if (referencedRuntime != MonoDevelop.Core.ClrVersion.Net_1_1 - && referencedRuntime != MonoDevelop.Core.ClrVersion.Net_2_0) + if (referencedRuntime != ClrVersion.Net_1_1 + && referencedRuntime != ClrVersion.Net_2_0) return null; bool reflectedRuntime1; @@ -68,7 +64,7 @@ namespace MonoDevelop.AspNet //Create the ToolboxItem. The ToolboxItemToolboxNode will destroy it, but need to //be able to extract data from it first. ToolboxItem item = (ToolboxItem) Activator.CreateInstance (toolboxItemType, new object[] {t}); - AspNetToolboxNode node = new AspNetToolboxNode (item); + WebFormsToolboxNode node = new WebFormsToolboxNode (item); //get the default markup for the tag string webText = reflectedRuntime1? GetWebText1 (t) : GetWebText (t); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetToolboxNode.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsToolboxNode.cs index c51107803d..07c99bcce0 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetToolboxNode.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsToolboxNode.cs @@ -30,20 +30,20 @@ using System; using System.ComponentModel; using System.Drawing.Design; +using ICSharpCode.NRefactory.TypeSystem; using MonoDevelop.Core; -using MonoDevelop.DesignerSupport.Toolbox; -using MonoDevelop.Core.Serialization; using MonoDevelop.Core.Assemblies; -using MonoDevelop.Ide; -using MonoDevelop.AspNet.Parser; +using MonoDevelop.Core.Serialization; +using MonoDevelop.DesignerSupport.Toolbox; using MonoDevelop.Projects; -using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.AspNet.Projects; +using MonoDevelop.AspNet.WebForms.Parser; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { [Serializable] - public class AspNetToolboxNode : ToolboxItemToolboxNode, ITextToolboxNode + public class WebFormsToolboxNode : ToolboxItemToolboxNode, ITextToolboxNode { [ItemProperty ("text")] @@ -54,8 +54,8 @@ namespace MonoDevelop.AspNet static readonly string aspNetDomain = GettextCatalog.GetString ("ASP.NET Controls"); - public AspNetToolboxNode () : base () {} - public AspNetToolboxNode (ToolboxItem item) : base (item) + public WebFormsToolboxNode () : base () {} + public WebFormsToolboxNode (ToolboxItem item) : base (item) { } @@ -78,7 +78,7 @@ namespace MonoDevelop.AspNet public override bool Equals (object obj) { - AspNetToolboxNode other = obj as AspNetToolboxNode; + WebFormsToolboxNode other = obj as WebFormsToolboxNode; return (other != null) && (this.text != other.text) && base.Equals (other); } @@ -130,7 +130,7 @@ namespace MonoDevelop.AspNet if (cls == null) return tag; - var doc = document.ParsedDocument as MonoDevelop.AspNet.Parser.AspNetParsedDocument; + var doc = document.ParsedDocument as WebFormsParsedDocument; if (doc == null) return tag; @@ -140,7 +140,7 @@ namespace MonoDevelop.AspNet Doc = doc }; - RegisterDirective directive; + WebFormsPageInfo.RegisterDirective directive; string prefix = refMan.GetTagPrefixWithNewDirective (cls, assemName.Name, null, out directive); if (prefix == null) diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetToolboxProvider.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsToolboxProvider.cs index f3f39a7234..21c86e566f 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetToolboxProvider.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsToolboxProvider.cs @@ -29,20 +29,16 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Linq; -using System.IO; using System.Collections.Generic; using MonoDevelop.Core; using MonoDevelop.DesignerSupport.Toolbox; -using MonoDevelop.Ide.Gui; using MonoDevelop.Core.Assemblies; - -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { - public class AspNetToolboxProvider : IToolboxDefaultProvider + public class WebFormsToolboxProvider : IToolboxDefaultProvider { public IEnumerable<string> GetDefaultFiles () { diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/WebTypeManager.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsTypeContext.cs index 631c07312d..033cae9991 100755..100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/WebTypeManager.cs +++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsTypeContext.cs @@ -31,28 +31,27 @@ using System; using System.Collections.Generic; -using System.Xml; -using System.IO; -using System.Linq; using System.Configuration; +using System.Linq; using System.Web.Configuration; +using System.Xml; +using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.NRefactory.TypeSystem.Implementation; using MonoDevelop.Core; -using MonoDevelop.Projects.Text; -using MonoDevelop.Ide.Gui; -using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.Core.Assemblies; -using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.Ide.CodeCompletion; using MonoDevelop.Ide.TypeSystem; -using ICSharpCode.NRefactory.TypeSystem.Implementation; +using MonoDevelop.Projects.Text; +using MonoDevelop.AspNet.Projects; -namespace MonoDevelop.AspNet +namespace MonoDevelop.AspNet.WebForms { - public class WebTypeContext + public class WebFormsTypeContext { const string sysWebAssemblyName = "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; - public WebTypeContext (AspNetAppProject project) + public WebFormsTypeContext (AspNetAppProject project) { if (project == null) throw new ArgumentException ("project"); @@ -163,7 +162,7 @@ namespace MonoDevelop.AspNet if (dom == null) continue; foreach (var t in ListControlClasses (baseType, dom, info.Namespace)) - yield return new MonoDevelop.AspNet.Parser.AspTagCompletionData (info.TagPrefix + ":", t); + yield return new AspTagCompletionData (info.TagPrefix + ":", t); } else if (info.IsUserControl) { //TODO: resolve docs @@ -215,7 +214,7 @@ namespace MonoDevelop.AspNet var dom = ResolveAssembly (tpxInfo.Assembly); if (dom != null) foreach (var type in ListControlClasses (baseType, dom, tpxInfo.Namespace)) - yield return new MonoDevelop.AspNet.Parser.AspTagCompletionData (tpxInfo.TagPrefix, type); + yield return new AspTagCompletionData (tpxInfo.TagPrefix, type); } } } diff --git a/main/src/addins/Web/MonoDevelop.AspNet/packages.config b/main/src/addins/Web/MonoDevelop.AspNet/packages.config new file mode 100644 index 0000000000..2154d11324 --- /dev/null +++ b/main/src/addins/Web/MonoDevelop.AspNet/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Microsoft.AspNet.Mvc" version="4.0.30506" targetFramework="net40" />
+ <package id="Microsoft.AspNet.WebPages" version="2.0.30506" targetFramework="net40" />
+ <package id="Microsoft.AspNet.Razor" version="2.0.30506" targetFramework="net40" />
+</packages>
\ No newline at end of file diff --git a/main/tests/UnitTests/MonoDevelop.CSharpBinding/TestDocument.cs b/main/tests/UnitTests/MonoDevelop.CSharpBinding/TestDocument.cs index b0ae822576..8803593ed1 100644 --- a/main/tests/UnitTests/MonoDevelop.CSharpBinding/TestDocument.cs +++ b/main/tests/UnitTests/MonoDevelop.CSharpBinding/TestDocument.cs @@ -31,7 +31,8 @@ namespace MonoDevelop.CSharpBinding { public class TestDocument : MonoDevelop.Ide.Gui.Document { - internal ParsedDocument HiddenParsedDocument; + public ParsedDocument HiddenParsedDocument; + public override ParsedDocument ParsedDocument { get { return HiddenParsedDocument; @@ -42,7 +43,7 @@ namespace MonoDevelop.CSharpBinding { } - internal IProjectContent HiddenProjectContent; + public IProjectContent HiddenProjectContent; public override IProjectContent GetProjectContext () { diff --git a/main/tests/UnitTests/UnitTests.csproj b/main/tests/UnitTests/UnitTests.csproj index f768e80321..ab2d1674f6 100644 --- a/main/tests/UnitTests/UnitTests.csproj +++ b/main/tests/UnitTests/UnitTests.csproj @@ -102,11 +102,6 @@ <Name>MonoDevelop.Refactoring</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\src\addins\AspNet\MonoDevelop.AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\src\addins\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj"> <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project> <Name>MonoDevelop.DesignerSupport</Name> @@ -147,26 +142,11 @@ <Name>MonoDevelop.Debugger</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\src\addins\MonoDevelop.Debugger.Soft\MonoDevelop.Debugger.Soft.AspNet\MonoDevelop.Debugger.Soft.AspNet.csproj"> - <Project>{F5390DA4-08B7-47E3-B6F3-D50683316AB4}</Project> - <Name>MonoDevelop.Debugger.Soft.AspNet</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\src\addins\CSharpBinding\Autotools\Autotools.csproj"> <Project>{F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}</Project> <Name>Autotools</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\src\addins\CSharpBinding\AspNet\CSharpBinding.AspNet.csproj"> - <Project>{F426CBB2-77FC-4E14-9E28-E667C2D1299A}</Project> - <Name>CSharpBinding.AspNet</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\src\addins\AspNet\MonoDevelop.AspNet.Mvc\MonoDevelop.AspNet.Mvc.csproj"> - <Project>{B32AD0DD-5247-437B-A2EF-1A4676C1B072}</Project> - <Name>MonoDevelop.AspNet.Mvc</Name> - <Private>False</Private> - </ProjectReference> <ProjectReference Include="..\..\src\addins\TextTemplating\MonoDevelop.TextTemplating\MonoDevelop.TextTemplating.csproj"> <Project>{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}</Project> <Name>MonoDevelop.TextTemplating</Name> @@ -228,16 +208,6 @@ </ProjectReference> </ItemGroup> <ItemGroup> - <Compile Include="MonoDevelop.AspNet.Mvc.Completion\CompletionTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.Completion\RazorCompletionTesting.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorCodeBlockParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorCodeFragmentsParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorCommentParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorDirectivesParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorExplicitExpressionsParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorImplicitExpressionsParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorParsingTests.cs" /> - <Compile Include="MonoDevelop.AspNet.Mvc.StateEngine\RazorStatementsParsingTests.cs" /> <Compile Include="Util.cs" /> <Compile Include="MonoDevelop.Projects\MdsTests.cs" /> <Compile Include="MonoDevelop.Projects\TestProjectsChecks.cs" /> @@ -271,9 +241,6 @@ <Compile Include="MonoDevelop.Core\BacktrackingStringMatcherTests.cs" /> <Compile Include="MonoDevelop.Ide.Gui\SearchPopupWindowTests.cs" /> <Compile Include="MonoDevelop.Core\LaneStringMatcherTests.cs" /> - <Compile Include="MonoDevelop.Xml.StateEngine\HtmlParsingTests.cs" /> - <Compile Include="MonoDevelop.Xml.StateEngine\AspNetParsingTests.cs" /> - <Compile Include="MonoDevelop.Xml.StateEngine\ParsingTests.cs" /> <Compile Include="MonoDevelop.Refactoring\IssueGroupTests.cs" /> <Compile Include="MonoDevelop.Refactoring\MockGroupingProvider.cs" /> <Compile Include="MonoDevelop.Refactoring\GroupingProviderTestBase.cs" /> @@ -283,8 +250,6 @@ <Compile Include="MonoDevelop.CSharpBinding\AutomaticBracketInsertionTests.cs" /> <Compile Include="MonoDevelop.CSharpBinding\NamedArgumentCompletionTests.cs" /> <Compile Include="MonoDevelop.SourceEditor\DebugTooltipTests.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetCompletionTests.cs" /> - <Compile Include="MonoDevelop.AspNet\AspNetTesting.cs" /> <Compile Include="MonoDevelop.CSharpBinding\UnitTesteditorIntegrationTests.cs" /> <Compile Include="MonoDevelop.Refactoring\AnalysisJobQueueTests.cs" /> <Compile Include="MonoDevelop.Refactoring\SimpleAnalysisJobTests.cs" /> @@ -294,7 +259,6 @@ <Compile Include="MonoDevelop.SourceEditor\JSonIndentEngineTests.cs" /> <Compile Include="MonoDevelop.Projects\SharedAssetsProjectTests.cs" /> <Compile Include="MonoDevelop.Projects\WebProjectTests.cs" /> - <Compile Include="MonoDevelop.Xml.StateEngine\HtmlImplicitClosingTests.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="..\..\md.targets" /> @@ -303,10 +267,7 @@ <None Include="MonoDevelop.Projects\CompletionDatabaseTests.cs" /> <None Include="MonoDevelop.Projects\DomPersistenceTests.cs" /> <None Include="MonoDevelop.Projects\DomCompilationUnitTests.cs" /> - <Compile Include="MonoDevelop.Xml.StateEngine\TestParser.cs" /> <None Include="MonoDevelop.Projects\DomTests.cs" /> - <None Include="MonoDevelop.AspNet\AspNetCompletionTests.cs" /> - <None Include="MonoDevelop.AspNet\AspNetTesting.cs" /> </ItemGroup> <ItemGroup /> <ItemGroup> |