本文整理匯總了TypeScript中eez-studio-shared/model/store.OutputSectionsStore.setActiveSection方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript OutputSectionsStore.setActiveSection方法的具體用法?TypeScript OutputSectionsStore.setActiveSection怎麽用?TypeScript OutputSectionsStore.setActiveSection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eez-studio-shared/model/store.OutputSectionsStore
的用法示例。
在下文中一共展示了OutputSectionsStore.setActiveSection方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: build
export async function build(onlyCheck: boolean) {
OutputSectionsStore.setActiveSection(Section.OUTPUT);
OutputSectionsStore.clear(Section.OUTPUT);
if (!anythingToBuild()) {
OutputSectionsStore.write(Section.OUTPUT, Type.INFO, `Nothing to build!`);
return;
}
try {
let sectionNames: string[] | undefined = undefined;
let destinationFolderPath;
if (!onlyCheck) {
destinationFolderPath = ProjectStore.getAbsoluteFilePath(
ProjectStore.project.settings.build.destinationFolder || "."
);
if (!fs.existsSync(destinationFolderPath)) {
throw new BuildException("Cannot find destination folder.");
}
sectionNames = getSectionNames();
}
let buildResults = await getBuildResults(sectionNames);
showCheckResult();
if (onlyCheck) {
return;
}
await doBuild(destinationFolderPath, buildResults);
await extensionDefinitionBuild();
OutputSectionsStore.write(Section.OUTPUT, Type.INFO, "Build successfully finished.");
} catch (err) {
if (err instanceof BuildException) {
OutputSectionsStore.write(Section.OUTPUT, Type.ERROR, err.message, err.object);
} else {
OutputSectionsStore.write(Section.OUTPUT, Type.ERROR, `Module build error: ${err}`);
}
showCheckResult();
}
}
示例2: findAllReferences
export function findAllReferences(object: EezObject) {
OutputSectionsStore.setActiveSection(Section.SEARCH);
startNewSearch(DocumentStore.document, object);
}
示例3: startSearch
export function startSearch(pattern: string) {
OutputSectionsStore.setActiveSection(Section.SEARCH);
startNewSearch(DocumentStore.document, pattern);
}