Posts Tagged ‘Code Editor’
Create class from code
Did you know that you can build/modify classes from code? It is actually not so hard, just use the ClassBuild-class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | static void JeDoe_testClassBuild(Args _args) { ClassBuild classBuild; ClassNode classNode; Str myCode; ; myCode = @" static void Main(Args _args) { ; info('Hello World!'); } "; classBuild = new ClassBuild("MyTest", false); classBuild.addMethod("Main", myCode); classNode = classBuild.classNode(); classNode.AOTcompile(); classNode.AOTrun(); } |
The sample above will create a new class MyTest with a ‘Hello World’ Main-method and will actually save compile/save the code in the AOT and then run it. Cool?
Note: The SysDictClass/SysDictMethod-class can also help you creating proper classes and methods. Maybe I’ll blog about this later.
Code Editor – shortcuts
Underneed you find the list of shortcuts I use most in Microsoft Dynamics Ax while developing.
- General (shortcuts I also use outside AX)
- CTRL + S : Save.
- CTRL + C : Copy text to clipboard.
- CTRL + X : Cut text to clipboard.
- CTRL + V : Past text from clipboard.
- CTRL + A : Select all.
- CTRL + LEFT / RIGHT ARROW : Next/Previous word.
- CTRL + SHIFT + LEFT / RIGHT ARROW : Select one word to the left/right.
- CTRL + HOME / END : Go to begin/end of the editor.
- SHIFT + HOME / END : Select text from the cursor to the start/end.
- SHIFT + PAGE-UP / PAGE-DOWN : Select the previous/next page. of the line.
- TAB / SHIFT + TAB : Indent Selection / Remove Indent Selection.
- CTRL + BACKSPACE : Remove previous word.
- CTRL + F : Find.
- F3 : Find Next.
- CTRL + Z / Y : Undo / Redo.
- CTRL (+ SHIFT) + TAB : Next/Previous tab-page.
- Ax specific
- Current Line in the Code Editor
- ALT + L : Select current line.
- CTRL + L : Remove current line.
- Breakpoints
- F9 : Insert / Remove breakpoint.
- SHIFT + F9 : Show all breakpoints.
- CTRL +F9 : Enable / Disable breakpoint.
- CTRL + SHIFT + F9 : Remove all breakpoints.
- Compile / Run
- F5 : run / execute current Job / Class / Form
- CTRL + BREAK : Stop execution.
- Lookup / More Info
- CTRL + ALT + SPACE : Lookup label.
- CTRL + SHIFT + SPACE : Lookup definition (go to the method).
- CTRL + SPACE : Show syntax information.
- Current Line in the Code Editor
And there are more shortcuts. You can find them on MSDN.

