MCPcopy Create free account
hub / github.com/DTStack/molecule / updateProblem

Method updateProblem

stories/extensions/test/testPane.tsx:169–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167 };
168
169 const updateProblem = () => {
170 const { PANEL_PROBLEMS } = molecule.builtin.getConstants();
171 molecule.panel.setActive(PANEL_PROBLEMS!);
172 molecule.problems.add({
173 id: randomId(),
174 name: 'text.tsx',
175 isLeaf: false,
176 value: {
177 code: 'text.tsx',
178 message: '文件夹',
179 startLineNumber: 0,
180 startColumn: 1,
181 endLineNumber: 0,
182 endColumn: 1,
183 status: 1,
184 },
185 children: [
186 {
187 id: randomId(),
188 name: '0-1',
189 isLeaf: true,
190 value: {
191 code: 'endLineNumber',
192 message: '提示信息',
193 startLineNumber: 0,
194 startColumn: 1,
195 endLineNumber: 0,
196 endColumn: 1,
197 status: 2,
198 },
199 children: [],
200 },
201 ],
202 });
203 };
204
205 const clearProblems = () => {
206 molecule.problems.reset();

Callers

nothing calls this directly

Calls 4

randomIdFunction · 0.90
getConstantsMethod · 0.65
setActiveMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected