mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Bookmark folders, Drag & Drop
This commit is contained in:
parent
b3787313be
commit
bd048e2fe6
5 changed files with 670 additions and 188 deletions
|
@ -1896,26 +1896,37 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
using (sd.CreateArray("Bookmarks"))
|
||||
|
||||
using (sd.CreateArray("BookmarkFolders"))
|
||||
{
|
||||
for (var bookmark in mBookmarkManager.mBookmarkList)
|
||||
{
|
||||
if (bookmark.mFileName != null)
|
||||
for (var folder in mBookmarkManager.mBookmarkFolders)
|
||||
{
|
||||
using (sd.CreateObject())
|
||||
{
|
||||
using (sd.CreateObject())
|
||||
{
|
||||
String relPath = scope .();
|
||||
mWorkspace.GetWorkspaceRelativePath(bookmark.mFileName, relPath);
|
||||
sd.Add("File", relPath);
|
||||
sd.Add("Line", bookmark.mLineNum);
|
||||
sd.Add("Column", bookmark.mColumn);
|
||||
sd.Add("Title", bookmark.mTitle);
|
||||
if (bookmark.mIsDisabled)
|
||||
sd.Add("Disabled", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
sd.Add("Title", folder.mTitle);
|
||||
|
||||
using (sd.CreateArray("Bookmarks"))
|
||||
{
|
||||
for (var bookmark in folder.mBookmarkList)
|
||||
{
|
||||
if (bookmark.mFileName != null)
|
||||
{
|
||||
using (sd.CreateObject())
|
||||
{
|
||||
String relPath = scope .();
|
||||
mWorkspace.GetWorkspaceRelativePath(bookmark.mFileName, relPath);
|
||||
sd.Add("File", relPath);
|
||||
sd.Add("Line", bookmark.mLineNum);
|
||||
sd.Add("Column", bookmark.mColumn);
|
||||
sd.Add("Title", bookmark.mTitle);
|
||||
if (bookmark.mIsDisabled)
|
||||
sd.Add("Disabled", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using (sd.CreateObject("DebuggerDisplayTypes"))
|
||||
|
@ -3308,22 +3319,33 @@ namespace IDE
|
|||
breakpoint.SetThreadId(0);
|
||||
}
|
||||
}
|
||||
|
||||
for (var _bookmark in data.Enumerate("Bookmarks"))
|
||||
|
||||
for (var _bookmarkFolder in data.Enumerate("BookmarkFolders"))
|
||||
{
|
||||
String relPath = scope String();
|
||||
data.GetString("File", relPath);
|
||||
IDEUtils.FixFilePath(relPath);
|
||||
String absPath = scope String();
|
||||
mWorkspace.GetWorkspaceAbsPath(relPath, absPath);
|
||||
int32 lineNum = data.GetInt("Line");
|
||||
int32 column = data.GetInt("Column");
|
||||
String title = scope String();
|
||||
data.GetString("Title", title);
|
||||
|
||||
bool isDisabled = data.GetBool("Disabled", false);
|
||||
BookmarkFolder folder = null;
|
||||
|
||||
mBookmarkManager.CreateBookmark(absPath, lineNum, column, isDisabled, title);
|
||||
if (!String.IsNullOrWhiteSpace(title))
|
||||
folder = mBookmarkManager.CreateFolder(title);
|
||||
|
||||
for (var _bookmark in data.Enumerate("Bookmarks"))
|
||||
{
|
||||
String relPath = scope String();
|
||||
data.GetString("File", relPath);
|
||||
IDEUtils.FixFilePath(relPath);
|
||||
String absPath = scope String();
|
||||
mWorkspace.GetWorkspaceAbsPath(relPath, absPath);
|
||||
int32 lineNum = data.GetInt("Line");
|
||||
int32 column = data.GetInt("Column");
|
||||
String bookmarkTitle = scope String();
|
||||
data.GetString("Title", bookmarkTitle);
|
||||
|
||||
bool isDisabled = data.GetBool("Disabled", false);
|
||||
|
||||
mBookmarkManager.CreateBookmark(absPath, lineNum, column, isDisabled, bookmarkTitle, folder);
|
||||
}
|
||||
}
|
||||
|
||||
for (var referenceId in data.Enumerate("DebuggerDisplayTypes"))
|
||||
|
@ -3952,13 +3974,25 @@ namespace IDE
|
|||
[IDECommand]
|
||||
public void Cmd_PrevBookmark()
|
||||
{
|
||||
mBookmarkManager.PrevBookmark();
|
||||
mBookmarkManager.PrevBookmark(false);
|
||||
}
|
||||
|
||||
[IDECommand]
|
||||
public void Cmd_PrevBookmarkInFolder()
|
||||
{
|
||||
mBookmarkManager.PrevBookmark(true);
|
||||
}
|
||||
|
||||
[IDECommand]
|
||||
public void Cmd_NextBookmark()
|
||||
{
|
||||
mBookmarkManager.NextBookmark();
|
||||
mBookmarkManager.NextBookmark(false);
|
||||
}
|
||||
|
||||
[IDECommand]
|
||||
public void Cmd_NextBookmarkInFolder()
|
||||
{
|
||||
mBookmarkManager.NextBookmark(true);
|
||||
}
|
||||
|
||||
[IDECommand]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue