[niftyplugins commit] r68 - - Added new "show in p4win" functionality to the perforce plugin.

0 views
Skip to first unread message

codesite...@google.com

unread,
Apr 24, 2009, 4:29:28 AM4/24/09
to niftyplug...@googlegroups.com
Author: jim.tilander
Date: Fri Apr 24 01:02:15 2009
New Revision: 68

Added:
trunk/NiftyPerforce/Commands/P4ShowItem.cs
trunk/NiftyPerforce/Properties/
trunk/NiftyPerforce/Properties/Resources.Designer.cs
trunk/NiftyPerforce/Properties/Resources.resx
Removed:
trunk/NiftyPerforce/Commands/ToolbarCommand.cs
Modified:
trunk/Build/Experimental_NiftyPerforce.msi
trunk/Build/Experimental_NiftyPerforce2008.msi
trunk/Build/Experimental_NiftySolution.msi
trunk/Build/Experimental_NiftySolution2008.msi
trunk/NiftyPerforce/Connect.cs
trunk/NiftyPerforce/NiftyPerforce.csproj
trunk/NiftyPerforce/P4Operations.cs
trunk/NiftyPerforce/ToolbarIcons.Designer.cs
trunk/NiftyPerforce/ToolbarIcons.resx

Log:
- Added new "show in p4win" functionality to the perforce plugin.
- Some minor cleanups.

Modified: trunk/Build/Experimental_NiftyPerforce.msi
==============================================================================
Binary files. No diff available.

Modified: trunk/Build/Experimental_NiftyPerforce2008.msi
==============================================================================
Binary files. No diff available.

Modified: trunk/Build/Experimental_NiftySolution.msi
==============================================================================
Binary files. No diff available.

Modified: trunk/Build/Experimental_NiftySolution2008.msi
==============================================================================
Binary files. No diff available.

Added: trunk/NiftyPerforce/Commands/P4ShowItem.cs
==============================================================================
--- (empty file)
+++ trunk/NiftyPerforce/Commands/P4ShowItem.cs Fri Apr 24 01:02:15 2009
@@ -0,0 +1,41 @@
+// Copyright (C) 2006-2009 Jim Tilander. See COPYING for and README for
more details.
+using System;
+using EnvDTE;
+using EnvDTE80;
+using Microsoft.VisualStudio.CommandBars;
+
+namespace Aurora
+{
+ namespace NiftyPerforce
+ {
+ class P4ShowItem : ItemCommandBase
+ {
+ public P4ShowItem(Plugin plugin)
+ : base("ShowItem", plugin, "Shows the item in p4win", true, true)
+ {
+ }
+
+ public override int IconIndex { get { return 8; } }
+
+ public override bool RegisterGUI(Command vsCommand, CommandBar
vsCommandbar, bool toolBarOnly)
+ {
+ if(toolBarOnly)
+ {
+ _RegisterGUIBar(vsCommand, vsCommandbar);
+ }
+ else
+ {
+ _RegisterGuiContext(vsCommand, "Project");
+ _RegisterGuiContext(vsCommand, "Item");
+ _RegisterGuiContext(vsCommand, "Easy MDI Document Window");
+ }
+ return true;
+ }
+
+ public override void OnExecute(SelectedItem item, string fileName,
OutputWindowPane pane)
+ {
+ P4Operations.P4WinShowFile(pane, fileName);
+ }
+ }
+ }
+}

Modified: trunk/NiftyPerforce/Connect.cs
==============================================================================
Binary files. No diff available.

Modified: trunk/NiftyPerforce/NiftyPerforce.csproj
==============================================================================
--- trunk/NiftyPerforce/NiftyPerforce.csproj (original)
+++ trunk/NiftyPerforce/NiftyPerforce.csproj Fri Apr 24 01:02:15 2009
@@ -49,6 +49,7 @@
<Compile Include="Commands\ItemCommandBase.cs" />
<Compile Include="Commands\P4RevertItem.cs" />
<Compile Include="Commands\P4RevisionHistorySolution.cs" />
+ <Compile Include="Commands\P4ShowItem.cs" />
<Compile Include="Commands\P4TimeLapseItem.cs" />
<Compile Include="EventHandlers\AutoAddDelete.cs" />
<Compile Include="EventHandlers\AutoCheckout.cs" />
@@ -137,6 +138,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="NiftyPerforce.AddIn" />
+ <Content Include="Resources\Show.bmp" />
<Content Include="Resources\TimeLapseView.bmp" />
<None Include="Resources\RevisionHistory.bmp" />
<None Include="Resources\EditAll.bmp" />

