FarNet — .NET Far API and .NET module manager

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

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

Post by NightRoman »

Latest post of the previous page:

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

= 4.3.31 =

*) UI: new .NET menu items
Added two new menu items "Editors..." and "Viewers..." that show the editor or
viewer list sorted by recent activity. This is experimental but it looks like a
useful addition to the native Far menu Screens.

*) Editor & Viewer
-- New methods Activate() to make the instance window active.
-- Improved internal management of editor and viewer lists. Useful side effect:
IFar methods Editors() and Viewers() return instances sorted by last activity.

*) IEditor
-- New properties KeyCount, TimeOfOpen, TimeOfSave (for statistics, AI, etc.)
-- Changed Save(): it saves only on changes. This is shorter than often used
"if (!editor.IsSaved) Save();" and helps to avoid misuse of the IsModified.
-- New method Save(bool) allows to save even not changed file.

NB: change of Save() is unlikely breaking but you may want to review your calls
and remove not needed checks.

*) IViewer
-- New property TimeOfOpen (similar to IEditor).

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

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

Post by NightRoman »

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

= 4.3.32 =

*) .NET menu
-- All panel menu commands and items moved to the new submenu "Panels...".
-- Added the submenu "Console...". There are two commands there: decrease and
increase console font size. This menu is available in all menus F11\.NET

Example mouse macros for the Common area:
-- CtrlMsWheelDown (FarNet: Decrease font size):
F11 $If (Menu.Select(".NET", 2) > 0) Enter c d $End
-- CtrlMsWheelUp (FarNet: Increase font size):
F11 $If (Menu.Select(".NET", 2) > 0) Enter c i $End

Notes:
-- increasing fonts too much leads to appearance of the console scroll bars;
-- some fonts are not suitable for this kind of interactive resizing.

*) IEditor
-- SetText() now drops selection, if any; this way looks more intuitive.
-- Fixed GetSelectedText() for column kind of selection.

*) MouseInfo
-- New property Value (wheel value for the MouseWheel event). Note: MouseWheel
event works in Far 2.0.1756+

*) IListMenu
Fixed the permanent filter.

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

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

Post by NightRoman »

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

= 4.3.33 =

*) Menu Console...
Commands Decrease/Increase font size: this feature works only in Windows Vista
and above. But it should not make problems in XP.

*) MouseWheel event in editor
It turns out this event is not yet supported by Far API. The issue is being
investigated, the event is not removed from FarNet but it does not work.

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

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

Post by NightRoman »

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

= 4.3.34 =

*) x64: Fixed crashes in dialogs. Thanks to signatov2000.

*) IEditor.KeyCount
It is mostly designed for the Vessel module, not for public use. Most of not
significant keys are excluded (navigation, Ctrl and Alt combinations, etc.)

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

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

Post by NightRoman »

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

= 4.3.35 =

*) IEditor.KeyCount
Corrected to count actual changes. (Reminder: it is not for public use)

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

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

Post by NightRoman »

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

= 4.3.36 =

*) IEditor
Added yet missed property IsVirtualSpace (EOPT_CURSORBEYONDEOL in Far API).

*) IAnyPanel
New method SelectedIndexes().

*) Shelve/Unshelve FarNet panels
These actions use SelectedIndexes() and keep/restore selection by indexes, not
names. This is more effective and allows to restore selection with same names
(rare but still possible use case, e.g. process list). NB: Push/Pop of native
panels still use names because indexes might change if files changed.

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

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

Post by NightRoman »

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

= 4.3.37 =

*) MODULE COMMANDS AND MACROS
If a FarNet module provides commands invoked by prefixes then these commands
can be called from macros by callplugin(). The first argument is the FarNet
system ID: 0xcd. The second argument is the module prefix and command.

Example (RightControl and PowerShellFar commands):

callplugin(0xcd, "RightControl:step-left")
callplugin(0xcd, ">: Menu-Favorites-.ps1")

Mnemonic for 0xcd: eXecute CommanD

*) Search in FarNet panels
Search by name pattern and F3/CtrlQ on folders work. Note that module panels
should do this properly. E.g. built-in PSF panels do not support this, yet.

*) IEditor, IPanel, IDialog
Property object Data {get;set;} is replaced with Hashtable Data {get;}. This
change allows more than one user to attach data without conflicts. Table keys
should be unique, indeed (e.g. a unique reference, Guid, etc.).

*) IFar
Removed the Run method. Use more effective way: GetModuleCommand + Invoke.

*) ModuleCommandEventArgs
New property IsMacro tells that a command is invoked via callplugin().
New property Ignore to tell it is not done (e.g. to use another way).

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

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

Post by NightRoman »

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

= 4.3.38 =

*** Use Far 2.0.1802+ ***

*) IFar.Message
New option Draw to draw message-like boxes.

