Page 5 of 18

Re: Far.Net — плагин для написания плагинов на .NET языках

Posted: Sat 24 Jan, 2009 14:12
by NightRoman

Latest post of the previous page:

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

= 3.3.57 =

ANNOUNCEMENT

This version is presumably the last one for FAR 1.x; the next version is going
to be for Unicode FAR 2.x. If you find new or know some old issues in 3.3.57,
report as soon as possible, this is the last call, then support of the frosen
version will be very limited.

FIX/CHANGE

*) Two accidentally related issues: fixed regression in IFar.ShowHelp();
changed how IPanel.GoToName() works with empty names: now it ignores them
(well, empty names are technically possible, but it is a weird case anyway).

HOUSEKEEPING

*) Refactoring and cleaning of legacy code shared between IFar.Msg and recently
removed obsolete IMessage.

Re: Far.Net — плагин для написания плагинов на .NET языках

Posted: Sun 01 Feb, 2009 14:11
by NightRoman
http://code.google.com/p/farnet/

= 4.0.0 =

ANNOUNCEMENT

From now on FarNet 4.x is for Far 2.x. FarNet 3.x is officially not supported.
Theoretically it is possible to use both FarNet 3.x and 4.x in Far 2.x at the
same time but this scenario is not supported, not tested and not recommended.

This is the first and mostly technical phase of transition from Far 1.x to 2.x.
Next FarNet version will use new Far API more effectively.

INSTALLATION

If you did not use FarNet 3.x in Far 2.x then simply do what Readme.txt says;
do read it again even if you read it before: some default names are changed.

If you use or used FarNet 3.x in Far 2.x then do in this order:

1) Remove all(!) installed files of FarNet and .NET plugins.

2) If you want to migrate old settings then rename in the registry:
HKEY_CURRENT_USER\Software\Far2\PluginHotkeys:
rename key "Plugins/FAR.NET/FarNetPlugin.dll" into "Plugins/FarNet/FarNetMan.dll"
HKEY_CURRENT_USER\Software\Far2\Plugins:
rename key "FAR.NET" info "FarNet"

3) Install FarNet, see Readme.txt for instructions.

4) Install new FarNet plugins, e.g. PowerShellFar 2.x

5) If you have your own FarNet plugins rebuild them with new FarNet.

BREAKING CHANGES (MAJOR)

*) You have to change dependency from FarNetInt.dll to FarNet.dll and rename
namespace FarManager into FarNet.

*) Removed property Targeted from panels, use new property SelectedFiles.

*) Removed property IFile.IsSelected. Originally it was introduced "a la FAR
API", but in fact it is not fit well to FarNet concept and planned evolution.

*) IViewer, IEditor - boolean property EnableSwitch is replaced with Switching
with 3 states: Auto(default), Enabled and Disabled.

BREAKING CHANGES (MINOR)

A few renamings for better consistency, discoverability and English, too.

*) IPanel:
Current -> CurrentFile
Contents -> ShownFiles
Selected -> SelectedFiles

*) All names *PanelPlugin* renamed into *PluginPanel*, e.g. new names are:
IPluginPanel, IPluginPanelInfo, CreatePluginPanel() and etc.

*) IPluginPanel.Another -> AnotherPanel

*) MessageOptions -> MsgOptions (to conform with IFar.Msg())

*) KeyCode constants:
- all names now are the same as FAR macro key names
- Ctrl, Alt, Shift moved to another type: KeyMode

*) VKeyCode constants:
- Ctrl, Alt, Shift moved to another type: VKeyMode

OTHER CHANGES

*) Do not use new properties CodePage in IEditor and IViewer, they are added,
but it turned out that FAR does not use them yet :)

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

Posted: Tue 03 Feb, 2009 10:32
by NightRoman
http://code.google.com/p/farnet/

= 4.0.1 =

** REMINDER: Far 2.x, read History.txt = 4.0.0 = **

*) Due to a bug in FarNet multiarc plugin did not work. Fixed.

*) FilerEventArgs: new property OperationModes Mode. Unfortunately it is not
yet clear how to use it, you may only experiment for now.

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

Posted: Tue 10 Feb, 2009 10:52
by NightRoman
http://code.google.com/p/farnet/

= 4.0.2 =

*) Improved exchange of strings between .NET and FAR. Note that now in some
cases FarNet is less tolerant to null input strings where text is expected.

*) Dialogs: fixed a few FAR 1 to 2 issues, fixed memory leaks in list controls
on dynamic operations on items, asked to implement IListBox.Title so that it
should work now, added new property IListBox.Bottom, etc.

*) Fixed order of history strings returned by IFar.GetHistory().

