User forums > General (but related to Code::Blocks)
A feature request about CC and BrowseTracker
mariocup:
Hi Pecan,
in some projects I have to use eclipse and found some interesting feature that could be integrated perhaps quite easy with existing features.
If you set bookmarks that can be label as favourites and you can use this favourite list to navigate between bookmarks. The same feature would make sense for Browsemarks.
In the filemanager plugin there is already a favourite manager for directories that provides such a functionality.
What do you think about it.
ollydbg:
Today, I have checkout the source code of "codelite" from sourceforge to see it's navigate back / navigate forward function.
All the related code was in:
pluggin_sdk/BrowsingRecords.
I have found that it try to add every position after a jump. some piece of code like:
--- Code: ---void ContextCpp::OnGotoFunctionStart(wxCommandEvent& event)
{
int line_number = GetCtrl().LineFromPosition(GetCtrl().GetCurrentPos());
TagEntryPtr tag = TagsManagerST::Get()->FunctionFromFileLine(GetCtrl().GetFileName(), line_number);
if (tag) {
// move the caret to the function start
BrowseRecord jumpfrom = GetCtrl().CreateBrowseRecord();
GetCtrl().SetCaretAt(GetCtrl().PositionFromLine(tag->GetLine()-1));
// add an entry to the navigation manager
NavMgr::Get()->AddJump(jumpfrom, GetCtrl().CreateBrowseRecord());
}
}
--- End code ---
In fact, the navigate manager in codelite still can't automatically record the editing position. Here comes my question:
I would like to fine a Message or Notification in wxscinllata which will send when a caret position was changed. Any body know such message? Because that the trigger I can do the record.
If we can't find any message for the situation I stated, I think a wxTimer is need, eg, it can qurey a caret position every one seconds, and check is is different than the previous one, so, a new position can be recorded if necessary.
Any comments?
Thanks.
blueshake:
@ollydbg
I found that the highlightbrace was done in these codes in cbeditor.cpp.
so I think we can do something here.
--- Code: ---void cbEditor::OnEditorUpdateUI(wxScintillaEvent& event)
{
if (Manager::Get()->GetEditorManager()->GetActiveEditor() == this)
{
NotifyPlugins(cbEVT_EDITOR_UPDATE_UI);
HighlightBraces(); // brace highlighting
m_pData->HighlightOccurrences();
}
OnScintillaEvent(event);
}
--- End code ---
ollydbg:
--- Quote from: blueshake on August 15, 2009, 03:03:15 pm ---@ollydbg
I found that the highlightbrace was done in these codes in cbeditor.cpp.
so I think we can do something here.
--- Code: ---void cbEditor::OnEditorUpdateUI(wxScintillaEvent& event)
{
if (Manager::Get()->GetEditorManager()->GetActiveEditor() == this)
{
NotifyPlugins(cbEVT_EDITOR_UPDATE_UI);
HighlightBraces(); // brace highlighting
m_pData->HighlightOccurrences();
}
OnScintillaEvent(event);
}
--- End code ---
--- End quote ---
Thanks!!
Did you mean that we can handle "cbEVT_EDITOR_UPDATE_UI"
in the BrowseTracker plugin?
blueshake:
I am not sure.but we can have a try,afterall ,highbrace is handled by this message.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version