Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
update to eclipse 4.21 (2021-09)
Browse files Browse the repository at this point in the history
  • Loading branch information
ervandew committed Nov 10, 2021
1 parent 97be979 commit c26ca4f
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 130 deletions.
25 changes: 24 additions & 1 deletion doc/content/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@
History of Changes
==================

.. _2.21.0:

2.21.0 (Nov. 10, 2021)
----------------------

Eclim:
- Eclim updated to support, and now requires, Eclipse 4.21 (2021-09)
- Fix json errors saving workspace/project settings for some setting values
(eg. import exclusion patterns).
- Some small install/uninstall improvements.

Java:
- Fix code completion for vim 8.2.2489 or later.
- Fix :JavaCorrect error for Serializable class missing serialVersionUID.

Xml:
- Fix :Validate command definition for vim 8.2.3140 and later. Thanks to
sideshowbarker.

| :gitlog:`Git Log (2.21.0) <2.18.0...2.21.0>`
.. _2.18.0:

2.18.0 (Jan. 09, 2021)
Expand Down Expand Up @@ -47,6 +68,8 @@ Removals:
- Vimplugin: this was never part of eclim's goal, just seemed like something
that was easy enough to include at the time.

| :gitlog:`Git Log (2.18.0) <2.8.0...2.18.0>`
.. _Language Server Protocol: https://langserver.org/
.. _Metals: https://scalameta.org/metals/

Expand All @@ -56,7 +79,7 @@ Removals:
---------------------

Eclim:
- Eclim updated to supports, and requires, Eclipse 4.8 (Photon)
- Eclim updated to support, and requires, Eclipse 4.8 (Photon)
- Fix eclimd script for jdk 10
- Update the installer to be compatible with python 2.6
- Fix the installer on OSX when libedit is not installed.
Expand Down
7 changes: 7 additions & 0 deletions doc/content/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ What's New?
:description: Latest news for eclim (eclipse + vim).
:end-before: end-rss

Nov 10, 2021
-------------

A new version of eclim is now available with support for Eclipse 4.21 (2021-09).

- :ref:`Eclim 2.21.0 <2.21.0>`

Jan 09, 2021
-------------

Expand Down
11 changes: 11 additions & 0 deletions doc/content/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ Step 1: Run the installer
If your machine is behind a proxy, take a look at the instructions for
:ref:`running the installer behind a proxy <installer-proxy>`.

.. note::

For some versions of eclipse you may see some SLF4J output like so during the
install, which can be safely ignored:

::

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Step 2: Test the installation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
12 changes: 6 additions & 6 deletions installer/dependencies.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dependencies SYSTEM "dependencies.dtd">
<dependencies eclipse-version="4.18" eclipse-name="2020-12">
<dependencies eclipse-version="4.21" eclipse-name="2021-09">
<feature id="jdt">
<dependency id="org.eclipse.jdt" version="3.18.600">
<site url="http://download.eclipse.org/releases/2020-12/"/>
<dependency id="org.eclipse.jdt" version="3.18.900">
<site url="http://download.eclipse.org/releases/2021-09/"/>
</dependency>
</feature>

<feature id="wst">
<dependency id="org.eclipse.wst.web_ui.feature" version="3.20.0">
<site url="http://download.eclipse.org/releases/2020-12/"/>
<dependency id="org.eclipse.wst.web_ui.feature" version="3.23.0">
<site url="http://download.eclipse.org/releases/2021-09/"/>
</dependency>
</feature>