*) IFar.UI (IUserInterface)
New method Draw(): actually draws the job done by DrawColor & DrawPalette
(it's more natuaral than also working DrawXXX(.., null)).

*) New interface FarNet.Tools.IProgress.

*) New class FarNet.Tools.ProgressBox : IProgress
Draws a simple message box with progress information.
PSF script Test-ProgressForm-.ps1 shows how to use it.

*) ProgressForm implements IProgress
- SetProgressValue() now works with double's, not int's.
- SetProgressInt64() is OBSOLETE AND WILL BE REMOVED.

Modules with ProgressForm:
- Multihasher should work fine;
- FolderChart has to be updated;
- Rebuild other (personal) modules.

*) ProgressBox & ProgressForm
Support of multiline text (see LineCount).

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

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

Post by NightRoman »

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

= 4.3.39 =

*) API documentation FarNetAccord.chm
Used the patch for the help builder. There are many fixes. The most important
perhaps is the fix of missing enum value descriptions.

*) ProgressForm
- Removed obsolete SetProgressInt64(). Use SetProgressValue().
- If you use the MultiHasher module: take 0.2.1 or later.

*) IAnyPanel
New property bool CaseSensitiveSort { get; set; }

*) PanelSortMode
New value ChangeTime (~ SM_CHTIME).

*) Revision of the PanelSortMode enum and related panel properties
Added all the same values with the 'Reversed' suffix, e.g. added 'NameReversed'
for 'Name', etc. Thus, all *SortMode properties in panels now get/set the sort
mode and direction in one shot. This approach seems to be easy, intuitive, and
helps to avoid some mistakes. This change is breaking if a module uses removed
*ReverseSortOrder properties.

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

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

Post by NightRoman »

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

= 4.3.40 =

*** Use Far 2.0.1807 ***

*) CallPlugin(0xcd, ..) properly opens modal UI and even panels!
CallPlugin supports asynchronous commands (steps and jobs). Asynchronous
commands are suitable for opening dialogs, modal editor/viewers, and even
panels. See Readme.txt for the details, examples, and a known issue, too.

*) IFar
New property MacroArea.

*) ModuleCommandEventArgs
New property MacroArea (instead of IsMacro).

*) IDialog
New property KeepWindowTitle (Far 2.0.1805). As a result, ProgressForm is now
able to show progress information in the console title, as ProgressBox does.

*) Housekeeping (BREAKING if a module is affected)
- Renamed FarMacroState to MacroState ("Far" is rather useless in here);
- PostKeys(, bool), PostText(, bool), PostKeySequence(, bool) - inverted the
second parameter: disableOutput -> enableOutput for consistency with PostMacro,
and Macro.EnableOutput. Also, this follows the rule of "default false". The
change is not breaking but may cause unwanted effects. Review these calls.

*) BUGS
- Fixed a minor issue in Macro.EnableOutput.
- Fixed a multithreading issue in ProgressForm.
- Fixed an error message on closing a module panel which is opened over a
native plugin panel.

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

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

Post by NightRoman »

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

= 4.4.0 =

*** Massive revision of panel API and the first step to "file explorers" ***

All module panels have to be adapted to the new infrastructure.
Modules accessing changed panel members have to be updated, too.

*) Classes and interfaces
- Panel replaces IPanel
- IAnyPanel becomes IPanel (any panel: native, plugin, module)
- Removed IPanelInfo (Info property), its data moved to the class.
- Removed AlternateName from files, it is generated and used internally.

Module panel interface (old IPanel) is combined with the Panel class. The Panel
class (or derived) holds the panel data, event handlers, extra members, etc.
The Host property was removed.

*) New class Explorer
Experimental data provider dealing with FarFile. Explorers are panel helpers
but they can be used without panels for pure data operations including testing.

The PowerShellFar script Test-Explorer-.ps1 shows how various explorers work.

To be continued. All panel methods operating on its virtual file system will be
moved to explorers soon. Panels should be for pure UI classes.

*) Renamed/changed quite a number of lame names/things; just some of them:
- IPanel.Path -> CurrentDirectory
- IPanel.ActivePath -> StartDirectory
- IFar.ActivePath -> CurrentDirectory
- Use*Highlighting -> Highlighting (3 states)
- AddDots -> DotsMode:PanelDotsMode (3 states)
- Some flags were renamed, e.g. related to RealNames mode.
- Events: UpdateFiles, ExportFiles, ImportFiles, MakeDirectory, and
SetPanelDirectory (should set PanelDirectory, not CurrentDirectory).

*) IFar
New method MatchPattern() compatible with the core file masks.

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

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

Post by NightRoman »

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

= 4.4.1 =

Module panel revision, continued
(changes are unlikely breaking for the most of users)

