Skip to content

Commit cff44ed

Browse files
committed
Update jdt to 1.51.0
1 parent e1737ce commit cff44ed

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
if: matrix.benchmark == false
8282
uses: actions/setup-java@v4
8383
with:
84-
java-version: 17
84+
java-version: 21
8585
distribution: 'adopt'
8686

8787
- name: Install Python
@@ -243,7 +243,7 @@ jobs:
243243
# if: matrix.benchmark == false
244244
# uses: actions/setup-java@v4
245245
# with:
246-
# java-version: 17
246+
# java-version: 21
247247
# distribution: 'temurin'
248248
# - name: Install Python
249249
# uses: actions/setup-python@v5

build.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ def Exit( self ):
8989
)$
9090
"""
9191

92-
JDTLS_MILESTONE = '1.40.0'
93-
JDTLS_BUILD_STAMP = '202409261450'
92+
JDTLS_REQUIRED_JAVA_VERSION = 21
93+
JDTLS_MILESTONE = '1.51.0'
94+
JDTLS_BUILD_STAMP = '202510022025'
9495
JDTLS_SHA256 = (
95-
'7416fc62befa450e32f06ec2b503f2eec5f22f0b1cc12f7b8ee5112bf671cf11'
96+
'8a59372117881bf5bdc0220f2254472846b88137c058f344b00a7d41427745a1'
9697
)
9798

9899
DEFAULT_RUST_TOOLCHAIN = 'stable'
@@ -1110,7 +1111,7 @@ def Print( *args, **kwargs ):
11101111
sys.stdout.write( 'Installing jdt.ls for Java support...' )
11111112
sys.stdout.flush()
11121113

1113-
CheckJavaVersion( 17 )
1114+
CheckJavaVersion( JDTLS_REQUIRED_JAVA_VERSION )
11141115

11151116
TARGET = p.join( DIR_OF_THIRD_PARTY, 'eclipse.jdt.ls', 'target', )
11161117
REPOSITORY = p.join( TARGET, 'repository' )

ycmd/completers/language_server/language_server_completer.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,19 @@ def _HandleDynamicRegistrations( self, request ):
586586
for watcher in reg[ 'registerOptions' ][ 'watchers' ]:
587587
# TODO: Take care of watcher kinds. Not everything needs
588588
# to be watched for create, modify *and* delete actions.
589-
pattern = os.path.join( self._project_directory,
590-
watcher[ 'globPattern' ] )
589+
590+
base, pattern = self._project_directory, watcher[ 'globPattern' ]
591+
if isinstance( pattern, dict ):
592+
# RelativePattern
593+
base, pattern = (
594+
watcher[ 'globPattern' ][ 'baseUri' ],
595+
watcher[ 'globPattern' ][ 'pattern' ]
596+
)
597+
if isinstance( base, dict ):
598+
# WorkspaceFolder
599+
base = base[ 'uri' ]
600+
601+
pattern = os.path.join( base, pattern )
591602
if os.path.isdir( pattern ):
592603
pattern = os.path.join( pattern, '**' )
593604
globs.append( pattern )

ycmd/tests/java/diagnostics_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
PathToTestFile,
3535
SharedYcmd,
3636
StartJavaCompleterServerInDirectory,
37+
StartJavaCompleterServerWithFile,
3738
setUpModule,
3839
tearDownModule )
3940

@@ -72,7 +73,6 @@ def ProjectPath( *args ):
7273
'Test.java' )
7374

7475
DIAG_MATCHERS_PER_FILE = {
75-
PathToTestFile( DEFAULT_PROJECT_DIR ): empty(),
7676
TestFactory: contains_inanyorder(
7777
has_entries( {
7878
'kind': 'WARNING',
@@ -321,8 +321,7 @@ def test_FileReadyToParse_Diagnostics_Simple( self, app ):
321321
@WithRetry()
322322
@IsolatedYcmd()
323323
def test_Poll_Diagnostics_ProjectWide_Eclipse( self, app ):
324-
StartJavaCompleterServerInDirectory( app,
325-
PathToTestFile( DEFAULT_PROJECT_DIR ) )
324+
StartJavaCompleterServerWithFile( app, TestFactory )
326325

327326
filepath = TestLauncher
328327
contents = ReadFile( filepath )

ycmd/tests/java/testdata/gradle-init/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)