Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos #392

Merged
merged 5 commits into from
Apr 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/com/google/gwt/site/markdown/MDHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public MDHelper create() throws MDHelperException {

// read template TOC if parameter is provided
if (templateTocFile != null) {
templateToc = MDTranslater.markDownToHtml(readFile(templateTocFile));
templateToc = MDTranslator.markDownToHtml(readFile(templateTocFile));
}

created = true;
Expand All @@ -121,7 +121,7 @@ private String readFile(String filePath) throws MDHelperException {
}
}

public void translate() throws TranslaterException {
public void translate() throws TranslatorException {

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

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

new MDTranslater(tocCreator, new MarkupWriter(outputDirectoryFile), template)
new MDTranslator(tocCreator, new MarkupWriter(outputDirectoryFile), template)
.render(mdRoot);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.util.List;
import java.util.Set;

public class MDTranslater {
public class MDTranslator {
private static final String SEPARATOR = File.separator;


Expand All @@ -39,17 +39,17 @@ public class MDTranslater {

private final String template;

public MDTranslater(TocCreator tocCreator, MarkupWriter writer, String template) {
public MDTranslator(TocCreator tocCreator, MarkupWriter writer, String template) {
this.tocCreator = tocCreator;
this.writer = writer;
this.template = template;
}

public void render(MDParent root) throws TranslaterException {
public void render(MDParent root) throws TranslatorException {
renderTree(root, root);
}

private void renderTree(MDNode node, MDParent root) throws TranslaterException {
private void renderTree(MDNode node, MDParent root) throws TranslatorException {

if (node.isFolder()) {
MDParent mdParent = node.asFolder();
Expand Down Expand Up @@ -125,11 +125,11 @@ protected String adjustRelativePath(String html, String relativePath) {
"$1='" + relativePath + "$3'");
}

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

}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/google/gwt/site/markdown/MarkDown.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

public class MarkDown {

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

if (args.length < 3) {
System.out.println("Usage MarkDown <sourceDir> <outputDir> <templateFile> [templateTOC]");
Expand Down Expand Up @@ -45,7 +45,7 @@ public static void main(String[] args) throws MDHelperException, TranslaterExcep
} catch (MDHelperException e) {
e.printStackTrace();
throw e;
} catch (TranslaterException e) {
} catch (TranslatorException e) {
e.printStackTrace();
throw e;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/google/gwt/site/markdown/MarkupWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public MarkupWriter(File rootFile) {
this.rootFile = rootFile;
}

public void writeHTML(MDNode node, String html) throws TranslaterException {
public void writeHTML(MDNode node, String html) throws TranslatorException {

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

}
}

private void ensureDirectory(File dir) throws TranslaterException {
private void ensureDirectory(File dir) throws TranslatorException {
if (!dir.exists()) {
boolean created = dir.mkdir();
if (!created) {
throw new TranslaterException("can not create directory: '" + dir + "'");
throw new TranslatorException("can not create directory: '" + dir + "'");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
*/
package com.google.gwt.site.markdown;

public class TranslaterException extends Exception {
public class TranslatorException extends Exception {

/**
*
*/
private static final long serialVersionUID = 1732290113260995362L;

public TranslaterException(String message, Throwable e1) {
public TranslatorException(String message, Throwable e1) {
super(message, e1);
}

public TranslaterException(String string) {
public TranslatorException(String string) {
super(string);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package com.google.gwt.site.markdown.fs;

import com.google.gwt.site.markdown.TranslaterException;
import com.google.gwt.site.markdown.TranslatorException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
Expand Down Expand Up @@ -89,7 +89,7 @@ public String getName() {
}
}

public MDParent traverse(File file) throws TranslaterException {
public MDParent traverse(File file) throws TranslatorException {
MDParent mdParent = traverse(null, file, 0, "");
removeEmptyDirs(mdParent);

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

private void readConfig(MDParent current) throws TranslaterException {
private void readConfig(MDParent current) throws TranslatorException {

if (current.getConfigFile() != null) {
FolderConfig config = parseConfig(current.getConfigFile());
Expand Down Expand Up @@ -178,7 +178,7 @@ private void removeEmptyDirs(MDParent current) {
}

private MDParent traverse(MDParent parent, File file, int depth, String path)
throws TranslaterException {
throws TranslatorException {

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

}

private FolderConfig parseConfig(File file) throws TranslaterException {
private FolderConfig parseConfig(File file) throws TranslatorException {
DocumentBuilder builder;
List<String> excludeList = new LinkedList<String>();

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

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

Expand Down Expand Up @@ -277,11 +277,11 @@ private FolderConfig parseConfig(File file) throws TranslaterException {
}

} catch (ParserConfigurationException e) {
throw new TranslaterException("can not construct xml parser", e);
throw new TranslatorException("can not construct xml parser", e);
} catch (SAXException e) {
throw new TranslaterException("error while parsing xml", e);
throw new TranslatorException("error while parsing xml", e);
} catch (IOException e) {
throw new TranslaterException("can not read file", e);
throw new TranslatorException("can not read file", e);
}

return new FolderConfig(href, excludeList, folderEntries);
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/articles/mvp-architecture-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public class ContactsViewColumnDefinitions<ContactDetails> {
});
}

public List<ColumnDefinition<ContactDetails>> getColumnDefnitions() {
public List<ColumnDefinition<ContactDetails>> getColumnDefinitions() {
return columnDefinitions;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideAutoBeans.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Maps are serialized in two forms based on whether or not the key type is a value
```json
{ "1" : { "property" : "value"}, "55" : { "property" : "value" } }
```
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:
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:

```json
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fn(40); // will return 42!
## Adding additional utility methods to a native type

The JsInterop contract specifies that a native type may contain only native methods except the ones annotated with `@JsOverlay`.
`@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:
`@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:

```java
@JsType(isNative = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function $onModuleLoad(){

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
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
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
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
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
here.

Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideI18nPluralForms.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ the count is 0, `"Nobody is here"` is chosen; if the count is 3,
`"{1}, {2}, and one other are here"` is chosen because 2 is subtracted
from the count before looking up the plural form to use.

BTW, we know it is somewhat klunky to have to pass in the names this way.
BTW, we know it is somewhat clunky to have to pass in the names this way.
In the future, we will add a way of referencing elements in the list/array
from the placeholders, where you could simply call `peopleHere(names)`.

Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideLightweightMetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The [Debug Panel for GWT](http://code.google.com/p/gwt-debug-panel/), developed

The Lightweight Metrics system is composed of sets of events that you're interested in tracking and a global collector method that is responsible for evaluating these events and reporting metrics.

For example, when loading a GWT application, the steps involved in the process consist of bootstrapping the application, loading external references, and starting up the GWT module. Each of these steps further break down into dowloading the bootstrap script, selecting the right permutation of your application to load, fetching the permutation, and so on. This is illustrated in the [Lightweight Metrics design doc](http://code.google.com/p/google-web-toolkit/wiki/LightweightMetricsDesign) (see GWT Startup Process diagram). Each of the smaller steps, like selecting the correct permutation of the application to load, can be represented as events you would like to measure in the overall application load time. The events themselves are standard JSON objects that contain the following information:
For example, when loading a GWT application, the steps involved in the process consist of bootstrapping the application, loading external references, and starting up the GWT module. Each of these steps further break down into downloading the bootstrap script, selecting the right permutation of your application to load, fetching the permutation, and so on. This is illustrated in the [Lightweight Metrics design doc](http://code.google.com/p/google-web-toolkit/wiki/LightweightMetricsDesign) (see GWT Startup Process diagram). Each of the smaller steps, like selecting the correct permutation of the application to load, can be represented as events you would like to measure in the overall application load time. The events themselves are standard JSON objects that contain the following information:

```javascript
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideOrganizingProjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ the path prefix up to and including `jre`. As a result, `com/google/myproject/gw
The GWT project uses this technique internally for the JRE emulation
classes provided with GWT. One caveat specific to overriding JRE classes in
this way is that they will never actually be used in development mode. In
development mode, the native JRE classes always supercede classes compiled
development mode, the native JRE classes always supersede classes compiled
from source.

The `<super-source>` element supports [pattern-based
Expand Down
4 changes: 2 additions & 2 deletions src/main/markdown/doc/latest/DevGuideRequestFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ as _transportable types_. Each client-side transportable type is mapped to a se

In determining whether or not a client-side method defined in a proxy or
context type is a valid mapping for a domain method, the client types are
converted to ther domain equivalent and regular Java type assignability rules
converted to their domain equivalent and regular Java type assignability rules
are considered.

A proxy type will be available on the client if it is:
Expand Down Expand Up @@ -399,7 +399,7 @@ formally implement the RequestContext interface. The name and argument list for
each method is the same on client and server, with the following mapping
rules:

* Client side methods that return `Reques<T>`return only T on the server. For example, a method
* Client side methods that return `Request<T>`return only T on the server. For example, a method
that returns `Request<String>` in the client interface simply returns String on the server.
* EntityProxy types become the domain entity type on the server, so a method that returns
`Request<List<EmployeeProxy>>` will just return `List<Employee>` on the server.
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideSecurityRpcXsrf.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ package com.example.foo.client;
}
```

Method level annotations override RPC interface level annoatations. If no
Method level annotations override RPC interface level annotations. If no
annotations are present and the RPC interface contains a method that returns
[`RpcToken`](/javadoc/latest/com/google/gwt/user/client/rpc/RpcToken.html) or its implementation, then XSRF token validation is
performed on all methods of that interface except for the method returning
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideUiBinder.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ aren't forced to pay the widget tax just to have templates.
</ui:UiBinder>
```

Now suppose you need to programatically read and write the text in the
Now suppose you need to programmatically read and write the text in the
span (the one with the `ui:field='nameSpan'` attribute) above. You'd
probably like to write actual Java code to do things like that, so
UiBinder templates have an associated owner class that allows
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideUiBinderI18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ examples.
**Original**

```html
<th title="Gross recipts">Gross</th>
<th title="Gross receipts">Gross</th>
```

**Tagged**
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideUiCellWidgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ CellBrowser is similar to a CellTree but displays the node levels side-by-side.
CellBrowser browser = new CellBrowser(model, "Item 1");
```

**Code Example #1** - For a simple example of CellBrowser, see [CellBrowerExample.java](https://github.com/gwtproject/gwt/blob/main/user/javadoc/com/google/gwt/examples/cellview/CellBrowserExample.java).
**Code Example #1** - For a simple example of CellBrowser, see [CellBrowserExample.java](https://github.com/gwtproject/gwt/blob/main/user/javadoc/com/google/gwt/examples/cellview/CellBrowserExample.java).

**Code Example #2** - For a real-world example of CellBrowser, see [CellBrowserExample2.java](https://github.com/gwtproject/gwt/blob/main/user/javadoc/com/google/gwt/examples/cellview/CellBrowserExample2.java).

Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/DevGuideUiCustomCells.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ The process for adding event support is as follows:
2. Override the
[Cell#onBrowserEvent()](/javadoc/latest/com/google/gwt/cell/client/Cell.html#onBrowserEvent-com.google.gwt.cell.client.Cell.Context-com.google.gwt.dom.client.Element-C-com.google.gwt.dom.client.NativeEvent-com.google.gwt.cell.client.ValueUpdater-) method to handle the event. For some events, you may want to look at the event target before deciding how to handle the event.
In the example below, we only respond to click events that actually occur on the rendered div.
3. As described in the example comments below, the `onEnterKeyDown()` method is a special case convience method in AbstractCell that helps to provide
3. As described in the example comments below, the `onEnterKeyDown()` method is a special case convenience method in AbstractCell that helps to provide
a unified user experience, such that all Cells that respond to events can be activated by selecting the Cell with the keyboard and pressing enter. Otherwise,
users would not be able to interact with the Cell without using the mouse. The convention followed by GWT cells is to toggle editing when the enter key is
pressed, but you are free to define the behavior for your app. Your cell's getConsumedEvents() method must include "keydown" in order for AbstractCell to call
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/RefCommandLineTools.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Use the files generated by these scripts as a starting point for building your o
| ------------------------ | ---------- |
| -[no]overwriteFiles | Overwrite any existing files. (defaults to OFF)
| -[no]ignoreExistingFiles | Ignore any existing files; do not overwrite. (defaults to OFF)
| -templates | Specifies the template(s) to use (comma separeted). Defaults to 'sample,ant,eclipse,readme'
| -templates | Specifies the template(s) to use (comma separated). Defaults to 'sample,ant,eclipse,readme'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't generate the docs at this time, so changing it here first seems fine to me.

| -out | The directory to write output files into (defaults to current)
| -junit | Specifies the path to your junit.jar (optional)
| -[no]maven | DEPRECATED: Create a maven2 project structure and pom file (default disabled). Equivalent to specifying 'maven' in the list of templates. (defaults to OFF)
Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/tutorial/JUnit.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ with the path to junit on your system.
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 37.042 sec
```

### In Eclipse (using the Google Pluging for Eclipse)
### In Eclipse (using the Google Plugin for Eclipse)

The Google Plugin for Eclipse makes it easy to run tests in Eclipse.

Expand Down
2 changes: 1 addition & 1 deletion src/main/markdown/doc/latest/tutorial/clientserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Note: There is a variety of public sources of JSON-formatted data you can practi

## Making Asynchronous Calls

Whether you use GWT RPC or get JSON data via HTTP, all the calls you make from the HTML page to the server are asychronous.
Whether you use GWT RPC or get JSON data via HTTP, all the calls you make from the HTML page to the server are asynchronous.
This means they do not block while waiting for the call to return.
The code following the call executes immediately.
When the call completes, the callback method you specified when you made the call will execute.
Expand Down
Loading