Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Communication between plugins (abbreviations, codecompletion)
p2rkw:
Hi,
How plug-ins can communicate (exchange data) with each other? Is it possible?
Last time I found out that most of my abbreviations keywords are c++ keywords too (class, for, switch, etc.). So when I typing one of them and codecompletion's SmartSense occurs I pressed"enter", and next keyboard shortcut for autocomplete.
Unfortunately I can only remember small part of my abbreviation's keywords. But, wait, why other abbreviations can't be listed in call tip too?
So, I want to import keywords from abbreviations plugin to codecompletion's SmartSense. If abbreviation keyword will be selected it macro will be automatically expanded.
What you think about this idea?
How can I import abbreviation's keywords to codecompletion? I read about Codeblocks events but it seems that only main app can send them.
MortenMacFly:
--- Quote from: p2rkw on August 20, 2012, 10:31:03 pm ---How plug-ins can communicate (exchange data) with each other? Is it possible?
--- End quote ---
This should not be needed and would be bad design and therefore error prone.
--- Quote from: p2rkw on August 20, 2012, 10:31:03 pm ---If abbreviation keyword will be selected it macro will be automatically expanded.
--- End quote ---
This should therefore be a function of the abbreviations plugin and not code-completion. Thus, no plugin-plugin communication is needed. :)
p2rkw:
@MortenMacFly: my first idea was to import all abbreviations keywords into CC as normal keywords, so they could be avalible as well as normal keywords (one sorted list) and after eventually selection of imported keyword call abbreviations plugin to expand macro. But I don't know enough source code architecture so I added auto completion to abbreviations.
I know that this patch should be divided into 2 parts, but again, I dont know how to create two patches on one working copy :)
Patch1:
- replace iteration over abbreviation's keywords map with find
- abbreviations now can be expandend even if cursor is inside keyword (not only at end)
Patch2:
- same as above +
- if keyword isn't complete abbreviation will display auto complete tip with possible matches
edit: patch in first post
MortenMacFly:
--- Quote from: p2rkw on August 22, 2012, 02:40:38 am ---Patch1:
Patch2:
--- End quote ---
Don't forget to put them on the patch tracker so they don't get lost and can be assigned to a dev.
MortenMacFly:
--- Quote from: p2rkw on August 22, 2012, 02:40:38 am ---Patch1:
Patch2:
--- End quote ---
BTW: Applying patch 2 causes conflicts when having patch 1 applied first. Does patch 2 include/supersede patch 1? They don't seem to be incremental to me...
Navigation
[0] Message Index
[#] Next page
Go to full version