Discussion:
[notepad-plus - Plugin Development] A tiny extension of NPPM_DOOPEN, please.
(too old to reply)
SourceForge.net
2007-08-16 16:52:35 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4468535
By: nobody

Currently, N++ plugin system doesn't enable you to specify the view in which
a file should be opened. It is always opened in the primary view.

NPPM_DOOPEN could be extended, to also recieve WPARAM: MAIN_VIEW or SUB_VIEW.
A file would be cloned to this view, if it was already open in the other view.
If the file isn't open yet, it is just opened to that view, of course.

Alternatively, but much less comfortable, a new message could be added to enable
cloning a file to the other view.

Also, DOOPEN seems to always return 0, even when it succeeds opening a file.
Bug?

Don, could you please add this?
Thanks!

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-16 20:41:17 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4469058
By: donho
Post by SourceForge.net
Currently, N++ plugin system doesn't enable you to specify the view in which
a file should be opened.
Post by SourceForge.net
It is always opened in the primary view.
It's not totally true. NPPM_DOOPEN message opens specific file in the current
view (which may be the second view).
But indeed, there's no way so far to specify a view to open a file.

NPPM_SETCURRENTVIEW message will be added.
Contact to me if you need new heaser and binary to test your plugin.

Don

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-17 09:47:30 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4469962
By: nobody

I tested opening files directly in N++. I did notice that a file is opened in
secondary view if secondary view has focus. The problem arises if the file is
already opened in the other view.

If the file is open in primary view, I have no means to display it in secondary.
As far as I know, N++ will switch to primary view if I try to open the file,
even if the secondary view has focus - or is it not so?

The reason I need the file opened in exactly the specified view is, that I'm
trying to use the secondary view as a utility view of my plugin. If the file
is opened in primary view and not cloned already, I cannot work with the file.

So, what I really need, is either:
1. When opening a file (NPPM_DOOPEN), if file already opened in the other view,
clone the file to current view.
2. A new message to request cloning of a specific file.

Thanks again!

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-17 22:17:58 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4471237
By: nobody

OK, I've completed it (more or less). My plugin features powerful autocompletion,
using ctags. I can send you the current version (0.95), if you would like a
preview of it.

At the moment, the plugin is still somewhat crippled by inability to clone an
already opened file to other view. Go-to-identifier and identifier-lookup functions
don't work in some cases, depending on which files are opened in which view.
The user has to manage the opened files by hand to keep things running, and
I would really appreciate if something like

NPPM_CLONEFILE(?, ?, viewID, tabIndex)

would be added. It specifies viewID (MAIN_VIEW or SUB_VIEW) and tab index of
the file to be cloned. It would function exactly the same as when user right
clicks on a tab and chooses "clone to another view". Would that be a lot of
work to add?

By the way, every documentation I have stated that WM_ACTIVATE_DOC (NPPM_ACTIVATEDOC,
if I could find the new header file) has two parameters: index and viewID. In
fact, the parameters are swapped. That had me debugging for a while ;)

Thanks.

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-19 03:08:56 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4472421
By: donho
I can send you the current version (0.95), if you would like a preview of
it.
NPPM_CLONEFILE(?, ?, viewID, tabIndex)
OK. I'll add this message then.

Don

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-20 00:24:31 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4473270
By: donho

A mail I sent regarding CCompletion plugin :

**************************************************************************
Bostjan,

Good plugin! A little confusing sometimes, but it's quite promising.

I have some questions and suggestions.
Let's begin with the suggestions :

1. Ctrl+Space is used by default to trigger the Notepad++'s auto-completion.
So your shortcut definition Ctrl+Space doesn't work at all under my Notepad++
v4.2.2.
After resigning the shortcut of CCompletion to Ctrl+Alt+Space, I could finally
launch the CCompletion dialog. I suggest to change the shortcut to
Ctrl+Alt+Space.

2. The system X button to close dialog for users don't know the esc key (or
lasy to move their hands to their keyboards :) ).

3. On each char typed, the focus can change from a item to another one in the
list, it is very convenient.
The problem is that on each focus change, CCompletion opens the file on the
second view (if present) automatically.
It may be annoying for an end user since he/she may hope open the files
by him/herself.
To remedy such undesired behaviour, CCompletion can onpen the file only when
user right clik on the item (to have the context menu), then choose one of items
: open in the same view/open in another view.

Here's my question :
Where does CCompletion (or ctag) search the files in order to generate the symbols?
In the current directory and its sub-directory?

Regarding the colon to another view :
I just implement a new message :
#define NPPM_MENUCOMMAND (NPPMSG + 48)
//void NPPM_MENUCOMMAND(0, int cmdID)
// uncomment //#include "menuCmdID.h"
// in the beginning of this file then use the command symbols defined in
"menuCmdID.h" file
// to access all the Notepad++ menu command items

So you can use this message to send IDM_VIEW_CLONE_TO_ANOTHER_VIEW to Notepad++
to do what you want.
Let me know if it works.

Regards,
Don

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-20 00:33:35 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4473277
By: donho

The new added message NPPM_MENUCOMMAND is a message allows plugins to execute
all the available menu item commands.

You can download newest binary and needed headers here :
http://notepad-plus.sourceforge.net/commun/misc/nppNewMsg.zip

Don

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-08-20 09:33:34 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4473698
By: nobody

No problem, will fix 1. and 2. when I get home.

3. This is the identifier lookup function. The user can avoid it by not having
second view open. I can also add an option to disable it, so it won't be annoying
if user wants to have second view without this function. To go to an identifier
manually, the user would use SPACE (go to identifier function).

The identifiers are regenerated after every restart (when the dialog is first
opened), and when the user manually regenerates them. The ctags.tmp file is
created in the directory of the current file, and includes all found definitions
for this directory and all subdirectories. There are some limitations, though.
I'm still considering, how to solve the problem of subdirectory files.

Thanks for the upgrade. Will try it out as soon as I can.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781

Continue reading on narkive:
Loading...