Skip to content

Commit 26f0da6

Browse files
committed
refact: minor cleanup
1 parent 049e761 commit 26f0da6

16 files changed

Lines changed: 50 additions & 51 deletions

File tree

org.eclipse.tm4e.core.tests/about.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml"><head>
3-
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
<head>
4+
<meta charset="ISO-8859-1">
45
<title>About</title>
56
</head>
6-
<body lang="EN-US">
7+
<body>
78
<h2>About This Content</h2>
89

910
<p>November 30, 2017</p>

org.eclipse.tm4e.core/about.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3-
<html xmlns="http://www.w3.org/1999/xhtml">
1+
<!DOCTYPE html>
2+
<html lang="en-US">
43
<head>
5-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
4+
<meta charset="ISO-8859-1">
65
<title>About</title>
76
</head>
87
<body lang="EN-US">

org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/css/CSSColors.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.eclipse.jdt.annotation.Nullable;
1919
import org.eclipse.tm4e.core.theme.RGB;
2020

21-
public class CSSColors {
21+
public final class CSSColors {
2222
private static final Map<String, RGB> NAMED_COLORS = new HashMap<>();
2323
static {
2424
NAMED_COLORS.put("aliceblue", new RGB(240, 248, 255));
@@ -176,4 +176,7 @@ public class CSSColors {
176176
public static @Nullable RGB getByName(final String name) {
177177
return NAMED_COLORS.get(name);
178178
}
179+
180+
private CSSColors() {
181+
}
179182
}

org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExpTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private void assertOnigRegExpSearch(final String pattern, final String input, fi
4343
}
4444

4545
@Test
46-
void testOnigRegExp() throws Exception {
46+
void testOnigRegExp() {
4747
assertOnigRegExpSearch(
4848
"\\G(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))",
4949
"ifeq (version,$(firstword $(MAKECMDGOALS))\n",

org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/TMParserTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private void validateCaptures(final RawGrammar grammar) {
5757
}
5858

5959
@Test
60-
void testParseCapturesJSON() throws Exception {
60+
void testParseCapturesJSON() {
6161
// test capture defined as JSON map
6262
validateCaptures(TMParserJSON.INSTANCE.parse(new StringReader("""
6363
{"patterns": [{
@@ -136,7 +136,7 @@ void testParseCapturesPList() throws Exception {
136136
}
137137

138138
@Test
139-
void testParseCapturesYAML() throws Exception {
139+
void testParseCapturesYAML() {
140140
// test capture defined as YAML map
141141
validateCaptures(TMParserYAML.INSTANCE.parse(new StringReader("""
142142
---

org.eclipse.tm4e.language_pack/about.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en-US">
33
<head>
44
<meta charset="UTF-8">
55
<title>About</title>
@@ -16,7 +16,6 @@
1616
}
1717
</style>
1818
</head>
19-
</head>
2019
<body>
2120

2221
<h2>About This Content</h2>

org.eclipse.tm4e.languageconfiguration/about.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml"><head>
3-
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
<head>
4+
<meta charset="ISO-8859-1">
45
<title>About</title>
56
</head>
6-
<body lang="EN-US">
7+
<body>
78
<h2>About This Content</h2>
89

910
<p>November 30, 2017</p>

org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ private Text createText(final Composite parent, final String s) {
263263
infoWidget.refresh(null);
264264

265265
final String path = fileText.getText();
266-
if (path.length() == 0) {
266+
if (path.isEmpty()) {
267267
return new Status(IStatus.ERROR, LanguageConfigurationPlugin.PLUGIN_ID,
268268
SelectLanguageConfigurationWizardPage_fileError_noSelection);
269269
}

org.eclipse.tm4e.languageconfiguration/src/test/java/org/eclipse/tm4e/languageconfiguration/internal/model/ParsingTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ParsingTest {
3636
}
3737

3838
@Test
39-
void testOniguramaFallback() throws Exception {
39+
void testOniguramaFallback() {
4040
final var languageConfiguration = LanguageConfiguration.load(new StringReader("""
4141
{
4242
"onEnterRules": [{
@@ -117,7 +117,7 @@ public FileVisitResult visitFile(final Path file, final @Nullable BasicFileAttri
117117
}
118118

119119
@Test
120-
void testParseColorizedBracketsPair() throws Exception {
120+
void testParseColorizedBracketsPair() {
121121
final var languageConfiguration = LanguageConfiguration.load(new StringReader("""
122122
{
123123
"colorizedBracketPairs": [
@@ -135,7 +135,7 @@ void testParseColorizedBracketsPair() throws Exception {
135135
}
136136

137137
@Test
138-
void testIndentationRules() throws Exception {
138+
void testIndentationRules() {
139139
final var languageConfiguration = LanguageConfiguration.load(new StringReader("""
140140
{
141141
"indentationRules": {

org.eclipse.tm4e.markdown/about.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3-
<html xmlns="http://www.w3.org/1999/xhtml">
1+
<!DOCTYPE html>
2+
<html lang="en-US">
43
<head>
5-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
4+
<meta charset="ISO-8859-1">
65
<title>About</title>
76
</head>
8-
<body lang="EN-US">
7+
<body>
98
<h2>About This Content</h2>
109

1110
<p>

0 commit comments

Comments
 (0)