Skip to content

Conversation

@Kakueeen
Copy link
Contributor

Implement session management functionality to persist and restore workspace
state across IDE sessions. This includes:

  • Add SessionManager class to handle session operations
  • Save/restore opened files and current file in editor
  • Save/restore breakpoints with conditions in debugger
  • Save/restore project list and active project
  • Add session events for coordination between components
  • Integrate session loading/saving with core components

The session manager provides a centralized way to persist workspace state
and restore it when reopening projects.

Log: add session manager to save and restore workspace state

@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/core/uicontroller/controller.cpp": [
        {
            "line": "        QDesktopServices::openUrl(QUrl(\"https://github.com/linuxdeepin/deepin-unioncode/issues\"));",
            "line_number": 1199,
            "rule": "S35",
            "reason": "Url link | f8f0d2a7c7"
        },
        {
            "line": "        QDesktopServices::openUrl(QUrl(\"https://uosdn.uniontech.com/#document2?dirid=656d40a9bd766615b0b02e5e\"));",
            "line_number": 1206,
            "rule": "S35",
            "reason": "Url link | f9197a3d4e"
        }
    ]
}

Implement session management functionality to persist and restore workspace
state across IDE sessions. This includes:

- Add SessionManager class to handle session operations
- Save/restore opened files and current file in editor
- Save/restore breakpoints with conditions in debugger
- Save/restore project list and active project
- Add session events for coordination between components
- Integrate session loading/saving with core components

The session manager provides a centralized way to persist workspace state
and restore it when reopening projects.

Log: add session manager to save and restore workspace state
@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/core/uicontroller/controller.cpp": [
        {
            "line": "        QDesktopServices::openUrl(QUrl(\"https://github.com/linuxdeepin/deepin-unioncode/issues\"));",
            "line_number": 1199,
            "rule": "S35",
            "reason": "Url link | f8f0d2a7c7"
        },
        {
            "line": "        QDesktopServices::openUrl(QUrl(\"https://uosdn.uniontech.com/#document2?dirid=656d40a9bd766615b0b02e5e\"));",
            "line_number": 1206,
            "rule": "S35",
            "reason": "Url link | f9197a3d4e"
        }
    ]
}

@linuxdeepin linuxdeepin deleted a comment from deepin-ci-robot Nov 26, 2024
tabWidget->deleteLater();
}

tabWidgetList.first()->closeAllEditor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabWidgetList有可能为空吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不可能,构造的时候就会放一个进去

void setAutoLoadLastSession(bool autoLoad);

public:
SessionManager *q;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

规范:初始化

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

构造函数初始化列表

const auto &name = info.baseName();
d->sessionDateTimes.insert(name, info.lastModified());
const auto lastActiveTime = lastActiveTimes.find(name);
// clang-format off
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的注释:// clang-format off ,是什么意思?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

禁用和开启clang的代码格式化功能

@deepin-mozart deepin-mozart merged commit 83fe5cc into linuxdeepin:master Nov 26, 2024
8 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart, Kakueeen, LiHua000

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants