Page 1 of 1

Creating on demand tree panel/view

Posted: Wed 22 Dec, 2010 21:24
by senpost
I am totally new to Far plugin development. I am good with C# and .NET.

I have an idea for plugin, A tree view/panel that loads only top level folders and loads contents once user makes selection, loads the inside contents.

I am thinking of starting up with FarNet,

Any ideas/tips to get started is appreciated.

Thanks
Se

Re: Creating on demand tree panel/view

Posted: Wed 22 Dec, 2010 23:41
by NightRoman
senpost
1) FarNet is the right way to go if you prefer .NET development.
2) The folder tree panel already exists in the FarNet module PowerShellFar. I think you should take a look at it in any case. If you like it as it is then it's great, we are done.
If not then:
a) Explain what you would like it to be, perhaps I am happy to add what you want;
b) Take a look at the implementation code in PowerShellFar module, write your own tool (and optionally publish it, we all will be happy).

Re: Creating on demand tree panel/view

Posted: Wed 22 Dec, 2010 23:47
by NightRoman
BTW, some time ago I created two threads for discussion of
FarNet
PowerShellFar

It is very quiet there :) You can be the first English speaking visitor. Welcome, indeed.

Re: Creating on demand tree panel/view

Posted: Thu 23 Dec, 2010 02:34
by senpost
@NightRoman, Thanks for your reply, I am surprised to see a reply from you. I feel like FAR load time is high if I add PowerShellFar, May be I am wrong. You have done wonderful job opening plugin development for .NET developers. But I still have some trouble getting started plugin development.
My goals here is,
1. Learn FAR plugin development, so I can develop something.
2. Publish set of articles about plugin development and FAR

Thanks for your reply

Re: Creating on demand tree panel/view

Posted: Thu 23 Dec, 2010 10:38
by NightRoman
I feel like FAR load time is high if I add PowerShellFar
Do not worry about it until you have tried. In PSF the PowerShell core is loaded in a separate thread, main UI thread is not blocked. So that basically in most cases you should not see any difference in load time at all. Memory use is increased with PowerShell, of course, but who really cares nowadays? FarNet itself takes much more memory than pure Far.
Learn FAR plugin development, so I can develop something.
* Download and learn the API documentation FarNetAccord.
* Take a close look at source code of FarNet sample and real modules.
* Still use PowerShellFar:
a) It is good for fast prototyping of simple things and exploring FarNet and .NET guts interactively or by scripts.
b) Take a look at PSF scripts: they show how FarNet works and PowerShell code is easy to translate to C#.
c) Advanced: you can test your FarNet .NET module by calling its public methods directly from PSF scripts.

Re: Creating on demand tree panel/view

Posted: Fri 24 Dec, 2010 23:53
by senpost
Thank you NightRoman, Nice job on FarNet and PowerShellFar

This is what I have in my mind, drill down search in Far, Let me try to explain this by an example,

1. Select a folder/folders to search in active panel
2. Get all *.log files from selected folder(s)
3. Filter files that has todays date
4. From the result, filter files that have log entries from 4.00 pm to 10.00 pm
5. This is our final set of files, copy the filenames to clipboard

In powershell I would do this by placing the result for each step in a temp variable and drill down further. With PowerShellFar, I would like to add some GUI so my search can be more visual.

Please let me know how can I get started.

Thanks in advance.

Re: Creating on demand tree panel/view

Posted: Sun 26 Dec, 2010 09:30
by NightRoman
This can be done in PowerShellFar, indeed. But what kind of UI do you want? It is not clear from what you said.

It is better to ask such questions in the thread specifically created for PowerShellFar