Modified: trunk/NiftyPerforce/P4Operations.cs
==============================================================================
--- trunk/NiftyPerforce/P4Operations.cs (original)
+++ trunk/NiftyPerforce/P4Operations.cs Fri Apr 24 01:02:15 2009
@@ -45,13 +45,18 @@

public static bool DiffFile(OutputWindowPane output, string
filename)
{
- return ScheduleRunCommand(output, "p4win.exe", GetUserInfoString()
+ "-D \"" + filename + "\"", System.IO.Path.GetDirectoryName(filename));
+ return ScheduleRunCommand(output, "p4win.exe", GetUserInfoString() + "
-D \"" + filename + "\"", System.IO.Path.GetDirectoryName(filename));
}

public static bool RevisionHistoryFile(OutputWindowPane
output, string filename)
{
return ScheduleRunCommand(output, "p4win.exe", GetUserInfoString() + "
\"" + filename + "\"", System.IO.Path.GetDirectoryName(filename));
}
+
+ public static bool P4WinShowFile(OutputWindowPane output, string
filename)
+ {
+ return ScheduleRunCommand(output, "p4win.exe", GetUserInfoString() + "
-s \"" + filename + "\"", System.IO.Path.GetDirectoryName(filename));
+ }

private static string GetUserInfoString()
{

Added: trunk/NiftyPerforce/Properties/Resources.Designer.cs
==============================================================================
--- (empty file)
+++ trunk/NiftyPerforce/Properties/Resources.Designer.cs Fri Apr 24
01:02:15 2009
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.1433
+//
+// Changes to this file may cause incorrect behavior and will be lost
if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace NiftyPerforce.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized
strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager
resourceMan;
+
+ private static global::System.Globalization.CultureInfo
resourceCulture;
+
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this
class.
+ /// </summary>
+
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager
ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new
global::System.Resources.ResourceManager("NiftyPerforce.Properties.Resources",
typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for
all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}

Added: trunk/NiftyPerforce/Properties/Resources.resx
==============================================================================
--- (empty file)
+++ trunk/NiftyPerforce/Properties/Resources.resx Fri Apr 24 01:02:15 2009
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 1.3
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">1.3</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader,
System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter,
System.Windows.Forms, ...</resheader>
+ <data name="Name1">this is my long string</data>
+ <data name="Color1" type="System.Drawing.Color,
System.Drawing">Blue</data>
+ <data name="Bitmap1"
mimetype="application/x-microsoft.net.object.binary.base64">
+ [base64 mime encoded serialized .NET Framework object]
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
mimetype="application/x-microsoft.net.object.bytearray.base64">
+ [base64 mime encoded string representing a byte array form of the .NET
Framework object]
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+
+ <xsd:schema id="root" xmlns=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string"
minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string"
msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string"
msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"
/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>1.3</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms,
Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms,
Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file

Modified: trunk/NiftyPerforce/ToolbarIcons.Designer.cs
==============================================================================
--- trunk/NiftyPerforce/ToolbarIcons.Designer.cs (original)
+++ trunk/NiftyPerforce/ToolbarIcons.Designer.cs Fri Apr 24 01:02:15 2009
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
+// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost
if
// the code is regenerated.
@@ -98,6 +98,20 @@
internal static System.Drawing.Bitmap _6 {
get {
object obj = ResourceManager.GetObject("6",
resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap _7 {
+ get {
+ object obj = ResourceManager.GetObject("7",
resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap _8 {
+ get {
+ object obj = ResourceManager.GetObject("8",
resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}

Modified: trunk/NiftyPerforce/ToolbarIcons.resx
==============================================================================
--- trunk/NiftyPerforce/ToolbarIcons.resx (original)
+++ trunk/NiftyPerforce/ToolbarIcons.resx Fri Apr 24 01:02:15 2009
@@ -139,6 +139,9 @@
<data name="7" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\TimeLapseView.bmp;System.Drawing.Bitmap,
System.Drawing, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <data name="8" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>Resources\Show.bmp;System.Drawing.Bitmap, System.Drawing,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
<data name="Icons" type="System.Resources.ResXFileRef,
System.Windows.Forms">
<value>Resources\Icons.bmp;System.Drawing.Bitmap, System.Drawing,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Reply all
Reply to author
Forward
0 new messages