Skip to content

Commit

Permalink
UI support for add/remove/refresh libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Vigilans committed Dec 28, 2019
1 parent 4e3f444 commit f9d4af4
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 3 deletions.
3 changes: 3 additions & 0 deletions images/dark/icon-add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions images/dark/icon-remove.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions images/light/icon-add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions images/light/icon-remove.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,33 @@
"title": "%contributes.commands.java.project.create%",
"category": "Java"
},
{
"command": "java.project.addLibraries",
"title": "%contributes.commands.java.project.addLibraries%",
"category": "Java",
"icon": {
"dark": "images/dark/icon-add.svg",
"light": "images/light/icon-add.svg"
}
},
{
"command": "java.project.removeLibrary",
"title": "%contributes.commands.java.project.removeLibrary%",
"category": "Java",
"icon": {
"dark": "images/dark/icon-remove.svg",
"light": "images/light/icon-remove.svg"
}
},
{
"command": "java.project.refreshLibraries",
"title": "%contributes.commands.java.view.package.refresh%",
"category": "Java",
"icon": {
"dark": "images/dark/icon-refresh.svg",
"light": "images/light/icon-refresh.svg"
}
},
{
"command": "java.view.package.refresh",
"title": "%contributes.commands.java.view.package.refresh%",
Expand Down Expand Up @@ -148,6 +175,14 @@
{
"command": "java.view.package.copyRelativeFilePath",
"when": "never"
},
{
"command": "java.project.removeLibrary",
"when": "never"
},
{
"command": "java.project.refreshLibraries",
"when": "never"
}
],
"view/title": [
Expand Down Expand Up @@ -192,6 +227,21 @@
"command": "java.view.package.copyRelativeFilePath",
"when": "view == javaDependencyExplorer && viewItem =~ /java:.*?\\+uri/",
"group": "@2"
},
{
"command": "java.project.addLibraries",
"when": "view == javaDependencyExplorer && viewItem =~ /java:container\/referenced-libraries/",
"group": "inline@1"
},
{
"command": "java.project.removeLibrary",
"when": "view == javaDependencyExplorer && viewItem =~ /java:jar\/referenced-libraries/",
"group": "inline"
},
{
"command": "java.project.refreshLibraries",
"when": "view == javaDependencyExplorer && viewItem =~ /java:container\/referenced-libraries/",
"group": "inline@0"
}
]
},
Expand Down Expand Up @@ -229,6 +279,7 @@
"gulp-copy": "^4.0.1",
"gulp-tslint": "^8.1.3",
"mocha": "^5.2.0",
"native-ext-loader": "^2.3.0",
"shelljs": "^0.8.3",
"ts-loader": "^5.3.1",
"tslint": "^5.11.0",
Expand Down
4 changes: 3 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"description": "Manage Java Dependencies in VSCode",
"contributes.commands.java.project.create": "Create Java Project",
"contributes.commands.java.project.addLibraries": "Add a jar file or a folder to project library reference",
"contributes.commands.java.project.removeLibrary": "Remove jar file from project library reference",
"contributes.commands.java.view.package.refresh": "Refresh",
"contributes.commands.java.view.package.changeRepresentation": "Change package representation",
"contributes.commands.java.view.package.changeToFlatPackageView":"Change to flat package representation",
Expand All @@ -14,6 +16,6 @@
"configuration.java.dependency.showOutline": "Enable show outline in the Java Dependency explorer",
"configuration.java.dependency.syncWithFolderExplorer": "Synchronize dependency viewer selection with folder explorer",
"configuration.java.dependency.autoRefresh": "Synchronize dependency viewer with changes",
"configuration.java.dependency.refreshDelay": "The delay time (ms) the auto refresh is invoked when changes are detected.",
"configuration.java.dependency.refreshDelay": "The delay time (ms) the auto refresh is invoked when changes are detected",
"configuration.java.dependency.packagePresentation": "Package presentation mode: flat or hierarchical"
}
4 changes: 3 additions & 1 deletion package.nls.zh.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"description": "在 VSCode 中管理 Java 依赖项",
"contributes.commands.java.project.create": "创建 Java 项目",
"contributes.commands.java.project.addLibraries": "将一个 Jar 文件或一个目录添加到 Java 项目引用库",
"contributes.commands.java.project.removeLibrary": "将 Jar 文件从 Java 项目引用库移除",
"contributes.commands.java.view.package.refresh": "刷新",
"contributes.commands.java.view.package.changeRepresentation": "更改包展示形式",
"contributes.commands.java.view.package.changeToFlatPackageView":"将 Java 包显示方式切换为平行显示",
Expand All @@ -14,6 +16,6 @@
"configuration.java.dependency.showOutline": "在 Java 依赖项资源管理器中显示类成员大纲",
"configuration.java.dependency.syncWithFolderExplorer": "在 Java 依赖项资源管理器中同步关联当前打开的文件",
"configuration.java.dependency.autoRefresh": "在 Java 依赖项资源管理器中自动同步修改",
"configuration.java.dependency.refreshDelay": "控制Java 依赖项资源管理器刷新的延迟时间 (毫秒)",
"configuration.java.dependency.refreshDelay": "控制Java 依赖项资源管理器刷新的延迟时间 (毫秒)",
"configuration.java.dependency.packagePresentation": "Java 包显示方式: 平行显示或者分层显示"
}
5 changes: 4 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ const config = {
use: [{
loader: 'ts-loader',
}]
}, {
test: /\.node$/,
loader: 'native-ext-loader',
}]
},
}
module.exports = config;
module.exports = config;

0 comments on commit f9d4af4

Please sign in to comment.