[svn] r7118: vs-plugin/trunk/Nemerle.VsIntegration:
NemerlePackage.cs Project/NemerleFileNode.cs Project/N...
IT
svnadmin at nemerle.org
Tue Dec 19 05:34:59 CET 2006
Log:
Sync with SDK.
Author: IT
Date: Tue Dec 19 05:34:54 2006
New Revision: 7118
Modified:
vs-plugin/trunk/Nemerle.VsIntegration/NemerlePackage.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleLibraryManager.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs
Modified: vs-plugin/trunk/Nemerle.VsIntegration/NemerlePackage.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/NemerlePackage.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/NemerlePackage.cs Tue Dec 19 05:34:54 2006
@@ -21,9 +21,7 @@
#region Registration Attributes
//TODO: Add WebSiteProject support.
- //[
- // SingleFileGeneratorSupportRegistrationAttribute(
- // typeof (NemerleProjectFactory))]
+ [SingleFileGeneratorSupportRegistrationAttribute(typeof(NemerleProjectFactory))]
//[WebSiteProject(GlobalConstants.LanguageName , GlobalConstants.LanguageName)]
//[WebSiteProjectRelatedFiles("aspx", "n")]
//[WebSiteProjectRelatedFiles("master", "n")]
@@ -34,10 +32,26 @@
// GlobalConstants.LanguageName, ".n",
// GlobalConstants.LanguageName + ";" + GlobalConstants.LanguageName ,
// GlobalConstants.LanguageName)]
+ [ProvideLoadKey("standard", NemerleConstants.ProductID, NemerleConstants.ProductDetails, "", 104)]
[DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\8.0Exp")]
+ [ProvideService(typeof(NemerleLanguageService), ServiceName = NemerleConstants.LanguageName)]
+ [ProvideService(typeof(INemerleLibraryManager))]
+ [ProvideLanguageService(
+ typeof(NemerleLanguageService),
+ NemerleConstants.LanguageName,
+ 100,
+ DefaultToInsertSpaces = true,
+ AutoOutlining = true,
+ CodeSense = true,
+ EnableCommenting = true,
+ MatchBraces = true,
+ ShowCompletion = true,
+ ShowMatchingBrace = true)]
+ [ProvideLanguageExtension(typeof(NemerleLanguageService), NemerleConstants.FileExtension)]
+ [Guid(NemerleConstants.PackageGuidString)]
[ProvideProjectFactory(typeof(NemerleProjectFactory),
NemerleConstants.LanguageName,
- NemerleConstants.LanguageName + " Project Project Files (*." +
+ NemerleConstants.LanguageName + " Project Files (*." +
NemerleConstants.ProjectExtension + ");*." + NemerleConstants.ProjectExtension,
NemerleConstants.ProjectExtension,
NemerleConstants.ProjectExtension,
@@ -45,15 +59,12 @@
// from including the working directory as a valid template path
@".\NullPath",
LanguageVsTemplate = NemerleConstants.LanguageName)]
- [ProvideMenuResource (1000, 1)]
+ [ProvideMenuResource(1000, 1)]
[ProvideObject (typeof(GeneralPropertyPage))]
[ProvideObject (typeof(NemerleBuildPropertyPage))]
- [ProvideEditorExtension(typeof(NemerleEditorFactory), NemerleConstants.FileExtension, 32)]
- [ProvideEditorLogicalView(typeof(NemerleEditorFactory), NemerleConstants.EditorLogicalViewGuidString)]
- //LOGVIEWID_Designer
- //[ProvideEditorLogicalView(typeof(NP.EditorFactory),
- // "{7651a701-06e5-11d1-8ebd-00a0c90f26ea}")
- //] //LOGVIEWID_Code
+ [ProvideEditorExtension (typeof(NemerleEditorFactory), NemerleConstants.FileExtension, 32)]
+ [ProvideEditorLogicalView(typeof(NemerleEditorFactory), NemerleConstants.EditorLogicalViewGuidString)] //LOGVIEWID_Designer
+ [ProvideEditorLogicalView(typeof(NemerleEditorFactory), NemerleConstants.EditorLogicalViewGuidString)] //LOGVIEWID_Code
[PackageRegistration(UseManagedResourcesOnly = true)]
// Showing the splash screen requires "devenv /rootsuffix Exp /setup" during the installation.
// For more information please see: http://blogs.msdn.com/jim_glass/archive/2005/05/23/421152.aspx
@@ -63,21 +74,6 @@
NemerleConstants.ProductDetails,
NemerleConstants.ProductID,
IconResourceID=300)]
- [ProvideLoadKey("standard", NemerleConstants.ProductID, NemerleConstants.ProductDetails, "", 104)]
- [ProvideService(typeof(NemerleLanguageService), ServiceName = NemerleConstants.LanguageName)]
- [ProvideService(typeof(INemerleLibraryManager))]
- [ProvideLanguageService(
- typeof(NemerleLanguageService),
- NemerleConstants.LanguageName,
- 100,
- AutoOutlining = true,
- CodeSense = true,
- EnableCommenting = true,
- MatchBraces = true,
- ShowCompletion = true,
- ShowMatchingBrace = true)]
- [ProvideLanguageExtension(typeof(NemerleLanguageService), NemerleConstants.FileExtension)]
- [Guid(NemerleConstants.PackageGuidString)]
[RegisterSnippets(
NemerleConstants.LanguageServiceGuidString,
false,
@@ -91,7 +87,7 @@
#endregion
- public class NemerlePackage : ProjectPackage/*Package*/, IOleComponent, IVsInstalledProduct
+ public class NemerlePackage : ProjectPackage, IOleComponent, IVsInstalledProduct
{
private uint _componentID;
private NemerleLibraryManager _libraryManager;
@@ -112,42 +108,32 @@
RegisterProjectFactory(new NemerleProjectFactory(this));
RegisterEditorFactory (new NemerleEditorFactory (this));
-
- //Microsoft.VisualStudio.Shell.Interop.IVsRegisterEditors registerEditors =
- // GetService(typeof(Microsoft.VisualStudio.Shell.Interop.SVsRegisterEditors))
- // as Microsoft.VisualStudio.Shell.Interop.IVsRegisterEditors;
-
- //uint cookie;
- //Guid riid = editorFactory.GetType().GUID;
-
- //int result = registerEditors.RegisterEditor(ref riid, editorFactory, out cookie);
- //NativeMethods.ThrowOnFailure(result);
-
- registerNemerleCommands();
+ RegisterNemerleCommands();
}
- private void registerNemerleCommands()
+ private void RegisterNemerleCommands()
{
OleMenuCommandService menuService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
+
if (menuService != null)
{
- registerCommand(menuService, NemerleMenus.ExtendSelection, new EventHandler(OnExtendSelection));
+ RegisterCommand(menuService, NemerleMenus.ExtendSelection, new EventHandler(OnExtendSelection));
// TODO: change handlers
- registerCommand(menuService, NemerleMenus.ShrinkSelection, new EventHandler(OnExtendSelection));
+ RegisterCommand(menuService, NemerleMenus.ShrinkSelection, new EventHandler(OnExtendSelection));
- registerCommand(menuService, NemerleMenus.Rename, new EventHandler(OnExtendSelection));
- registerCommand(menuService, NemerleMenus.Inline, new EventHandler(OnExtendSelection));
+ RegisterCommand(menuService, NemerleMenus.Rename, new EventHandler(OnExtendSelection));
+ RegisterCommand(menuService, NemerleMenus.Inline, new EventHandler(OnExtendSelection));
- registerCommand(menuService, NemerleMenus.Options, new EventHandler(OnExtendSelection));
+ RegisterCommand(menuService, NemerleMenus.Options, new EventHandler(OnExtendSelection));
// TODO: kill it
- registerCommand(menuService, NemerleMenus.TestCommand, new EventHandler(OnExtendSelection));
+ RegisterCommand(menuService, NemerleMenus.TestCommand, new EventHandler(OnExtendSelection));
}
else
Trace.WriteLine("Command Service is null!");
}
- private static void registerCommand(OleMenuCommandService service, CommandID commandId, EventHandler handler)
+ private static void RegisterCommand(OleMenuCommandService service, CommandID commandId, EventHandler handler)
{
MenuCommand command = new MenuCommand(handler, commandId);
service.AddCommand(command);
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs Tue Dec 19 05:34:54 2006
@@ -101,6 +101,22 @@
internal override object Object { get { return VSProjectItem; } }
+ /*
+ public override int ImageIndex
+ {
+ get
+ {
+ if (IsFormSubType)
+ return (int)ProjectNode.ImageName.WindowsForm;
+
+ if (this.FileName.ToLower().EndsWith(".n"))
+ return NemerleProjectNode.ImageOffset + (int)NemerleProjectNode.PythonImageName.PyFile;
+
+ return base.ImageIndex;
+ }
+ }
+ */
+
#endregion
#region overridden methods
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleLibraryManager.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleLibraryManager.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleLibraryManager.cs Tue Dec 19 05:34:54 2006
@@ -343,10 +343,10 @@
lock (_requests)
{
- if (0 != _requests.Count)
+ if (_requests.Count != 0)
task = _requests.Dequeue();
- if (0 == _requests.Count)
+ if (_requests.Count == 0)
_requestPresent.Reset();
}
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs Tue Dec 19 05:34:54 2006
@@ -20,6 +20,9 @@
namespace Nemerle.VisualStudio.Project
{
+ [ComVisible(true)]
+ [CLSCompliant(false)]
+ [ClassInterface(ClassInterfaceType.AutoDual)]
[Guid(NemerleConstants.ProjectNodeGuidString)]
public class NemerleProjectNode : ProjectNode, IVsProjectSpecificEditorMap2
{
More information about the svn
mailing list