Skip to content

Commit 4746df9

Browse files
authored
Update links to source code, fix heading levels (#365)
1 parent ae15804 commit 4746df9

33 files changed

+106
-89
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private String getEditUrl(String path) {
9393
}
9494

9595
int index = path.indexOf(SEPARATOR + "src" + SEPARATOR);
96-
return "<a class=\"icon_editGithub\" href=\"https://github.com/gwtproject/gwt-site/edit/master/"
96+
return "<a class=\"icon_editGithub\" href=\"https://github.com/gwtproject/gwt-site/edit/main/"
9797
+ path.substring(index + 1).replace(SEPARATOR, "/") + "\"></a>";
9898
}
9999

src/main/markdown/community-group-charter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h2>Welcome to the GWT Discussion Group!</h2>
1+
# Welcome to the GWT Discussion Group!
22

33
The GWT (GWT) allows developers to use the Java programming language to build no-compromise AJAX applications. This is the official discussion forum for GWT.
44

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ background-position: left 4px top 10px;
571571
ImageResource logo();
572572
```
573573

574-
* [Current auto-RTL test cases](https://gwt.googlesource.com/gwt/+/master/user/test/com/google/gwt/resources/rg)
574+
* [Current auto-RTL test cases](https://github.com/gwtproject/gwt/blob/main/user/test/com/google/gwt/resources/rg)
575575

576576
#### Selector obfuscation<a id="Selector_obfuscation"></a>
577577

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ rules are pulled into the module build through `<inherits>` elements.
5757
For example, the following configuration invokes deferred binding for the [PopupPanel](/javadoc/latest/com/google/gwt/user/client/ui/PopupPanel.html) widget:
5858

5959
* Top level `<module>.gwt.xml` _**inherits**_
60-
[com.google.gwt.user.User](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/User.gwt.xml)
61-
* [com/google/gwt/user/User.gwt.xml](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/User.gwt.xml) _**inherits**_ [com.google.gwt.user.Popup](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/Popup.gwt.xml)
62-
* [com/google/gwt/user/Popup.gwt.xml](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/Popup.gwt.xml) _**contains**_ `<replace-with>` elements to define deferred binding rules for the [PopupPanel](/javadoc/latest/com/google/gwt/user/client/ui/PopupPanel.html) class.
60+
[com.google.gwt.user.User](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/User.gwt.xml)
61+
* [com/google/gwt/user/User.gwt.xml](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/User.gwt.xml) _**inherits**_ [com.google.gwt.user.Popup](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/Popup.gwt.xml)
62+
* [com/google/gwt/user/Popup.gwt.xml](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/Popup.gwt.xml) _**contains**_ `<replace-with>` elements to define deferred binding rules for the [PopupPanel](/javadoc/latest/com/google/gwt/user/client/ui/PopupPanel.html) class.
6363

6464
Inside the [PopupPanel](/javadoc/latest/com/google/gwt/user/client/ui/PopupPanel.html) module XML file, there
6565
happens to be some rules defined for deferred binding. In this case, we're using a replacement rule.
@@ -151,9 +151,9 @@ client will download based on its browser environment.
151151
The following is an example of how a deferred binding generator is specified to the compiler in the [module XML file](DevGuideOrganizingProjects.html#DevGuideModuleXml)
152152
hierarchy for the `RemoteService` class - used for GWT-RPC:
153153

154-
* Top level `<module>.gwt.xml` _**inherits**_ [com.google.gwt.user.User](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/User.gwt.xml)
155-
* [com/google/gwt/user/User.gwt.xml](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/User.gwt.xml) _**inherits**_ [com.googl.gwt.user.RemoteService](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/RemoteService.gwt.xml)
156-
* [com/google/gwt/user/RemoteService.gwt.xml](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/RemoteService.gwt.xml) _**contains**_ `<generates-with>` elements to define deferred binding rules for the `RemoteService` class.
154+
* Top level `<module>.gwt.xml` _**inherits**_ [com.google.gwt.user.User](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/User.gwt.xml)
155+
* [com/google/gwt/user/User.gwt.xml](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/User.gwt.xml) _**inherits**_ [com.googl.gwt.user.RemoteService](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/RemoteService.gwt.xml)
156+
* [com/google/gwt/user/RemoteService.gwt.xml](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/RemoteService.gwt.xml) _**contains**_ `<generates-with>` elements to define deferred binding rules for the `RemoteService` class.
157157

158158
## Generator Configuration in Module XML<a id="generator"></a>
159159

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ or specifying `locale=` as a query string. In this case, you could write your ow
159159

160160
A property provider is specified in the [module XML file](DevGuideOrganizingProjects.html#DevGuideModuleXml) as a JavaScript fragment that will return the value for the
161161
named property at runtime. In this case, you would want to define the locale property using a property provider. To see examples of `<property-provider>` definitions
162-
in action, see the files [I18N.gwt.xml](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/i18n/I18N.gwt.xml) and
163-
[UserAgent.gwt.xml](https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/UserAgent.gwt.xml) in the GWT source code.
162+
in action, see the files [I18N.gwt.xml](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/i18n/I18N.gwt.xml) and
163+
[UserAgent.gwt.xml](https://github.com/gwtproject/gwt/blob/main/user/src/com/google/gwt/user/UserAgent.gwt.xml) in the GWT source code.
164164

165165
## Programmatic Access to Locale Information<a id="LocaleInfo"></a>
166166

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ value in a properties file.
121121

122122
See the next item for another use of Exact Values.
123123

124-
## Offsets<a id="Offsets"><a>
124+
## Offsets<a id="Offsets"></a>
125125

126126
In some cases, you may want to alter the count before applying the plural
127127
rules to it. For example, if you are saying `"Bob, Joe, and 3 others ate

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Linkers<a id="DevGuideLinkers-intro"></a>
1+
# Linkers<a id="DevGuideLinkers-intro"></a>
22

33
The Linker subsystem takes care of writing the GWT compiler's output. It's responsible for each output file's name, location, and content.
44

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,30 @@ You build and run LogExample the same way you would build and run any of the oth
4343

4444
[![Logging Example web page](images/LoggingExample.png)](images/LoggingExample.png)
4545

46-
LogExample is configured using [`LogExample.gwt.xml`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/LogExample.gwt.xml).
47-
The entry point for the app is [`LogExample.java`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/LogExample.java) &mdash; it simply creates and adds the various demo modules to the page. Each of these modules illustrates a different set of logging concepts; this tutorial will walk you through them.
46+
LogExample is configured using [`LogExample.gwt.xml`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/LogExample.gwt.xml).
47+
The entry point for the app is [`LogExample.java`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/LogExample.java) &mdash; it simply creates and adds the various demo modules to the page. Each of these modules illustrates a different set of logging concepts; this tutorial will walk you through them.
4848

4949
## Loggers, Handlers and the Root Logger<a id="Loggers_Handlers_and_the_Root_Logger"></a>
5050

5151
Loggers are organized in a tree structure, with the Root Logger at the root of the tree. Parent/Child relationships are determined by the name of the logger, using "." to separate sections of the name. So if we have two loggers Foo.Bar and Foo.Baz, then they are siblings, with their parent being the logger named Foo. The Foo logger (and any logger with a name which does not contain a dot ".") has the Root Logger as a parent.
5252

5353
When you log a message to a logger, if the Level of the message is high enough, it will pass the message on to its parent, which will pass it on to its parent, and so on, until the Root Logger is reached. Along the way, any given logger (including the Root Logger) will also pass the message to any of its Handlers, and if the Level of the message is high enough, those handlers will output the message in some way (to a popup, to stderr, etc.). For a much more detailed explanation of this, see [http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html](http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html).
5454

55-
If you open [`LogExample.java`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/LogExample.java) you can see that we've created 3 loggers:
55+
If you open [`LogExample.java`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/LogExample.java) you can see that we've created 3 loggers:
5656

5757
```
58-
// <a href="https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/LogExample.java">LogExample.java</a>
58+
// <a href="https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/LogExample.java">LogExample.java</a>
5959
6060
private static Logger childLogger = Logger.getLogger("ParentLogger.Child");
6161
private static Logger parentLogger = Logger.getLogger("ParentLogger");
6262
private static Logger rootLogger = Logger.getLogger("");
6363
```
6464

