# HG changeset patch # User Dirk Olmes # Date 1602747814 -7200 # Node ID 778c251baa66b8cd48af1499847c621eb3e85b2d # Parent fe67b0af9b238a5bb414a47634352b0a8cb7e4b7 Anpassungen fuer aktuelles JDK. Input Stream, aus dem das Icon geladen wird, ordentlich schliessen. diff -r fe67b0af9b23 -r 778c251baa66 META-INF/MANIFEST.MF --- a/META-INF/MANIFEST.MF Mon Sep 07 14:49:50 2015 +0200 +++ b/META-INF/MANIFEST.MF Thu Oct 15 09:43:34 2020 +0200 @@ -1,4 +1,5 @@ Manifest-Version: 1.0 +Automatic-Module-Name: de.codedo.java.editor Bundle-ManifestVersion: 2 Bundle-Name: Java Editor with extra icon Bundle-SymbolicName: de.codedo.java.editor;singleton:=true @@ -12,5 +13,5 @@ org.eclipse.jdt.ui, org.eclipse.jdt.core, org.eclipse.core.resources -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff -r fe67b0af9b23 -r 778c251baa66 plugin.xml --- a/plugin.xml Mon Sep 07 14:49:50 2015 +0200 +++ b/plugin.xml Thu Oct 15 09:43:34 2020 +0200 @@ -18,26 +18,22 @@ symbolicFontName="org.eclipse.jdt.ui.editors.textfont"> - + - + - + - + - diff -r fe67b0af9b23 -r 778c251baa66 src/de/codedo/java/editor/CodedoJavaEditor.java --- a/src/de/codedo/java/editor/CodedoJavaEditor.java Mon Sep 07 14:49:50 2015 +0200 +++ b/src/de/codedo/java/editor/CodedoJavaEditor.java Thu Oct 15 09:43:34 2020 +0200 @@ -82,5 +82,4 @@ // this class is registered as Java editor so we should always have a java element here return (IJavaElement)input.getAdapter(IJavaElement.class); } - } diff -r fe67b0af9b23 -r 778c251baa66 src/de/codedo/java/editor/CodedoJavaElementImageProvider.java --- a/src/de/codedo/java/editor/CodedoJavaElementImageProvider.java Mon Sep 07 14:49:50 2015 +0200 +++ b/src/de/codedo/java/editor/CodedoJavaElementImageProvider.java Thu Oct 15 09:43:34 2020 +0200 @@ -1,5 +1,6 @@ package de.codedo.java.editor; +import java.io.IOException; import java.io.InputStream; import java.util.HashSet; import java.util.Set; @@ -58,8 +59,14 @@ Image image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_DEF_VIEW); Device device = image.getDevice(); - InputStream input = getClass().getClassLoader().getResourceAsStream("icons/icon.png"); - _customTitleImage = new Image(device, input); + try (InputStream input = getClass().getClassLoader().getResourceAsStream("icons/icon.png")) + { + _customTitleImage = new Image(device, input); + } + catch (IOException ex) + { + throw new IllegalStateException(ex); + } } return _customTitleImage; }