|
From: David H. <no...@so...> - 2013-12-20 18:24:25
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "codelite".
The branch, master has been updated
via db8ed36b58368334f148517fd625d23d3ba3b457 (commit)
via fcb6435e93e038e54652221ef09af7fa1a8bbc2c (commit)
via 487a30dc8b04d007ab6e9960231cd65d6697f953 (commit)
via 40f943c885ea0269aa04687db3e6f88a240c0b3f (commit)
via d9d909fad4d88deeba0fe33f6eceadf603a6e084 (commit)
via dfca573204628a7fc42ad622b109a7b2aa7a3255 (commit)
via 022de58c24758ef2203bbdc31ed1dba7e69e33db (commit)
from 98fa2214474bc9a56991088ba9cb8a6fe900b1b2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/codelite/codelitegit/ci/db8ed36b58368334f148517fd625d23d3ba3b457
commit db8ed36b58368334f148517fd625d23d3ba3b457
Merge: 98fa221 fcb6435
Author: dghart <da...@4P...>
Date: Fri Dec 20 18:22:51 2013 +0000
Merge branch 'multiple bookmark types'
https://sourceforge.net/p/codelite/codelitegit/ci/fcb6435e93e038e54652221ef09af7fa1a8bbc2c
commit fcb6435e93e038e54652221ef09af7fa1a8bbc2c
Author: dghart <da...@4P...>
Date: Fri Dec 20 18:13:29 2013 +0000
Multiple bookmark types are now correctly serialised
diff --git a/LiteEditor/cl_editor.cpp b/LiteEditor/cl_editor.cpp
index df3d06c..e874407 100644
--- a/LiteEditor/cl_editor.cpp
+++ b/LiteEditor/cl_editor.cpp
@@ -2315,17 +2315,30 @@ bool LEditor::LineIsMarked(enum marker_mask_type mask)
void LEditor::StoreMarkersToArray(wxArrayString& bookmarks)
{
- for (int line = 0; (line = MarkerNext(line, 128)) >= 0; ++line) {
- bookmarks.Add(wxString::Format("%d", line));
+ for (int line = 0; (line = MarkerNext(line, mmt_all_bookmarks)) >= 0; ++line) {
+ for (int type=smt_FIRST_BMK_TYPE; type <= smt_LAST_BMK_TYPE; ++type) {
+ int mask = (1 << type);
+ if (MarkerGet(line) & mask) {
+ // We need to serialise both the line and BM type. To keep things simple in sessionmanager, just merge their strings
+ bookmarks.Add(wxString::Format("%d:%d", line, type));
+ }
+ }
}
}
void LEditor::LoadMarkersFromArray(const wxArrayString& bookmarks)
{
for (size_t i = 0; i < bookmarks.GetCount(); i++) {
+ // Unless this is an old file, each bookmark will have been stored in the form: "linenumber:type"
+ wxString lineno = bookmarks.Item(i).BeforeFirst(':');
+ long bmt = smt_bookmark1;
+ wxString type = bookmarks.Item(i).AfterFirst(':');
+ if (!type.empty()) {
+ type.ToLong(&bmt);
+ }
long line = 0;
- if (bookmarks.Item(i).ToLong(&line)) {
- MarkerAdd(line, 0x7); // BMTODO
+ if (lineno.ToLong(&line)) {
+ MarkerAdd(line, bmt);
}
}
}
https://sourceforge.net/p/codelite/codelitegit/ci/487a30dc8b04d007ab6e9960231cd65d6697f953
commit 487a30dc8b04d007ab6e9960231cd65d6697f953
Author: dghart <da...@4P...>
Date: Fri Dec 20 16:20:45 2013 +0000
Multiple bookmark types: These are now taken into account when a file is being reformatted
diff --git a/LiteEditor/cl_editor.cpp b/LiteEditor/cl_editor.cpp
index 2b55b70..df3d06c 100644
--- a/LiteEditor/cl_editor.cpp
+++ b/LiteEditor/cl_editor.cpp
@@ -4488,8 +4488,8 @@ void LEditor::OnFileFormatStarting(wxCommandEvent& e)
void LEditor::DoRestoreMarkers()
{
MarkerDeleteAll(mmt_all_bookmarks);
- for(size_t i=0; i<m_savedMarkers.GetCount(); ++i) {
- MarkerAdd(m_savedMarkers.Item(i), smt_bookmark1); // BMTODO
+ for(size_t i=smt_FIRST_BMK_TYPE; i<m_savedMarkers.size(); ++i) {
+ MarkerAdd(m_savedMarkers.at(i).first, m_savedMarkers.at(i).second);
}
m_savedMarkers.clear();
}
@@ -4498,12 +4498,16 @@ void LEditor::DoSaveMarkers()
{
m_savedMarkers.clear();
int nLine = LineFromPosition(0);
- int mask = mmt_all_bookmarks;
- int nFoundLine = MarkerNext(nLine, mask);
+ int nFoundLine = MarkerNext(nLine, mmt_all_bookmarks);
while ( nFoundLine >= 0 ) {
- m_savedMarkers.Add( nFoundLine ); // BMTODO
- nFoundLine = MarkerNext(nFoundLine+1, mask);
+ for (size_t type=smt_FIRST_BMK_TYPE; type < smt_LAST_BMK_TYPE; ++type) {
+ int mask = (1 << type);
+ if (MarkerGet(nLine) & mask) {
+ m_savedMarkers.push_back(std::make_pair(nFoundLine, type));
+ }
+ }
+ nFoundLine = MarkerNext(nFoundLine+1, mmt_all_bookmarks);
}
}
diff --git a/LiteEditor/cl_editor.h b/LiteEditor/cl_editor.h
index ec20fa2..845791a 100644
--- a/LiteEditor/cl_editor.h
+++ b/LiteEditor/cl_editor.h
@@ -152,7 +152,7 @@ class LEditor : public wxStyledTextCtrl, public IEditor
int m_positionToEnsureVisible;
bool m_preserveSelection;
bool m_fullLineCopyCut;
- wxArrayInt m_savedMarkers;
+ std::vector< std::pair<int,int> > m_savedMarkers;
wxArrayString m_markerLabels;
bool m_findBookmarksActive;
https://sourceforge.net/p/codelite/codelitegit/ci/40f943c885ea0269aa04687db3e6f88a240c0b3f
commit 40f943c885ea0269aa04687db3e6f88a240c0b3f
Author: dghart <da...@4P...>
Date: Fri Dec 20 15:22:24 2013 +0000
Multiple bookmark types: It's now possible to set individual colours for each bookmark type
diff --git a/Interfaces/cl_defs.h b/Interfaces/cl_defs.h
index 4d360b1..761c9d2 100644
--- a/Interfaces/cl_defs.h
+++ b/Interfaces/cl_defs.h
@@ -54,4 +54,6 @@
# define CL_USE_NEW_BUILD_TAB 1
#endif
+#define CL_N0_OF_BOOKMARK_TYPES 5
+
#endif // CL_DEFS_H
diff --git a/LiteEditor/cl_editor.cpp b/LiteEditor/cl_editor.cpp
index afa9490..2b55b70 100644
--- a/LiteEditor/cl_editor.cpp
+++ b/LiteEditor/cl_editor.cpp
@@ -480,10 +480,10 @@ void LEditor::SetProperties()
}
for (size_t bmt=smt_FIRST_BMK_TYPE; bmt <= smt_LAST_BMK_TYPE; ++bmt) {
- MarkerDefine(bmt, marker); // BMTODO
- if (bmt == smt_LAST_BMK_TYPE) MarkerSetBackground(bmt, wxT("YELLOW")); // BMTODO
- else MarkerSetBackground(bmt, options->GetBookmarkBgColour());
- MarkerSetForeground(bmt, options->GetBookmarkFgColour());
+ MarkerDefine(bmt, marker);
+ MarkerSetBackground(bmt, options->GetBookmarkBgColour(bmt - smt_FIRST_BMK_TYPE));
+ MarkerSetForeground(bmt, options->GetBookmarkFgColour(bmt - smt_FIRST_BMK_TYPE));
+ m_markerLabels.Item(bmt - smt_FIRST_BMK_TYPE) = options->GetBookmarkLabel(bmt - smt_FIRST_BMK_TYPE);
}
MarkerDefineBitmap(smt_breakpoint, wxBitmap(wxImage(stop_xpm)));
@@ -573,7 +573,7 @@ void LEditor::SetProperties()
col2 = wxColour(val2);
}
- IndicatorSetForeground(1, options->GetBookmarkBgColour());
+ IndicatorSetForeground(1, options->GetBookmarkBgColour(smt_find_bookmark - smt_FIRST_BMK_TYPE));
// Word highlight indicator
IndicatorSetStyle(MARKER_WORD_HIGHLIGHT, wxSTC_INDIC_ROUNDBOX);
@@ -2325,7 +2325,7 @@ void LEditor::LoadMarkersFromArray(const wxArrayString& bookmarks)
for (size_t i = 0; i < bookmarks.GetCount(); i++) {
long line = 0;
if (bookmarks.Item(i).ToLong(&line)) {
- MarkerAdd(line, 0x7);
+ MarkerAdd(line, 0x7); // BMTODO
}
}
}
@@ -2552,7 +2552,7 @@ wxString LEditor::GetBookmarkLabel(sci_marker_types type) const
wxCHECK_MSG(type >= smt_FIRST_BMK_TYPE && type <= smt_LAST_BMK_TYPE, "", "Invalid marker type");
wxString label = m_markerLabels.Item(type - smt_FIRST_BMK_TYPE);
if (label.empty()) {
- label = wxString::Format("type %i", type - smt_FIRST_BMK_TYPE + 1);
+ label = wxString::Format("Type %i", type - smt_FIRST_BMK_TYPE + 1);
}
return label;
@@ -2603,7 +2603,7 @@ wxString LEditor::GetBookmarkTooltip(const int lineno)
// If multiple, list each, with the visible one first
int linebits = MarkerGet(lineno);
if (linebits & GetActiveBookmarkMask()) {
- active = "<b>Bookmark " + GetBookmarkLabel((sci_marker_types)GetActiveBookmarkType()) + "</b>";
+ active = "<b>" + GetBookmarkLabel((sci_marker_types)GetActiveBookmarkType()) + " bookmark</b>";
}
for (size_t bmt=smt_FIRST_BMK_TYPE; bmt <= smt_LAST_BMK_TYPE; ++bmt) {
@@ -2612,7 +2612,7 @@ wxString LEditor::GetBookmarkTooltip(const int lineno)
if (!others.empty()) {
others << "\n";
}
- others << "Bookmark " << GetBookmarkLabel((sci_marker_types)bmt);
+ others << GetBookmarkLabel((sci_marker_types)bmt) << " bookmark";
}
}
}
diff --git a/LiteEditor/cl_editor.h b/LiteEditor/cl_editor.h
index 8e0eb07..ec20fa2 100644
--- a/LiteEditor/cl_editor.h
+++ b/LiteEditor/cl_editor.h
@@ -42,6 +42,7 @@
#include "breakpointsmgr.h"
#include "plugin.h"
#include "globals.h"
+#include "cl_defs.h"
#define DEBUGGER_INDICATOR 11
#define MATCH_INDICATOR 10
@@ -63,7 +64,8 @@ enum sci_annotation_styles {
// The higher the value, the nearer the top of the pecking order displaywise. So keep the most important breakpoint at the top i.e. smt_breakpoint,
// but have smt_breakpointsmt_indicator above it, so you can see the indicator when there's a breakpt too
enum sci_marker_types { /* markers 0-2 are unused atm */
- smt_FIRST_BMK_TYPE=3, smt_bookmark1=smt_FIRST_BMK_TYPE, smt_bookmark2, smt_bookmark3, smt_bookmark4, smt_find_bookmark=7, smt_LAST_BMK_TYPE=smt_find_bookmark,
+ smt_FIRST_BMK_TYPE=3, smt_LAST_BMK_TYPE=smt_FIRST_BMK_TYPE + CL_N0_OF_BOOKMARK_TYPES - 1,
+ smt_bookmark1=smt_FIRST_BMK_TYPE, smt_bookmark2, smt_bookmark3, smt_bookmark4, smt_find_bookmark=smt_LAST_BMK_TYPE,
smt_FIRST_BP_TYPE=8, smt_cond_bp_disabled = smt_FIRST_BP_TYPE, smt_bp_cmdlist_disabled, smt_bp_disabled, smt_bp_ignored,
smt_cond_bp, smt_bp_cmdlist, smt_breakpoint, smt_LAST_BP_TYPE = smt_breakpoint,
smt_indicator, smt_warning, smt_error
diff --git a/LiteEditor/editor_options_bookmarks.wxcp b/LiteEditor/editor_options_bookmarks.wxcp
index f472dc5..249d555 100644
--- a/LiteEditor/editor_options_bookmarks.wxcp
+++ b/LiteEditor/editor_options_bookmarks.wxcp
@@ -1,12 +1,14 @@
{
"metadata": {
"m_generatedFilesDir": "/common/git/CL/LiteEditor",
- "m_objCounter": 2,
+ "m_objCounter": 18,
"m_includeFiles": [],
"m_bitmapFunction": "wxCrafterZg1KYTInitBitmapResources",
"m_bitmapsFile": "editor_options_bookmarks_liteeditor_bitmaps.cpp",
"m_GenerateCodeTypes": 4984313,
"m_outputFileName": "editorsettingsbookmarksbasepanel",
+ "m_firstWindowId": 1000,
+ "m_useEnum": false,
"m_templateClasses": []
},
"windows": [{
@@ -67,6 +69,10 @@
"m_value": ""
}, {
"type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
"m_label": "Title:",
"m_value": ""
}, {
@@ -105,6 +111,10 @@
"m_label": "Name:",
"m_value": "bSizer2"
}, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
"type": "choice",
"m_label": "Orientation:",
"m_selection": 0,
@@ -173,6 +183,10 @@
"m_value": ""
}, {
"type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
"m_label": "Label:",
"m_value": "Display Breakpoints / Bookmarks margin"
}, {
@@ -243,6 +257,10 @@
"m_label": "Include File:",
"m_value": ""
}, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
"type": "multi-string",
"m_label": "Label:",
"m_value": "Bookmark Shape:"
@@ -314,6 +332,10 @@
"m_label": "Include File:",
"m_value": ""
}, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
"type": "multi-string",
"m_label": "Choices:",
"m_value": ""
@@ -325,320 +347,816 @@
"m_events": [],
"m_children": []
}, {
- "m_type": 4403,
+ "m_type": 4401,
"proportion": 0,
"border": 5,
- "gbSpan": ",",
- "gbPosition": ",",
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
"m_properties": [{
"type": "string",
"m_label": "Name:",
- "m_value": "fgSizer1"
- }, {
- "type": "string",
- "m_label": "# Columns:",
- "m_value": "2"
- }, {
- "type": "string",
- "m_label": "# Rows:",
- "m_value": "0"
- }, {
- "type": "string",
- "m_label": "Growable columns:",
- "m_value": "0,1"
+ "m_value": "boxSizer6"
}, {
"type": "string",
- "m_label": "Growable rows:",
+ "m_label": "Style:",
"m_value": ""
}, {
- "type": "string",
- "m_label": "Horizontal gap:",
- "m_value": "0"
- }, {
- "type": "string",
- "m_label": "Vertical gap:",
- "m_value": "0"
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 1,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
}],
"m_events": [],
"m_children": [{
- "m_type": 4405,
+ "m_type": 4401,
"proportion": 0,
"border": 5,
- "gbSpan": ",",
- "gbPosition": ",",
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
"m_properties": [{
- "type": "winid",
- "m_label": "ID:",
- "m_winid": "wxID_ANY"
- }, {
- "type": "string",
- "m_label": "Size:",
- "m_value": ""
- }, {
- "type": "string",
- "m_label": "Minimum Size:",
- "m_value": ""
- }, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_staticText4"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": ""
- }, {
- "type": "colour",
- "m_label": "Bg Colour:",
- "colour": "<Default>"
- }, {
- "type": "colour",
- "m_label": "Fg Colour:",
- "colour": "<Default>"
- }, {
- "type": "font",
- "m_label": "Font:",
- "m_value": ""
- }, {
- "type": "bool",
- "m_label": "Hidden",
- "m_value": false
- }, {
- "type": "bool",
- "m_label": "Disabled",
- "m_value": false
- }, {
- "type": "bool",
- "m_label": "Focused",
- "m_value": false
- }, {
- "type": "string",
- "m_label": "Class Name:",
- "m_value": ""
+ "m_value": "boxSizer8"
}, {
"type": "string",
- "m_label": "Include File:",
+ "m_label": "Style:",
"m_value": ""
}, {
- "type": "multi-string",
- "m_label": "Label:",
- "m_value": "Select the bookmark background colour:"
- }, {
- "type": "string",
- "m_label": "Wrap:",
- "m_value": "-1"
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
}],
"m_events": [],
- "m_children": []
+ "m_children": [{
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticText10"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
... 2396 lines suppressed ...
hooks/post-receive
--
codelite
|