diff --git a/org.eclipse.tm4e.core.tests/about.html b/org.eclipse.tm4e.core.tests/about.html index 9d78adb2f..51ff83f00 100644 --- a/org.eclipse.tm4e.core.tests/about.html +++ b/org.eclipse.tm4e.core.tests/about.html @@ -1,9 +1,10 @@ - - - + + + + About - +

About This Content

November 30, 2017

diff --git a/org.eclipse.tm4e.core/about.html b/org.eclipse.tm4e.core/about.html index b64910f7c..561a1efdf 100644 --- a/org.eclipse.tm4e.core/about.html +++ b/org.eclipse.tm4e.core/about.html @@ -1,8 +1,7 @@ - - + + - + About diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/css/CSSColors.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/css/CSSColors.java index 599550382..cf79cce82 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/css/CSSColors.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/css/CSSColors.java @@ -18,7 +18,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.theme.RGB; -public class CSSColors { +public final class CSSColors { private static final Map NAMED_COLORS = new HashMap<>(); static { NAMED_COLORS.put("aliceblue", new RGB(240, 248, 255)); @@ -176,4 +176,7 @@ public class CSSColors { public static @Nullable RGB getByName(final String name) { return NAMED_COLORS.get(name); } + + private CSSColors() { + } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExpTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExpTest.java index 664b51f88..acde48063 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExpTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExpTest.java @@ -43,7 +43,7 @@ private void assertOnigRegExpSearch(final String pattern, final String input, fi } @Test - void testOnigRegExp() throws Exception { + void testOnigRegExp() { assertOnigRegExpSearch( "\\G(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))", "ifeq (version,$(firstword $(MAKECMDGOALS))\n", diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/TMParserTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/TMParserTest.java index ec1df93f3..c036884e5 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/TMParserTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/TMParserTest.java @@ -57,7 +57,7 @@ private void validateCaptures(final RawGrammar grammar) { } @Test - void testParseCapturesJSON() throws Exception { + void testParseCapturesJSON() { // test capture defined as JSON map validateCaptures(TMParserJSON.INSTANCE.parse(new StringReader(""" {"patterns": [{ @@ -136,7 +136,7 @@ void testParseCapturesPList() throws Exception { } @Test - void testParseCapturesYAML() throws Exception { + void testParseCapturesYAML() { // test capture defined as YAML map validateCaptures(TMParserYAML.INSTANCE.parse(new StringReader(""" --- diff --git a/org.eclipse.tm4e.language_pack/about.html b/org.eclipse.tm4e.language_pack/about.html index eb0292045..047094fc5 100644 --- a/org.eclipse.tm4e.language_pack/about.html +++ b/org.eclipse.tm4e.language_pack/about.html @@ -1,5 +1,5 @@ - + About @@ -16,7 +16,6 @@ } -

About This Content

diff --git a/org.eclipse.tm4e.languageconfiguration/about.html b/org.eclipse.tm4e.languageconfiguration/about.html index 9d78adb2f..51ff83f00 100644 --- a/org.eclipse.tm4e.languageconfiguration/about.html +++ b/org.eclipse.tm4e.languageconfiguration/about.html @@ -1,9 +1,10 @@ - - - + + + + About - +

About This Content

November 30, 2017

diff --git a/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java b/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java index b8fdccc70..b5c921e78 100644 --- a/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java +++ b/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java @@ -263,7 +263,7 @@ private Text createText(final Composite parent, final String s) { infoWidget.refresh(null); final String path = fileText.getText(); - if (path.length() == 0) { + if (path.isEmpty()) { return new Status(IStatus.ERROR, LanguageConfigurationPlugin.PLUGIN_ID, SelectLanguageConfigurationWizardPage_fileError_noSelection); } diff --git a/org.eclipse.tm4e.languageconfiguration/src/test/java/org/eclipse/tm4e/languageconfiguration/internal/model/ParsingTest.java b/org.eclipse.tm4e.languageconfiguration/src/test/java/org/eclipse/tm4e/languageconfiguration/internal/model/ParsingTest.java index 2b05bdc66..591766f90 100644 --- a/org.eclipse.tm4e.languageconfiguration/src/test/java/org/eclipse/tm4e/languageconfiguration/internal/model/ParsingTest.java +++ b/org.eclipse.tm4e.languageconfiguration/src/test/java/org/eclipse/tm4e/languageconfiguration/internal/model/ParsingTest.java @@ -36,7 +36,7 @@ class ParsingTest { } @Test - void testOniguramaFallback() throws Exception { + void testOniguramaFallback() { final var languageConfiguration = LanguageConfiguration.load(new StringReader(""" { "onEnterRules": [{ @@ -117,7 +117,7 @@ public FileVisitResult visitFile(final Path file, final @Nullable BasicFileAttri } @Test - void testParseColorizedBracketsPair() throws Exception { + void testParseColorizedBracketsPair() { final var languageConfiguration = LanguageConfiguration.load(new StringReader(""" { "colorizedBracketPairs": [ @@ -135,7 +135,7 @@ void testParseColorizedBracketsPair() throws Exception { } @Test - void testIndentationRules() throws Exception { + void testIndentationRules() { final var languageConfiguration = LanguageConfiguration.load(new StringReader(""" { "indentationRules": { diff --git a/org.eclipse.tm4e.markdown/about.html b/org.eclipse.tm4e.markdown/about.html index 5cfefda65..d4870127f 100644 --- a/org.eclipse.tm4e.markdown/about.html +++ b/org.eclipse.tm4e.markdown/about.html @@ -1,11 +1,10 @@ - - + + - + About - +

About This Content

diff --git a/org.eclipse.tm4e.registry/about.html b/org.eclipse.tm4e.registry/about.html index 9d78adb2f..51ff83f00 100644 --- a/org.eclipse.tm4e.registry/about.html +++ b/org.eclipse.tm4e.registry/about.html @@ -1,9 +1,10 @@ - - - + + + + About - +

About This Content

November 30, 2017

diff --git a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/TMScope.java b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/TMScope.java index 5dc9e1f90..d59f24745 100644 --- a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/TMScope.java +++ b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/TMScope.java @@ -54,8 +54,7 @@ public boolean equals(final @Nullable Object obj) { if (this == obj) return true; return obj instanceof TMScope other - ? qualifiedName.equals(other.qualifiedName) - : false; + && qualifiedName.equals(other.qualifiedName); } @Override diff --git a/org.eclipse.tm4e.samples/about.html b/org.eclipse.tm4e.samples/about.html index 20c9980ec..7fbfc89b1 100644 --- a/org.eclipse.tm4e.samples/about.html +++ b/org.eclipse.tm4e.samples/about.html @@ -1,11 +1,10 @@ - - + + - + About - +

About This Content

diff --git a/org.eclipse.tm4e.ui.tests/about.html b/org.eclipse.tm4e.ui.tests/about.html index b5f103411..a944bd490 100644 --- a/org.eclipse.tm4e.ui.tests/about.html +++ b/org.eclipse.tm4e.ui.tests/about.html @@ -1,11 +1,10 @@ - - + + - + About - +

About This Content

diff --git a/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/tests/TMinGenericEditorTest.java b/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/tests/TMinGenericEditorTest.java index 76b57c1ec..ad130e1c4 100644 --- a/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/tests/TMinGenericEditorTest.java +++ b/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/tests/TMinGenericEditorTest.java @@ -14,7 +14,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.FileOutputStream; -import java.io.IOException; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.widgets.Control; @@ -22,7 +21,6 @@ import org.eclipse.tm4e.ui.tests.support.TestUtils; import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PartInitException; import org.eclipse.ui.ide.IDE; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -48,7 +46,7 @@ public void tearDown() throws Exception { } @Test - void testTMHighlightInGenericEditor() throws IOException, PartInitException { + void testTMHighlightInGenericEditor() throws Exception { final var f = TestUtils.createTempFile(".ts"); try (var fileOutputStream = new FileOutputStream(f)) { fileOutputStream.write("let a = '';\nlet b = 10;\nlet c = true;".getBytes()); @@ -60,7 +58,7 @@ void testTMHighlightInGenericEditor() throws IOException, PartInitException { } @Test - void testTMHighlightInGenericEditorEdit() throws IOException, PartInitException { + void testTMHighlightInGenericEditorEdit() throws Exception { final var f = TestUtils.createTempFile(".ts"); try (var fileOutputStream = new FileOutputStream(f)) { fileOutputStream.write("let a = '';".getBytes()); diff --git a/org.eclipse.tm4e.ui/about.html b/org.eclipse.tm4e.ui/about.html index 9d78adb2f..51ff83f00 100644 --- a/org.eclipse.tm4e.ui/about.html +++ b/org.eclipse.tm4e.ui/about.html @@ -1,9 +1,10 @@ - - - + + + + About - +

About This Content

November 30, 2017