65-
We've passed these 3 loggers into [`LoggerController`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/LoggerController.java), which in turn, creates an instance of
66-
[`OneLoggerController`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/OneLoggerController.java) for each of them. In `OneLoggerController.java` you can see example code for changing the Level of the logger, logging to the logger, and logging an exception to the logger.
65+
We've passed these 3 loggers into [`LoggerController`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/LoggerController.java), which in turn, creates an instance of
66+
[`OneLoggerController`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/OneLoggerController.java) for each of them. In `OneLoggerController.java` you can see example code for changing the Level of the logger, logging to the logger, and logging an exception to the logger.
6767

6868
```
69-
// <a href="https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/OneLoggerController.java">OneLoggerController</a>
69+
// <a href="https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/OneLoggerController.java">OneLoggerController</a>
7070
7171
// Change the level of the logger
7272
@UiHandler("levelTextBox")
@@ -125,7 +125,7 @@ GWT logging comes with a set of Handlers already defined and (by default) attach
125125
Here's an example of how a checkbox adds or removes a handler:
126126

127127
```
128-
// <a href="https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/HandlerController.java">HandlerController.java</a>
128+
// <a href="https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/HandlerController.java">HandlerController.java</a>
129129
130130
public void onValueChange(ValueChangeEvent<Boolean> event) {
131131
if (checkbox.getValue()) {
@@ -158,7 +158,7 @@ Once we have one of these widgets, we simply pass it into the constructor
158158
of a `HasWidgetsLogHandler` and add that Handler to a logger.
159159

160160
```
161-
// <a href="https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/user/client/ui/VerticalPanel.java">VerticalPanel.java</a>
161+
// <a href="https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/user/src/com/google/gwt/user/client/ui/VerticalPanel.java">VerticalPanel.java</a>
162162
163163
VerticalPanel customLogArea;
164164
@@ -175,14 +175,14 @@ Although GWT emulates java.util.logging, it is important to understand the diffe
175175

176176
To make this clear, the client-side GWT code has a Root Logger (and logger hierarchy) that is separate from the server-side code; all of the handlers discussed above are only applicable to client-side code. If code shared by the client and server makes logging calls, then which Root Logger (and logger hierarchy) it logs to will depend on whether it is being executed on the client or server side. You should not add or manipulate Handlers in shared code, since this will not work as expected.
177177

178-
In [`ServerLoggingArea.java`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/ServerLoggingArea.java), you can experiment with these concepts. The buttons in that section will trigger logging calls on the server, as well as logging calls in [`SharedClass.java`](https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/shared/SharedClass.java) from both the client and server side. Note the slight differences in formatting between client-side and server-side logging, as well as the different handlers each is logged to (in the tutorial, server-side logging will simply log to stderr, while client-side logging will log to all of the Handlers discussed above).
178+
In [`ServerLoggingArea.java`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/ServerLoggingArea.java), you can experiment with these concepts. The buttons in that section will trigger logging calls on the server, as well as logging calls in [`SharedClass.java`](https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/shared/SharedClass.java) from both the client and server side. Note the slight differences in formatting between client-side and server-side logging, as well as the different handlers each is logged to (in the tutorial, server-side logging will simply log to stderr, while client-side logging will log to all of the Handlers discussed above).
179179

180180
## Remote Logging<a id="Remote_Logging"></a>
181181

182182
In order for events that are logged by client-side code to be stored on the server side, you need to use a `RemoteLogHandler`. This handler will send log messages to the server, where they will be logged using the server-side logging mechanism. GWT currently contains a `SimpleRemoteLogHandler` which will do this in the simplest possible way (using GWT-RPC) and no intelligent batching, exponential backoffs in case of failure, and so forth. This logger is disabled by default, but you can enable it in the .gwt.xml file (see the section on Handlers above for more details on configuring the default Handlers).
183183

184184
```
185-
# <a href="https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/LogExample.gwt.xml">LogExample.gwt.xml</a>
185+
# <a href="https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/LogExample.gwt.xml">LogExample.gwt.xml</a>
186186
187187
<set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED" />
188188
```
@@ -204,7 +204,7 @@ Code that normally compiles out will still be present in Development mode. You
204204

205205
```
206206
207-
// <a href="https://gwt.googlesource.com/gwt/+/master/samples/logexample/src/com/google/gwt/sample/logexample/client/CustomLogArea.java">VerticalPanel.java</a>
207+
// <a href="https://github.com/gwtproject/gwt/blob/3c49dc1b8ac1116d3436e87637c1daeb107d7ea3/samples/logexample/src/com/google/gwt/sample/logexample/client/CustomLogArea.java">VerticalPanel.java</a>
208208
209209
// Although this code will compile out without this check in web mode, the guard will ensure
210210
// that the handler does not show up in development mode.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Specify the implementation class in .gwt.xml:
220220

221221
You can use `<when-property-is>` to specify different
222222
implementations based on user.agent, locale, or other properties you
223-
define. The [mobilewebapp](https://gwt.googlesource.com/gwt/+/master/samples/mobilewebapp/)
223+
define. The [mobilewebapp](https://github.com/gwtproject/gwt/blob/main/samples/mobilewebapp/)
224224
sample application defines a "formfactor" property used to
225225
select a different view implementations for mobile, tablet, and desktop devices.
226226

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

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,50 +60,63 @@ entity can be persisted to a data store such as a relational database or the
6060
Google App Engine Datastore. In persistence frameworks like JDO and JPA,
6161
entities are annotated with @Entity. RequestFactory does not require the use of
6262
any particular framework or annotations on your domain classes. Here's part of
63-
an entity definition from the [Expenses
64-
sample application](https://gwt.googlesource.com/gwt/+/master/samples/expenses) found in the GWT distribution.
63+
an entity definition from the [Mobile
64+
web application](https://github.com/gwtproject/gwt/blob/main/samples/mobilewebapp) found in the GWT distribution.
6565

6666
```
67-
package com.google.gwt.sample.expenses.server.domain;
67+
package com.google.gwt.sample.mobilewebapp.server.domain;
6868
6969
/**
70-
* The Employee domain object.
70+
* A task used in the task list.
7171
*/
7272
@Entity
73-
public class Employee {
73+
public class Task {
7474
75-
@Size(min = 3, max = 30)
76-
private String userName;
77-
78-
private String department;
75+
@Id
76+
Long id;
7977
80-
@NotNull
81-
private String displayName;
78+
private Date dueDate;
8279
83-
private String password;
80+
@NotNull(message = "You must specify a name")
81+
@Size(min = 3, message = "Name must be at least 3 characters long")
82+
private String name;
8483
85-
@JoinColumn
86-
private Long supervisorKey;
84+
private String notes;
8785
88-
@Id
89-
@Column(name = "id")
90-
@GeneratedValue(strategy = GenerationType.IDENTITY)
91-
private Long id;
86+
/**
87+
* The unique ID of the user who owns this task.
88+
*/
89+
@Index
90+
private String userId;
9291
93-
@Version
94-
@Column(name = "version")
95-
private Integer version;
92+
/**
93+
* Get the due date of the Task.
94+
*/
95+
public Date getDueDate() {
96+
return dueDate;
97+
}
9698
97-
@Transient
98-
private Employee supervisor;
99+
/**
100+
* Get the unique ID of the Task.
101+
*/
102+
public Long getId() {
103+
return id;
104+
}
99105
100-
public String getDepartment() {
101-
return department;
106+
/**
107+
* Get the name of the Task.
108+
*/
109+
public String getName() {
110+
return name;
102111
}
103112
104-
public String getDisplayName() {
105-
return this.displayName;
113+
/**
114+
* Get the notes associated with the task.
115+
*/
116+
public String getNotes() {
117+
return notes;
106118
}
119+
107120
...
108121
}
109122
```
@@ -684,7 +697,7 @@ any method invocation will result in changes being sent to the server.
684697

685698
Changes to related entities can be persisted in a single request.
686699
For example, this code from the
687-
[DynatableRF sample app](https://gwt.googlesource.com/gwt/+/master/samples/dynatablerf) in GWT trunk creates a new Person and Address at the same time:
700+
[DynatableRF sample app](https://github.com/gwtproject/gwt/tree/main/samples/dynatablerf) in GWT trunk creates a new Person and Address at the same time:
688701

689702
```
690703
PersonRequest context = requestFactory.personRequest();

0 commit comments

Comments
 (0)