Thanks dough, Its very usefull and nice code.

  ----- Original Message ----- 
  From: Doug Hale 
  To: advanced_delphi@yahoogroups.com 
  Sent: Thursday, October 16, 2008 10:34 AM
  Subject: [advanced_delphi] IDE Extension - I found it.


   It seams as though I can't post via email anymore - so this is from
  the website.

  Here it is, small and simple - thanks to Nafis Sadyko

  Just add to a package and install it.

  Doug

  ----------------------------------------------------------
  unit JBComment;
  {
  Keybinding for Delphi (versions 5, 6, 7) and
  C++Builder (versions 5 and 6) editors.
  Introduces 'Ctrl+/' shortcut for fast multi-line (JBuilder-style)
  commenting.
  How it works: select text block (with a mouse) and press 'Ctrl+/'
  to comment/uncomment the lines contained.
  Installation: just install as you'd install a new component
  (by clicking "Component-> Install Component" IDE menu), then
  compile and
  install the resulting package.
  Note: for C++Builder - don't forget to add the path of your Builder's
  Source\ToolsAPI folder to your package's library path in Project
  Options.

  ----------------------------------------------------------
  Copyright Nafis Sadykov - No restrictions on use.
  e-mail: [EMAIL PROTECTED]
  }
  interface
  uses
  // SysUtils, {if using inttostr() or format() functions for debug
  messages}
  Classes,
  Menus,
  ToolsAPI,
  Windows;
  procedure Register;
  implementation
  const
  VK_SLASH = 191; // not defined in 'windows.pas'
  type
  TJBCommentBinding = class(TNotifierObject, IOTAKeyboardBinding)
  private
  public
  {required IOTAKeyboardBinding methods:}
  function GetBindingType: TBindingType;
  function GetDisplayName: string;
  function GetName: string;
  procedure BindKeyboard(const BindingServices:
  IOTAKeyBindingServices);
  {callback for the introduced shortcut - though not called automatically
  for our specific "Ctrl+/" shortcut

Reply via email to