Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重构代码同步模式 #190

Merged
merged 6 commits into from
Jul 30, 2024
Merged

重构代码同步模式 #190

merged 6 commits into from
Jul 30, 2024

Conversation

wwsun
Copy link
Contributor

@wwsun wwsun commented Jul 29, 2024

Features

core

  • 新增 workspace.fileErrors 展示所有的工作区文件错误
  • 新增 workspace.syncFiles() 手动同步所有的文件的 ast-code 信息
  • 允许文件更新的时候不同步 ast,例如在源码模式下
  • 优化文件解析流程,增加 isAstSynced 标记 ast-code 是否同步,增加 isError, errorMessage 展示ast解析错误

designer

  • Toolbar.Item 增加 activeViews 支持配置仅在特定视图展示

BreakChanges

  • 模块文件的 update(code, isFormatCode) 重构为 update(code, isSyncAst),考虑到几乎没有什么情况会设置 isFormatCode=false
  • workspace 的 updateFile(filename, code, isFormatCode) 重构为 updateFile(filename, code, isSyncAst) 原因同上

源码模式下的更新流程如下
whiteboard_exported_image

@wwsun wwsun merged commit 8dd289c into main Jul 30, 2024
1 check passed
@wwsun wwsun deleted the fix/syncByCode0729 branch July 30, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant