├── .azure-pipelines
├── ci.yml
├── nightly.yml
└── rc.yml
├── .github
├── dependabot.yml
└── workflows
│ ├── linux.yml
│ ├── linuxUI.yml
│ ├── macOS.yml
│ ├── no-response.yml
│ ├── windows.yml
│ └── windowsUI.yml
├── .gitignore
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── ThirdPartyNotices.txt
├── extension.bundle.ts
├── icons
├── dark
│ ├── icon-link.svg
│ └── icon-unlink.svg
└── light
│ ├── icon-link.svg
│ └── icon-unlink.svg
├── images
├── create-project.png
├── export-jar.png
├── manage-dependencies.gif
└── project-explorer.png
├── javaConfig.json
├── jdtls.ext
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── check_style.xml
├── com.microsoft.jdtls.ext.core
│ ├── .classpath
│ ├── .project
│ ├── .settings
│ │ ├── org.eclipse.core.resources.prefs
│ │ ├── org.eclipse.jdt.core.prefs
│ │ └── org.eclipse.m2e.core.prefs
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── build.properties
│ ├── plugin.xml
│ ├── pom.xml
│ └── src
│ │ ├── com
│ │ └── microsoft
│ │ │ └── jdtls
│ │ │ └── ext
│ │ │ └── core
│ │ │ ├── CommandHandler.java
│ │ │ ├── ExtUtils.java
│ │ │ ├── JarFileContentProvider.java
│ │ │ ├── JdtlsExtActivator.java
│ │ │ ├── PackageCommand.java
│ │ │ ├── PackageParams.java
│ │ │ ├── ProjectCommand.java
│ │ │ ├── model
│ │ │ ├── ContainerNode.java
│ │ │ ├── NodeKind.java
│ │ │ ├── PackageNode.java
│ │ │ ├── PackageRootNode.java
│ │ │ ├── Trie.java
│ │ │ └── TrieNode.java
│ │ │ └── parser
│ │ │ ├── JavaResourceVisitor.java
│ │ │ ├── ResourceSet.java
│ │ │ └── ResourceVisitor.java
│ │ └── org
│ │ └── eclipse
│ │ └── jdt
│ │ └── internal
│ │ └── jarpackager
│ │ └── JarPackageUtil.java
├── com.microsoft.jdtls.ext.target
│ ├── com.microsoft.jdtls.ext.tp.target
│ └── pom.xml
├── mvnw
├── mvnw.cmd
└── pom.xml
├── logo.png
├── main.js
├── package-lock.json
├── package.json
├── package.nls.json
├── package.nls.zh-cn.json
├── package.nls.zh-tw.json
├── scripts
├── buildJdtlsExt.js
└── prepare-nightly-build.js
├── src
├── ExperimentationService.ts
├── build.ts
├── commands.ts
├── constants.ts
├── contextManager.ts
├── controllers
│ ├── libraryController.ts
│ └── projectController.ts
├── explorerCommands
│ ├── delete.ts
│ ├── new.ts
│ ├── rename.ts
│ └── utility.ts
├── extension.ts
├── java
│ ├── containerNodeData.ts
│ ├── hierarchicalPackageNodeData.ts
│ ├── jdtls.ts
│ ├── nodeData.ts
│ ├── packageRootNodeData.ts
│ └── typeRootNodeData.ts
├── languageServerApi
│ ├── LanguageServerMode.ts
│ └── languageServerApiManager.ts
├── settings.ts
├── syncHandler.ts
├── tasks
│ ├── build
│ │ └── buildTaskProvider.ts
│ └── buildArtifact
│ │ ├── BuildArtifactTaskProvider.ts
│ │ ├── GenerateJarExecutor.ts
│ │ ├── IExportJarStepExecutor.ts
│ │ ├── IStepMetadata.ts
│ │ ├── ResolveJavaProjectExecutor.ts
│ │ ├── ResolveMainClassExecutor.ts
│ │ ├── migration
│ │ ├── CodeActionProvider.ts
│ │ ├── DiagnosticProvider.ts
│ │ └── utils.ts
│ │ └── utility.ts
├── utility.ts
├── utils
│ └── Lock.ts
└── views
│ ├── DragAndDropController.ts
│ ├── PrimaryTypeNode.ts
│ ├── containerNode.ts
│ ├── dataNode.ts
│ ├── dependencyDataProvider.ts
│ ├── dependencyExplorer.ts
│ ├── documentSymbolNode.ts
│ ├── explorerNode.ts
│ ├── fileNode.ts
│ ├── folderNode.ts
│ ├── hierarchicalPackageNode.ts
│ ├── hierarchicalPackageRootNode.ts
│ ├── nodeCache
│ ├── Trie.ts
│ └── explorerNodeCache.ts
│ ├── nodeFactory.ts
│ ├── packageNode.ts
│ ├── packageRootNode.ts
│ ├── projectNode.ts
│ └── workspaceNode.ts
├── templates
└── invisible-project
│ ├── .vscode
│ └── settings.json
│ ├── README.md
│ └── src
│ └── App.java
├── test
├── gradle-suite
│ ├── index.ts
│ └── projectView.test.ts
├── gradle
│ ├── .vscode
│ │ ├── launch.json
│ │ └── settings.json
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ └── java
│ │ └── GradleTest.java
├── index.ts
├── invisible-suite
│ ├── index.ts
│ └── projectView.test.ts
├── invisible
│ ├── .vscode
│ │ └── settings.json
│ ├── libSource
│ │ └── simple.jar
│ └── src
│ │ └── App.java
├── java9
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ ├── com
│ │ │ └── microsoft
│ │ │ │ └── app
│ │ │ │ ├── App.java
│ │ │ │ └── Launcher.java
│ │ │ └── module-info.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── microsoft
│ │ └── app
│ │ └── AppTest.java
├── maven-suite
│ ├── buildArtifact.test.ts
│ ├── context.test.ts
│ ├── index.ts
│ └── projectView.test.ts
├── maven
│ ├── .hidden
│ ├── .vscode
│ │ ├── launch.json
│ │ ├── settings.json
│ │ └── tasks.json
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ ├── com
│ │ │ └── mycompany
│ │ │ │ ├── app
│ │ │ │ ├── App.java
│ │ │ │ ├── AppToDelete.java
│ │ │ │ ├── AppToRename.java
│ │ │ │ └── package-info.java
│ │ │ │ └── app1
│ │ │ │ └── App1.java
│ │ │ └── module-info.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── mycompany
│ │ └── app
│ │ └── AppTest.java
├── multi-module-suite
│ ├── index.ts
│ └── projectView.test.ts
├── multi-module
│ ├── .vscode
│ │ └── settings.json
│ ├── level1
│ │ └── pom.xml
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── fvclaus
│ │ │ └── App.java
│ │ └── test
│ │ └── java
│ │ └── fvclaus
│ │ └── AppTest.java
├── multiple
│ └── multiple-project.code-workspace
├── shared.ts
├── simple-suite
│ ├── index.ts
│ └── projectView.test.ts
├── simple
│ ├── .classpath
│ ├── .project
│ ├── .vscode
│ │ ├── launch.json
│ │ └── settings.json
│ └── src
│ │ └── main
│ │ └── java
│ │ └── HelloWorld.java
├── suite
│ ├── buildTask.test.ts
│ ├── contextValue.test.ts
│ ├── extension.test.ts
│ └── index.ts
├── ui
│ ├── command.test.ts
│ └── index.ts
└── util.ts
├── tsconfig.json
├── tslint.json
└── webpack.config.js
/.azure-pipelines/ci.yml:
--------------------------------------------------------------------------------
1 | name: $(Date:yyyyMMdd).$(Rev:r)
2 | variables:
3 | - name: Codeql.Enabled
4 | value: true
5 | resources:
6 | repositories:
7 | - repository: self
8 | type: git
9 | ref: refs/heads/main
10 | - repository: 1esPipelines
11 | type: git
12 | name: 1ESPipelineTemplates/1ESPipelineTemplates
13 | ref: refs/tags/release
14 | trigger:
15 | branches:
16 | include:
17 | - main
18 | extends:
19 | template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
20 | parameters:
21 | pool:
22 | os: linux
23 | name: 1ES_JavaTooling_Pool
24 | image: 1ES_JavaTooling_Ubuntu-2004
25 | sdl:
26 | sourceAnalysisPool:
27 | name: 1ES_JavaTooling_Pool
28 | image: 1ES_JavaTooling_Windows_2022
29 | os: windows
30 | customBuildTags:
31 | - MigrationTooling-mseng-VSJava-9020-Tool
32 | stages:
33 | - stage: Build
34 | jobs:
35 | - job: Job_1
36 | displayName: CI
37 | templateContext:
38 | outputs:
39 | - output: pipelineArtifact
40 | artifactName: extension
41 | targetPath: $(Build.ArtifactStagingDirectory)
42 | displayName: "Publish Artifact: extension"
43 | steps:
44 | - checkout: self
45 | fetchTags: false
46 | - task: JavaToolInstaller@0
47 | displayName: Use Java 21
48 | inputs:
49 | versionSpec: "21"
50 | jdkArchitectureOption: x64
51 | jdkSourceOption: PreInstalled
52 | - task: NodeTool@0
53 | displayName: Use Node 20.x
54 | inputs:
55 | versionSpec: 20.x
56 | - task: Npm@1
57 | displayName: npm install
58 | inputs:
59 | verbose: true
60 | - task: Npm@1
61 | displayName: npm run build-server
62 | inputs:
63 | command: custom
64 | verbose: false
65 | customCommand: run build-server
66 | - task: Bash@3
67 | displayName: vsce package
68 | inputs:
69 | targetType: inline
70 | script: |-
71 | cd $(Build.SourcesDirectory)
72 |
73 | npx @vscode/vsce@latest package
74 | - task: CopyFiles@2
75 | displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
76 | inputs:
77 | Contents: "*.vsix"
78 | TargetFolder: $(Build.ArtifactStagingDirectory)
79 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "daily"
12 |
--------------------------------------------------------------------------------
/.github/workflows/linux.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | linux:
11 | name: Linux
12 | runs-on: ubuntu-latest
13 | timeout-minutes: 30
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - name: Setup Build Environment
18 | run: |
19 | sudo apt-get update
20 | sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
21 | sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
22 | sleep 3
23 |
24 | - name: Set up JDK 21
25 | uses: actions/setup-java@v1
26 | with:
27 | java-version: '21'
28 |
29 | - name: Setup Node.js environment
30 | uses: actions/setup-node@v2
31 | with:
32 | node-version: 20
33 |
34 | - name: Install Node.js modules
35 | run: npm install
36 |
37 | - name: Install VSCE
38 | run: npm install -g @vscode/vsce
39 |
40 | - name: Build OSGi bundle
41 | run: npm run build-server
42 |
43 | - name: Build VSIX file
44 | run: vsce package
45 |
46 | - name: Test extension
47 | run: DISPLAY=:99 npm test
48 |
49 | - name: Print language server Log if job failed
50 | if: ${{ failure() }}
51 | run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
--------------------------------------------------------------------------------
/.github/workflows/linuxUI.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | linuxUI:
11 | name: Linux-UI
12 | runs-on: ubuntu-latest
13 | timeout-minutes: 30
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - name: Setup Build Environment
18 | run: |
19 | sudo apt-get update
20 | sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
21 | sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
22 | sleep 3
23 |
24 | - name: Set up JDK 21
25 | uses: actions/setup-java@v1
26 | with:
27 | java-version: '21'
28 |
29 | - name: Setup Node.js environment
30 | uses: actions/setup-node@v2
31 | with:
32 | node-version: 20
33 |
34 | - name: Install Node.js modules
35 | run: npm install
36 |
37 | - name: Install VSCE
38 | run: npm install -g vsce
39 |
40 | - name: Build OSGi bundle
41 | run: npm run build-server
42 |
43 | - name: Build VSIX file
44 | run: vsce package
45 |
46 | - name: UI Test
47 | continue-on-error: true
48 | id: test
49 | run: DISPLAY=:99 npm run test-ui
50 |
51 | - name: Retry UI Test 1
52 | continue-on-error: true
53 | if: steps.test.outcome=='failure'
54 | id: retry1
55 | run: |
56 | git reset --hard
57 | git clean -fd
58 | DISPLAY=:99 npm run test-ui
59 |
60 | - name: Retry UI Test 2
61 | continue-on-error: true
62 | if: steps.retry1.outcome=='failure'
63 | id: retry2
64 | run: |
65 | git reset --hard
66 | git clean -fd
67 | DISPLAY=:99 npm run test-ui
68 |
69 | - name: Set test status
70 | if: ${{ steps.test.outcome=='failure' && steps.retry1.outcome=='failure' && steps.retry2.outcome=='failure' }}
71 | run: |
72 | echo "Tests failed"
73 | exit 1
74 |
75 | - name: Print language server Log
76 | if: ${{ failure() }}
77 | run: find ./test-resources/settings/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
78 |
--------------------------------------------------------------------------------
/.github/workflows/macOS.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | darwin:
11 | name: macOS
12 | runs-on: macos-latest
13 | timeout-minutes: 30
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - name: Set up JDK 21
18 | uses: actions/setup-java@v1
19 | with:
20 | java-version: '21'
21 |
22 | - name: Setup Node.js environment
23 | uses: actions/setup-node@v2
24 | with:
25 | node-version: 20
26 |
27 | - name: Install Node.js modules
28 | run: npm install
29 |
30 | - name: Install VSCE
31 | run: npm install -g @vscode/vsce
32 |
33 | - name: Build OSGi bundle
34 | run: npm run build-server
35 |
36 | - name: Build VSIX file
37 | run: vsce package
38 |
39 | - name: Test extension
40 | run: npm test
41 |
42 | - name: Print language server Log if job failed
43 | if: ${{ failure() }}
44 | run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
45 |
--------------------------------------------------------------------------------
/.github/workflows/no-response.yml:
--------------------------------------------------------------------------------
1 | name: No Response
2 |
3 | # **What it does**: Closes issues where the original author doesn't respond to a request for information.
4 | # **Why we have it**: To remove the need for maintainers to remember to check back on issues periodically to see if contributors have responded.
5 |
6 | on:
7 | issue_comment:
8 | types: [created]
9 | schedule:
10 | # every morning at 5:30 AM
11 | - cron: '30 5 * * *'
12 |
13 | jobs:
14 | noResponse:
15 | runs-on: ubuntu-latest
16 | permissions:
17 | issues: write
18 | steps:
19 | - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb
20 | with:
21 | token: ${{ github.token }}
22 | daysUntilClose: 14
23 | responseRequiredLabel: "need more info"
24 | closeComment: >
25 | This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.
--------------------------------------------------------------------------------
/.github/workflows/windows.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | windows:
11 | name: Windows
12 | runs-on: windows-latest
13 | timeout-minutes: 30
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - name: Set up JDK 21
18 | uses: actions/setup-java@v1
19 | with:
20 | java-version: '21'
21 |
22 | - name: Setup Node.js environment
23 | uses: actions/setup-node@v2
24 | with:
25 | node-version: 20
26 |
27 | - name: Install Node.js modules
28 | run: npm install
29 |
30 | - name: Install VSCE
31 | run: npm install -g @vscode/vsce
32 |
33 | - name: Lint
34 | run: npm run tslint
35 |
36 | - name: Build OSGi bundle
37 | run: npm run build-server
38 |
39 | - name: Build VSIX file
40 | run: vsce package
41 |
42 | - name: Test extension
43 | run: npm test
44 |
45 | - name: Print language server Log if job failed
46 | if: ${{ failure() }}
47 | run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
48 |
--------------------------------------------------------------------------------
/.github/workflows/windowsUI.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | windowsUI:
11 | name: Windows-UI
12 | runs-on: windows-latest
13 | timeout-minutes: 30
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - name: Set up JDK 21
18 | uses: actions/setup-java@v1
19 | with:
20 | java-version: '21'
21 |
22 | - name: Setup Node.js environment
23 | uses: actions/setup-node@v2
24 | with:
25 | node-version: 20
26 |
27 | - name: Install Node.js modules
28 | run: npm install
29 |
30 | - name: Install VSCE
31 | run: npm install -g vsce
32 |
33 | - name: Lint
34 | run: npm run tslint
35 |
36 | - name: Checkstyle
37 | working-directory: .\jdtls.ext
38 | run: .\mvnw.cmd checkstyle:check
39 |
40 | - name: Build OSGi bundle
41 | run: npm run build-server
42 |
43 | - name: Build VSIX file
44 | run: vsce package
45 |
46 | - name: UI Test
47 | continue-on-error: true
48 | id: test
49 | run: npm run test-ui
50 |
51 | - name: Retry UI Test 1
52 | continue-on-error: true
53 | if: steps.test.outcome=='failure'
54 | id: retry1
55 | run: |
56 | git reset --hard
57 | git clean -fd
58 | npm run test-ui
59 |
60 | - name: Retry UI Test 2
61 | continue-on-error: true
62 | if: steps.retry1.outcome=='failure'
63 | id: retry2
64 | run: |
65 | git reset --hard
66 | git clean -fd
67 | npm run test-ui
68 |
69 | - name: Set test status
70 | if: ${{ steps.test.outcome=='failure' && steps.retry1.outcome=='failure' && steps.retry2.outcome=='failure' }}
71 | run: |
72 | echo "Tests failed"
73 | exit 1
74 |
75 | - name: Print language server Log if job failed
76 | if: ${{ failure() }}
77 | run: Get-ChildItem -Path ./test-resources/settings/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
78 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/node_modules/
2 | .DS_Store
3 | target/
4 | bin/
5 | out/
6 | **/lib
7 | **/server
8 | **/*.vsix
9 | .vscode-test/
10 | vscode-java-*.vsix
11 | packages/
12 | dist
13 | **/.settings
14 | **/.classpath
15 | **/.project
16 | **/.checkstyle
17 | test-resources/
18 | **/.gradle
19 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "shengchen.vscode-checkstyle",
6 | "yaozheng.vscode-pde"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "java.configuration.updateBuildConfiguration": "automatic",
3 | "java.checkstyle.configuration": "${workspaceFolder}/jdtls.ext/check_style.xml",
4 | "java.checkstyle.version": "8.29",
5 | "java.import.exclusions": [
6 | "**/test/**",
7 | "**/node_modules/**",
8 | "**/.metadata/**",
9 | "**/archetype-resources/**",
10 | "**/META-INF/maven/**",
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558
2 | // for the documentation about the tasks.json format
3 | {
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "type": "npm",
8 | "script": "watch",
9 | "problemMatcher": {
10 | "owner": "typescript",
11 | "pattern":[
12 | {
13 | "regexp": "\\[tsl\\] ERROR",
14 | "file": 1,
15 | "location": 2,
16 | "message": 3
17 | }
18 | ],
19 | "background": {
20 | "activeOnStart": true,
21 | "beginsPattern": "\\w+",
22 | "endsPattern": "webpack .* compiled"
23 | }
24 | },
25 | "isBackground": true,
26 | "presentation": {
27 | "reveal": "never"
28 | },
29 | "group": {
30 | "kind": "build",
31 | "isDefault": true
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode/**
2 | .vscode-test/**
3 | out/**
4 | test/**
5 | src/**
6 | **/*.map
7 | jdtls.ext/**
8 | vscode/**
9 | tsconfig.json
10 | scripts/build/**
11 | .gitignore
12 | dist/**/test
13 | webpack.*.js
14 | tslint.json
15 | node_modules
16 | scripts
17 | extension.bundle.ts
18 | javaConfig.json
19 | .github/**
20 | .azure-pipelines/**
21 | images
22 | test-resources
23 |
24 | # Ignore output of code sign
25 | server/*.md
26 | **/*.log
27 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | We greatly appreciate contributions to the vscode-java-dependency project. Your efforts help us maintain and improve this extension. To ensure a smooth contribution process, please follow these guidelines.
4 |
5 | ## Prerequisites
6 | - [JDK](https://www.oracle.com/java/technologies/downloads/?er=221886)
7 | - [Node.JS](https://nodejs.org/en/)
8 | - [VSCode](https://code.visualstudio.com/)
9 |
10 | ## Build and Run
11 |
12 | To set up the vscode-java-dependency project, follow these steps:
13 |
14 | 1. **Build the Server JAR**:
15 | - The server JAR (Java application) is located in the [jdtls.ext](./jdtls.ext) directory.
16 | - Run the following command to build the server:
17 | ```shell
18 | npm run build-server
19 | ```
20 |
21 | 2. **Install Dependencies**:
22 | - Execute the following command to install the necessary dependencies:
23 | ```shell
24 | npm install
25 | ```
26 |
27 | 3. **Run/Debug the Extension**:
28 | - Open the "Run and Debug" view in Visual Studio Code.
29 | - Run the "Run Extension" task.
30 |
31 | 4. **Attach to Plugin[Debug Java]**:
32 | - Prerequisite: Ensure that the extension is activated, meaning the Java process is already launched. This is required for the task to run properly.
33 | - Open the "Run and Debug" view in Visual Studio Code.
34 | - Run the "Attach to Plugin" task.
35 | - Note: This task is required only if you want to debug Java code [jdtls.ext](./jdtls.ext). It requires the [vscode-pde](https://marketplace.visualstudio.com/items?itemName=yaozheng.vscode-pde) extension to be installed.
36 |
37 | Thank you for your contributions and support!
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Project Manager for Java
2 |
3 | > Manage Java projects in Visual Studio Code
4 |
5 | [](https://github.com/microsoft/vscode-java-dependency/actions/workflows/windows.yml?query=branch%3Amain)
6 | [](https://github.com/microsoft/vscode-java-dependency/actions/workflows/linux.yml?query=branch%3Amain)
7 | [](https://github.com/microsoft/vscode-java-dependency/actions/workflows/macOS.yml?query=branch%3Amain)
8 |
9 | ## Overview
10 |
11 | A lightweight extension to provide additional Java project explorer features. It works with [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) to provide the following features:
12 |
13 | ### Project View
14 |
15 | 
16 |
17 | ### Create Java Projects
18 |
19 | 
20 |
21 | ### Export Jar
22 | > Note: For Spring Boot projects, please use the build tool to build the executable jar, for example: `mvn package`.
23 |
24 | 
25 |
26 | ### Manage Dependencies
27 |
28 | You can work with JAR files directly without any build tools. Go to `JAVA PROJECTS` view, find the `Referenced Libraries` node and click the `+` icon:
29 |
30 | 
31 |
32 | If you want to fine-tune this, go to `settings.json` and look for the `java.project.referencedLibraries` entry.
33 |
34 | ```json
35 | "java.project.referencedLibraries": [
36 | "library/**/*.jar",
37 | "/home/username/lib/foo.jar"
38 | ]
39 | ```
40 |
41 | You can tell that the glob pattern is supported. And here's more - you can include/exclude certain files, and attach source JARs:
42 |
43 | ```json
44 | "java.project.referencedLibraries": {
45 | "include": [
46 | "library/**/*.jar",
47 | "/home/username/lib/foo.jar"
48 | ],
49 | "exclude": [
50 | "library/sources/**"
51 | ],
52 | "sources": {
53 | "library/bar.jar": "library/sources/bar-src.jar"
54 | }
55 | }
56 | ```
57 |
58 | ## Requirements
59 |
60 | - VS Code (version 1.83.1+)
61 | - [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)
62 |
63 |
64 | ## Settings
65 |
66 | | Setting Name | Description | Default Value |
67 | |---|---|---|
68 | | `java.dependency.showMembers` | Specify whether to show the members in the Java Projects explorer. | `false` |
69 | | `java.dependency.syncWithFolderExplorer` | Specify whether to link Java Projects Explorer with the active editor. | `true` |
70 | | `java.dependency.autoRefresh` | Specify whether to automatically sync the change from editor to the Java Projects explorer. | `true` |
71 | | `java.dependency.refreshDelay` | The delay time (ms) the auto refresh is invoked when changes are detected. | `2000ms` |
72 | | `java.dependency.packagePresentation` | Specify how to display the package. Supported values are: `flat`, `hierarchical`.| `flat` |
73 | | `java.project.exportJar.targetPath` | The output path of export jar. When this setting is **empty** , a file explorer will pop up to let the user select the output location.| `${workspaceFolder}/${workspaceFolderBasename}.jar` |
74 | | `java.project.explorer.showNonJavaResources` | When enabled, the explorer shows non-Java resources. | `true` |
75 |
76 | ## Contribution
77 |
78 | ### Build
79 | * Prerequirement
80 | - Node.js
81 | - Java SDK 11 or above
82 |
83 | * Go to root folder:
84 | ```
85 | npm install
86 | npm run build-server
87 | ```
88 |
89 | ## Telemetry
90 | VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409) to learn more. If you don't wish to send usage data to Microsoft, you can set the `telemetry.enableTelemetry` setting to `false`. Learn more in our [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).
91 |
92 |
93 | ---
94 |
95 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
96 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/extension.bundle.ts:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Licensed under the MIT license.
3 |
4 | export { activate, deactivate } from "./src/extension";
5 |
6 | // context value test
7 | export { INodeData, NodeKind, TypeKind } from "./src/java/nodeData";
8 | export { PackageRootKind } from "./src/java/packageRootNodeData";
9 | export { ContainerNode } from "./src/views/containerNode";
10 | export { DataNode } from "./src/views/dataNode";
11 | export { FileNode } from "./src/views/fileNode";
12 | export { FolderNode } from "./src/views/folderNode";
13 | export { PackageNode } from "./src/views/packageNode";
14 | export { PackageRootNode } from "./src/views/packageRootNode";
15 | export { PrimaryTypeNode } from "./src/views/PrimaryTypeNode";
16 | export { ProjectNode } from "./src/views/projectNode";
17 | export { WorkspaceNode } from "./src/views/workspaceNode";
18 | export { IMainClassInfo } from "./src/tasks/buildArtifact/ResolveMainClassExecutor";
19 |
20 | // project view test
21 | export { contextManager } from "./src/contextManager";
22 | export { DependencyExplorer } from "./src/views/dependencyExplorer";
23 | export { Commands } from "./src/commands";
24 | export { LanguageServerMode } from "./src/languageServerApi/LanguageServerMode";
25 |
26 | // language server api
27 | export { languageServerApiManager } from "./src/languageServerApi/languageServerApiManager";
28 |
29 | // tasks
30 | export { BuildTaskProvider, categorizePaths, getFinalPaths } from "./src/tasks/build/buildTaskProvider";
31 |
32 | // delegate commands
33 | export { Jdtls } from "./src/java/jdtls";
34 |
--------------------------------------------------------------------------------
/icons/dark/icon-link.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/dark/icon-unlink.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/icons/light/icon-link.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/light/icon-unlink.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/images/create-project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/vscode-java-dependency/7b3990cf7d388b0e3fc801734cbff654a5313d17/images/create-project.png
--------------------------------------------------------------------------------
/images/export-jar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/vscode-java-dependency/7b3990cf7d388b0e3fc801734cbff654a5313d17/images/export-jar.png
--------------------------------------------------------------------------------
/images/manage-dependencies.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/vscode-java-dependency/7b3990cf7d388b0e3fc801734cbff654a5313d17/images/manage-dependencies.gif
--------------------------------------------------------------------------------
/images/project-explorer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/vscode-java-dependency/7b3990cf7d388b0e3fc801734cbff654a5313d17/images/project-explorer.png
--------------------------------------------------------------------------------
/javaConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "projects": [
3 | "./jdtls.ext/com.microsoft.jdtls.ext.core"
4 | ],
5 | "targetPlatform": "./jdtls.ext/com.microsoft.jdtls.ext.target/com.microsoft.jdtls.ext.tp.target"
6 | }
7 |
--------------------------------------------------------------------------------
/jdtls.ext/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/vscode-java-dependency/7b3990cf7d388b0e3fc801734cbff654a5313d17/jdtls.ext/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/jdtls.ext/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.microsoft.jdtls.ext.core
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 | org.eclipse.m2e.core.maven2Builder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.m2e.core.maven2Nature
31 | org.eclipse.pde.PluginNature
32 | org.eclipse.jdt.core.javanature
33 |
34 |
35 |
36 | 1665551209562
37 |
38 | 30
39 |
40 | org.eclipse.core.resources.regexFilterMatcher
41 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
4 | org.eclipse.jdt.core.compiler.compliance=11
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.release=disabled
8 | org.eclipse.jdt.core.compiler.source=11
9 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: JDTLS EXT Core
4 | Bundle-SymbolicName: com.microsoft.jdtls.ext.core;singleton:=true
5 | Bundle-Version: 0.24.1
6 | Bundle-Activator: com.microsoft.jdtls.ext.core.JdtlsExtActivator
7 | Bundle-RequiredExecutionEnvironment: JavaSE-11
8 | Bundle-ActivationPolicy: lazy
9 | Import-Package: org.eclipse.jdt.core,
10 | org.eclipse.jdt.launching,
11 | org.osgi.framework;version="1.3.0"
12 | Require-Bundle: org.eclipse.core.runtime,
13 | org.eclipse.jdt.ls.core,
14 | org.eclipse.jdt.core,
15 | org.eclipse.core.resources,
16 | org.eclipse.lsp4j.jsonrpc,
17 | org.eclipse.lsp4j,
18 | org.apache.commons.lang3,
19 | com.google.gson
20 | Bundle-ClassPath: .
21 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = META-INF/,\
4 | .,\
5 | plugin.xml
6 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
17 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | com.microsoft.jdtls.ext
7 | jdtls-ext-parent
8 | 0.24.1
9 |
10 | com.microsoft.jdtls.ext.core
11 | eclipse-plugin
12 | ${base.name} :: JDTLS Ext Plugin
13 |
14 |
15 |
16 |
17 |
18 | org.apache.maven.plugins
19 | maven-checkstyle-plugin
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/CommandHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2018 Microsoft Corporation and others.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * Microsoft Corporation - initial API and implementation
10 | *******************************************************************************/
11 |
12 | package com.microsoft.jdtls.ext.core;
13 |
14 | import java.util.List;
15 |
16 | import org.apache.commons.lang3.StringUtils;
17 | import org.eclipse.core.runtime.IProgressMonitor;
18 | import org.eclipse.jdt.ls.core.internal.IDelegateCommandHandler;
19 |
20 | public class CommandHandler implements IDelegateCommandHandler {
21 |
22 | @Override
23 | public Object executeCommand(String commandId, List