FarNet — .NET Far API and .NET module manager

Анонсы новых плагинов. Обсуждение плагинов ведется ниже.
User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sun 03 Jan, 2010 14:57

Latest post of the previous page:

http://code.google.com/p/farnet/

= 4.2.21 =

*) IPluginPanel: property DataComparison (class Comparison<object>) is replaced
with easier to use and more natural property DataId (delegate Getter). This
change is breaking if your plugins use DataComparison.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Tue 05 Jan, 2010 11:15

http://code.google.com/p/farnet/

= 4.2.22 =

*) IPanel: methods SelectAt(), UnselectAt(): null as input parameter is OK now,
it is simply ignored, just like an empty array.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sun 10 Jan, 2010 14:45

http://code.google.com/p/farnet/

= 4.2.23 =

PLUGINS LOCALIZATION SUPPORT
(Standard file based resource management in .NET)

*) BasePlugin: localization support:
-- New property CurrentUICulture (normally you should not care but see help).
-- New method GetString() gets localized strings from standard resource files:
PluginBaseName.resources (default, English is recommended)
PluginBaseName.ru.resources (Russian)
PluginBaseName.de.resources (German)
...
Binary .resources files are generated by resgen.exe from trivial .txt\.restext
files or Visual Studio .resx files. Note that resgen.exe allows to decompile
.resources back to .restext or .resx, only original comments are lost.

Yet another way to build resources is MSBuild task GenerateResource.

*) IFar: localization support:
-- New method GetCurrentUICulture() based on %FARLANG%.

*) Plugins.NET\Tutorial-ToolPlugin: shows how to build a localized plugin using
trivial .restext files. Note that Hello.ru.restext translates only language
dependent strings and does not care of others. The .NET resource manager
processes such cases just fine.

WINDOWS 7 TASKBAR ICON

*) IFar: new methods SetProgressState() and SetProgressValue() expose Far API
ACTL_SETPROGRESSSTATE and ACTL_SETPROGRESSVALUE (build 1309).

MISC

*) IFar.TempName() uses changed Far FSF.MkTemp (build 1311).

*) Plugins.NET: it is decided to drop VB and JS samples. Hopefully provided CS
samples should be quite enough: basically all .NET languages are very similar.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sun 10 Jan, 2010 20:30

http://code.google.com/p/farnet/

= 4.2.24 =

PLUGINS LOCALIZATION SUPPORT (continued, see 4.2.23)

*) FarNet configuration menus and dialogs
-- Section "Tools": fixed displayed tool number.
-- Section "Modules": added submenu item "UI culture".
-- Updated the .hlf file.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Tue 12 Jan, 2010 12:18

http://code.google.com/p/farnet/

= 4.2.25 =

*) IPluginPanel: it turned out that the event MakingDirectory still was not
quite implemented. Now it is.

*) Far error messages in a panel which is not subscribed to MakingDirectory
on pressing [F7] are fixed.

*) Plugins.NET samples: replaced .bat files with .proj files for MSBuild.exe:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe
Basically "MSBuild" and "projects" are similar to "make" and "makefiles" but
MSBuild is .NET oriented and projects are XML files (see MSDN for details).

Examples:
MSBuild.exe Build.proj (makes default targets, usually "Build")
MSBuild.exe Build.proj /t:Build (makes the target "Build")
MSBuild.exe Build.proj /t:Clean (makes the target "Clean")
MSBuild.exe Build.proj /t:Build;Clean (makes the "Build" and "Clean")

If you use PowerShellFar then the script Start-MSBuild-.ps1 can be used, too.
It helps to choose command line parameters and keeps commands in history.

Even if you develop in Visual Studio, MSBuild tasks still can be useful, for
example you may add custom MSBuild tasks like resource files generation (see
Tutorial-ToolPlugin\Build.proj). See commented out targets "BeforeBuild" and
"AfterBuild" in your Visual Studio project file (.csproj, use text editor).

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sun 17 Jan, 2010 14:43

http://code.google.com/p/farnet/

= 4.2.26 =

*) Minor fix in MakingDirectoryEventArgs.

*) Work around "Far does not restore panel state" on menu action .NET \ Close
panel: let's set the top item current before closing.

NEW FEATURES

*) IInputBox:
-- New flag IsPath (~ Far FIB_EDITPATH).

*) IEdit:
-- New flag IsPath (~ Far DIF_EDITPATH).
-- Renamed Password -> IsPassword (to be the same as in IInputBox). Technically
this is a breaking change but it is unlikely used (it is read only in IEdit).

*) FarNet configuration: "UI culture": added [F1] help for the input box.

REFACTORING OF MACROS
(breaking changes for plugins using macros)

-- Renamed interface IKeyMacroHost to IMacro
-- Its methods Post() moved to IFar as PostMacro()
-- Renamed property IFar KeyMacro to Macro
-- Renamed class KeyMacroData to MacroData
-- Internal: the macro operator is created only when requested.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Tue 19 Jan, 2010 11:33

http://code.google.com/p/farnet/

= 4.2.27 =

*) Tweaks in docs and code.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sat 23 Jan, 2010 14:00

http://code.google.com/p/farnet/

= 4.3.0 =

NEW VERSION NUMBER

Version number moves forward due to important recent changes:
-- Localization support
-- Quit() and CanExit()
-- MakingDirectory
-- Macros revison
-- Win7 taskbar icon tools
-- GUI message boxes (suitable for special tasks)
-- Revision of panel mode info (more object oriented)
-- Long paths support (note: .NET does not like long file paths)
-- Multiple panels (true for FarNet, saved state for file panels)
-- Async writing mode in editors (including not current editors)
-- Code pages in editors (get\set)
-- More info on exceptions
-- Dialog enhancements

NEW IN THIS VERSION

*) New method IFar.Quit(): Tells Far to quit (Far 2.0.1348 ACTL_QUIT).

*) New virtual method BasePlugin.CanExit() (called by IFar.Quit()).

*) Hopefully the final revision of macros (breaking for using plugins):
-- MacroData is replaced with Macro;
-- IMacro methods updated for new Macro.
The story: unusual IMacro methods with dictionaries were designed for easy use
in PowerShell. End of story: in PowerShell V2 New-Object supports dictionaries
itself, so that IMacro methods now can be natural and simple.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sun 31 Jan, 2010 19:35

http://code.google.com/p/farnet/

= 4.3.1 =

!! This time update manually (do not use Update-PowerShellFar.ps1).

ANNOUNCEMENT

It is discussed and decided that FarNet plugins are not called PLUGINS any more
everywhere: in API, code, documentation. From now on they are called MODULES:
.NET assemblies implementing one or more FarNet MODULE TOOLS.

The folders structure is changed, see Readme.txt or just extract from the
archive to %FARHOME% keeping the structure. Then remove old Lib (it is now
%FARHOME%\FarNet) and Plugins.NET (it is now %FARHOME%\FarNet\Modules).
Do not forget to replace %FARHOME%\Far.exe.config with new one.

TERMINOLOGY: PLUGINS -> MODULES
(breaking name changes)

Module tools:
-- BasePlugin -> BaseModule
-- CommandPlugin -> ModuleCommand
-- EditorPlugin -> ModuleEditor
-- FilerPlugin -> ModuleFiler
-- ToolPlugin -> ModuleTool
-- PluginException -> ModuleException

Interfaces:
-- IPanel -> IAnyPanel (rename it first, before IPluginPanel -> IPanel)
-- IPluginPanel -> IPanel (rename it second, after IPanel -> IAnyPanel)
-- IPluginPanelInfo -> IPanelInfo

Members:
-- GetPluginPanel() -> FindPanel()
-- CreatePluginPanel() -> CreatePanel()

Let's also fix wrong names and bad names:
-- EnvExpanded -> ExpandEnvironmentVariables
-- Eol -> EndOfLine
-- HWnd -> MainWindowHandle
-- Msg -> Message
-- NoSmartCoords -> NoSmartCoordinates
-- RootFar -> RegistryFarPath
-- RootKey -> RegistryPluginsPath
-- StartSortDesc -> StartReverseSortOrder
-- UseAttrHighlighting -> UseAttribiteHighlighting

Let's also fix one confusing feature:
-- InputBox.NoLastHistory -> UseLastHistory
a) to have the same name as the property of IEdit
b) because by default it should be "don't use" (the least surprise)

OTHER CHANGES

*) Macros:
-- IMacro.GetNames(): fixed exceptions on missed areas.
-- Macro.Area type changed from string to enum MacroArea.
-- IMacro methods use the enum MacroArea.
-- API changes: see documentation.

*) Issue _090208_042536. IBaseList: removed the obsolete workaround method
.Clear(). Instead, the method .Items.Clear() should be used. If it still has
problems, report, it will be restored ASAP. (It was a bug in PowerShell that
looks fixed in V2 RTM).

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Sun 07 Feb, 2010 15:53

http://code.google.com/p/farnet/

= 4.3.2 =

CUSTOM COLORS OF DIALOG CONTROLS

New event IControl.Coloring allows to set 1-4 custom colors depending on the
control type. PowerShellFar script Test-Dialog-.ps1 shows a few examples.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET plugin manager

Post by NightRoman » Tue 09 Feb, 2010 21:23

http://code.google.com/p/farnet/

= 4.3.3 =

*) Removed the ".NET" item from the disk menu. It is not used. Note: ".NET"
items in F11 menus, even empty, are used internally and cannot be removed.

*) FarColumn, SetColumn: Width changed type from 'string' to 'int':
positive: absolute width; negative: percentage; 0: Far decides.

*) Fix: "event" Invoking() was not always called for module tools.

*) IMacro: new method Check(). Far 2.0.1381+

*) IEditor: new option WriteByteOrderMark. Far 2.0.1384+

*) Tracing: too frequent events moved from mode 3 to 4 (see Far.exe.config).

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET module manager

Post by NightRoman » Wed 10 Feb, 2010 19:16

http://code.google.com/p/farnet/

= 4.3.4 =

*) [e]Bu$ter fixed a recent bug of FarColumn percentage (negative) widths.

*) IMacro.Check() should start to work correctly in Far 2.0.1386+

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET module manager

Post by NightRoman » Tue 16 Feb, 2010 12:00

http://code.google.com/p/farnet/

= 4.3.5 =

MAJOR ARCHITECTURE CHANGES

*) Module tool classes:
-- Module tool class instance is created for each call of its Invoke() method.
-- Virtual Connect()\Disconnect() are removed. Use ModuleHost if you need them.
-- Virtual properties are replaced with class attributes, see documentation and
sample modules. Each class has its own attribute class: e.g. ModuleXyzAttribute
for ModuleXyz class.
-- Attributes are mandatory. Empty ("default") names are not allowed any more.

*) Simplified access to IFar host. It is now 'Far.Net' anywhere. In your code:
-- Module classes: replace 'Far.' with 'Far.Net.';
-- Other code: you do not have to think of exposing IFar (e.g. sending it to
constructors or keeping it in a static variable), just use 'Far.Net' anywhere.

*) Simplified module manifest files (.cfg), see Readme.txt if you use them.

*) A few renamings, e.g. ToolOptions -> ModuleToolOptions, CommandEventArgs ->
ModuleCommandEventArgs, etc. New names describe themselves better.

*) These changes are breaking, indeed, and the modules should be updated.
If you have problems on loading after update try to drop the cache:
HKEY_CURRENT_USER\Software\Far2\Plugins\FarNet\<cache>

MINOR RELATED CHANGES

*) For a menu tool default Options value changed from 'AllMenus' to 'None'.
Thus, it is mandatory to specify Options, otherwise an item is not shown:
[ModuleTool(Name = "Hello", Options = ModuleToolOptions.Panels)]

*) Invoke() in some module tools: sender is null now, not IFar instance. It is
useless to send IFar because it is available as Far.Net anywhere.

*) Sample module Tutorial-Tool is replaced with Tutorial-Host. It still
contains the same sample module tool and a sample module host is added.
This host is not preloadable. Example of preloadable host is PSF.

OTHER CHANGES

*) IEditor: options WordDiv, ShowWhiteSpace, WriteByteOrderMark can be set
before (new!) or after opening the editor.

*) PanelModeInfo: new properties IsAlignedExtensions, IsCaseConversion.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET module manager

