finish reconstruct manager
This commit is contained in:
parent
8b127d5302
commit
ee9e990446
@ -1 +1,13 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1588600619702" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1885" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M924 100v824h-824v-824h824m64-64H36v952h952V36z" p-id="1886"></path><path d="M188 164c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM188 812c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM836 164c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM836 812c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM744 280v464H280V280h464m20.8-32H259.2c-6.4 0-11.2 4.8-11.2 11.2v506.4c0 6.4 4.8 11.2 11.2 11.2h506.4c6.4 0 11.2-4.8 11.2-11.2V259.2c-0.8-6.4-5.6-11.2-12-11.2z" p-id="1887"></path></svg>
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg t="1588600619702" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" p-id="1885" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="200" height="200">
|
||||||
|
<defs>
|
||||||
|
<style type="text/css"></style>
|
||||||
|
</defs>
|
||||||
|
<path d="M924 100v824h-824v-824h824m64-64H36v952h952V36z" p-id="1886"></path>
|
||||||
|
<path
|
||||||
|
d="M188 164c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM188 812c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM836 164c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM836 812c13.6 0 24 10.4 24 24s-10.4 24-24 24-24-10.4-24-24 10.4-24 24-24m0-24c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48zM744 280v464H280V280h464m20.8-32H259.2c-6.4 0-11.2 4.8-11.2 11.2v506.4c0 6.4 4.8 11.2 11.2 11.2h506.4c6.4 0 11.2-4.8 11.2-11.2V259.2c-0.8-6.4-5.6-11.2-12-11.2z"
|
||||||
|
p-id="1887"></path>
|
||||||
|
</svg>
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
1
images/svg/view.svg
Normal file
1
images/svg/view.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="354px" height="354px" viewBox="-0.5 -0.5 354 354" content="<mxfile><diagram id="E9SxX19eNgA6MUTyjjO6" name="Icon-黑白">7Vlbb9owFP41PBblUhL6WG7dqlWqxMO6p8okJrHmxJljStivn53YiXMpFI0A6kal4nN8fIzP9/kcOxnY0yh7oCAJn4gP8cAy/GxgzwaWZTsW/y8Uu0Lhju8KRUCRX6jMSrFEv6FUGlK7QT5Ma4aMEMxQUld6JI6hx2o6QCnZ1s3WBNdnTUAAW4qlB3Bb+x35LJRa07mrOr5AFIRy6rHlFh0RUMZyJWkIfLLVVPZ8YE8pIaxoRdkUYhE7FRd/sp3DBXl0VtPt8vHVi5KH15vC2eKYIeUSKIzZaV3bhes3gDcyXnKtbKcCuA0Rg8sEeELeco4M7EnIIswlkzdBmhSwrVEG+VSTNcJ4SjCh+XB7YYg/rk8ZJT9LDEbCksRMs1znn9JS6zHyD+/5YCBkwN4gZTDTaCAD8wBJBBndcRPZe+tIjCXJLSVvNcooHoQaW0olkDQNSt8VFLwh0TgCmdtLIWNfFzJje+iO6uBoKg0f1xqO2gBV2pMjNDqMEPfC8xwXJsdiVcfEaqAXkxh2wVFC2hscbmOjuB0bpWuf9LVNnOsDof890QDB7spW5wTB/QdBGDlXBsL4+kDoPR01Qbh4OjLddtB9fh6VIqEsJAGJAZ5X2gklm9gXYZ4ZdRhghtiLVIv2D9EWta8QZ5nWN9tpwjOkiC8IUqWL+eJelFchFK5GSqxc5ZLyJc4BCxAhLBRTEiGPr20J4pR/PS2lgTzzm3Y+3L8Xh/aKFFyzQCKIM2PvPm0z7DjSpGRDPbjHTp73GaAB3OtP7huB214OUogBQ2/1e8bJGXV3eFuL/YL4jecbWEH8TFLEEIl514owRiIRW3VzEYH2QRqWZAMYBcLU4zEWbNHZp9zeSxtGksJXIuaNskDcF4cQ80xBhd0QkwB5rwFgMNXafAxJIAXyR4H4cD5p8+Ksmd1qZHbFCC2p2F1Jpa+DpspWNQ44mMn9J27FQFLf+bUR19FJe6+WXYI76paudKbe7QTyO59hVeOashLz3hRu7rmBaSdZ28UMBQzgm6+zuXLGl79qTsB1xSqUusFujhqrE7NOCZlnOupRi9xNRkfI9/F75bCelRs3okvce+zbdnHrvvT0V96cPsqbams16f3qpipZKRSjrEOlLJeadfGY+ja+7vJmqodrh+rb3anLWz6UhwXsNIOEoJilmudnodCSrNkgtzHS2XnYXlKxYnPxCypul0v5C7qrbXvKhzBHUq5OHLOR6Xy4BhvMekxEI6NRDY1LH7Gt/6C0QDHHw/YTsb5g6TqOXBUAFz4/XhScq09ZVwbOGdPZBxLXp3tMdskHxh94ufXp4n3GJ2JcrF5+Fkeu6g2yPf8D</diagram><diagram id="2oZjiazD9LnPP1Vpl2Fo" name="第 2 页">5ZZBb4IwFIB/DUcTaBHwqtPtMJcYt+zcQIFuhZJSBffrV8YDRDRuiW5L5EDo915f4etLg4FnSXkvSRYvRUC5gcygNPCdgdDEQvpegV0DxjWIJAtqZHVgzT4oQBPohgU07yUqIbhiWR/6Ik2pr3qMSCmKflooeH/VjESwotmBtU84HaS9skDFNfWQ2/EHyqK4WdlyJnUkIU0yFM5jEohiD+G5gWdSCFU/JeWM8spd46WetzgRbV9M0lR9Z0K2XD6H2xVhq6f05c16nHqFGkGVLeEb+GB4WbVrDEixSQNaFbEMPC1ipug6I34VLfSWaxarhEM4ZJzPBBdSj1OR6qRprqR4b+UhWyNYlEpFy5NfY7WOdG9RkVAldzoFJowsF7xCY2EbxkW3TRgDi/e2qIUEWiNqi3f29AMI/IFM9OsyzQvJdL2eSxujgUvLdoYuW3hxl/i8S11FnwL0vEeSZ/XRELKycn9g0TtQbSC8+LrazGORi/SwfdDD7rCH7SMtbF+rg8c3YH3yz5w7t+fcMf/YuXsDzgenyxWt62H3I/MV2/sbxPNP</diagram></mxfile>"><defs/><g><rect x="12" y="12" width="330" height="330" rx="49.5" ry="49.5" fill="none" stroke="rgb(0, 0, 0)" stroke-width="24" pointer-events="all"/><rect x="104" y="104" width="146" height="146" rx="21.9" ry="21.9" fill="none" stroke="rgb(0, 0, 0)" stroke-width="20" pointer-events="all"/><ellipse cx="62" cy="62" rx="20" ry="20" fill="#ffffff" stroke="#ffffff" stroke-width="8" pointer-events="all"/><ellipse cx="292" cy="62" rx="20" ry="20" fill="#ffffff" stroke="#ffffff" stroke-width="8" pointer-events="all"/><ellipse cx="292" cy="292" rx="20" ry="20" fill="#ffffff" stroke="#ffffff" stroke-width="8" pointer-events="all"/><ellipse cx="62" cy="292" rx="20" ry="20" fill="#ffffff" stroke="#ffffff" stroke-width="8" pointer-events="all"/></g></svg>
|
After Width: | Height: | Size: 3.0 KiB |
@ -1,6 +1,6 @@
|
|||||||
<mxfile host="65bd71144e">
|
<mxfile host="65bd71144e">
|
||||||
<diagram id="E9SxX19eNgA6MUTyjjO6" name="Icon-黑白">
|
<diagram id="E9SxX19eNgA6MUTyjjO6" name="Icon-黑白">
|
||||||
<mxGraphModel dx="752" dy="561" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
<mxGraphModel dx="362" dy="789" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
||||||
<root>
|
<root>
|
||||||
<mxCell id="dBwEeFoJ6bCwSJ_cmpG_-0"/>
|
<mxCell id="dBwEeFoJ6bCwSJ_cmpG_-0"/>
|
||||||
<mxCell id="dBwEeFoJ6bCwSJ_cmpG_-1" parent="dBwEeFoJ6bCwSJ_cmpG_-0"/>
|
<mxCell id="dBwEeFoJ6bCwSJ_cmpG_-1" parent="dBwEeFoJ6bCwSJ_cmpG_-0"/>
|
||||||
@ -60,4 +60,30 @@
|
|||||||
</root>
|
</root>
|
||||||
</mxGraphModel>
|
</mxGraphModel>
|
||||||
</diagram>
|
</diagram>
|
||||||
|
<diagram id="2oZjiazD9LnPP1Vpl2Fo" name="第 2 页">
|
||||||
|
<mxGraphModel dx="912" dy="915" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0"/>
|
||||||
|
<mxCell id="1" parent="0"/>
|
||||||
|
<mxCell id="pMMTfvQaiQNnUj1LB8wt-1" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;strokeWidth=24;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-170" y="340" width="330" height="330" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="pMMTfvQaiQNnUj1LB8wt-2" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;strokeWidth=20;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-78" y="432" width="146" height="146" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="pMMTfvQaiQNnUj1LB8wt-3" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;strokeWidth=8;fillColor=#FFFFFF;strokeColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-140" y="370" width="40" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="pMMTfvQaiQNnUj1LB8wt-5" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;strokeWidth=8;fillColor=#FFFFFF;strokeColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="90" y="370" width="40" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="pMMTfvQaiQNnUj1LB8wt-6" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;strokeWidth=8;fillColor=#FFFFFF;strokeColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="90" y="600" width="40" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="pMMTfvQaiQNnUj1LB8wt-7" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;strokeWidth=8;fillColor=#FFFFFF;strokeColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-140" y="600" width="40" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
</mxfile>
|
</mxfile>
|
13
package.json
13
package.json
@ -318,15 +318,24 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"viewsContainers": {
|
||||||
|
"activitybar": [
|
||||||
|
{
|
||||||
|
"id": "TreeView",
|
||||||
|
"title": "Digital-IDE",
|
||||||
|
"icon": "images/svg/view.svg"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"views": {
|
"views": {
|
||||||
"TOOL": [
|
"TreeView": [
|
||||||
{
|
{
|
||||||
"id": "digital-ide-treeView-arch",
|
"id": "digital-ide-treeView-arch",
|
||||||
"name": "architecture"
|
"name": "architecture"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "digital-ide-treeView-tool",
|
"id": "digital-ide-treeView-tool",
|
||||||
"name": "TOOL"
|
"name": "TOOL Options"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "digital-ide-treeView-hardware",
|
"id": "digital-ide-treeView-hardware",
|
||||||
|
@ -6,6 +6,18 @@
|
|||||||
"soc": {
|
"soc": {
|
||||||
"core": "none"
|
"core": "none"
|
||||||
},
|
},
|
||||||
|
"arch": {
|
||||||
|
"prjPath": "./prj",
|
||||||
|
"hardware": {
|
||||||
|
"src": "./user/src",
|
||||||
|
"sim": "./user/sim",
|
||||||
|
"data": "./user/data"
|
||||||
|
},
|
||||||
|
"software": {
|
||||||
|
"src": "./user/software/src",
|
||||||
|
"data": "./user/software/data"
|
||||||
|
}
|
||||||
|
},
|
||||||
"enableShowLog": false,
|
"enableShowLog": false,
|
||||||
"device": "none"
|
"device": "none"
|
||||||
}
|
}
|
@ -49,10 +49,16 @@ class BaseCommandTreeProvider implements vscode.TreeDataProvider<CommandDataItem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getElementChildrenNum(element: CommandDataItem): number {
|
||||||
|
if (element.children) {
|
||||||
|
return Object.keys(element.children).length;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 根据输入的CommandDataItem转化为vscode.TreeItem
|
// 根据输入的CommandDataItem转化为vscode.TreeItem
|
||||||
getTreeItem(element: CommandDataItem): vscode.TreeItem | Thenable<vscode.TreeItem> {
|
getTreeItem(element: CommandDataItem): vscode.TreeItem | Thenable<vscode.TreeItem> {
|
||||||
const childNum = Object.keys(element.children).length;
|
const childNum = this.getElementChildrenNum(element);
|
||||||
const treeItem = new vscode.TreeItem(
|
const treeItem = new vscode.TreeItem(
|
||||||
element.name,
|
element.name,
|
||||||
childNum === 0 ?
|
childNum === 0 ?
|
||||||
|
@ -225,7 +225,6 @@ class PrjInfo implements PrjInfoMeta {
|
|||||||
|
|
||||||
uniformPath = toSlash(uniformPath);
|
uniformPath = toSlash(uniformPath);
|
||||||
|
|
||||||
|
|
||||||
if (check) {
|
if (check) {
|
||||||
if (fs.existsSync(uniformPath)) {
|
if (fs.existsSync(uniformPath)) {
|
||||||
return uniformPath;
|
return uniformPath;
|
||||||
@ -472,11 +471,19 @@ class PrjInfo implements PrjInfoMeta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get libCommonPath(): AbsPath {
|
public get libCommonPath(): AbsPath {
|
||||||
return join(this._extensionPath, 'lib', 'common');
|
const libPath = join(this._extensionPath, 'lib', 'common');
|
||||||
|
if (!fs.existsSync(libPath)) {
|
||||||
|
vscode.window.showErrorMessage('common lib path in extension is invalid, maybe extension has been corrupted, reinstall the extension');
|
||||||
|
}
|
||||||
|
return libPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get libCustomPath(): AbsPath {
|
public get libCustomPath(): AbsPath {
|
||||||
return vscode.workspace.getConfiguration().get('prj.lib.custom.path', this._workspacePath);
|
const libPath = vscode.workspace.getConfiguration().get('prj.lib.custom.path', this._workspacePath);
|
||||||
|
if (!fs.existsSync(libPath)) {
|
||||||
|
vscode.window.showErrorMessage('property "prj.lib.custom.path" is empty or is an invalid path');
|
||||||
|
}
|
||||||
|
return libPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public json(): RawPrjInfo {
|
public json(): RawPrjInfo {
|
||||||
|
@ -248,7 +248,7 @@ function copyFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let parent = fspath.dirname(dest);
|
const parent = fspath.dirname(dest);
|
||||||
fs.mkdirSync(parent, {recursive: true});
|
fs.mkdirSync(parent, {recursive: true});
|
||||||
if (!fs.existsSync(dest) || cover) {
|
if (!fs.existsSync(dest) || cover) {
|
||||||
fs.copyFileSync(src, dest);
|
fs.copyFileSync(src, dest);
|
||||||
@ -297,8 +297,8 @@ function isHasAttr(obj: any, attr: string): boolean{
|
|||||||
attr = attr.replace(/\[(\w+)\]/g, '.$1');
|
attr = attr.replace(/\[(\w+)\]/g, '.$1');
|
||||||
attr = attr.replace(/^\./, '');
|
attr = attr.replace(/^\./, '');
|
||||||
|
|
||||||
let keyArr = attr.split('.');
|
const keyArr = attr.split('.');
|
||||||
for (let i = 0; i < keyArr.length; i++) {
|
for (let i = 0; i < keyArr.length; ++ i) {
|
||||||
const element = keyArr[i];
|
const element = keyArr[i];
|
||||||
if (!tempObj) {
|
if (!tempObj) {
|
||||||
return false;
|
return false;
|
||||||
@ -321,8 +321,8 @@ function isHasValue(obj: any, attr: string, value: any): boolean{
|
|||||||
attr = attr.replace(/\[(\w+)\]/g, '.$1');
|
attr = attr.replace(/\[(\w+)\]/g, '.$1');
|
||||||
attr = attr.replace(/^\./, '');
|
attr = attr.replace(/^\./, '');
|
||||||
|
|
||||||
let keyArr = attr.split('.');
|
const keyArr = attr.split('.');
|
||||||
for (let i = 0; i < keyArr.length; i++) {
|
for (let i = 0; i < keyArr.length; ++ i) {
|
||||||
const element = keyArr[i];
|
const element = keyArr[i];
|
||||||
if (!tempObj) {
|
if (!tempObj) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -168,13 +168,19 @@ class LibManage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
remote2Local(remotes: Path[], callback: (src: AbsPath, dist: AbsPath) => void) {
|
remote2Local(remotes: Path[], callback: (src: AbsPath, dist: AbsPath) => void) {
|
||||||
|
const localLibPath = this.localLibPath;
|
||||||
|
const sourceLibPath = this.sourceLibPath;
|
||||||
|
const customerPath = this.customerPath;
|
||||||
|
const customerPathValid = hdlFile.isDir(customerPath);
|
||||||
|
|
||||||
for (const src of remotes) {
|
for (const src of remotes) {
|
||||||
let dist;
|
let dist;
|
||||||
if (src.includes(this.customerPath)) {
|
if (customerPathValid && src.includes(customerPath)) {
|
||||||
dist = src.replace(this.customerPath, this.localLibPath);
|
dist = src.replace(customerPath, localLibPath);
|
||||||
} else {
|
} else {
|
||||||
dist = src.replace(this.sourceLibPath, this.localLibPath);
|
dist = src.replace(sourceLibPath, localLibPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
callback(src, dist);
|
callback(src, dist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@ class LibPick {
|
|||||||
selectedQuickPickItem: LibPickItem | undefined;
|
selectedQuickPickItem: LibPickItem | undefined;
|
||||||
|
|
||||||
constructor () {
|
constructor () {
|
||||||
this.commonPath = hdlPath.join(opeParam.extensionPath, 'lib', 'common');
|
this.commonPath = opeParam.prjInfo.libCommonPath;
|
||||||
this.customPath = hdlPath.toSlash(vscode.workspace.getConfiguration('PRJ.custom.Lib.repo').get('path', ''));
|
this.customPath = opeParam.prjInfo.libCustomPath;
|
||||||
|
|
||||||
this.commonQuickPickItem = {
|
this.commonQuickPickItem = {
|
||||||
label: "$(libpick-common) common",
|
label: "$(libpick-common) common",
|
||||||
@ -72,6 +72,18 @@ class LibPick {
|
|||||||
return `$(libpick-${prompt})`;
|
return `$(libpick-${prompt})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getReadmeText(path: AbsPath, fileName: string): string | undefined {
|
||||||
|
const mdPath1 = hdlPath.join(path, fileName, 'readme.md');
|
||||||
|
if (fs.existsSync(mdPath1)) {
|
||||||
|
return hdlFile.readFile(mdPath1);
|
||||||
|
}
|
||||||
|
const mdPath2 = hdlPath.join(path, fileName, 'README.md');
|
||||||
|
if (fs.existsSync(mdPath2)) {
|
||||||
|
return hdlFile.readFile(mdPath2);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
private makeQuickPickItemsByPath(path: AbsPath, back: boolean=true): LibPickItem[] {
|
private makeQuickPickItemsByPath(path: AbsPath, back: boolean=true): LibPickItem[] {
|
||||||
const items: LibPickItem[] = [];
|
const items: LibPickItem[] = [];
|
||||||
if (!hdlPath.exist(path)) {
|
if (!hdlPath.exist(path)) {
|
||||||
@ -85,8 +97,7 @@ class LibPick {
|
|||||||
const filePath = hdlPath.join(path, fileName);
|
const filePath = hdlPath.join(path, fileName);
|
||||||
const themeIcon = this.getPathIcon(filePath);
|
const themeIcon = this.getPathIcon(filePath);
|
||||||
const label = themeIcon + " " + fileName;
|
const label = themeIcon + " " + fileName;
|
||||||
const mdPath = hdlPath.join(path, fileName, 'readme.md');
|
const mdText = this.getReadmeText(path, fileName);
|
||||||
const mdText = hdlFile.readFile(mdPath);
|
|
||||||
const description = mdText ? mdText : '';
|
const description = mdText ? mdText : '';
|
||||||
const buttons = [{iconPath: getIconConfig('import'), tooltip: 'import everything in ' + fileName}];
|
const buttons = [{iconPath: getIconConfig('import'), tooltip: 'import everything in ' + fileName}];
|
||||||
items.push({label, description, path: filePath, buttons});
|
items.push({label, description, path: filePath, buttons});
|
||||||
@ -125,14 +136,12 @@ class LibPick {
|
|||||||
pickWidget.items = this.provideQuickPickItem();
|
pickWidget.items = this.provideQuickPickItem();
|
||||||
|
|
||||||
pickWidget.onDidChangeSelection(items => {
|
pickWidget.onDidChangeSelection(items => {
|
||||||
console.log('enter onDidChangeSelection');
|
|
||||||
if (items[0]) {
|
if (items[0]) {
|
||||||
this.selectedQuickPickItem = items[0];
|
this.selectedQuickPickItem = items[0];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
pickWidget.onDidAccept(() => {
|
pickWidget.onDidAccept(() => {
|
||||||
console.log('enter onDidAccept');
|
|
||||||
if (this.selectedQuickPickItem) {
|
if (this.selectedQuickPickItem) {
|
||||||
const childernItems = this.provideQuickPickItem(this.selectedQuickPickItem);
|
const childernItems = this.provideQuickPickItem(this.selectedQuickPickItem);
|
||||||
if (childernItems && childernItems.length > 0) {
|
if (childernItems && childernItems.length > 0) {
|
||||||
|
@ -15,7 +15,8 @@ class PrjManage {
|
|||||||
vscode.window.showWarningMessage('property file already exists !!!');
|
vscode.window.showWarningMessage('property file already exists !!!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const template = hdlFile.readJSON(opeParam.propertyInitPath);
|
const template = hdlFile.readJSON(opeParam.propertyInitPath) as RawPrjInfo;
|
||||||
|
template.arch?.hardware.
|
||||||
hdlFile.writeJSON(opeParam.propertyJsonPath, template);
|
hdlFile.writeJSON(opeParam.propertyJsonPath, template);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user