coc-java-explorer
asmodeus812coc.nvim extension project manager for java
Published Package Summary
coc-java-explorer
A Java project explorer for coc.nvim, ported from vscode-java-dependency. It shows the Java projects of the workspace in a tree: source roots, packages, classes, the JRE, the Maven or Gradle dependencies and referenced libraries. From the tree you create classes and packages, rename and delete; commands add and remove referenced libraries, create projects and export jars.
Using it inside Neovim is described in the help page: :help coc-java-explorer.
Requirements
- Neovim with coc.nvim.
- coc-java. Its Java language server fills the tree, so coc-java must be installed and working.
Installation
:CocInstall coc-java-explorer
The extension starts when you open a Java file or a workspace with a pom.xml, build.gradle,
build.gradle.kts, settings.gradle, settings.gradle.kts or .classpath file. Open the tree with:
:CocCommand java.view.package.revealInProjectExplorer
Troubleshooting
- The tree is empty: the language server is still importing the projects. Projects appear as their import
finishes; check
:CocCommand workspace.showOutputand the coc-java output for import errors. - A workspace folder is missing from the tree: it has no Java project. Run
:CocCommand java.project.explorer.showNonJavaResourcesto browse it as a plain folder. :help coc-java-exploreris not found: the help page is registered when the extension starts. Open a Java file first.
Every message the extension shows, with what to do, is in :help coc-java-explorer-messages.
Development
npm install
npm run build # bundle into lib/
npm run watch # rebuild on change
npm run typecheck # type check without emitting
make update # rebuild the bundled server jar from vscode-java-dependency
- coc.nvim extension project manager for java
- onLanguage:java
- workspaceContains:pom.xml
- workspaceContains:*/pom.xml
- workspaceContains:build.gradle
- workspaceContains:*/build.gradle
- workspaceContains:settings.gradle
- workspaceContains:*/settings.gradle
- workspaceContains:build.gradle.kts
- workspaceContains:*/build.gradle.kts
- workspaceContains:settings.gradle.kts
- workspaceContains:*/settings.gradle.kts
- workspaceContains:.classpath
- workspaceContains:*/.classpath
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
Published with coc-java-explorer@0.3.5 as CHANGELOG.md.
Change Log
All notable changes to the "vscode-java-dependency" extension will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.23.6
Fixed
- Referenced Libraries container should be immutable for build tool projects. PR#826
0.23.5
Added
- Add 'New Java File' menu to File Explorer. PR#820.
Changed
- Adjust the existing File Explorer menu order. PR#820.
0.23.4
Added
- Contribute 'New Java Project...' command to
File>New File...and File Explorer menus. PR#809
0.23.3
Added
- Register the project delete event. PR#802
Changed
0.23.2
Fixed
- Improve wording in Java Projects view. PR#785
- Support showing Gradle sub-menu for projects imported by Gradle build server. PR#786
- Update extension names in creating Java projects menu. PR#790, contributed by @dbalek
- Maven multi-module project doesn't correctly open modules. #766, contributed by @fvclaus
0.23.1
Removed
- Removed marketplace preview flag. PR#780
0.23.0
Added
- Support creating Micronaut projects. #713, contributed by @dbalek
- Support creating Craal Cloud Native projects. PR#765, contributed by @dbalek
Fixed
- Fix spelling mistake in welcome view. PR#760, contributed by @jeremyfiel
- Cannot open file explorer from welcome view. #770
0.22.0
Added
- Display non-Java files in Java Projects explorer. #145
- Show non-Java projects in the Java Projects explorer. #736
- Introduce a setting:
java.project.explorer.showNonJavaResourcesto control whether non-Java resources show in Java Projects explorer. #751 - Support creating files and folders in Java Projects explorer. #598
- Apply file decorators to project level. #481
- Give more hints about the project import status. #580
Changed
Fixed
- Apply
files.excludeto Java Projects explorer. #214 - Empty packages will not appear sometimes. #600
- Show Java files which does not have a primary type in the Java Projects explorer. #748
0.21.2
Fixed
0.21.1
Changed
- Scan two levels of directories for activation indicators. PR#681
- Remove the
ASKUSERoption when specify the output path of exporting jar task. To make the extension asks for the output path when exporting jars, simply leave it empty. #676
Fixed
0.21.0
Added
- Add sub-menu for Maven and Gradle projects in Java Project explorer. PR#664
- Add Rebuild commands into context menu. PR#663
- Support
Run Build Task...in theTerminalmenu. PR#660 - Show
Reload Java Projectshortcut in editor title area on demand. PR#671 - Add
zh-twlocale. PR#669, contributed by @MuTsunTsai
Changed
- Rename the task type
java, which is used for exporting jar files, tojava (buildArtifact). #665
Fixed
0.20.0
Added
- Support Support drag and drop for Java Project explorer. #613
Changed
- Move the
Rebuild Workspaceaction to navigation bar. #619
Fixed
0.19.1
Fixed
0.19.0
Added
- Support creating new JavaFX project via Maven archetype. PR#581
- Support creating new Gradle project. PR#583
Changed
- Now you can simply leave the setting
java.project.exportJar.targetPathempty when you want to specify the location of exported jar manually. PR#575 - Add the
java.project.referencedLibrariessetting by default when creating an unmanaged folder project. PR#584
0.18.9
Fixed
0.18.8
Changed
- Adopt the new
folder-libraryicon. PR#545
Fixed
0.18.7
Added
- Support creating new Java class from
File>New File.... PR#533
0.18.6
Changed
- Set the output path to
binby default when creating projects without build tools. #523
Fixed
0.18.5
Fixed
0.18.4
Added
- Show reports when exporting jar. #374
Fixed
0.18.3
Added
- Add new unmanaged folder metadata for the project node. PR#479
Changed
- Rename sorting group
9_syncto9_configuration. PR#480
0.18.2
Changed
- Update dependencies. PR#470
Fixed
0.18.1
Added
- Add welcome view in Java Project explorer when there is no Java projects in the workspace. PR#461
Changed
- Apply the new extension icon. PR#462
Fixed
0.18.0
Added
- Adopt the resource URI API to the Java Project explorer. PR#453
Fixed
0.17.0
Added
- Add contextual title and icon for
Java Projectexplorer. #396 - Allow adding library folders into the
Referenced Librarieson Windows and Linux (PressAltorShiftto toggle out the button). PR#434 - Add test metadata to the nodes which are under test source paths. PR#437
Changed
- Opening files from the
Java Projectexplorer now has the same experience as theFileexplorer. PR#426
Fixed
0.16.0
Added
- Add
Update Projectcommand into the project node in explorer. PR#391 - Add more default keyboard shortcuts for the explorer commands. PR#393
Changed
- Change the command name
Reveal in Java ProjectstoReveal in Java Projects Explorer. PR#395 - Do not show the
Java Projectexplorer in non-Java workspace. #372
Fixed
0.15.0
Added
- Support exporting jar with custom task. PR#350
- Add
renameinto the view context menu. PR#353 - Add context value for folder nodes in the Java Projects explorer. PR#365
Changed
- Update the icon of exporting jar. PR#360
Fixed
0.14.0
Added
- Add a new setting
java.project.exportJar.targetPathto specify target path when exporting jar. #330 - Add delete action into the Project explorer's context menu. PR#343
- Can trigger
New Java ClassandNew Packageactions from the project nodes in the Project explorer. PR#335 - Can reveal the Project explorer from the Java source file. PR#327
- Can reveal the Project explorer from the editor context menu. PR#332
- Add inline buttons for
New Java Classin the Project explorer. PR#331
Fixed
0.13.0
Added
- Add overflow menu and the shortcut for
Build WorkspaceandClean Workspacecommands. PR#308
Changed
- Refined the context value of the nodes in the
Java Projectsexplorer. PR#311. For more details about how to register commands onto the nodes, see the wiki page. - The default package will not show in the explorer any more. #313
- Improve the explorer layout for
No build toolsprojects. PR#312, PR#210 - Improve the description for
No build toolsoption when creating new projects. PR#314
Fixed
0.12.0
Added
- Support creating new packages and types. #78
Changed
- Reduce unnecessary refreshes when editing a Java file. #283
- Adopt welcome view for Project explorer in LightWeight mode. PR#300
Fixed
0.11.0
Added
- Export jar file from workspace folder. PR#271
- A unified entry to create new Java projects. PR#276
- Adopt APIs in LightWeight mode. PR#272
Changed
- Extension is renamed to
Project Manager for Java. #248
0.10.2
Added
- Integrated the TAS client. PR#260
0.10.1
Changed
- Update the
vscode-extension-telemetry-wrapperto0.8.0.
0.10.0 - 2020-05-10
Changed
- Migrate icons to Codicons. PR#241, PR#242
- The command
Create Java Projectnow will allow users to create a Java project with Maven support (as long as the Maven extension is installed) or a project without any build tools. #199, #249
Fixed
0.9.0 - 2020-02-19
Added
- A new entry in explorer to add Maven dependencies. PR#230
Changed
- By default, the explorer won't show the members of the classes. If the users want to show them in the explorer, please set the setting
java.dependency.showMemberstotrue. PR#235
0.8.0 - 2020-01-17
Added
- Support managing referenced libraries in the dependency explorer. #174
0.7.0 - 2020-01-10
Added
- Add
Collapse Allsupport in theJava Dependenciesexplorer. PR#198 - Add file path as description for external jar files in the
Java Dependenciesexplorer. PR#209 - Add
Reveal in Explorer,Copy PathandCopy Relative Pathin theJava Dependenciesexplorer's right-click context menu. #PR208
Updated
- Open newly created project in the current window when no workspace folder is opened. #180
- Update the icons in the navigation bar of the
Java Dependenciesexplorer. #197
0.6.0 - 2019-10-16
Updated:
- Fix: When edit java file, the dependency view failed to auto refresh because of uncaught NPE. #176
- Fix: Replace deprecated workspace.rootPath api with workspaceFolder. PR#184
- Fix: Click some tree node in the dependency view will throw icon not found error. #161
- Fix: Add multiple roots to VS Code and the dependency view didn't list the full projects. #162
- Enhancement: Apply debounce to the auto refresh mechanism to reduce the refresh frequency. PR#183
0.5.1 - 2019-6-18
Updated:
- Fix telemetry issue.
0.5.0 - 2019-6-11
Added
- Add sync settings for dependency viewer PR#156
Updated:
- Update the project template PR#154
0.4.0 - 2019-3-26
Added:
- Add sync command to synchronize/desynchronize dependency viewer selection with folder explorer PR#140.
Updated:
- Update package view icons PR#138
- Fix error when window.activeTextEditor is undefined PR#136.
- Fix NPE issue when opne a non java file Issue#139.
0.3.0 - 2018-12-21
Added:
- Add the ability to show hierarchical package presentation #57.
- Add Chinese localization #134.
- Add a "Referenced Libraries" tree node for referenced libraries #14.
Updated
- Fix: No way to link a resource files back to the project explorer #106.
- Fix: The click on the the tree node will navigate to the start of comment #124.
- Fix: The link between dependency explorer and active editor does not work for JDK classes #110.
- Fix: Class file can't show the symbols in the dependency explorer #35.
0.2.0 - 2018-11-19
Added:
- Add the support for resource files under resource source folders like src/main/resources.
Updated
- Fix: The side bar keeps popping up when a new Java file opens. #83.
- Fix: No way to link a java class definition back to the project explorer. #80.
0.1.0 - 2018-10-19
Added
- View Java source code in the flat package
- View Java project dependencies, supporting Eclipse/Maven/Gradle
- Create simple Java project
Contributed Commands
All contributes.commands entries from the published package manifest for coc-java-explorer@0.3.5.
| Command (:CocCommand) | Description |
|---|---|
| java.project.addLibraries | Add jar libraries to project |
| java.project.addLibraryFolders | Add library folders to project |
| java.project.refreshLibraries | Refresh project libraries |
| java.project.removeLibrary | Exclude referenced libraries from project |
| java.project.create | Create a new Java project |
| java.view.package.linkWithFolderExplorer | Link package view with folder |
| java.view.package.unlinkWithFolderExplorer | Unlink package view from folder |
| java.view.package.changeToFlatPackageView | Show package view as flat view |
| java.view.package.changeToHierarchicalPackageView | Show package view as hierarchical view |
| java.view.package.refresh | Refresh project & packages in view |
| java.view.package.exportJar | Export project jar file |
| java.view.package.revealInProjectExplorer | Reveal the current file in the project view |
| java.project.explorer.showNonJavaResources | Show non-Java resources in view |
| java.project.explorer.hideNonJavaResources | Hide non-Java resources in view |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Set to true to automatically refresh the tree view when changes to the classpath occur and the view is opened or visible"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Show class members in the project explorer view when a class is expanded"
}Raw JSON Schema
{
"type": "number",
"default": 2000,
"description": "The debounce refresh delay after which detected changes to the class path will reflect and update the project view"
}Raw JSON Schema
{
"enum": [
"flat",
"hierarchical"
],
"type": "string",
"default": "flat",
"description": "Show the package view explorer in either a flat or hierarchical view model"
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Reveal the file of the active editor in the explorer when the editor changes. Written by the link and unlink with folder explorer commands"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Show non java related file system resources such as folders or files, and browse workspace folders without java projects. When disabled, workspace folders without java projects are hidden"
}