Post by NightRoman » Sat 20 Feb, 2010 20:16

http://code.google.com/p/farnet/

= 4.3.6 =

UPDATE STEPS

Remove the registry key "Far2\Plugins\FarNet" and make sure you do not start
old FarNet after that, otherwise you will get never used FarNet registry data.

MAIN CHANGES

*) All module items (actions and hosts) should have a Guid attribute. Generate
it once for each class or registered action and never change. But you can now
use any class or action names and change them as you want: registry data will
not be affected. All sample modules use these GUIDs.

N.B. Guid attribute is not absolutely mandatory, you can play in your local
sandbox without it. But if you publish a module, please, set these GUIDs.

*) Module actions: new attribute property Resources. If it is true the property
Name is the name of a resource string from the module .resources files.

*) All Register*\Unregister* methods moved from IFar to IModuleManager.

*) IFar: new methods GetModuleCommand, GetModuleFiler, GetModuleTool allow to
call an action of any module (loaded or not yet) from any other module.

*) Configuration menus and dialogs were changed a little bit. For tools we now
can set internal hotkeys (do not use standard Far hotkeys!). This is temporary,
hopefully Far will use GUIDs for menus, then module items will be able to use
standard Far hotkeys.

OTHER CHANGES

*) IControl: new property Data: user data (for FarNet controls only).

*) IAnyPanel: new method UnselectNames(), opposite to SelectNames().

*) Recommendation: how modules should keep their settings. IFar: removed
methods GetPluginValue(), SetPluginValue(), this place is not for modules.
Use new IModuleManager.OpenSubKey().

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET module manager

Post by NightRoman » Mon 01 Mar, 2010 11:47

http://code.google.com/p/farnet/

= 4.3.7 =

PROGRESS

*) Modules with dynamically added actions do not have to unregister them on
disconnection: they are unregistered automatically.

*) IMacro: added support for Consts and Vars areas.

*) Optimized module loading, unloading, caching.

*) Fixed crash on incorrect use of a listbox.

REFACTORING, BREAKING FOR SOME MODULES

*) Abstract registry access:
-- Removed properties IFar .RegistryFarPath, .RegistryPluginsPath.
-- Modules should not operate on the registry directly (though they can, of
course). They should access data via IRegistryKey returned by OpenRegistryKey()
of IModuleManager (normally) or IFar (only when really needed).
-- For Far Manager IRegistryKey works with the Windows registry, it is the
wrapper of Microsoft.Win32.RegistryKey. But modules should not rely on this.

*) IFar: window members moved to the operator:
Members GetWindowInfo, GetWindowType, SetCurrentWindow, WindowCount, and
WindowType moved to new window operator IFar.Window (and names adapted).

*) Type -> Kind:
The word 'Type' is replaced with 'Kind' in most cases. 'Type' should deal with
.NET System.Type class only. This change should reduce confusions and fix some
code analysis issues.
Renamed:
-- WindowType -> WindowKind, Type -> Kind, TypeName -> KindName
-- SelectionType -> RegionKind (and used more general 'Region')
-- FarColumn, SetColumn: Type -> Kind
-- ISelection.Type -> Kind
-- PanelType -> PanelKind
-- IAnyPanel.Type -> Kind

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET module manager

Post by NightRoman » Tue 02 Mar, 2010 21:17

http://code.google.com/p/farnet/

= 4.3.8 =

FarNet configuration dialog for a module tool allows to set a hotkey for the
.NET menus (as usual) and to disable\enable the default areas where the tool
menu items are shown (new feature). As a result, normally modules should not
care of these configuration settings, they are common for all modules and
configured by the core.

User avatar
NightRoman
Posts: 5911
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: FarNet - .NET Far API and .NET module manager

Post by NightRoman » Wed 03 Mar, 2010 11:50

http://code.google.com/p/farnet/

= 4.3.9 =

Fixed a few configuration bugs of FarNet 4.3.8.

Disk menu: show just tool names with no .NET prefix and hotkeys.

Tutorial-Host sample module: used Options=AllAreas, for demo and testing sake.

Post Reply

Return to “Анонсы новых плагинов”