diff --git a/README.md b/README.md index c60ea04..1813ece 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ [2019-06](https://github.com/howlger/Eclipse-IDE-improvements-videos/tree/2019-06) -# +++ Work in progress (for September 11, 2024) +++
Eclipse IDE 2024-09 Improvements Video +# [Eclipse IDE 2024-09 Improvements Video](https://youtu.be/u8llH82TfPc) * [September 11, 2024](https://calendar.google.com/calendar/event?eid=MTNudGlsMjd1cWFoM2ZkdjY3bjJjbWs1Z2wgZ2NoczdubTRudnBtODM3NDY5ZGRqOXRqbGtAZw&ctz=Europe/Berlin) ([calendar](https://calendar.google.com/calendar/embed?src=gchs7nm4nvpm837469ddj9tjlk@group.calendar.google.com&ctz=Europe/Berlin)) - [projects](https://projects.eclipse.org/releases/2024-09) - [wiki](https://github.com/eclipse-simrel/.github/blob/main/wiki/Simultaneous_Release.md) - [website](https://eclipseide.org/) ([New & Noteworthy](https://eclipseide.org/release/noteworthy/)) - [splash screen](https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/3963) * Builds: [latest unreleased](https://download.eclipse.org/technology/epp/staging/) → [released](https://download.eclipse.org/technology/epp/downloads/release/2024-09/) ([Jenkins](https://ci.eclipse.org/packaging/job/simrel.epp-tycho-build), [*.aggrcon](https://github.com/eclipse-simrel/simrel.build/commits/main), update sites: [staging](https://download.eclipse.org/staging/2024-09), [release](http://download.eclipse.org/releases/2024-09)) @@ -62,10 +62,15 @@ ### Features to show -* **Java** +* **Java (1/2) [📽️](https://youtu.be/u8llH82TfPc?t=16)** * Java 23 support [as preview/patch via Marketplace maybe after it has been released](https://marketplace.eclipse.org/search?search_api_fulltext=Java+23) ([branch](https://github.com/eclipse-jdt/eclipse.jdt.core/tree/BETA_JAVA23) and [update site](https://download.eclipse.org/eclipse/updates/4.33-P-builds/P20240828-1240/) exist, but [composite update site](https://download.eclipse.org/eclipse/updates/4.33-P-builds/) is empty) * [No support of Java versions older than Java 8 anymore](https://eclipse.dev/eclipse/news/4.33/jdt.php#removed-support-for-java7-and-below) (see [details](https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2536); in _New Java Project_ dialog Java versions pull-down menu in reversed order: highest version on top now) - * [Update older project by going to _Project > Properties: Java Compiler_ and hitting _Apply and Close_](https://github.com/eclipse-jdt/eclipse.jdt.ui/commit/95a365fc91472629e70e763516fb0576cddf4ee6#diff-75bddcdfd2484e74dd12777aa5f88c804a476cb214989f7363c5a654ef9eb0b1) + * [Update older project by going to _Project > Properties: Java Compiler_ and hitting _Apply and Close_](https://github.com/eclipse-jdt/eclipse.jdt.ui/commit/95a365fc91472629e70e763516fb0576cddf4ee6#diff-75bddcdfd2484e74dd12777aa5f88c804a476cb214989f7363c5a654ef9eb0b1) +* **General/Platform (1/2) [📽️](https://youtu.be/u8llH82TfPc?t=93)** + * Text editors + * [Find/replace overlay](https://eclipse.dev/eclipse/news/4.33/platform.php#find-replace-overlay): enabled by default (option hidden when text editor is too small); can be disabled or moved to the bottom in the preferences _General > Editors > Text Editors_ + * [Sticky scrolling](https://eclipse.dev/eclipse/news/4.33/platform.php#sticky-scrolling): disabled by default; can be enabled in the preferences _General > Editors > Text Editors_ +* **Java (2/2) [📽️](https://youtu.be/u8llH82TfPc?t=204)** * Java editor * ([Quick fix to change constructor type](https://eclipse.dev/eclipse/news/4.33/jdt.php#quickfix-change-constructor-type)) * Clean-ups @@ -73,16 +78,9 @@ * [Improved: _Java Features > Java 15: Convert String concatenation to Text Block > Include StringBuffer or StringBuilder concatenations_](https://eclipse.dev/eclipse/news/4.33/jdt.php#enhnaced-stringbuf-to-text-block-cleanup) works now also without a final `toString()` on the `StringBuffer`/`StringBuilder` * ([Performance](https://github.com/search?utf8=%E2%9C%93&q=performance+OR+speed+OR+faster+org%3Aeclipse-jdt+committer-date%3A2024-06-05..2024-09-10&s=committer-date&o=desc&type=Commits)) * ([Use new `IFile` API `IFile.readAllBytes()`/`readAllChars()`](https://github.com/eclipse-jdt/eclipse.jdt.core/commit/18d9a53b48f3ecb3a700b286dde8727c3ae8a3e3)) - * **Maven** - * [Environment variables, system properties, etc. used in JUnit launch configurations](https://github.com/eclipse-m2e/m2e-core/blob/master/RELEASE_NOTES.md#surefirefailsafe-plugin-configuration-propagated-to-junittestng-launch-configuration): after editing, manually run _Maven > Update Project..._ to update existing run configurations - * [Embedded Maven updated from 3.9.7 to 3.9.9](https://github.com/eclipse-m2e/m2e-core/blob/master/RELEASE_NOTES.md#embedded-and-use-maven-399) - * (**Gradle**) -* **General/Platform [📽️](https://youtu.be/jTaiDGVwygE?t=302)** +* **General/Platform (2/2) [📽️](https://youtu.be/u8llH82TfPc?t=262)** * Debug * [Possibility to pin _Inspect_ pop-up](https://eclipse.dev/eclipse/news/4.33/platform.php#pin-debug-inspect-popup) - * Text editors - * [Sticky scrolling](https://eclipse.dev/eclipse/news/4.33/platform.php#sticky-scrolling): disabled by default; can be enabled in the preferences _General > Editors > Text Editors_ - * [Find/replace overlay](https://eclipse.dev/eclipse/news/4.33/platform.php#find-replace-overlay): enabled by default (option hidden when text editor is too small); can be disabled or moved to the bottom in the preferences _General > Editors > Text Editors_ * [UI](https://github.com/search?utf8=%E2%9C%93&q=dark+OR+light+OR+theme+OR+layout+org%3Aeclipse-platform+org%3Aeclipse-jdt+committer-date%3A2024-06-05..2024-09-10&s=committer-date&type=Commits) * [Preview version of improved light theme](https://eclipse.dev/eclipse/news/4.33/platform.php#new-light-theme) * ([Improvement to light and dark theme for Linux](https://github.com/eclipse-platform/eclipse.platform.ui/commit/e41945cce6a8f2ed49c783c58de425cf5ca310f6)) @@ -102,9 +100,13 @@ * ([Avoid 2nd file access on lightweightAutoRefresh](https://github.com/eclipse-platform/eclipse.platform/commit/9fa486f709df66134116aed0a7a94ba5b975b22b)) * ([`IFile.write(byte[])`: reduce `store.fetchInfo()`](https://github.com/eclipse-platform/eclipse.platform/commit/31f4f9871349eea1af5b4bb77be22be364fb3763), [2](https://github.com/eclipse-platform/eclipse.platform/commit/c5603d23b5f8879bf018850fe89924c04288ed43)) * (**Mylyn**) -* (**Git**) +* **Maven [📽️](https://youtu.be/u8llH82TfPc?t=328)** + * [Environment variables, system properties, etc. used in JUnit launch configurations](https://github.com/eclipse-m2e/m2e-core/blob/master/RELEASE_NOTES.md#surefirefailsafe-plugin-configuration-propagated-to-junittestng-launch-configuration): after editing, manually run _Maven > Update Project..._ to update existing run configurations ([documentation](https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html)) + * [Embedded Maven updated from 3.9.7 to 3.9.9](https://github.com/eclipse-m2e/m2e-core/blob/master/RELEASE_NOTES.md#embedded-and-use-maven-399) +* (**Gradle**) +* (**Git**) * ([Support of X.509 signatures on commits and tags if an external GPG is used](https://github.com/eclipse-egit/egit/wiki/New-and-Noteworthy-7.0#x509-signatures)) -* **Web [📽️](https://youtu.be/jTaiDGVwygE?t=370)** +* **Web [📽️](https://youtu.be/u8llH82TfPc?t=424)** * TypeScript 5.5 support * JavaScript/TypeScript tooling (in JavaScript enable validation via `// @ts-check`): * [Regular expression syntax checking](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#regular-expression-syntax-checking4) diff --git a/intro_outro_thumbnail.svg b/intro_outro_thumbnail.svg index 2c9a152..507f8e2 100644 --- a/intro_outro_thumbnail.svg +++ b/intro_outro_thumbnail.svg @@ -7,7 +7,7 @@ id="svg8" inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)" sodipodi:docname="intro_outro_thumbnail.svg" - inkscape:export-filename="..\Eclipse-IDE-improvements-videos-extras\2024-06\Outro.png" + inkscape:export-filename="..\Eclipse-IDE-improvements-videos-extras\2025-03\Outro.png" inkscape:export-xdpi="180" inkscape:export-ydpi="180" xml:space="preserve" @@ -67,10 +67,10 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.2958984" - inkscape:cx="511.61418" + inkscape:cx="611.54486" inkscape:cy="292.4612" inkscape:document-units="px" - inkscape:current-layer="layer2" + inkscape:current-layer="g584" showgrid="false" inkscape:window-width="1920" inkscape:window-height="1112" @@ -204,11 +204,11 @@ rotate="0 0 0 0 0 0 0 0" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.9921px;line-height:76%;font-family:'Agency FB';-inkscape-font-specification:'Agency FB';text-align:end;text-anchor:end;fill:#fdeb7d;fill-opacity:1;stroke-width:0.108786px" y="29.680222" - x="62.182583" + x="62.182579" sodipodi:role="line">2024-062025-03eclipseide.org 2024-06eclipseide.org2025-03UTF-8^^^|clip ::echo|set/p=""C:\Program Files\Java\jdk-20-ea\bin\javac^" -d . src\main\java\BytecodeSample.java"|clip -echo|set/p="C:\Program Files\Eclipse Adoptium\jdk-22.0.1.8-hotspot"|clip +::echo|set/p="C:\Program Files\Eclipse Adoptium\jdk-22.0.1.8-hotspot"|clip dir "%ECLIPSE_DIR%\p2" diff --git a/sample_code/Eclipse 2024-06 Improvements/check-incubating.sh b/sample_code/Eclipse 2024-06 Improvements/check-incubating.sh deleted file mode 100644 index 68a9130..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/check-incubating.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -u # run with unset flag error so that missing parameters cause build failure -set -e # error out on any failed commands -# set -x # echo all commands used for debugging purposes - -echo "Checking all EPPs for incubating components" -echo "The below report shows what bundles look like they may be incubating in each project" -for i in *eclipse*linux.gtk.x86_64.tar.gz; do - echo $i - tar --warning=no-unknown-keyword -tf $i eclipse/plugins | \ - # get the plug-in name only (no contents or .jar) - sed '-es,.*eclipse/plugins/, ,g' '-es,/.*,,g' '-es,\.jar,,g' | \ - # Uniqify - sort -u | \ - # Get all 0.* versions (as a proxy for incubating) - grep "_0\\." | \ - # Only interested in Eclipse plug-ins - grep "org\\.eclipse\\." | \ - # The following plug-ins have 0.*.* versions, but are not actually incubating - grep -v "org\\.eclipse\\.e4\\..*" | \ - grep -v "org\\.eclipse\\.wst\\.jsdt\\.chromium.*" | \ - grep -v "org\\.eclipse\\.passage\\..*" | \ - grep -v "org\\.eclipse\\.tips\\..*" | \ - grep -v "org\\.eclipse\\.tracecompass\\..*" | \ - grep -v "org\\.eclipse\\.m2e\\.workspace\\.cli.*" | \ - grep -v "org\\.eclipse\\.jface\\.notifications" | \ - grep -v "org\\.eclipse\\.cdt\\.debug\\.core\\.memory" | \ - grep -v "org\\.eclipse\\.pde\\.spy" \ - || echo " No incubating plug-ins identified" -done diff --git a/sample_code/Eclipse 2024-06 Improvements/src/AnotherClass.java b/sample_code/Eclipse 2024-06 Improvements/src/AnotherClass.java deleted file mode 100644 index 2ad0685..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/src/AnotherClass.java +++ /dev/null @@ -1,7 +0,0 @@ -public class AnotherClass { - - public int getSamplesTotal(Samples samples) { - return samples.x + samples.y; - } - -} \ No newline at end of file diff --git a/sample_code/Eclipse 2024-06 Improvements/src/Java22.java b/sample_code/Eclipse 2024-06 Improvements/src/Java22.java deleted file mode 100644 index 6598fc6..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/src/Java22.java +++ /dev/null @@ -1,45 +0,0 @@ -import java.util.List; -import java.util.function.BiConsumer; -import java.util.function.Consumer; - -class Java22 implements Consumer { - - record Order(String name, int quantity) {} - - /** - * Samples for JEP 456: Unnamed Variables & Patterns - */ - int jep456(List> notifiers, Iterable items, Order order) { - - // unnamed lambda parameter - notifiers.add((name, _) -> System.out.println(name)); - - // unnamed exception parameter - try { - // ... - } catch (RuntimeException _) { - // ignore - } - - // unnamed pattern parameter - switch (order) { - case Order(var _, var quantity) when quantity <= 0 -> throw new RuntimeException("Zero or negative quantity"); - case Order(var name, var _) when name.isBlank() -> throw new RuntimeException("Blank name"); - default -> { /* ... */ } - } - - // unnamed local variable - int total = 0; - for (Object _ : items) { - total++; - } - return total; - - } - - @Override - public void accept(Object obj) { - // ... - } - -} \ No newline at end of file diff --git a/sample_code/Eclipse 2024-06 Improvements/src/Samples.java b/sample_code/Eclipse 2024-06 Improvements/src/Samples.java deleted file mode 100644 index 3ce73bf..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/src/Samples.java +++ /dev/null @@ -1,69 +0,0 @@ -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.io.Reader; -import java.util.function.BinaryOperator; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -public class Samples { - - /** - * New quick assist: - * Split try resource expressions into inner try-with-resources - */ - void sample(String fileName1, String fileName2, String fileName3) { - try (Reader reader1 = new BufferedReader(new FileReader(fileName1)); - Reader reader2 = new BufferedReader(new FileReader(fileName2)); - Reader reader3 = new BufferedReader(new FileReader(fileName3))) { - // ... - } catch (IOException e) { - // ... - } - } - - /** - * New quick assist: - * Extract anonymous class declaration to local - */ - Runnable extractAnonymousClass() { - return new Runnable() { - - @Override - public void run() { - // ... - } - - }; - } - - /** - * Improved quick assists: - * Use 'MessageFormat/String.format' for string concatenation - */ - String extractAnonymousClass(String name) { - return "Hello " - + name - + "!\nWelcome!\n"; - } - - // Refactor > Encapsulate Field(s)... - int x; - int y; - - /** - * Improved clean-up: - * Unnecessary Code > Remove overridden assignment - */ - void sample() { - long start; - start = System.nanoTime(); - // ... - System.out.println((System.nanoTime() - start) + " ns"); - } - - /** @see Collectors#toMap(Function, Function, BinaryOperator, Supplier) */ - void javadocStyling() {} - -} \ No newline at end of file diff --git a/sample_code/Eclipse 2024-06 Improvements/web/JavaScript.js b/sample_code/Eclipse 2024-06 Improvements/web/JavaScript.js deleted file mode 100644 index 74b0f30..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/web/JavaScript.js +++ /dev/null @@ -1,35 +0,0 @@ -// @ts-check - -// Checks for super Property Accesses on Instance Fields -class Base { - fn = () => console.log("function called"); - - method() { - console.log("method() called"); - } -} -class Derived extends Base { - someOtherMethod() { - super.fn(); // overlooked error in the past - } -} - - -// Preserved Narrowing in Closures Following Last Assignments -/** - * @param {string|URL} url - * @param {string[]} names - */ -function getUrls(url, names) { -// if (typeof url === "string") { -// url = new URL(url); -// } - - return names.map(function(name) { - url.searchParams.set("name", name) - // ~~~~~~~~~~~~ - // ⚠ Property 'searchParams' does not exist on type 'string | URL'. - - return url.toString(); - }); -} \ No newline at end of file diff --git a/sample_code/Eclipse 2024-06 Improvements/web/TypeScript.ts b/sample_code/Eclipse 2024-06 Improvements/web/TypeScript.ts deleted file mode 100644 index 0776dd4..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/web/TypeScript.ts +++ /dev/null @@ -1,7 +0,0 @@ - -// New quick fixes: Add missing/optional parameters -function someHelperFunction(abc: string) {} - -function someFunction(abc: string, def: string, xyz: string) { - return someHelperFunction(abc, def, xyz); -} \ No newline at end of file diff --git a/sample_code/Eclipse 2024-06 Improvements/web/TypeScript_5.4.ts b/sample_code/Eclipse 2024-06 Improvements/web/TypeScript_5.4.ts deleted file mode 100644 index 8d16309..0000000 --- a/sample_code/Eclipse 2024-06 Improvements/web/TypeScript_5.4.ts +++ /dev/null @@ -1,5 +0,0 @@ -function createStreetLight(colors: C[], defaultColor: C) { - // ... -} - -createStreetLight(["red", "yellow", "green"], "blue"); \ No newline at end of file diff --git a/sample_code/Eclipse 2024-09 Improvements/.classpath b/sample_code/Eclipse 2024-09 Improvements/.classpath new file mode 100644 index 0000000..fe27910 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/.classpath @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample_code/Eclipse 2024-09 Improvements/.gitignore b/sample_code/Eclipse 2024-09 Improvements/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/sample_code/Eclipse 2024-09 Improvements/.project b/sample_code/Eclipse 2024-09 Improvements/.project new file mode 100644 index 0000000..f228cc4 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/.project @@ -0,0 +1,23 @@ + + + Eclipse 2024-09 Improvements + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.core.resources.prefs b/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.jdt.core.prefs b/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..89db28c --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=21 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 diff --git a/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.m2e.core.prefs b/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/sample_code/Eclipse 2024-09 Improvements/IDE structure.txt b/sample_code/Eclipse 2024-09 Improvements/IDE structure.txt new file mode 100644 index 0000000..31b6034 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/IDE structure.txt @@ -0,0 +1,58 @@ +Eclipse IDE for Java Developers (Eclipse Packaging Project) + Bytecode Outline View (Eclipse.org) + EclEmma Java Code Coverage (Eclipse EclEmma) + Eclipse Java Development Tools (Eclipse.org) + Eclipse Platform (Eclipse.org) + Eclipse Help System (Eclipse.org) + Eclipse RCP (Eclipse.org) + Equinox p2, Provisioning for IDEs. (Eclipse.org - Equinox) + Eclipse Packaging Project Common Feature (Eclipse Packaging Project) + ECF Apache Httpclient 5 FileTransfer Provider (Eclipse.org - ECF) + ECF Filetransfer Feature (Eclipse.org - ECF) + Equinox p2, backward compatibility support (Eclipse.org - Equinox) + Equinox p2, headless functionalities (Eclipse.org - Equinox) + Equinox p2, minimal support for RCP applications (Eclipse.org - Equinox) + ECF Core Feature (Eclipse.org - ECF) + ECF Core SSL Feature (Eclipse.org - ECF) + ECF Filetransfer SSL Feature (Eclipse.org - ECF) + ECF Java/JVM 11+ HttpClient FileTransfer Provider (Eclipse.org - ECF) + EPP Java Package (Eclipse Packaging Project) + Git integration for Eclipse (Eclipse EGit) + Java implementation of Git (Eclipse JGit) + Java implementation of Git - GPG support using BouncyCastle (Eclipse JGit) + Java implementation of Git - optional Http support using Apache httpclient (Eclipse JGit) + Java implementation of Git - ssh support using Apache MINA sshd (Eclipse JGit) + JustJ JRE for IDE Packages (Eclipse JustJ) + M2E - Maven Integration for Eclipse (Eclipse.org - m2e) + M2E - POM Editor using LemMinX language server (includes Incubating components) (Eclipse.org - m2e) + M2E - SLF4J over Logback Logging (Eclipse.org - m2e) + Marketplace Client (Eclipse Marketplace Client) + Eclipse User Storage (Eclipse.org) + Equinox p2, Discovery UI support (Eclipse.org - Equinox) + Mylyn Builds Connector: Jenkins (Eclipse Mylyn) + Mylyn Builds (Eclipse Mylyn) + Mylyn Commons Repositories (Eclipse Mylyn) + Mylyn Commons Activity (Eclipse Mylyn) + Mylyn Commons (Eclipse Mylyn) + Mylyn Context Connector: Eclipse IDE (Eclipse Mylyn) + Mylyn Context Connector: Team Support (Eclipse Mylyn) + Mylyn Task List (Eclipse Mylyn) + Mylyn Task-Focused Interface (Eclipse Mylyn) + Mylyn Context Connector: Java Development (Eclipse Mylyn) + Mylyn Git integration - Task focused interface (Eclipse Mylyn) + Mylyn Reviews (Eclipse Mylyn) + Mylyn Tasks Connector: GitHub (Eclipse Mylyn) + Mylyn Versions Connector: Git (Eclipse Mylyn) + Mylyn Versions (Eclipse Mylyn) + Mylyn WikiText (Eclipse Mylyn) + Oomph Setup (Eclipse Oomph Project) + Oomph P2 Management (Eclipse Oomph Project) + Oomph Setup Core (Eclipse Oomph Project) + Tip of the Day UI Feature (Eclipse.org) + TM Terminal (Eclipse CDT) + Terminal (Console) View (Eclipse CDT) + TM Terminal Control (Eclipse CDT) + TM Terminal Local Connector Extensions (Eclipse CDT) + TM Terminal SSH Connector Extensions (Eclipse CDT) + TM Terminal Telnet Connector Extensions (Eclipse CDT) + Wild Web Developer XML tools (Eclipse Wild Web Developer project) \ No newline at end of file diff --git a/sample_code/Eclipse 2024-09 Improvements/JavaScript.js b/sample_code/Eclipse 2024-09 Improvements/JavaScript.js new file mode 100644 index 0000000..f1bede2b --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/JavaScript.js @@ -0,0 +1,15 @@ +// @ts-check + +/** + * @param {Record} obj + * @param {string} key + */ +function f1(obj, key) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); // now okay, previously was error + } +} + +// Regular expression syntax checking +const stringListRegex = /(("[^"]*")(,\s*)?)+)/; +const markdownCodeRegex = /(`+).*?\2/; diff --git a/sample_code/Eclipse 2024-09 Improvements/TypeScript.ts b/sample_code/Eclipse 2024-09 Improvements/TypeScript.ts new file mode 100644 index 0000000..21e0390 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/TypeScript.ts @@ -0,0 +1,10 @@ +// Control flow narrowing for constant indexed accesses +function f1(obj: Record, key: string) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); // now okay, previously was error + } +} + +// Regular expression syntax checking +const stringListRegex = /(("[^"]*")(,\s*)?)+)/; +const markdownCodeRegex = /(`+).*?\2/; diff --git a/sample_code/Eclipse 2024-09 Improvements/pom.xml b/sample_code/Eclipse 2024-09 Improvements/pom.xml new file mode 100644 index 0000000..f75a4e0 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + com.example + Eclipse_2024-09_Improvements + 0.0.1-SNAPSHOT + + UTF-8 + 21 + + + + + org.junit.jupiter + junit-jupiter + 5.11.0 + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.0 + + + ACCESS_TOKEN_VALUE + + + allow + + false + -Xmx256m + src/test/resources + + + + + + \ No newline at end of file diff --git a/sample_code/Eclipse 2024-09 Improvements/src/main/java/Sample.java b/sample_code/Eclipse 2024-09 Improvements/src/main/java/Sample.java new file mode 100644 index 0000000..3ae4886 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/src/main/java/Sample.java @@ -0,0 +1,50 @@ +class Sample { + + // Improved clean-up: + // Code Style > Convert if/else if/else chain with 3 blocks min to switch + public static void main(String[] args) { + StringBuilder builder = new StringBuilder(); + builder.append("+++++++++\n"); + builder.append("+ Hello +\n"); + builder.append("+ World +\n"); + builder.append("+++++++++\n"); + write(builder); // in the past only when: write(builder.toString()) + write("end."); + } + static void write(CharSequence sequence) { + System.out.println(sequence); + } + + // Improved clean-up: + // Java Features > Java 15 > Convert String concatenation to Text Block + // > Include StringBuffer or StringBuilder concatenations + int getLevel(String x) { + int level; + if (x.equals("green") || x.equals("one")) { + level = 1; + } else if (x.equals("yellow") || x.equals("two")) { + level = 2; + } else if (x.equals("red") || x.equals("three")) { + level = 3; + } else { + level = 0; + } + return level; + } + + enum Color { WHITE, GREEN, YELLOW, RED } + int getLevel(Color color) { + int level; + if (color == Color.GREEN) { + level = 1; + } else if (color == Color.YELLOW) { + level = 2; + } else if (color == Color.RED) { + level = 3; + } else { + level = 0; + } + return level; + } + +} diff --git a/sample_code/Eclipse 2024-09 Improvements/src/main/resources/.gitkeep b/sample_code/Eclipse 2024-09 Improvements/src/main/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sample_code/Eclipse 2024-09 Improvements/src/test/java/SampleTest.java b/sample_code/Eclipse 2024-09 Improvements/src/test/java/SampleTest.java new file mode 100644 index 0000000..b16c2b3 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/src/test/java/SampleTest.java @@ -0,0 +1,27 @@ +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; + +import org.junit.jupiter.api.Test; + +class SampleTest { + + @Test + void test() throws IOException { + + // + assertEquals("ACCESS_TOKEN_VALUE", System.getenv("ACCESS_TOKEN")); + + // + assertEquals("allow", System.getProperty("java.security.manager")); + + // + Files.readAllLines(Path.of("test_data.txt")).forEach(line -> { + // ... + }); + + } + +} diff --git a/sample_code/Eclipse 2024-09 Improvements/src/test/resources/test_data.txt b/sample_code/Eclipse 2024-09 Improvements/src/test/resources/test_data.txt new file mode 100644 index 0000000..9a70907 --- /dev/null +++ b/sample_code/Eclipse 2024-09 Improvements/src/test/resources/test_data.txt @@ -0,0 +1 @@ +dummy data \ No newline at end of file diff --git a/sample_code/Eclipse 2024-06 Improvements/.classpath b/sample_code/Migrate Java 7 or older to 8/.classpath similarity index 95% rename from sample_code/Eclipse 2024-06 Improvements/.classpath rename to sample_code/Migrate Java 7 or older to 8/.classpath index 20a8b72..090dfff 100644 --- a/sample_code/Eclipse 2024-06 Improvements/.classpath +++ b/sample_code/Migrate Java 7 or older to 8/.classpath @@ -1,6 +1,6 @@ - + diff --git a/sample_code/Migrate Java 7 or older to 8/.gitignore b/sample_code/Migrate Java 7 or older to 8/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/sample_code/Migrate Java 7 or older to 8/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/sample_code/Eclipse 2024-06 Improvements/.project b/sample_code/Migrate Java 7 or older to 8/.project similarity index 88% rename from sample_code/Eclipse 2024-06 Improvements/.project rename to sample_code/Migrate Java 7 or older to 8/.project index 0cda51a..6863fe7 100644 --- a/sample_code/Eclipse 2024-06 Improvements/.project +++ b/sample_code/Migrate Java 7 or older to 8/.project @@ -1,6 +1,6 @@ - Eclipse 2024-06 Improvements + Migrate Java 7 or older to 8 diff --git a/sample_code/Eclipse 2024-06 Improvements/.settings/org.eclipse.core.resources.prefs b/sample_code/Migrate Java 7 or older to 8/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from sample_code/Eclipse 2024-06 Improvements/.settings/org.eclipse.core.resources.prefs rename to sample_code/Migrate Java 7 or older to 8/.settings/org.eclipse.core.resources.prefs diff --git a/sample_code/Eclipse 2024-06 Improvements/.settings/org.eclipse.jdt.core.prefs b/sample_code/Migrate Java 7 or older to 8/.settings/org.eclipse.jdt.core.prefs similarity index 69% rename from sample_code/Eclipse 2024-06 Improvements/.settings/org.eclipse.jdt.core.prefs rename to sample_code/Migrate Java 7 or older to 8/.settings/org.eclipse.jdt.core.prefs index 6e5f874..2c6240c 100644 --- a/sample_code/Eclipse 2024-06 Improvements/.settings/org.eclipse.jdt.core.prefs +++ b/sample_code/Migrate Java 7 or older to 8/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,9 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=22 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=22 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -10,5 +11,5 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=22 +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/sample_code/Migrate Java 7 or older to 8/src/App.java b/sample_code/Migrate Java 7 or older to 8/src/App.java new file mode 100644 index 0000000..b31f8da --- /dev/null +++ b/sample_code/Migrate Java 7 or older to 8/src/App.java @@ -0,0 +1,8 @@ + +public class App { + + public static void main(String[] args) { + System.out.println("Hello world"); + } + +} diff --git a/sample_code/Set compiler compliance level to 1.8/.classpath b/sample_code/Set compiler compliance level to 1.8/.classpath new file mode 100644 index 0000000..090dfff --- /dev/null +++ b/sample_code/Set compiler compliance level to 1.8/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sample_code/Set compiler compliance level to 1.8/.gitignore b/sample_code/Set compiler compliance level to 1.8/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/sample_code/Set compiler compliance level to 1.8/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/sample_code/Set compiler compliance level to 1.8/.project b/sample_code/Set compiler compliance level to 1.8/.project new file mode 100644 index 0000000..5c49701 --- /dev/null +++ b/sample_code/Set compiler compliance level to 1.8/.project @@ -0,0 +1,17 @@ + + + Set compiler compliance level to 1.8 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/sample_code/Set compiler compliance level to 1.8/.settings/org.eclipse.core.resources.prefs b/sample_code/Set compiler compliance level to 1.8/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/sample_code/Set compiler compliance level to 1.8/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/sample_code/Set compiler compliance level to 1.8/.settings/org.eclipse.jdt.core.prefs b/sample_code/Set compiler compliance level to 1.8/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..2c6240c --- /dev/null +++ b/sample_code/Set compiler compliance level to 1.8/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,15 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/sample_code/Set compiler compliance level to 1.8/src/App.java b/sample_code/Set compiler compliance level to 1.8/src/App.java new file mode 100644 index 0000000..b31f8da --- /dev/null +++ b/sample_code/Set compiler compliance level to 1.8/src/App.java @@ -0,0 +1,8 @@ + +public class App { + + public static void main(String[] args) { + System.out.println("Hello world"); + } + +}