Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Python Code Completion
MortenMacFly:
--- Quote from: dmoore on October 13, 2012, 03:54:13 pm ---* the shortcut keys (e.g. ctrl + space, ctrl+shift+space) worked for all CC plugins.
--- End quote ---
Isn't this the case when all CC plugins call event.Ski() in their handler accordingly?
--- Quote from: dmoore on October 13, 2012, 03:54:13 pm ---* For symbol browsing (which I haven't even begun to implement for python yet), share the symbol tab in the manager pane across plugins, though not sure how feasible that is. How would one separate the symbols for different languages?
--- End quote ---
I would prefer having a separate UI for the languages, like done with Fortran. Because for mixed language projects (i.e. Fortran is often mixed with C/C++) this is the only way to go.
--- Quote from: dmoore on October 13, 2012, 03:54:13 pm ---* the goto declaration/implementation stuff had a shared GUI (or at least didn't show inappropriately).
--- End quote ---
I don't get it: Did it have a shared UI (when/where is it it gone?!) or do you wish it had one?!
dmoore:
--- Quote from: MortenMacFly on October 14, 2012, 07:44:34 am ---
--- Quote from: dmoore on October 13, 2012, 03:54:13 pm ---* the shortcut keys (e.g. ctrl + space, ctrl+shift+space) worked for all CC plugins.
--- End quote ---
Isn't this the case when all CC plugins call event.Ski() in their handler accordingly?
--- End quote ---
No because the menu items are provided by the Code Completion plugin and not the SDK
see plugins/codecompletion/codecompletion.cpp(635)
--- Code: --- m_EditMenu->Append(idMenuCodeComplete, _("Complete code\tCtrl-Space"));
m_EditMenu->Append(idMenuShowCallTip, _("Show call tip\tCtrl-Shift-Space"));
--- End code ---
--- Quote ---I would prefer having a separate UI for the languages, like done with Fortran. Because for mixed language projects (i.e. Fortran is often mixed with C/C++) this is the only way to go.
--- End quote ---
Well I think it would be useful to at least have them share the symbols tab.
--- Quote ---
--- Quote from: dmoore on October 13, 2012, 03:54:13 pm ---* the goto declaration/implementation stuff had a shared GUI (or at least didn't show inappropriately).
--- End quote ---
I don't get it: Did it have a shared UI (when/where is it it gone?!) or do you wish it had one?!
--- End quote ---
You missed the "it would be nice if..." that prefaced those bullets. So no it doesn't have a shared UI and never did because the CC plugin currently provides those menu options. It would be better if the SDK did and called each plugins' handler. Also, can we switch off the goto declaration/implementation options in CC if the highlight language is not in some predefined set (e.g. C/C++/D/Fortran?).
see plugins/codecompletion/codecompletion.cpp(644)
--- Code: --- pos = menuBar->FindMenu(_("Sea&rch"));
if (pos != wxNOT_FOUND)
{
m_SearchMenu = menuBar->GetMenu(pos);
m_SearchMenu->Append(idMenuGotoFunction, _("Goto function...\tCtrl-Alt-G"));
m_SearchMenu->Append(idMenuGotoPrevFunction, _("Goto previous function\tCtrl-PgUp"));
m_SearchMenu->Append(idMenuGotoNextFunction, _("Goto next function\tCtrl-PgDn"));
m_SearchMenu->Append(idMenuGotoDeclaration, _("Goto declaration\tCtrl-Shift-."));
m_SearchMenu->Append(idMenuGotoImplementation, _("Goto implementation\tCtrl-."));
m_SearchMenu->Append(idMenuFindReferences, _("Find references\tAlt-."));
m_SearchMenu->Append(idMenuOpenIncludeFile, _("Open include file\tCtrl-Alt-."));
}
--- End code ---
MortenMacFly:
--- Quote from: dmoore on October 14, 2012, 04:31:45 pm ---No because the menu items are provided by the Code Completion plugin and not the SDK
--- End quote ---
Understood and makes sense.
--- Quote from: dmoore on October 14, 2012, 04:31:45 pm ---Well I think it would be useful to at least have them share the symbols tab.
--- End quote ---
But how would you differ symbols with the same name coming from different CC's? And also, syncing the symbols tab with the user's selection and re-freshing it becomes an issues, especially if it is thread based (as it is now). I think having a symbol tab for each language is not too much and makes it way easier to handle. Maybe a CC plugin can "request" such a tab from the SDK.
--- Quote from: dmoore on October 14, 2012, 04:31:45 pm ---So no it doesn't have a shared UI and never did because the CC plugin currently provides those menu options. [...]
--- End quote ---
Well - so altogether this sounds like a similar concept as for the debugger, isn't it? Sharing the dialogs via the SDK and having the plugins to specialise it. It would be unique (I've never heard of an IDE having such) but sounds good.
oBFusCATed:
--- Quote from: MortenMacFly on October 14, 2012, 04:39:28 pm ---But how would you differ symbols with the same name coming from different CC's? And also, syncing the symbols tab with the user's selection and re-freshing it becomes an issues, especially if it is thread based (as it is now). I think having a symbol tab for each language is not too much and makes it way easier to handle. Maybe a CC plugin can "request" such a tab from the SDK.
--- End quote ---
You'll have a combobox with the current language showed by the symbol browser. Changing the value in the combo could change the UI - ask the plugin to build the correct UI.
dmoore:
--- Quote from: oBFusCATed on October 15, 2012, 05:31:23 pm ---You'll have a combobox with the current language showed by the symbol browser. Changing the value in the combo could change the UI - ask the plugin to build the correct UI.
--- End quote ---
Yes, I think this would work well. Perhaps the combo could be switched automatically to whatever type of source the user has open in the active editor.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version