Add tree search, URL deep linking, clipboard copy, and improved X++ syntax highlighting#40
Merged
calebblanchardargano merged 16 commits intomasterfrom Apr 10, 2026
Merged
Conversation
Tree Search: - Search button opens a dialog to enter search text - Recursively walks the tree to find matching nodes (case-insensitive) - Next/Prev buttons navigate between matches with wrap-around - Search state clears when switching to a different object URL Deep Linking: - New ARBAOTBrowserUrlHelper class builds shareable URLs - init() parses ObjectType, ObjectName, TreePath query parameters - Copy Link button in action pane shows the URL in the infolog - URL format: ?mi=ARBAOTBrowser&ObjectType=Table&ObjectName=CustTable Co-authored-by: Copilot <[email protected]>
Replace info()-based Copy Link with a proper browser clipboard copy using a JavaScript extensible control pattern: - ARBClipboardHelperBuild: design-time build class - ARBClipboardHelperControl: runtime control with FormProperty - ARBClipboardHelper form: transient dialog hosting the control - ARBClipboardHelper class: static copyToClipboard() entry point - HTML/JS resources using navigator.clipboard.writeText() The dialog opens briefly when Copy Link is clicked, copies the URL to the browser clipboard via JavaScript, then auto-closes after 2s. Co-authored-by: Copilot <[email protected]>
Extensible control resources (HTML/JS) must be copied to the IIS webroot/resources/ folder for the browser to load them. Add an automatic deployment step to Mount.ps1 that copies resource content from AxResource/ResourceContent/ to the webroot. Co-authored-by: Copilot <[email protected]>
HttpContext::Current is null during form init() in D365FO's SPA architecture. Replace with Global::getClientURLQueryValue() which uses SessionContext to access the original browser URL parameters. Co-authored-by: Copilot <[email protected]>
CopyLinkButton now captures the currently selected tree node path via ARBAOTBrowserUrlHelper::getSelectedTreePath() and includes it as a TreePath parameter in the URL. When opened, the form navigates directly to that tree node. Co-authored-by: Copilot <[email protected]>
Replace dialog-based tree search with inline filter group using the Docentric pattern (DocReportUserDefinedPlaceholderExpressionDesigner). Changes: - Add TreeSearchFilterGroup with StringControl + Prev/Next buttons inside DetailsNavigationList, above the ObjectTree - TreeSearchButton in action pane now toggles filter group visibility - Pre-build ascending/descending search index lists after tree construction (buildSearchTreeItems/buildSearchTreeItemsRecursive) - Use match() for wildcard-aware search via findTreeItem() - Remove old dialog-based methods (treeSearchExecute, treeSearchClear, treeSearchCollectMatches, treeSearchNavigate) Co-authored-by: Copilot <[email protected]>
- Remove ImageOnly display so Search button shows text label - Rewrite findTreeItem to skip-past-current approach instead of fragile +1/-1 index arithmetic - Use strContains for plain text (case-insensitive substring match), reserve match() for wildcard patterns (* and ?) - Change findTreeItem to public for DataControl access Co-authored-by: Copilot <[email protected]>
- Remove NormalImage from Search toggle button (text-only display) - Add enter() override on TreeSearchString so pressing Enter triggers Find Next automatically Co-authored-by: Copilot <[email protected]>
- Remove Search toggle button from action pane (no longer needed) - Show TreeSearchFilterGroup always (remove Visible=No) - Replace enter() with modified() on TreeSearchString so search triggers automatically as the user types and tabs/clicks away Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Replace C#-centric keyword list with accurate X++ keywords
- Add: final, implements, retry, next, firstonly, forupdate, nofetch,
forceselectorder, crosscompany, display, edit, server, client,
ttsbegin/ttscommit/ttsabort, changecompany, mod, div, and more
- Remove 30+ C#-only keywords (async, await, unsafe, stackalloc, etc.)
- Replace type keywords with X++ types (int64, utcdatetime, guid, anytype,
boolean, container, tableId, fieldId, classId, etc.)
- Add XML doc comment (///) highlighting as String.Doc token type
- Add label literal (@sys12345, @module:Label) highlighting as Name.Label
- Add intrinsic function highlighting (classStr, tableStr, enumStr, etc.)
as Name.Builtin with green bold styling
- Add ClassName:: static access highlighting (class name as Name.Class)
- Separate operators from punctuation for distinct visual styling
- Add macro usage (#MacroName) highlighting as Comment.Preproc
- Add additional preprocessor directives (globaldefine, defjob, etc.)
Co-authored-by: Copilot <[email protected]>
- Add XML doc summary to ARBClipboardHelperBuild and ARBClipboardHelperControl - Fix HTML-encoded summary tags in ARBClipboardHelper and ARBAOTBrowserUrlHelper - Change ARBClipboardHelperControl constructor from public to protected - Remove unnecessary strFmt() call on label with no format args - Add missing returns tag on TreeSearchString.modified() doc header Co-authored-by: Copilot <[email protected]>
Cross-referenced our lexer against the official Tokens enum from Microsoft.Dynamics.Framework.Tools.LanguageService.Parser and added 15 missing keywords: - event, eventhandler (event handling) - firstonly100, firstonly1000 (select hints) - from (insert_recordset ... from) - generateonly (select modifier) - hint, index (index hint) - optimisticlock, pessimisticlock, repeatableread (concurrency) - print (debug output) - reverse (select ordering) - set, unchecked (misc keywords) Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four major features to the AOT Browser to improve navigation, shareability, and code readability.
Features
🔍 Tree Search
🔗 URL Deep Linking & Clipboard Copy
ObjectType,ObjectName, andTreePathparameters for node-level navigationnavigator.clipboard.writeText()for clipboard accessGlobal::getClientURLQueryValue()to restore the exact view🎨 X++ Syntax Highlighting Improvements
XPlusPlusLexer.cswith proper X++ token rules:ttsbegin/ttscommit,changecompany,container, etc.)select,firstonly,forupdate,join,where,order by, etc.)classStr,tableNum,fieldNum, etc.) highlighted as builtins'strings') and@"verbatim strings"///) distinguished from regular commentsTokensenum — added 15 missing keywords🛠️ Other
Files Changed
XPlusPlusLexer.cs— rewritten lexer rules (~140 lines changed)ARBAOTBrowser.xml— form logic for search, deep linking, copy link (~300 lines added)