Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f41dd22
fix: Cannot list multi-module projects properly (#450)
jdneo Jan 29, 2021
2f49ab9
chore: Add configuration file for No Response bot (#451)
jdneo Feb 1, 2021
30fc493
chore: Adopt GitHub Actions for CI (#454)
jdneo Feb 5, 2021
dd40a30
feat: Adopt resourceUri API to the Java Project explorer (#453)
jdneo Feb 5, 2021
8dbf3b8
chore: Prepare for 0.18.0 (#456)
jdneo Feb 7, 2021
54911c3
fix: Cannot reveal the explorer when 'java.dependency.syncWithFolderE…
jdneo Feb 9, 2021
f780af8
fix: Show welcome view when no Java projects in workspace (#461)
jdneo Feb 26, 2021
671c65c
chore: Apply new logo (#462)
CsCherrYY Mar 1, 2021
23c89a9
chore: Prepare for 0.18.1 (#463)
jdneo Mar 1, 2021
7dbfef8
chore: Update logo to 256*256 (#466)
CsCherrYY Mar 3, 2021
32ed473
chore(deps): Bump elliptic from 6.5.3 to 6.5.4 (#469)
dependabot[bot] Mar 9, 2021
2162e7a
fix: export jar doesn't report error when grammatical error exists (…
CsCherrYY Mar 9, 2021
c928522
chore: Update dependencies (#470)
jdneo Mar 9, 2021
292ee9f
fix: Create new packages or classes does not work via hotkeys (#467)
jdneo Mar 9, 2021
38a40b2
chore: Prepare for 0.18.2 (#473)
jdneo Mar 22, 2021
403f78f
chore(deps): Bump y18n from 3.2.1 to 3.2.2 (#474)
dependabot[bot] Mar 31, 2021
4d15548
Adopt new APIs from vscode-tas-client (#477)
jdneo Apr 6, 2021
9d3e62d
chore: Rename group 9_sync to 9_configuration (#480)
jdneo Apr 7, 2021
214680c
feat: Add metadata for unmanaged folder (#479)
jdneo Apr 7, 2021
95dd252
chore: Prepare for 0.18.3 (#482)
jdneo Apr 8, 2021
9fc5bf3
fix: Save the workspace before exporting jar (#483)
jdneo Apr 16, 2021
341ac5b
bugfix: Data tree node not found (#484)
jdneo Apr 23, 2021
27c306b
test: Add unit tests for exporting jar (#485)
jdneo Apr 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
daysUntilClose: 14
responseRequiredLabel: need more info
closeComment: >
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.
150 changes: 150 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
linux:
name: Linux
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2

- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 12

- name: Install Node.js modules
run: npm install

- name: Install Gulp
run: npm install -g gulp

- name: Install VSCE
run: npm install -g vsce

- name: Lint
run: gulp tslint

- name: Checkstyle
run: gulp checkstyle

- name: Build OSGi bundle
run: npm run build-server

- name: Build VSIX file
run: vsce package

- name: Test extension
run: DISPLAY=:99 npm test

- name: Print language server Log if job failed
if: ${{ failure() }}
run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;

windows:
name: Windows
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 12

- name: Install Node.js modules
run: npm install

- name: Install Gulp
run: npm install -g gulp --force

- name: Install VSCE
run: npm install -g vsce

- name: Lint
run: gulp tslint

- name: Checkstyle
run: gulp checkstyle

- name: Build OSGi bundle
run: npm run build-server

- name: Build VSIX file
run: vsce package

- name: Test extension
run: npm test

- name: Print language server Log if job failed
if: ${{ failure() }}
run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat

darwin:
name: macOS
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 12

- name: Install Node.js modules
run: npm install

- name: Install Gulp
run: npm install -g gulp

- name: Install VSCE
run: npm install -g vsce

- name: Lint
run: gulp tslint

- name: Checkstyle
run: gulp checkstyle

- name: Build OSGi bundle
run: npm run build-server

- name: Build VSIX file
run: vsce package

- name: Test extension
run: npm test

- name: Print language server Log if job failed
if: ${{ failure() }}
run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ node_modules
scripts
extension.bundle.ts
javaConfig.json
.github/**

# Ignore output of code sign
server/*.md
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ All notable changes to the "vscode-java-dependency" extension will be documented
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.18.3
### Added
- Add new unmanaged folder metadata for the project node. [PR#479](https://github.com/microsoft/vscode-java-dependency/pull/479)
### Changed
- Rename sorting group `9_sync` to `9_configuration`. [PR#480](https://github.com/microsoft/vscode-java-dependency/pull/480)

## 0.18.2

### Changed
- Update dependencies. [PR#470](https://github.com/microsoft/vscode-java-dependency/pull/470)

### Fixed
- [Bugs fixed](https://github.com/microsoft/vscode-java-dependency/issues?q=is%3Aissue+label%3Abug+milestone%3A0.18.2+is%3Aclosed)

## 0.18.1
### Added
- Add welcome view in Java Project explorer when there is no Java projects in the workspace. [PR#461](https://github.com/microsoft/vscode-java-dependency/pull/461)

### Changed
- Apply the new extension icon. [PR#462](https://github.com/microsoft/vscode-java-dependency/pull/462)

### Fixed
- [Bugs fixed](https://github.com/microsoft/vscode-java-dependency/issues?q=is%3Aissue+label%3Abug+milestone%3A0.18.1+is%3Aclosed)

## 0.18.0
### Added
- Adopt the resource URI API to the Java Project explorer. [PR#453](https://github.com/microsoft/vscode-java-dependency/pull/453)

### Fixed
- [Bugs fixed](https://github.com/microsoft/vscode-java-dependency/issues?q=is%3Aissue+label%3Abug+milestone%3A0.18.0+is%3Aclosed)

## 0.17.0
### Added
- Add contextual title and icon for `Java Project` explorer. [#396](https://github.com/microsoft/vscode-java-dependency/issues/396)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Manage Java projects in Visual Studio Code

[![Travis CI](https://travis-ci.org/Microsoft/vscode-java-dependency.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-java-dependency)
[![GitHub Actions](https://img.shields.io/github/workflow/status/microsoft/vscode-java-dependency/CI/master?style=flat-square)](https://github.com/microsoft/vscode-java-dependency/actions?query=workflow%3ACI+branch%3Amaster)

## Overview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JDTLS EXT Activator
Bundle-SymbolicName: com.microsoft.jdtls.ext.activator;singleton:=true
Bundle-Version: 0.17.0
Bundle-Version: 0.18.3
Bundle-Activator: com.microsoft.jdtls.ext.activator.JdtlsExtActivator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.eclipse.jdt.core,
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/com.microsoft.jdtls.ext.activator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.microsoft.jdtls.ext</groupId>
<artifactId>jdtls-ext-parent</artifactId>
<version>0.17.0</version>
<version>0.18.3</version>
</parent>
<artifactId>com.microsoft.jdtls.ext.activator</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/com.microsoft.jdtls.ext.core/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry exported="true" kind="lib" path="lib/commons-io-2.5.jar"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JDTLS EXT Core
Bundle-SymbolicName: com.microsoft.jdtls.ext.core;singleton:=true
Bundle-Version: 0.17.0
Bundle-Version: 0.18.3
Bundle-Activator: com.microsoft.jdtls.ext.core.JdtlsExtActivator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/com.microsoft.jdtls.ext.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.microsoft.jdtls.ext</groupId>
<artifactId>jdtls-ext-parent</artifactId>
<version>0.17.0</version>
<version>0.18.3</version>
</parent>
<artifactId>com.microsoft.jdtls.ext.core</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ public static IJavaProject getJavaProject(String projectUri) {
}

// For multi-module scenario, findContainersForLocationURI API may return a container array,
// need put the result from the nearest project in front.
// need filter out non-Java project and put the result from the nearest project in front.
containers = Arrays.stream(containers).filter(c -> ProjectUtils.isJavaProject(c.getProject())).toArray(IContainer[]::new);
Arrays.sort(containers, (Comparator<IContainer>) (IContainer a, IContainer b) -> {
return a.getFullPath().toPortableString().length() - b.getFullPath().toPortableString().length();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static List<MainClassInfo> getMainClasses(List<Object> arguments, IProgre
}
}
}
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(searchRoots.toArray(IJavaElement[]::new));
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(searchRoots.toArray(new IJavaElement[0]));
SearchPattern pattern = SearchPattern.createPattern("main(String[]) void", IJavaSearchConstants.METHOD,
IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
SearchRequestor requestor = new SearchRequestor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
package com.microsoft.jdtls.ext.core.model;

import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -43,13 +45,6 @@
*/
public class PackageNode {

/**
* Nature Id for the IProject.
*/
private static final String NATURE_ID = "NatureId";

private static final String UNMANAGED_FOLDER_INNER_PATH = "UnmanagedFolderInnerPath";

public static final String K_TYPE_KIND = "TypeKind";

/**
Expand All @@ -67,15 +62,26 @@ public class PackageNode {
*/
public static final int K_ENUM = 3;

public static final String REFERENCED_LIBRARIES_PATH = "REFERENCED_LIBRARIES_PATH";
private static final String REFERENCED_LIBRARIES_CONTAINER_NAME = "Referenced Libraries";
private static final String IMMUTABLE_REFERENCED_LIBRARIES_CONTAINER_NAME = "Referenced Libraries (Read-only)";

public static final String REFERENCED_LIBRARIES_PATH = "REFERENCED_LIBRARIES_PATH";
public static final ContainerNode REFERENCED_LIBRARIES_CONTAINER = new ContainerNode(REFERENCED_LIBRARIES_CONTAINER_NAME, REFERENCED_LIBRARIES_PATH,
NodeKind.CONTAINER, IClasspathEntry.CPE_CONTAINER);
public static final ContainerNode IMMUTABLE_REFERENCED_LIBRARIES_CONTAINER = new ContainerNode(IMMUTABLE_REFERENCED_LIBRARIES_CONTAINER_NAME,
REFERENCED_LIBRARIES_PATH, NodeKind.CONTAINER, IClasspathEntry.CPE_CONTAINER);

/**
* Nature Id for the IProject.
*/
private static final String NATURE_ID = "NatureId";

private static final String UNMANAGED_FOLDER_INNER_PATH = "UnmanagedFolderInnerPath";

/**
* Nature Id for the unmanaged folder.
*/
private static final String UNMANAGED_FOLDER_NATURE_ID = "org.eclipse.jdt.ls.core.unmanagedFolder";

/**
* The name of the PackageNode.
*/
Expand Down Expand Up @@ -158,10 +164,12 @@ public static PackageNode createNodeForProject(IJavaElement javaElement) {
PackageNode projectNode = new PackageNode(proj.getName(), proj.getFullPath().toPortableString(), NodeKind.PROJECT);
projectNode.setUri(ProjectUtils.getProjectRealFolder(proj).toFile().toURI().toString());
try {
projectNode.setMetaDataValue(NATURE_ID, proj.getDescription().getNatureIds());
List<String> natureIds = new ArrayList<>(Arrays.asList(proj.getDescription().getNatureIds()));
if (!ProjectUtils.isVisibleProject(proj)) {
natureIds.add(UNMANAGED_FOLDER_NATURE_ID);
projectNode.setMetaDataValue(UNMANAGED_FOLDER_INNER_PATH, proj.getLocationURI().toString());
}
projectNode.setMetaDataValue(NATURE_ID, natureIds);
} catch (CoreException e) {
// do nothing
}
Expand Down
2 changes: 1 addition & 1 deletion jdtls.ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.microsoft.jdtls.ext</groupId>
<artifactId>jdtls-ext-parent</artifactId>
<name>${base.name} :: Parent</name>
<version>0.17.0</version>
<version>0.18.3</version>
<packaging>pom</packaging>
<properties>
<base.name>Java Project Manager</base.name>
Expand Down
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading