-
Notifications
You must be signed in to change notification settings - Fork 382
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
Update and improve help info logs #10081
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
package com.google.gwt.dev.javac; | ||
|
||
import com.google.gwt.dev.jdt.SafeASTVisitor; | ||
import com.google.gwt.dev.util.InstalledHelpInfo; | ||
import com.google.gwt.dev.util.GwtprojectOrgHelpInfo; | ||
import com.google.gwt.dev.util.collect.Stack; | ||
|
||
import org.eclipse.jdt.core.compiler.CharOperation; | ||
|
@@ -43,16 +43,14 @@ | |
* Check a compilation unit for violations of | ||
* {@link com.google.gwt.core.client.JavaScriptObject JavaScriptObject} (JSO) | ||
* restrictions. The restrictions are summarized in | ||
* <code>jsoRestrictions.html</code>. | ||
* | ||
* | ||
* @see <a href="https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html">jsoRestrictions.html</a>. | ||
* Any violations found are attached as errors on the | ||
* CompilationUnitDeclaration. | ||
* | ||
* @see <a | ||
* href="http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes">Overlay | ||
* types design doc</a> | ||
* @see jsoRestrictions.html | ||
* @see <a href="https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html">jsoRestrictions.html</a> | ||
*/ | ||
public class JSORestrictionsChecker { | ||
|
||
|
@@ -288,8 +286,8 @@ static String errAlreadyImplemented(String intfName, String impl1, | |
|
||
private static void errorOn(ASTNode node, CompilationUnitDeclaration cud, | ||
String error) { | ||
GWTProblem.recordError(node, cud, error, new InstalledHelpInfo( | ||
"jsoRestrictions.html")); | ||
GWTProblem.recordError(node, cud, error, new GwtprojectOrgHelpInfo( | ||
"/doc/latest/DevGuideCodingBasicsJSNI.html")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not link to the jsoRestrictions.html file that was moved? |
||
} | ||
|
||
private final CompilationUnitDeclaration cud; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2025 GWT Project Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package com.google.gwt.dev.util; | ||
|
||
import com.google.gwt.core.ext.TreeLogger; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
/** | ||
* Reference to a help document on the GWT project website. | ||
*/ | ||
public class GwtprojectOrgHelpInfo extends TreeLogger.HelpInfo { | ||
private URL url; | ||
|
||
public GwtprojectOrgHelpInfo(String relativeUrl) { | ||
try { | ||
url = new URL("https://gwtproject.org" + relativeUrl); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All constructor calls seem to start with /doc/latest/gwt-dev-help/, can we include that in the path here? If we ever want an absolute link to somewhere else, we could have a factory method for "help(pagename)" vs "article(path)"? |
||
} catch (MalformedURLException ignored) { | ||
// ignore, url will be null | ||
} | ||
} | ||
|
||
@Override | ||
public URL getURL() { | ||
return url; | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could point to the same file after moving it.