@@ -13,7 +13,7 @@ import { treeViewController } from "./controller/TreeViewController";
1313import { NodeModel } from "./model/NodeModel" ;
1414import { treeDataService } from "./service/TreeDataService" ;
1515import { treeItemDecorationService } from "./service/TreeItemDecorationService" ;
16- import { logOutput , promptForOpenOutputChannel } from "./utils/OutputUtils" ;
16+ import { promptForOpenOutputChannel } from "./utils/OutputUtils" ;
1717import { executeService } from "./service/ExecuteService" ;
1818import { eventController } from "./controller/EventController" ;
1919import { previewService } from "./service/PreviewService" ;
@@ -26,12 +26,12 @@ import { getLeetCodeEndpoint } from "./utils/ConfigUtils";
2626import { BricksType , OutPutType , RemarkComment } from "./model/Model" ;
2727import { bricksDataService } from "./service/BricksDataService" ;
2828import { bricksViewController } from "./controller/BricksViewController" ;
29- import { remarkController } from "./controller/RemarkController" ;
3029import { debugContorller } from "./controller/DebugController" ;
3130import { BABA , BabaStr } from "./BABA" ;
3231import { StatusBarTimeMediator , StatusBarTimeProxy } from "./statusBarTime/StatusBarTimeModule" ;
3332import { StatusBarMediator , StatusBarProxy } from "./statusBar/StatusBarModule" ;
34- import { RemarkProxy , RemarkMediator } from "./service/RemarkService" ;
33+ import { LogOutputMediator , LogOutputProxy } from "./logOutput/logOutputModule" ;
34+ import { RemarkMediator , RemarkProxy } from "./remark/RemarkServiceModule" ;
3535
3636//==================================BABA========================================
3737
@@ -52,8 +52,12 @@ export async function activate(context: ExtensionContext): Promise<void> {
5252 StatusBarMediator ,
5353 RemarkProxy ,
5454 RemarkMediator ,
55+ LogOutputProxy ,
56+ LogOutputMediator ,
5557 ] ) ;
5658
59+ BABA . sendNotification ( BabaStr . InitAll , context ) ;
60+
5761 // 初始化控制器
5862 mainContorller . initialize ( context ) ;
5963 // 检查node环境
@@ -64,7 +68,6 @@ export async function activate(context: ExtensionContext): Promise<void> {
6468
6569 // 资源管理
6670 context . subscriptions . push (
67- logOutput ,
6871 previewService ,
6972 submissionService ,
7073 solutionService ,
@@ -133,31 +136,31 @@ export async function activate(context: ExtensionContext): Promise<void> {
133136 commands . registerCommand ( "lcpr.removeQidFromGroup" , ( node ) => bricksViewController . removeQidFromGroup ( node ) ) ,
134137
135138 commands . registerCommand ( "lcpr.remarkCreateNote" , ( reply : CommentReply ) => {
136- remarkController . remarkCreateNote ( reply ) ;
139+ BABA . sendNotification ( BabaStr . Remark_remarkCreateNote , reply ) ;
137140 } ) ,
138141 commands . registerCommand ( "lcpr.remarkClose" , ( a ) => {
139- remarkController . remarkClose ( a ) ;
142+ BABA . sendNotification ( BabaStr . Remark_remarkClose , a ) ;
140143 } ) ,
141144 commands . registerCommand ( "lcpr.remarkReplyNote" , ( reply : CommentReply ) => {
142- remarkController . remarkReplyNote ( reply ) ;
145+ BABA . sendNotification ( BabaStr . Remark_remarkReplyNote , reply ) ;
143146 } ) ,
144147 commands . registerCommand ( "lcpr.remarkDeleteNoteComment" , ( comment : RemarkComment ) => {
145- remarkController . remarkDeleteNoteComment ( comment ) ;
148+ BABA . sendNotification ( BabaStr . Remark_remarkDeleteNoteComment , comment ) ;
146149 } ) ,
147150 commands . registerCommand ( "lcpr.remarkCancelsaveNote" , ( comment : RemarkComment ) => {
148- remarkController . remarkCancelsaveNote ( comment ) ;
151+ BABA . sendNotification ( BabaStr . Remark_remarkCancelsaveNote , comment ) ;
149152 } ) ,
150153 commands . registerCommand ( "lcpr.remarkSaveNote" , ( comment : RemarkComment ) => {
151- remarkController . remarkSaveNote ( comment ) ;
154+ BABA . sendNotification ( BabaStr . Remark_remarkSaveNote , comment ) ;
152155 } ) ,
153156 commands . registerCommand ( "lcpr.remarkEditNote" , ( comment : RemarkComment ) => {
154- remarkController . remarkEditNote ( comment ) ;
157+ BABA . sendNotification ( BabaStr . Remark_remarkEditNote , comment ) ;
155158 } ) ,
156159 commands . registerCommand ( "lcpr.startRemark" , ( document : TextDocument ) => {
157- remarkController . startRemark ( document ) ;
160+ BABA . sendNotification ( BabaStr . Remark_startRemark , document ) ;
158161 } ) ,
159162 commands . registerCommand ( "lcpr.includeTemplates" , ( document : TextDocument ) => {
160- remarkController . includeTemplates ( document ) ;
163+ BABA . sendNotification ( BabaStr . Remark_includeTemplates , document ) ;
161164 } ) ,
162165 commands . registerCommand ( "lcpr.simpleDebug" , ( document : TextDocument , testCase ?) =>
163166 debugContorller . startDebug ( document , testCase )
@@ -176,7 +179,7 @@ export async function activate(context: ExtensionContext): Promise<void> {
176179 await loginContorller . getLoginStatus ( ) ;
177180 await bricksViewController . initialize ( ) ;
178181 } catch ( error ) {
179- logOutput . appendLine ( error . toString ( ) ) ;
182+ BABA . getProxy ( BabaStr . LogOutputProxy ) . get_log ( ) . appendLine ( error . toString ( ) ) ;
180183 promptForOpenOutputChannel (
181184 "Extension initialization failed. Please open output channel for details." ,
182185 OutPutType . error
0 commit comments