Nqq-plugins needs implementation

Bug #1193469 reported by Justin Kinnaird
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Notepadqq [MOVED TO GITHUB]
New
Medium
Unassigned

Bug Description

Revision history for this message
Justin Kinnaird (teklad) wrote :

In the short term I believe option #1 would be the best route to take. What do you think about having option #3 also available to later down the road for those people that enjoy making love to C++ plugins? It isn't really a priority just figured I'd pull your thoughts on it so we can modify the blueprint as necessary.

Changed in notepadqq:
importance: Undecided → Medium
Revision history for this message
Daniele "OpenNingia" Simonetti (oppifjellet) wrote :

if we implement binary plugins we should also consider providing a "safe mode" to run the app without loading plugins. Just in case one of them is causing the program to crash at startup. Also we should be aware of x86, x86_64 conflicts

Revision history for this message
Daniel Di Sarli (danieleds0) wrote :

I think that binary plugins could cause more trouble than advantages. I'd keep it simple by going only with option #1.

Revision history for this message
Justin Kinnaird (teklad) wrote :

We will go with option #1 then. I'm in agreement that it would probably be more trouble than its worth and a larger headache to maintain.

Revision history for this message
Justin Kinnaird (teklad) wrote :

I've changed around the blueprint to reflect the decision. If everyone is in agreement with the current blueprint we can go ahead and approve it.

Revision history for this message
Daniele "OpenNingia" Simonetti (oppifjellet) wrote :

a tentative implementation is here:
https://github.com/OpenNingia/notepadqq/tree/plugins/

this is an hello world plugin:

({
 name: "HelloWorld",
 init: function()
 {
  nqq.debug("init called");
  nqq.addMenuItem("HelloWorld", this.hello_world);
 },

 hello_world: function() {
  editor = nqq.create()
        text = nqq.prompt("Text", "EnterText", "Hello world!");
  editor.append(text);
 }
});

save this as helloworld.qs

and place it under ~/.config/notepadqq/scripts/

Revision history for this message
Aaditya Kalsi (aadityakalsi) wrote :

Do you see benefit in using another language as a plugin language, and write a c++-<insert language> bridge and expose an API in that language?

Revision history for this message
Daniele "OpenNingia" Simonetti (oppifjellet) wrote :

Yes, of course. The tentative implementation here ( https://github.com/OpenNingia/notepadqq/tree/plugins/ ) uses a variant of Javascript ( QtScript ) as plugin language.

Revision history for this message
Aaditya Kalsi (aadityakalsi) wrote :

haha.. i shouldve seen that.. :) my concern is use of existing libraries in that language and amount of support available.. i'll just read more on QtScript. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.