Virtual filesystem - intercepting Edit

A place where plug-in developers can share their knowledge and experience.
Post Reply
pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Virtual filesystem - intercepting Edit

Post by pepak » Wed 27 Aug, 2014 15:57

Hi!

I wrote a plugin which implements a virtual filesystem and I would like to intercept the Edit function to edit items in a user-friendly dialog (much like Session Manager in NetBox). Which functions should I implement and export? I don't see any obvious candidate in the Panels API, except for ProcessPanelInputW, but that one would take a lot of resources and probably still fail in case the user selected Edit from menu. Which function am I overlooking? Thanks.

User avatar
DrKnS
Posts: 4642
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 4 times
Been thanked: 125 times
Contact:

Re: Virtual filesystem - intercepting Edit

Post by DrKnS » Wed 27 Aug, 2014 16:01

GetFilesW + OPM_EDIT

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Re: Virtual filesystem - intercepting Edit

Post by pepak » Wed 27 Aug, 2014 16:10

Ah. It seems that this way I could implement a special handler for OPM_EDIT, but generate regular temp files for other operating modes?

Which operating modes are used for creation of new files (SHIFT+F4) and for running a file (ENTER)?

Thanks.

User avatar
DrKnS
Posts: 4642
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 4 times
Been thanked: 125 times
Contact:

Re: Virtual filesystem - intercepting Edit

Post by DrKnS » Wed 27 Aug, 2014 18:20

i suggest you to take a look at the source code of existing filesystem plugins like FTP or NetBox, and the source code of Far itself.

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Re: Virtual filesystem - intercepting Edit

Post by pepak » Wed 27 Aug, 2014 18:45

I did. But it's rather difficult to separate the one function required for this task from all the rest. Once I know where to look, it's easy enough to discover what I need, but knowing where to look is the problem.

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Re: Virtual filesystem - intercepting Edit

Post by pepak » Thu 28 Aug, 2014 17:19

Never mind, implemented it using ProcessPanelInputW and it seems to work OK.

Post Reply

Return to “Plug-In Developers”