*) Wish: allow to "unload" FarNet. Note: DLLs are not phisically unloaded. It
is OK to call ExitFARW several times, the first call terminates FarNet. Then it
is safe to call GetPluginInfoW, FarNet simply returns "nothing". Other exported
functions must not be called. STILL, THIS SCENARIO IS NOT RECOMMENDED. Besides,
perhaps some FarNet sub-plugins were not designed for "half-termination".

*) Issue: http://bugs.farmanager.com/view.php?id=730
Do not make dialog list controls empty directly when a dialog is running. Use
this way: DetachItems(), Clear() or RemoveAt(), add items, AttachItems().

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

Posted: Sun 15 Feb, 2009 15:46
by NightRoman
http://code.google.com/p/farnet/

= 4.0.3 =

*) Property IListBox.Bottom - it was runtime only, now it is standard: as
usual, you can set it before opening a dialog.

*) New overloaded IFar.GetHistory() with extra parameter 'filter' returns
history strings by type(s).

*) It turned out that it is possible to unload FarNet abnormally, for example
by 'unloadp' FAR command or by some plugin manager. This scenario is not
recommended but some changes still were done for avoiding problems.

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

Posted: Mon 02 Mar, 2009 18:25
by NightRoman
http://code.google.com/p/farnet/

= 4.0.4 =

MAIN CHANGES

*) FarNet is adapted to new Far panel API in 2.0.789. Of course .NET plugins
should not care about it.

*) For technical reasons FarNet is built by Visual Studio 2008 SP1 and FarNet
C++/CLI depends on VS runtime modules. If you do not have VS 2008 then you may
have to google, download and install one of the redistributable packages:
- Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
- Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)

OTHER CHANGES

*) IAnyViewer.ViewText() - switching to editor is enabled. For now if you
switch by [F6] to editor then on exit you see "The file ... was moved or
deleted. [Save]...". It is not a perfect solution perhaps but it is just
useful. If you do not like it, do not switch. Better ideas are welcome.

*) New interface IRawUI and property in IFar, TEST ONLY, they are experimental
and perhaps will be removed.

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

Posted: Sun 08 Mar, 2009 11:39
by NightRoman
http://code.google.com/p/farnet/

= 4.0.5 =

*) New IFar methods PostStepAfterKeys() and PostStepAfterStep(). This is a very
important achievement for "super-macros" that can be used now also with modal UI.
See PowerShellFar History.txt for more details.

*) Mantis #730 - thanks to DrKnS, the problem is fixed for listboxes in Far
2.0.812, so that listboxes can be used as normal. Other problems still exist
for comboedit and combolist; workaround: when a dialog has started do not use
Clear() and then Insert() without detaching and attaching items.

*) ViewFrame.LeftPos - changed from 'int' to 'long', as it is in Far API.

P.S. REMINDER
*) For technical reasons FarNet is built by Visual Studio 2008 SP1 and FarNet
C++/CLI depends on VS runtime modules. If you do not have VS 2008 then you may
have to google, download and install one of the redistributable packages:
- Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
- Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)

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

Posted: Thu 12 Mar, 2009 13:49
by NightRoman
http://code.google.com/p/farnet/

= 4.0.6 =

*) x64 support: FarNetMan.dll for x64 Far Manager should be copied from
Plugins.x64\FarNet. (NOTE: the build contains both x86 and x64 versions,
only FarNetMan.dll depends on a platform, FarNet.dll does not).

*) Optimized performance of stepping mechanism (IFar.PostStepXXX methods).

*) Experimental low level UI types were moved to FarNet.Raw namespace.

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

Posted: Tue 17 Mar, 2009 11:39
by NightRoman
http://code.google.com/p/farnet/

= 4.0.7 =

*) IListMenu
- New property NoInfo: Do not show item count information at the bottom line.
- Fix. If a key handler is available and called then a standard handler, if
any, should not be called.

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

Posted: Sun 22 Mar, 2009 15:39
by NightRoman
http://code.google.com/p/farnet/

= 4.0.8 =

*) IPluginPanel. New event Escaping. It is triggered when [Escape] is pressed
and the command line is empty. Basically it only helps to use [Escape] key for
closing a panel (or other action). There is no default action, perhaps it will
be added later, suggestions are welcome.

*) As far as IFar.GetWindowType(-1) is used quite frequently, a new property
IFar.WindowType is introduced: it gets a type of the current Far window:
Panels, Dialog, Editor and etc.

*) Undone stepping mode optimization because of problems for command, tool and
filer plugins dynamically registered during stepping.

*) IFar.PostStepAfterStep - fixed a subtle issue: when the first step throws an
error then the second should not be invoked even if it has been already posted.

*) Dialog controls. Improved some code originally designed in Far/1 and not
effective in Far/2.

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

Posted: Sun 29 Mar, 2009 17:09
by NightRoman
http://code.google.com/p/farnet/

= 4.0.9 =

*) IFar.Write - fixed Unicode output (some characters were written as '?').
Lesson to learn: avoid Console.Write* methods in FarNet and its plugins.

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

