From eb94f037e627e1b52955583d6208cc924ac874d8 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 7 Nov 2023 02:33:30 +0100 Subject: [PATCH] refact: remove guava --- org.eclipse.tm4e.core/META-INF/MANIFEST.MF | 3 +- .../internal/parser/PListContentHandler.java | 6 +-- .../tm4e/core/internal/theme/Theme.java | 6 +-- .../core/internal/utils/ObjectCloner.java | 26 ++++------- .../tm4e/core/internal/utils/StringUtils.java | 8 ++++ .../core/model/TMTokenizationSupport.java | 45 ++++++++++++------- .../tm4e/core/grammar/TokenizationUtils.java | 7 ++- .../META-INF/MANIFEST.MF | 9 ++-- org.eclipse.tm4e.markdown/pom.xml | 2 +- .../tm4e/markdown/marked/InlineLexer.java | 9 ++-- .../eclipse/tm4e/markdown/marked/Lexer.java | 7 ++- .../eclipse/tm4e/markdown/marked/Parser.java | 9 ++-- .../META-INF/MANIFEST.MF | 3 +- org.eclipse.tm4e.repository/category.xml | 3 -- org.eclipse.tm4e.ui/META-INF/MANIFEST.MF | 3 +- .../ui/internal/model/DocumentHelper.java | 5 +-- target-platform/tm4e-target.target | 1 - 17 files changed, 76 insertions(+), 76 deletions(-) diff --git a/org.eclipse.tm4e.core/META-INF/MANIFEST.MF b/org.eclipse.tm4e.core/META-INF/MANIFEST.MF index 76e9995ae..7c7132893 100644 --- a/org.eclipse.tm4e.core/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.core/META-INF/MANIFEST.MF @@ -6,7 +6,6 @@ Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.tm4e.core Bundle-Version: 0.6.2.qualifier Require-Bundle: com.google.gson;bundle-version="[2.10.1,3.0.0)", - com.google.guava;bundle-version="[32.1.0,33.0.0)", org.apache.batik.css;bundle-version="[1.16.0,2.0.0)";resolution:=optional, org.apache.batik.util;bundle-version="[1.16.0,2.0.0)";resolution:=optional, org.jcodings;bundle-version="[1.0.58,2.0.0)", @@ -23,7 +22,7 @@ Export-Package: org.eclipse.tm4e.core, org.eclipse.tm4e.core.internal.matcher;x-friends:="org.eclipse.tm4e.core.tests", org.eclipse.tm4e.core.internal.theme;x-friends:="org.eclipse.tm4e.core.tests", org.eclipse.tm4e.core.internal.theme.raw;x-friends:="org.eclipse.tm4e.core.tests", - org.eclipse.tm4e.core.internal.utils;x-friends:="org.eclipse.tm4e.core.tests,org.eclipse.tm4e.registry,org.eclipse.tm4e.languageconfiguration,org.eclipse.tm4e.ui,org.eclipse.tm4e.ui.tests", + org.eclipse.tm4e.core.internal.utils;x-friends:="org.eclipse.tm4e.core.tests,org.eclipse.tm4e.registry,org.eclipse.tm4e.languageconfiguration,org.eclipse.tm4e.markdown,org.eclipse.tm4e.ui,org.eclipse.tm4e.ui.tests", org.eclipse.tm4e.core.model, org.eclipse.tm4e.core.registry, org.eclipse.tm4e.core.theme, diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListContentHandler.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListContentHandler.java index 509e2ba4b..a40c23d56 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListContentHandler.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListContentHandler.java @@ -17,6 +17,7 @@ import java.time.ZonedDateTime; import java.time.format.DateTimeParseException; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -26,14 +27,13 @@ import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; -import com.google.common.collect.Iterators; - final class PListContentHandler extends DefaultHandler { private static final Logger LOGGER = System.getLogger(PListContentHandler.class.getName()); private static final class PListPathImpl implements PListPath { final LinkedList keys = new LinkedList<>(); + final List keysUnmodifiable = Collections.unmodifiableList(keys); final List keysDepths = new ArrayList<>(); int depth = 0; @@ -69,7 +69,7 @@ public String last() { @Override public Iterator iterator() { - return Iterators.unmodifiableIterator(keys.iterator()); + return keysUnmodifiable.iterator(); } @Override diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java index 7984e30f0..f972c0bf9 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java @@ -27,8 +27,6 @@ import org.eclipse.tm4e.core.internal.theme.raw.IRawThemeSetting; import org.eclipse.tm4e.core.internal.utils.StringUtils; -import com.google.common.collect.Lists; - /** * TextMate theme. * @@ -201,8 +199,8 @@ && isValidHexColor(stringSettingsBackground)) { final var scope = getLastElement(segments); List parentScopes = null; if (segments.size() > 1) { - parentScopes = segments.subList(0, segments.size() - 1); - parentScopes = Lists.reverse(parentScopes); + parentScopes = new ArrayList<>(segments.subList(0, segments.size() - 1)); + Collections.reverse(parentScopes); } result.add(new ParsedThemeRule( diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/ObjectCloner.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/ObjectCloner.java index 455446c85..1b4659997 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/ObjectCloner.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/ObjectCloner.java @@ -19,28 +19,15 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.WeakHashMap; import java.util.function.Supplier; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.CacheLoader; -import com.google.common.cache.LoadingCache; - public final class ObjectCloner { - private static final LoadingCache, Optional> CLONE_METHODS = CacheBuilder.newBuilder().weakKeys() - .build(new CacheLoader<>() { - @Override - public Optional load(final Class cls) { - try { - return Optional.of(cls.getMethod("clone")); - } catch (final Exception ex) { - return Optional.empty(); - } - } - }); + private static final WeakHashMap, Optional> CLONE_METHODS_CACHE = new WeakHashMap<>(); public static <@NonNull T> T deepClone(final T obj) { return deepClone(obj, new IdentityHashMap<>()); @@ -105,8 +92,13 @@ public Optional load(final Class cls) { private static <@NonNull T> T shallowClone(final T obj, final Supplier fallback) { if (obj instanceof Cloneable) { try { - final var objClass = obj.getClass(); - final var cloneMethod = CLONE_METHODS.get(objClass); + final var cloneMethod = CLONE_METHODS_CACHE.computeIfAbsent(obj.getClass(), cls -> { + try { + return Optional.of(cls.getMethod("clone")); + } catch (final Exception ex) { + return Optional.empty(); + } + }); if (cloneMethod.isPresent()) { return (T) cloneMethod.get().invoke(obj); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java index 63d5c9a5c..2e919105e 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java @@ -38,6 +38,14 @@ public final class StringUtils { private static final Pattern RGB = Pattern.compile("^#[0-9a-f]{3}", Pattern.CASE_INSENSITIVE); private static final Pattern RGBA = Pattern.compile("^#[0-9a-f]{4}", Pattern.CASE_INSENSITIVE); + public static String nullToEmpty(@Nullable final String txt) { + return txt == null ? "" : txt; + } + + public static boolean isNullOrEmpty(@Nullable final String txt) { + return txt == null || txt.isEmpty(); + } + public static boolean isValidHexColor(final CharSequence hex) { if (hex.isEmpty()) { return false; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMTokenizationSupport.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMTokenizationSupport.java index 8dc61fd61..8db49369d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMTokenizationSupport.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMTokenizationSupport.java @@ -22,7 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.concurrent.TimeUnit; +import java.util.function.BiFunction; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -33,10 +33,6 @@ import org.eclipse.tm4e.core.internal.utils.MoreCollections; import org.eclipse.tm4e.core.internal.utils.StringUtils; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.CacheLoader; -import com.google.common.cache.LoadingCache; - /** * @see @@ -74,15 +70,6 @@ public TokenizationResult tokenize(final String line, @Nullable final IStateStac return tokenize(line, state, null, null); } - private final LoadingCache, String> tokenTypeOfScopesCache = CacheBuilder.newBuilder() - .expireAfterAccess(5, TimeUnit.SECONDS) - .build(new CacheLoader, String>() { - @Override - public String load(final List scopes) throws Exception { - return decodeTextMateToken(decodeMap, scopes); - } - }); - @Override public TokenizationResult tokenize(final String line, @Nullable final IStateStack state, @@ -97,7 +84,7 @@ public TokenizationResult tokenize(final String line, final var tmTokens = new ArrayList(tokens.length < 10 ? tokens.length : 10); String lastTokenType = null; for (final var token : tokens) { - final String tokenType = tokenTypeOfScopesCache.getUnchecked(token.getScopes()); + final String tokenType = decodeTextMateTokenCached.apply(decodeMap, token.getScopes()); // do not push a new token if the type is exactly the same (also helps with ligatures) if (!tokenType.equals(lastTokenType)) { @@ -121,6 +108,34 @@ public TokenizationResult tokenize(final String line, tokenizationResult.isStoppedEarly()); } + private final BiFunction, String> decodeTextMateTokenCached = new BiFunction<>() { + private static final long EXPIRE_AFTER_ACCESS_MS = 5_000; + + static final class CacheEntry { + CacheEntry(final String tokenType) { + this.tokenType = tokenType; + } + + final String tokenType; + long lastAccessed; + } + + private final Map, CacheEntry> cache = new HashMap<>(); + private long lastCacheCleanup = System.currentTimeMillis(); + + @Override + public String apply(final DecodeMap decodeMap, final List scopes) { + final var entry = cache.computeIfAbsent(scopes, s -> new CacheEntry(decodeTextMateToken(decodeMap, s))); + final var now = System.currentTimeMillis(); + entry.lastAccessed = now; + if (now - lastCacheCleanup > EXPIRE_AFTER_ACCESS_MS) { + lastCacheCleanup = now; + cache.values().removeIf(e -> now - e.lastAccessed > EXPIRE_AFTER_ACCESS_MS); + } + return entry.tokenType; + } + }; + /** * https://github.com/microsoft/vscode/blob/70d250824ef66ef09f04c4084b804d5f353fb704/src/vs/editor/node/textMate/TMSyntax.ts#L251 */ diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java index 5d3e6659f..50c785ff5 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java @@ -16,13 +16,12 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.concurrent.atomic.AtomicReference; +import java.util.regex.Pattern; import java.util.stream.Stream; -import com.google.common.base.Splitter; - public final class TokenizationUtils { - private static final Splitter BY_LINE_SPLITTER = Splitter.onPattern("\\r?\\n"); + private static final Pattern BY_LINE_SPLITTER = Pattern.compile("\\r?\\n"); /** * Lazy tokenizes the given text. @@ -37,7 +36,7 @@ public static Stream> tokenizeText(final CharSeque } final var prevStack = new AtomicReference(); - return BY_LINE_SPLITTER.splitToStream(text).map(line -> { + return BY_LINE_SPLITTER.splitAsStream(text).map(line -> { final var tokenized = grammar.tokenizeLine(line, prevStack.get(), null); prevStack.set(tokenized.getRuleStack()); return tokenized; diff --git a/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF b/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF index a07056dd9..b472621d0 100644 --- a/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF @@ -4,12 +4,11 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.tm4e.markdown;singleton:=true -Bundle-Version: 0.5.3.qualifier +Bundle-Version: 0.5.4.qualifier Require-Bundle: org.eclipse.core.runtime, - org.eclipse.tm4e.core;bundle-version="0.6.1", - org.eclipse.tm4e.registry;bundle-version="0.6.5", - org.eclipse.tm4e.ui;bundle-version="0.7.1", - com.google.guava;bundle-version="[32.1.0,33.0.0)" + org.eclipse.tm4e.core;bundle-version="0.6.2", + org.eclipse.tm4e.registry;bundle-version="0.6.6", + org.eclipse.tm4e.ui;bundle-version="0.7.2" Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.tm4e.markdown, org.eclipse.tm4e.markdown.marked diff --git a/org.eclipse.tm4e.markdown/pom.xml b/org.eclipse.tm4e.markdown/pom.xml index 06882657c..987aaf59a 100644 --- a/org.eclipse.tm4e.markdown/pom.xml +++ b/org.eclipse.tm4e.markdown/pom.xml @@ -10,5 +10,5 @@ org.eclipse.tm4e.markdown eclipse-plugin - 0.5.3-SNAPSHOT + 0.5.4-SNAPSHOT diff --git a/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/InlineLexer.java b/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/InlineLexer.java index b9b67340d..2e16c1f09 100644 --- a/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/InlineLexer.java +++ b/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/InlineLexer.java @@ -21,8 +21,7 @@ import java.util.regex.Matcher; import org.eclipse.jdt.annotation.Nullable; - -import com.google.common.base.Strings; +import org.eclipse.tm4e.core.internal.utils.StringUtils; public class InlineLexer { @@ -57,13 +56,13 @@ public InlineLexer(@Nullable final Object links, @Nullable final Options options public void output(String src) { Matcher cap = null; - while (!Strings.isNullOrEmpty(src)) { + while (!StringUtils.isNullOrEmpty(src)) { // strong if ((cap = this.rules.strong.exec(src)) != null) { src = src.substring(cap.group(0).length()); this.renderer.startStrong(); - this.output(!Strings.isNullOrEmpty(cap.group(2)) ? cap.group(2) : cap.group(1)); + this.output(!StringUtils.isNullOrEmpty(cap.group(2)) ? cap.group(2) : cap.group(1)); this.renderer.endStrong(); continue; } @@ -72,7 +71,7 @@ public void output(String src) { if ((cap = this.rules.em.exec(src)) != null) { src = src.substring(cap.group(0).length()); this.renderer.startEm(); - this.output(!Strings.isNullOrEmpty(cap.group(2)) ? cap.group(2) : cap.group(1)); + this.output(!StringUtils.isNullOrEmpty(cap.group(2)) ? cap.group(2) : cap.group(1)); this.renderer.endEm(); continue; } diff --git a/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Lexer.java b/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Lexer.java index ef0b739b6..b01bde8dc 100644 --- a/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Lexer.java +++ b/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Lexer.java @@ -19,8 +19,7 @@ import java.util.regex.Matcher; import org.eclipse.jdt.annotation.Nullable; - -import com.google.common.base.Strings; +import org.eclipse.tm4e.core.internal.utils.StringUtils; public class Lexer { @@ -61,7 +60,7 @@ private Tokens token(final String src, final boolean top) { private Tokens token(String src, final boolean top, @Nullable final Object bq) { src = src.replaceAll("^ +$", ""); Matcher cap; - while (!Strings.isNullOrEmpty(src)) { + while (!StringUtils.isNullOrEmpty(src)) { // newline if ((cap = this.rules.newline.exec(src)) != null) { @@ -86,7 +85,7 @@ private Tokens token(String src, final boolean top, @Nullable final Object bq) { if ((cap = this.rules.fences.exec(src)) != null) { src = src.substring(cap.group(0).length()); final String lang = cap.group(2); - final String text = !Strings.isNullOrEmpty(cap.group(3)) ? cap.group(3) : ""; + final String text = !StringUtils.isNullOrEmpty(cap.group(3)) ? cap.group(3) : ""; this.tokens.add(new Token(TokenType.code, lang, text)); continue; } diff --git a/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Parser.java b/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Parser.java index 41986aadd..222f6dd87 100644 --- a/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Parser.java +++ b/org.eclipse.tm4e.markdown/src/main/java/org/eclipse/tm4e/markdown/marked/Parser.java @@ -17,8 +17,7 @@ package org.eclipse.tm4e.markdown.marked; import org.eclipse.jdt.annotation.Nullable; - -import com.google.common.base.Strings; +import org.eclipse.tm4e.core.internal.utils.StringUtils; public class Parser { @@ -75,14 +74,14 @@ private void tok(final InlineLexer inline) { break; case heading: // this.renderer.heading(this.inline.output(token.text), token.depth, token.text); - this.renderer.heading(Strings.nullToEmpty(token.text), token.depth, Strings.nullToEmpty(token.text)); + this.renderer.heading(StringUtils.nullToEmpty(token.text), token.depth, StringUtils.nullToEmpty(token.text)); break; case code: - this.renderer.code(Strings.nullToEmpty(token.text), token.lang, token.escaped); + this.renderer.code(StringUtils.nullToEmpty(token.text), token.lang, token.escaped); break; case paragraph: this.renderer.startParagraph(); - inline.output(Strings.nullToEmpty(token.text)); + inline.output(StringUtils.nullToEmpty(token.text)); this.renderer.endParagraph(); break; } diff --git a/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF b/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF index 9cf74f202..69a417f51 100644 --- a/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF @@ -8,8 +8,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.eclipse.core.runtime, org.eclipse.equinox.preferences, org.eclipse.tm4e.core;bundle-version="0.6.1", - com.google.gson;bundle-version="[2.10.1,3.0.0)", - com.google.guava;bundle-version="[32.1.0,33.0.0)" + com.google.gson;bundle-version="[2.10.1,3.0.0)" Export-Package: org.eclipse.tm4e.registry Bundle-Activator: org.eclipse.tm4e.registry.TMEclipseRegistryPlugin Bundle-Localization: plugin diff --git a/org.eclipse.tm4e.repository/category.xml b/org.eclipse.tm4e.repository/category.xml index d4c8b8ffe..11ba67188 100644 --- a/org.eclipse.tm4e.repository/category.xml +++ b/org.eclipse.tm4e.repository/category.xml @@ -18,9 +18,6 @@ - - - diff --git a/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF b/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF index fe8b1305a..bbacd72a4 100644 --- a/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF @@ -17,8 +17,7 @@ Require-Bundle: org.eclipse.core.expressions, org.eclipse.e4.ui.css.swt.theme, org.eclipse.tm4e.core;bundle-version="0.6.1", org.eclipse.tm4e.registry;bundle-version="0.6.4", - com.google.gson;bundle-version="[2.10.1,3.0.0)", - com.google.guava;bundle-version="[32.1.0,33.0.0)" + com.google.gson;bundle-version="[2.10.1,3.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.tm4e.ui, org.eclipse.tm4e.ui.internal.model;x-friends:="org.eclipse.tm4e.languageconfiguration,org.eclipse.tm4e.ui.tests", diff --git a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentHelper.java b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentHelper.java index 61b2f3d29..6f3ab5d3e 100644 --- a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentHelper.java +++ b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentHelper.java @@ -17,8 +17,7 @@ import org.eclipse.jface.text.IDocumentListener; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.Region; - -import com.google.common.base.Strings; +import org.eclipse.tm4e.core.internal.utils.StringUtils; /** * Utilities class for {@link IDocument}. @@ -32,7 +31,7 @@ enum DocumentEventType { } static DocumentEventType getEventType(final DocumentEvent event) { - if (Strings.isNullOrEmpty(event.getText())) { + if (StringUtils.isNullOrEmpty(event.getText())) { return DocumentEventType.REMOVE; } return event.getLength() == 0 diff --git a/target-platform/tm4e-target.target b/target-platform/tm4e-target.target index 6c2dfbc4b..03cbfca26 100644 --- a/target-platform/tm4e-target.target +++ b/target-platform/tm4e-target.target @@ -7,7 +7,6 @@ -