- Fixed a few bugs in the Panel class
- ExplorerResult -> JobResult (to be used elsewhere)
- Panel.UI{View/Edit}CurrentFile -> UI{View/Edit}File
- Added to explorers the DeleteFiles method and its infrastructure

Concept proof: the first version of universal search in explorer panels:
[ShiftF7] (hardcoded so far). There is no dialog yet, it finds all items and
shows them in a new search result panel. [Enter] on found items opens their
original panels as child panels of the search. If an item (its explorer)
supports Export/Import then you can view/edit it in the result panel.

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

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

Post by NightRoman »

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

= 4.4.2 =

*) Module panel revision, continued
(changes are unlikely breaking for the most of users)

Experimental search command moved to the new module Explore. But the search
core moved to FarNet.Tools - the idea is that any module can make its own
custom search using the tools. There are two consumers so far:
- the FarNet module Explore;
- the Start-FarSearch cmdlet in PowerShellFar.

Corrections/changes/etc. in panels and explorers:
- Renamed OperationModes -> ExplorerModes.
- CanX() methods are replaced with Function flags.
- MakePanel(args) -> CreatePanel(): now it has to create or get null.
- Removed SetupPanel() as redundant, CreatePanel() should do this job.
- CanImport is used in ExportFileArgs to let the core to [not] lock the editor.
- Panel.DataId is replaced with more flexible FileComparer approach/property.
- IPanel.TempFileExtension -> ExportFileArgs.FileNameExtension (search panel
can now Export/Edit files with the proper extensions + extensions may now be
different for different files).

Explorers/panels have TypeId and ExplorerTypeId - simple way to tell the core
to reuse the panel with several explorers of the same type.

New explorer type/method ExploreLocation - it works with pure paths and files
with no data. Advantage: standard Far search [AltF7] and [F3], [CtrlQ] work.

*) Editor
- IsLocked is settable (before opening, too).

*) Dialog
- IButton.Text - added internal setter (reflection issue).
- Added IControl.Name (not used by the core) in addition to Data.

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

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

Post by NightRoman »

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

= 4.4.3 =

*) Module panel revision, continued
(changes are unlikely breaking for the most of users)

*) Explorer
- Added quite a number of new methods, changed some existing.

*) Panels revision
- All module panels are based on explorers now. A lots of stuff moved to the
Explorer class. To be continued.

*) Panels new
- Method SelectFiles().
- Property SelectionExists.

*) IFar
- FindPanel() ~ one panel -> Panels() ~ all panels

*) Misc
- Error message box: removed [Copy], [More] shows details in the locked editor.

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

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

Post by NightRoman »

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

= 4.4.4 =

*) File search
- Uses the progress box with some info and [Esc] key stopping the search.
- Results are shown as Name/Owner where Owner values are explorer locations.
- Can be performed in the background with the new switch -Asynchronous of the
Explore module "explore:" command. Results are added to the panel dynamically.
NOTE: Asynchronous mode is very cool but vulnerable, some module panels are not
suitable for this, it all depends on how they and their dependencies work.
- On [Esc] you are prompted to Close or Push the result panel. Push can be done
even if the search process is still in progress. Use the FarNet menu to pop the
panel later (perhaps with more results).
- Added -Depth parameter to the explore: command.

*) Super panel, analogue of the temporary panel

Unlike the temporary panel the super panel deals with files from module panels,
including mixed. It knows how to view / edit / copy / move / delete and etc.
its files because any super file keeps the reference to its source explorer
that actually performs that operations on files, the super panel simply
dispatches operations and files.

It is opened by the empty "explore:" command (i.e. without parameters).

It is also used for search results in both sync and async modes.

*) Opening files (on [Enter])
Added methods OpenFile() and UIOpenFile() to explorer and panels. As a result,
files are opened "as usual" from super/search panels if an explorer can do.

*) ProgressBox
- New properties ElapsedFromShow (used to avoid too frequent shows),
ElapsedFromStart (useful for statistics, performance measurement, etc.)

*) ProgressForm
uses "safe" abort, if possible. The idea/code is from:
http://www.codeproject.com/KB/threads/AbortIfSafe.aspx

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

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

Post by NightRoman »

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

= 4.4.5 =

*) Explorer arguments
Removed the Panel property. Instead, most of explorer methods are called via
virtual panel methods, so that panels have a chance to do something before or
after. There is also the Parameter property, explorers and callers may use it.

*) Explorer methods
- Renamed a few methods (see the forum discussion)
- AcceptFilesEventArgs: Delete -> ToDeleteFiles

*) Explorers and panels
- Added RenameFile() to rename a file
- Added ExportFiles() to copy/move module files to native destinations
- Super panel supports ExportFiles (actually it depends on explorers of files)

*) Misc
- FarFile class is abstract

Post Reply

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