Posted: Thu 02 Apr, 2009 18:25
by NightRoman
http://code.google.com/p/farnet/

= 4.0.10 =

*) ISelection - new method SelectAll() selects all text in the editor. It is
a helper, you can do the same by Select() with proper parameters.

*) IViewer.CodePage for the opened viewer works now (read only).

*) IFar.CodeToChar() fixed old ANSI approach.

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

Posted: Mon 06 Apr, 2009 10:45
by NightRoman
http://code.google.com/p/farnet/

= 4.0.11 =

*) New. PanelModeInfo and IPluginPanelInfo.Modes are used for setting plugin
panel view modes (column types, widths, titles, status line and etc.). To be
continued, remarks are welcome.

*) Implemented processing of IFile.Owner for plugin panels. It can be used as
a custom column (with proper view mode and column titles, see above).

*) IFar.GetHistory() - adapted to recent Far Manger registry history changes.

*) IMenuItem - new properties Grayed, Hidded (new in Far API).

*) PaletteColor - added new values (new in Far API).

*) ControlKeyStates, KeyInfo and MouseInfo: AltCtrlShift is set obsolete (not
standard name) and will be removed soon. Use classic CtrlAltShift instead.

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

Posted: Sun 12 Apr, 2009 12:50
by NightRoman
http://code.google.com/p/farnet/

= 4.0.12 =

PLUGIN PANEL VIEW MODES
(in progress, subject to change)

*) New .NET menu item "Switch full screen" allows to switch "full screen"
mode for any view mode of any FarNet panel. So that you may actually have
20 modes = 10 as usual + 10 the same but with switched "full screen".

*) PanelModeInfo - new method Clone() for shallow copy. It is useful for
creation of similar modes with a few differences.

*) IPluginPanelInfo - replaced property Modes (array of all modes) with two
methods GetMode() and SetMode() (they work only for one mode).

OTHER CHANGES

*) ControlKeyStates, KeyInfo and MouseInfo: obsolete not standard name
AltCtrlShift was replaced with classic name CtrlAltShift.

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

Posted: Mon 27 Apr, 2009 11:55
by NightRoman
http://code.google.com/p/farnet/

= 4.0.13 =

TRACING

*) FarNet core supports standard .NET tracing mechanism. It is customized in
"Far.exe.config", take a look at comments there and customize it for yourself.

*) A default listener (added in machine .config) outputs to a debugger, so that
FarNet plugin debugging may be easier. Trace levels 3 and 4 (see below) can be
slow with a debugger; in this case you can remove default listeners by <clear/>
and still use a fast file writer added by <add ... />.

*) Removed option FarNet.StartupErrorDialog from "Far.exe.config" - critical
startup errors are written to the console and optionally traced now. Modal
dialogs should not be shown on loading.

*) Most important calls Far <-> FarNet <-> FarNetPlugin are already traced.
More tracing, especially FarNet <-> FarNetPlugin will be introduced later.

TRACING TIPS

1) Switch 'FarNet.Trace' defines 5 levels of tracing (0:Off ... 4:Verbose);
recommended level is 2:Warning - to trace errors and warnings, if any. Note:
they normally show plugins or system issues, not FarNet itself.

2) You can add more trace listeners, for example a log file writer; one is
added in "Far.exe.config". Remove it or change it as needed.

3) Your plugin can call System.Diagnostics.Trace methods itself. 'FarNet.Trace'
does not affect your tracing unless you use it directly (see TraceSwitch, MSDN).

4) Tracing is a standard .NET feature, see MSDN for details about tracing and
configuration files - there are many useful titbits for free there.

5) Do not be tempted to use tracing for normal data output. Tracing is for
diagnostics and troubleshooting.

MISC

*) Renamed namespace FarNet.Raw into FarNet.Support; it contains supportive
features that normally should not be used from user code.

*) Internal FarNet menu commands are processed more effectively.

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

Posted: Mon 18 May, 2009 11:38
by NightRoman
http://code.google.com/p/farnet/

= 4.1.0 =

MAJOR CHANGES

*) Interface 'IFile' is replaced with abstract class 'FarFile'. This approach
is more convenient for plugins that use custom implementation of files. Also,
though it is less important, it provides slightly faster access to members.
WARNING: this change is breaking, but technically in almost 100% cases you
simply just have to replace the name IFile with FarFile everywhere.

*) FarNet provides ready to use implementation of 'FarFile': class 'SetFile'.
Instances of this class can be created directly by 'new'. That is why two
methods IFar.CreatePanelItem() are not needed now; they are attributed
'Obsolete' and will be removed in the next version.

OTHER CHANGES

*) Reviewed and improved (hopefully) tracing of errors. IFar.ShowError() now
traces errors, too, so that if a plugin calls this function then error info is
sent to trace listeners. Reminder: see "Far.exe.config" for tracing options.