Skip to content

Commit 06b7b52

Browse files
authored
Merge pull request #392 from zbynek/typos
Fix some typos
2 parents ec13d42 + 98f26f2 commit 06b7b52

33 files changed

+64
-64
lines changed

src/main/java/com/google/gwt/site/markdown/MDHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public MDHelper create() throws MDHelperException {
105105

106106
// read template TOC if parameter is provided
107107
if (templateTocFile != null) {
108-
templateToc = MDTranslater.markDownToHtml(readFile(templateTocFile));
108+
templateToc = MDTranslator.markDownToHtml(readFile(templateTocFile));
109109
}
110110

111111
created = true;
@@ -121,7 +121,7 @@ private String readFile(String filePath) throws MDHelperException {
121121
}
122122
}
123123

124-
public void translate() throws TranslaterException {
124+
public void translate() throws TranslatorException {
125125

126126
if (!created) {
127127
throw new IllegalStateException();
@@ -132,7 +132,7 @@ public void translate() throws TranslaterException {
132132

133133
TocCreator tocCreator = templateToc != null ? new TocFromTemplateCreator(templateToc) : new TocFromMdCreator();
134134

135-
new MDTranslater(tocCreator, new MarkupWriter(outputDirectoryFile), template)
135+
new MDTranslator(tocCreator, new MarkupWriter(outputDirectoryFile), template)
136136
.render(mdRoot);
137137
}
138138

src/main/java/com/google/gwt/site/markdown/MDTranslater.java renamed to src/main/java/com/google/gwt/site/markdown/MDTranslator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import java.util.List;
3030
import java.util.Set;
3131

32-
public class MDTranslater {
32+
public class MDTranslator {
3333
private static final String SEPARATOR = File.separator;
3434

3535

@@ -39,17 +39,17 @@ public class MDTranslater {
3939

4040
private final String template;
4141

42-
public MDTranslater(TocCreator tocCreator, MarkupWriter writer, String template) {
42+
public MDTranslator(TocCreator tocCreator, MarkupWriter writer, String template) {
4343
this.tocCreator = tocCreator;
4444
this.writer = writer;
4545
this.template = template;
4646
}
4747

48-
public void render(MDParent root) throws TranslaterException {
48+
public void render(MDParent root) throws TranslatorException {
4949
renderTree(root, root);
5050
}
5151

52-
private void renderTree(MDNode node, MDParent root) throws TranslaterException {
52+
private void renderTree(MDNode node, MDParent root) throws TranslatorException {
5353

5454
if (node.isFolder()) {
5555
MDParent mdParent = node.asFolder();
@@ -125,11 +125,11 @@ protected String adjustRelativePath(String html, String relativePath) {
125125
"$1='" + relativePath + "$3'");
126126
}
127127

128-
private String getNodeContent(String path) throws TranslaterException {
128+
private String getNodeContent(String path) throws TranslatorException {
129129
try {
130130
return Util.getStringFromFile(new File(path));
131131
} catch (IOException e1) {
132-
throw new TranslaterException("can not load content from file: '" + path + "'", e1);
132+
throw new TranslatorException("can not load content from file: '" + path + "'", e1);
133133
}
134134

135135
}

src/main/java/com/google/gwt/site/markdown/MarkDown.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
public class MarkDown {
1717

18-
public static void main(String[] args) throws MDHelperException, TranslaterException {
18+
public static void main(String[] args) throws MDHelperException, TranslatorException {
1919

2020
if (args.length < 3) {
2121
System.out.println("Usage MarkDown <sourceDir> <outputDir> <templateFile> [templateTOC]");
@@ -45,7 +45,7 @@ public static void main(String[] args) throws MDHelperException, TranslaterExcep
4545
} catch (MDHelperException e) {
4646
e.printStackTrace();
4747
throw e;
48-
} catch (TranslaterException e) {
48+
} catch (TranslatorException e) {
4949
e.printStackTrace();
5050
throw e;
5151
}

src/main/java/com/google/gwt/site/markdown/MarkupWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public MarkupWriter(File rootFile) {
2828
this.rootFile = rootFile;
2929
}
3030

31-
public void writeHTML(MDNode node, String html) throws TranslaterException {
31+
public void writeHTML(MDNode node, String html) throws TranslatorException {
3232

3333
if (node.isFolder()) {
3434
throw new IllegalArgumentException();
@@ -62,16 +62,16 @@ public void writeHTML(MDNode node, String html) throws TranslaterException {
6262
try {
6363
Util.writeStringToFile(fileToWrite, html);
6464
} catch (IOException e) {
65-
throw new TranslaterException("can not write markup to file: '" + fileToWrite + "'", e);
65+
throw new TranslatorException("can not write markup to file: '" + fileToWrite + "'", e);
6666

6767
}
6868
}
6969

70-
private void ensureDirectory(File dir) throws TranslaterException {
70+
private void ensureDirectory(File dir) throws TranslatorException {
7171
if (!dir.exists()) {
7272
boolean created = dir.mkdir();
7373
if (!created) {
74-
throw new TranslaterException("can not create directory: '" + dir + "'");
74+
throw new TranslatorException("can not create directory: '" + dir + "'");
7575
}
7676
}
7777
}

src/main/java/com/google/gwt/site/markdown/TranslaterException.java renamed to src/main/java/com/google/gwt/site/markdown/TranslatorException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
*/
1414
package com.google.gwt.site.markdown;
1515

16-
public class TranslaterException extends Exception {
16+
public class TranslatorException extends Exception {
1717

1818
/**
1919
*
2020
*/
2121
private static final long serialVersionUID = 1732290113260995362L;
2222

23-
public TranslaterException(String message, Throwable e1) {
23+
public TranslatorException(String message, Throwable e1) {
2424
super(message, e1);
2525
}
2626

27-
public TranslaterException(String string) {
27+
public TranslatorException(String string) {
2828
super(string);
2929
}
3030

src/main/java/com/google/gwt/site/markdown/fs/FileSystemTraverser.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
package com.google.gwt.site.markdown.fs;
1515

16-
import com.google.gwt.site.markdown.TranslaterException;
16+
import com.google.gwt.site.markdown.TranslatorException;
1717

1818
import org.w3c.dom.Document;
1919
import org.w3c.dom.Element;
@@ -89,7 +89,7 @@ public String getName() {
8989
}
9090
}
9191

92-
public MDParent traverse(File file) throws TranslaterException {
92+
public MDParent traverse(File file) throws TranslatorException {
9393
MDParent mdParent = traverse(null, file, 0, "");
9494
removeEmptyDirs(mdParent);
9595

@@ -98,7 +98,7 @@ public MDParent traverse(File file) throws TranslaterException {
9898
return mdParent;
9999
}
100100

101-
private void readConfig(MDParent current) throws TranslaterException {
101+
private void readConfig(MDParent current) throws TranslatorException {
102102

103103
if (current.getConfigFile() != null) {
104104
FolderConfig config = parseConfig(current.getConfigFile());
@@ -178,7 +178,7 @@ private void removeEmptyDirs(MDParent current) {
178178
}
179179

180180
private MDParent traverse(MDParent parent, File file, int depth, String path)
181-
throws TranslaterException {
181+
throws TranslatorException {
182182

183183
if (ignoreFile(file)) {
184184
return null;
@@ -221,7 +221,7 @@ private MDParent traverse(MDParent parent, File file, int depth, String path)
221221

222222
}
223223

224-
private FolderConfig parseConfig(File file) throws TranslaterException {
224+
private FolderConfig parseConfig(File file) throws TranslatorException {
225225
DocumentBuilder builder;
226226
List<String> excludeList = new LinkedList<String>();
227227

@@ -236,7 +236,7 @@ private FolderConfig parseConfig(File file) throws TranslaterException {
236236
Element documentElement = document.getDocumentElement();
237237

238238
if (!"folder".equalsIgnoreCase(documentElement.getTagName())) {
239-
throw new TranslaterException(
239+
throw new TranslatorException(
240240
"the file '" + file.getAbsolutePath() + "' does not contain a folder tag");
241241
}
242242

@@ -277,11 +277,11 @@ private FolderConfig parseConfig(File file) throws TranslaterException {
277277
}
278278

279279
} catch (ParserConfigurationException e) {
280-
throw new TranslaterException("can not construct xml parser", e);
280+
throw new TranslatorException("can not construct xml parser", e);
281281
} catch (SAXException e) {
282-
throw new TranslaterException("error while parsing xml", e);
282+
throw new TranslatorException("error while parsing xml", e);
283283
} catch (IOException e) {
284-
throw new TranslaterException("can not read file", e);
284+
throw new TranslatorException("can not read file", e);
285285
}
286286

287287
return new FolderConfig(href, excludeList, folderEntries);

src/main/markdown/articles/mvp-architecture-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public class ContactsViewColumnDefinitions<ContactDetails> {
330330
});
331331
}
332332

333-
public List<ColumnDefinition<ContactDetails>> getColumnDefnitions() {
333+
public List<ColumnDefinition<ContactDetails>> getColumnDefinitions() {
334334
return columnDefinitions;
335335
}
336336
}

src/main/markdown/doc/latest/DevGuideAutoBeans.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Maps are serialized in two forms based on whether or not the key type is a value
228228
```json
229229
{ "1" : { "property" : "value"}, "55" : { "property" : "value" } }
230230
```
231-
A map that uses a reference object as a key will instead be encoded as a list of two lists. This allows object-identity maps that contain keys with identical serialized froms to be deserialized correctly. For example, a `Map<Person, Address>` would be encoded as:
231+
A map that uses a reference object as a key will instead be encoded as a list of two lists. This allows object-identity maps that contain keys with identical serialized forms to be deserialized correctly. For example, a `Map<Person, Address>` would be encoded as:
232232

233233
```json
234234
[

src/main/markdown/doc/latest/DevGuideCodingBasicsJsInterop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn(40); // will return 42!
149149
## Adding additional utility methods to a native type
150150

151151
The JsInterop contract specifies that a native type may contain only native methods except the ones annotated with `@JsOverlay`.
152-
`@JsOverlay` allows adding a method to a native type (annotated with `@JsType(isNative=true)`) or on a default method of a `@JsFunction` annotated interface . The `@JsOverlay` contract specifies that the methods annotated should be final and should not override any existing native method. The annotated methods will not be accessble from JavaScript and can be used from Java only. `@JsOverlay` can be useful for adding utilities methods that may not be offered by the native type. For example:
152+
`@JsOverlay` allows adding a method to a native type (annotated with `@JsType(isNative=true)`) or on a default method of a `@JsFunction` annotated interface . The `@JsOverlay` contract specifies that the methods annotated should be final and should not override any existing native method. The annotated methods will not be accessible from JavaScript and can be used from Java only. `@JsOverlay` can be useful for adding utilities methods that may not be offered by the native type. For example:
153153

154154
```java
155155
@JsType(isNative = true)

src/main/markdown/doc/latest/DevGuideCodingBasicsOverlay.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function $onModuleLoad(){
183183

184184
This is pretty darn optimized. Even the overhead of the `getFullName()` method went away. In fact, _all_ of the Java method calls went away. When we say that "GWT
185185
gives you affordable abstractions," this is the kind of thing we're talking about. Not only does inlined code run significantly faster, we no longer had to include the function
186-
definitions themselves, thus shrinking the script a litte, too. (To be fair, though, inlining can also easily increase script size, so we're careful to strike a balance between
186+
definitions themselves, thus shrinking the script a little, too. (To be fair, though, inlining can also easily increase script size, so we're careful to strike a balance between
187187
size and speed.) It's pretty fun to look back at the original Java source above and try to reason about the sequence of optimizations the compiler had to perform to end up
188188
here.
189189

0 commit comments

Comments
 (0)