From 9a5a3862b31e279e9e008fe45523c43c4569712f Mon Sep 17 00:00:00 2001 From: Aleksandar Kurtakov Date: Wed, 4 Jun 2025 14:04:12 +0300 Subject: [PATCH] Streamline SnippetLauncher PocketPC and JavaXPCom are dead technologies - no need to special handling them. Catch only IOExceptions (rather than Exception) --- .../src/org/eclipse/swt/snippets/SnippetLauncher.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java index 07675ac2357..7402d377761 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java @@ -58,15 +58,9 @@ public static void main (String [] args) { System.out.println(source.substring(start, end-3)); boolean skip = false; String platform = SWT.getPlatform(); - if (source.contains("PocketPC")) { - platform = "PocketPC"; - skip = true; - } else if (source.contains("OpenGL")) { + if (source.contains("OpenGL")) { platform = "OpenGL"; skip = true; - } else if (source.contains("JavaXPCOM")) { - platform = "JavaXPCOM"; - skip = true; } else { String [] platforms = {"win32", "gtk"}; for (String platformId : platforms) { @@ -81,7 +75,8 @@ public static void main (String [] args) { System.out.println("...skipping " + platform + " example..."); continue; } - } catch (Exception e) { + } catch (IOException e) { + e.printStackTrace(); } } Method method = null;