<feature id="pydev">
<dependency id="org.python.pydev.feature" version="8.1.0">
<dependency id="org.python.pydev.feature" version="9.2.0">
<site url="http://pydev.org/updates"/>
</dependency>
</feature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ public void setPreference(
*
* @param file The file containing a json dict of name / value pairs.
*
* @return List of any errors attempting to set the values.
*
* @throws FileNotFoundException If the supplied file doesn't exist.
*/
public List<Error> setValues(File file)
Expand All @@ -620,6 +622,8 @@ public List<Error> setValues(File file)
* @param project The project to set the values for or null for global.
* @param file The file containing a json dict of name / value pairs.
*
* @return List of any errors attempting to set the values.
*
* @throws FileNotFoundException If the supplied file doesn't exist.
*/
public List<Error> setValues(IProject project, File file)
Expand Down
4 changes: 2 additions & 2 deletions org.eclim.jdt/java/org/eclim/plugin/jdt/util/ASTUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2020 Eric Van Dewoestine
* Copyright (C) 2005 - 2021 Eric Van Dewoestine
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -50,7 +50,7 @@ public class ASTUtils
{
private static final Logger logger = Logger.getLogger(ASTUtils.class);

private static final int JLS_LATEST = AST.JLS14;
private static final int JLS_LATEST = AST.JLS16;

private ASTUtils ()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class TestImport
{
private List<Callable<Void>> l;
private Entry<String,Callable<Void>> l;
private Map<String,String> m;
private Pattern pattern;
private File file;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@

public class TestImportOrganizeVUnit
{
private List list = new ArrayList();
private Entry entry;
private Pattern pattern;
private JComponent jcomponent;
private JTree jtree;
private SynchronousQueue queue;
private JList jlist;
private AWTError awterror;
private Map map = new HashMap();
private TestBean testbean;
private String FOOBAR = FOO + BAR;
Expand Down
11 changes: 6 additions & 5 deletions org.eclim.jdt/test/eclim_unit_test_java/webxml/web.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">

<!--
- Listener for loading up settings.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2020 Eric Van Dewoestine
* Copyright (C) 2005 - 2021 Eric Van Dewoestine
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -96,7 +96,7 @@ public void methodSearch()
normalize(results);
assertEquals(results.get(0),
"https://docs.oracle.com/en/java/javase/${version}/docs/api/java.base/" +
"java/lang/System.html#currentTimeMillis--");
"java/lang/System.html#currentTimeMillis()");
}

private void normalize(List<String> results)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2020 Eric Van Dewoestine
* Copyright (C) 2005 - 2021 Eric Van Dewoestine
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -55,119 +55,120 @@ public void execute()
assertTrue("Java project doesn't exist.",
Eclim.projectExists(Jdt.TEST_PROJECT));

Pattern listImport = Pattern.compile("import java\\.util\\.List;");
Pattern entryImport = Pattern.compile("import java\\.util\\.Map\\.Entry;");
String file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
assertFalse(listImport.matcher(file).find());
assertFalse(entryImport.matcher(file).find());

List<String> results = (List<String>)Eclim.execute(new String[]{
"java_import", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "72", "-e", "utf-8",
"-o", "73", "-e", "utf-8",
});

assertEquals(2, results.size());
assertEquals("java.awt.List", results.get(0));
assertEquals("java.util.List", results.get(1));
assertEquals(3, results.size());
assertEquals("java.security.KeyStore.Entry", results.get(0));
assertEquals("java.util.Map.Entry", results.get(1));
assertEquals("javax.swing.RowFilter.Entry", results.get(2));
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
assertFalse(listImport.matcher(file).find());
assertFalse(entryImport.matcher(file).find());

Map<String, Object> position = (Map<String, Object>)Eclim.execute(new String[]{
"java_import", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "72", "-e", "utf-8", "-t", "java.util.List",
"-o", "72", "-e", "utf-8", "-t", "java.util.Map.Entry",
});
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
Matcher listMatcher = listImport.matcher(file);
assertTrue(listMatcher.find());
assertEquals(33, listMatcher.start());
assertEquals(96, position.get("offset"));
Matcher entryMatcher = entryImport.matcher(file);
assertTrue(entryMatcher.find());
assertEquals(33, entryMatcher.start());
assertEquals(101, position.get("offset"));
assertEquals(7, position.get("line"));
assertEquals(14, position.get("column"));

position = (Map<String, Object>)Eclim.execute(new String[]{
"java_import", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "98", "-e", "utf-8",
"-o", "111", "-e", "utf-8",
});
Pattern callableImport =
Pattern.compile("import java\\.util\\.concurrent\\.Callable;");
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
Matcher callableMatcher = callableImport.matcher(file);
listMatcher = listImport.matcher(file);
assertTrue(listMatcher.find());
entryMatcher = entryImport.matcher(file);
assertTrue(entryMatcher.find());
assertTrue(callableMatcher.find());
assertEquals(33, listMatcher.start());
assertEquals(57, callableMatcher.start());
assertEquals(137, position.get("offset"));
assertEquals(33, entryMatcher.start());
assertEquals(62, callableMatcher.start());
assertEquals(150, position.get("offset"));
assertEquals(9, position.get("line"));
assertEquals(16, position.get("column"));
assertEquals(24, position.get("column"));

position = (Map<String, Object>)Eclim.execute(new String[]{
"java_import", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "166", "-e", "utf-8",
"-o", "179", "-e", "utf-8",
});
Pattern mapImport = Pattern.compile("import java\\.util\\.Map;");
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
Matcher mapMatcher = mapImport.matcher(file);
listMatcher = listImport.matcher(file);
entryMatcher = entryImport.matcher(file);
callableMatcher = callableImport.matcher(file);
assertTrue(listMatcher.find());
assertTrue(entryMatcher.find());
assertTrue(mapMatcher.find());
assertTrue(callableMatcher.find());
assertEquals(33, listMatcher.start());
assertEquals(56, mapMatcher.start());
assertEquals(79, callableMatcher.start());
assertEquals(188, position.get("offset"));
assertEquals(55, entryMatcher.start());
assertEquals(33, mapMatcher.start());
assertEquals(84, callableMatcher.start());
assertEquals(201, position.get("offset"));
assertEquals(11, position.get("line"));
assertEquals(11, position.get("column"));

position = (Map<String, Object>)Eclim.execute(new String[]{
"java_import", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "220", "-e", "utf-8",
"-o", "233", "-e", "utf-8",
});
Pattern patternImport = Pattern.compile("import java\\.util\\.regex\\.Pattern;");
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
Matcher patternMatcher = patternImport.matcher(file);
listMatcher = listImport.matcher(file);
entryMatcher = entryImport.matcher(file);
mapMatcher = mapImport.matcher(file);
callableMatcher = callableImport.matcher(file);
assertTrue(listMatcher.find());
assertTrue(entryMatcher.find());
assertTrue(mapMatcher.find());
assertTrue(callableMatcher.find());
assertTrue(patternMatcher.find());
assertEquals(33, listMatcher.start());
assertEquals(56, mapMatcher.start());
assertEquals(79, callableMatcher.start());
assertEquals(118, patternMatcher.start());
assertEquals(253, position.get("offset"));
assertEquals(55, entryMatcher.start());
assertEquals(33, mapMatcher.start());
assertEquals(84, callableMatcher.start());
assertEquals(123, patternMatcher.start());
assertEquals(266, position.get("offset"));
assertEquals(14, position.get("line"));
assertEquals(11, position.get("column"));

position = (Map<String, Object>)Eclim.execute(new String[]{
"java_import", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "280", "-e", "utf-8",
"-o", "293", "-e", "utf-8",
});
Pattern fileImport = Pattern.compile("import java\\.io\\.File;");
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
Matcher fileMatcher = fileImport.matcher(file);
listMatcher = listImport.matcher(file);
entryMatcher = entryImport.matcher(file);
mapMatcher = mapImport.matcher(file);
callableMatcher = callableImport.matcher(file);
patternMatcher = patternImport.matcher(file);
assertTrue(fileMatcher.find());
assertTrue(listMatcher.find());
assertTrue(entryMatcher.find());
assertTrue(mapMatcher.find());
assertTrue(callableMatcher.find());
assertTrue(patternMatcher.find());
assertEquals(33, fileMatcher.start());
assertEquals(55, listMatcher.start());
assertEquals(78, mapMatcher.start());
assertEquals(101, callableMatcher.start());
assertEquals(140, patternMatcher.start());
assertEquals(302, position.get("offset"));
assertEquals(77, entryMatcher.start());
assertEquals(55, mapMatcher.start());
assertEquals(106, callableMatcher.start());
assertEquals(145, patternMatcher.start());
assertEquals(315, position.get("offset"));
assertEquals(17, position.get("line"));
assertEquals(11, position.get("column"));

Pattern classDecl = Pattern.compile("public class TestImport");
Matcher classMatcher = classDecl.matcher(file);
assertTrue(classMatcher.find());
assertEquals(173, classMatcher.start());
assertEquals(178, classMatcher.start());
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2012 - 2020 Eric Van Dewoestine
* Copyright (C) 2012 - 2021 Eric Van Dewoestine
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -64,22 +64,18 @@ public void execute()
"-o", "185", "-e", "utf-8",
});

assertEquals(2, results.size());
assertEquals(1, results.size());
List<String> entries = results.get(0);
assertEquals("java.security.KeyStore.Entry", entries.get(0));
assertEquals("java.util.Map.Entry", entries.get(1));
assertEquals("javax.swing.RowFilter.Entry", entries.get(2));

List<String> lists = results.get(1);
assertEquals("java.awt.List", lists.get(0));
assertEquals("java.util.List", lists.get(1));

file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
assertFalse(listImport.matcher(file).find());

Map<String, Object> position = (Map<String, Object>)Eclim.execute(new String[]{
"java_import_organize", "-p", Jdt.TEST_PROJECT, "-f", TEST_FILE,
"-o", "185", "-e", "utf-8", "-t", "java.util.Map.Entry,java.util.List",
"-o", "185", "-e", "utf-8", "-t", "java.util.Map.Entry",
});
file = Eclim.fileToString(Jdt.TEST_PROJECT, TEST_FILE);
assertTrue(listImport.matcher(file).find());
Expand Down
Loading

0 comments on commit c26ca4f

Please sign in to comment.