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

Commit

Permalink
update eclipse 4.17, 2020-09
Browse files Browse the repository at this point in the history
  • Loading branch information
ervandew committed Nov 9, 2020
1 parent 1c3f814 commit 99a517e
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 31 deletions.
5 changes: 2 additions & 3 deletions ant/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ eclipse.home=${env.ECLIM_ECLIPSE_HOME}
eclim.gvim=/usr/bin/gvim
eclim.gvim.embed=true

javac.target=1.8
javac.target=11
javac.deprecation=false
javac.compilerargs=
test.javac.target=1.8
test.javac.target=11

build.classes=build/temp/classes
build.features=build/temp/eclipse/features
Expand Down
4 changes: 4 additions & 0 deletions doc/content/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ History of Changes
x.x.x (Xxx. xx, 2020)
---------------------

Eclim:
- Eclim updated for Eclipse 4.17 (2020-09), so java 11 or newer is also
required.

Removals:
.. note::

Expand Down
4 changes: 2 additions & 2 deletions installer/install.bin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (C) 2017 - 2018 Eric Van Dewoestine
# Copyright (C) 2017 - 2020 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 @@ -52,7 +52,7 @@ fi

# validate minimum java version
# Note: see eclimd as well
JAVA_REQUIRED=8
JAVA_REQUIRED=11
if [[ $JAVA_VERSION -lt $JAVA_REQUIRED ]] ; then
echo "You must have at least java $JAVA_REQUIRED installed to run eclimd."
echo "Note: you can still target previous java versions on a per project basis."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public void initialize(String name)
"General/Project org.eclim.project.copyright"
);

PreferencesOptionHandler handler = new PreferencesOptionHandler(
// FIXME: Eclipse may have smartly removed this annoying feature, so remove
// this block if the nagging dialog never shows up.
/*PreferencesOptionHandler handler = new PreferencesOptionHandler(
Preferences.CORE, false);
handler.addSupportedPreferences(
"org.eclipse.recommenders.news.rcp",
Expand All @@ -61,7 +63,7 @@ public void initialize(String name)
Preferences.addOptionHandler(handler);
PreferenceFactory.addOptions(Preferences.CORE,
"General org.eclipse.recommenders.news.rcp.newsEnabled ^(true|false)"
);
);*/
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2017 Eric Van Dewoestine
* Copyright (C) 2005 - 2020 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 @@ -37,7 +37,7 @@

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.SubMonitor;

import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
Expand Down Expand Up @@ -81,14 +81,14 @@ public Object execute(CommandLine commandLine)
Refactoring refactoring = refactor.refactoring;

RefactoringStatus status = refactoring.checkAllConditions(
new SubProgressMonitor(monitor, 4));
SubMonitor.convert(monitor, 4));
int stopSeverity = RefactoringCore.getConditionCheckingFailedSeverity();
if (status.getSeverity() >= stopSeverity) {
throw new RefactorException(status);
}

Change change = refactoring.createChange(new SubProgressMonitor(monitor, 2));
change.initializeValidationData(new SubProgressMonitor(monitor, 1));
Change change = refactoring.createChange(SubMonitor.convert(monitor, 2));
change.initializeValidationData(SubMonitor.convert(monitor, 1));

// preview
if (commandLine.hasOption(PREVIEW_OPTION)){
Expand Down Expand Up @@ -144,7 +144,7 @@ public Object execute(CommandLine commandLine)
changeOperation.setUndoManager(
RefactoringCore.getUndoManager(), change.getName());

changeOperation.run(new SubProgressMonitor(monitor, 4));
changeOperation.run(SubMonitor.convert(monitor, 4));
return rcl.getChangedFiles();
}finally{
workspace.removeResourceChangeListener(rcl);
Expand Down
11 changes: 4 additions & 7 deletions org.eclim/java/org/eclim/eclipse/ui/EclimEditorSite.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2017 Eric Van Dewoestine
* Copyright (C) 2005 - 2020 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 @@ -40,7 +40,6 @@
*
* @author Eric Van Dewoestine
*/
@SuppressWarnings("rawtypes")
public class EclimEditorSite
implements IEditorSite
{
Expand Down Expand Up @@ -125,21 +124,19 @@ public void setSelectionProvider(ISelectionProvider provider)
}

@Override
@SuppressWarnings("unchecked")
public Object getAdapter(Class arg0)
public <T> T getAdapter(Class<T> arg0)
{
return null;
}

@Override
@SuppressWarnings("unchecked")
public Object getService(Class arg0)
public <T> T getService(Class<T> arg0)
{
return null;
}

@Override
public boolean hasService(Class arg0)
public boolean hasService(Class<?> arg0)
{
return false;
}
Expand Down
17 changes: 11 additions & 6 deletions org.eclim/java/org/eclim/plugin/AbstractPluginResources.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2017 Eric Van Dewoestine
* Copyright (C) 2005 - 2020 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 All @@ -19,6 +19,8 @@
import java.io.File;
import java.io.InputStream;

import java.lang.reflect.InvocationTargetException;

import java.net.URL;

import java.text.MessageFormat;
Expand Down Expand Up @@ -96,11 +98,14 @@ public Command getCommand(String name)
}
Class<? extends Command> cc = commands.get(name);
try{
return cc.newInstance();
}catch(IllegalAccessException iae){
throw new RuntimeException(iae);
}catch(InstantiationException ie){
throw new RuntimeException(ie);
return cc.getDeclaredConstructor().newInstance();
}catch(
IllegalAccessException|
InstantiationException|
InvocationTargetException|
NoSuchMethodException e)
{
throw new RuntimeException(e);
}
}

Expand Down
4 changes: 2 additions & 2 deletions org.eclim/java/org/eclim/plugin/Plugin.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2017 Eric Van Dewoestine
* Copyright (C) 2005 - 2020 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 @@ -115,7 +115,7 @@ public void activate(BundleContext context)
Bundle bundle = this.getBundle();
try{
PluginResources resources = (PluginResources)
bundle.loadClass(resourceClass).newInstance();
bundle.loadClass(resourceClass).getDeclaredConstructor().newInstance();
logger.debug("{}: initializing resources", name);
resources.initialize(name);
Services.addPluginResources(resources);
Expand Down
6 changes: 3 additions & 3 deletions org.eclim/java/org/eclim/util/file/FileOffsets.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2005 - 2014 Eric Van Dewoestine
* Copyright (C) 2005 - 2020 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 @@ -95,15 +95,15 @@ private void compileOffsets(InputStream in)
reader = new BufferedReader(new InputStreamReader(in));

ArrayList<Integer> lines = new ArrayList<Integer>();
lines.add(new Integer(0));
lines.add(Integer.valueOf(0));
ArrayList<String> byteLines = new ArrayList<String>();
byteLines.add(null);

int offset = 0;
String line = null;
while((line = reader.readLine()) != null){
offset += line.length();
lines.add(new Integer(offset));
lines.add(Integer.valueOf(offset));
if (line.length() != line.getBytes().length){
byteLines.add(line);
}else{
Expand Down

0 comments on commit 99a517e

Please sign in to comment.