Skip to content

Commit 7746d37

Browse files
author
Stewart Miles
committed
Added links to documentation from the menu.
Menu links to per-component and project documentation. Bug: 132072231 Change-Id: Id47da9e8e8d85955fb95535a2de28ea2830be0cf
1 parent 6858f73 commit 7746d37

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

source/IOSResolver/src/IOSResolver.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,14 @@ exception is TypeInitializationException ||
703703
}
704704
}
705705

706+
/// <summary>
707+
/// Link to the documentation.
708+
/// </summary>
709+
[MenuItem("Assets/Play Services Resolver/iOS Resolver/Documentation")]
710+
public static void OpenDocumentation() {
711+
Application.OpenURL(VersionHandlerImpl.DocumentationUrl("#ios-resolver-usage"));
712+
}
713+
706714
// Display the iOS resolver settings menu.
707715
[MenuItem("Assets/Play Services Resolver/iOS Resolver/Settings")]
708716
public static void SettingsDialog() {

source/PlayServicesResolver/src/PlayServicesResolver.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,14 @@ private static void NotAvailableDialog() {
15531553

15541554
}
15551555

1556+
/// <summary>
1557+
/// Link to the documentation.
1558+
/// </summary>
1559+
[MenuItem("Assets/Play Services Resolver/Android Resolver/Documentation")]
1560+
public static void OpenDocumentation() {
1561+
Application.OpenURL(VersionHandlerImpl.DocumentationUrl("#android-resolver-usage"));
1562+
}
1563+
15561564
/// <summary>
15571565
/// Add a menu item for resolving the jars manually.
15581566
/// </summary>

source/VersionHandlerImpl/src/VersionHandlerImpl.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,6 +1693,32 @@ internal static void Log(string message, bool verbose = false,
16931693
logger.Log(message, level: verbose ? LogLevel.Verbose : level);
16941694
}
16951695

1696+
/// <summary>
1697+
/// Generate a documentation URL.
1698+
/// </summary>
1699+
/// <param name="subsection">String to add to the URL.</param>
1700+
/// <returns>URL</returns>
1701+
internal static string DocumentationUrl(string subsection) {
1702+
return String.Format("{0}{1}", "https://github.com/googlesamples/unity-jar-resolver",
1703+
subsection);
1704+
}
1705+
1706+
/// <summary>
1707+
/// Link to the project documentation.
1708+
/// </summary>
1709+
[MenuItem("Assets/Play Services Resolver/Documentation")]
1710+
public static void OpenProjectDocumentation() {
1711+
Application.OpenURL(VersionHandlerImpl.DocumentationUrl("#overview"));
1712+
}
1713+
1714+
/// <summary>
1715+
/// Link to the documentation.
1716+
/// </summary>
1717+
[MenuItem("Assets/Play Services Resolver/Version Handler/Documentation")]
1718+
public static void OpenDocumentation() {
1719+
Application.OpenURL(VersionHandlerImpl.DocumentationUrl("#version-handler-usage"));
1720+
}
1721+
16961722
/// <summary>
16971723
/// Add the settings dialog for this module to the menu and show the
16981724
/// window when the menu item is selected.

0 commit comments

Comments
 (0)