From 385660d7be535cdd6f4b3e41ca15109ec79d122b Mon Sep 17 00:00:00 2001 From: Markus Alexander Kuppe Date: Tue, 19 Jan 2021 17:35:02 -0800 Subject: [PATCH] Add dummy classes for xtext @Pure and ToStringBuilder to prevent ClassNotFoundExceptions while debugging. See https://github.com/eclipse/lsp4j/issues/494 for context. [Bug][Debugger] --- .../src/org/eclipse/xtext/xbase/lib/Pure.java | 16 ++++++++++++++++ .../xtext/xbase/lib/util/ToStringBuilder.java | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/Pure.java create mode 100644 tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/util/ToStringBuilder.java diff --git a/tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/Pure.java b/tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/Pure.java new file mode 100644 index 0000000000..48d75fddc0 --- /dev/null +++ b/tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/Pure.java @@ -0,0 +1,16 @@ +package org.eclipse.xtext.xbase.lib; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Documented +@Retention(RUNTIME) +@Target({ METHOD, CONSTRUCTOR }) +public @interface Pure { + +} diff --git a/tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/util/ToStringBuilder.java b/tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/util/ToStringBuilder.java new file mode 100644 index 0000000000..07153f21f0 --- /dev/null +++ b/tlatools/org.lamport.tlatools/src/org/eclipse/xtext/xbase/lib/util/ToStringBuilder.java @@ -0,0 +1,15 @@ +package org.eclipse.xtext.xbase.lib.util; + +public class ToStringBuilder { + + public ToStringBuilder(Object instance) { + } + + public ToStringBuilder add(Object value) { + return this; + } + + public ToStringBuilder add(String fieldName, Object value) { + return this; + } +}