AxGoToDeclaration

Download
A handy tool for Dynamics Ax Developers
 * Version 1.1.2 (by Miker) - download
 * Version 1.1.1 - download
 * Version 1.1 - download

Purpose
Finds the declaration of the selected variable and opens the editor on the line with the declaration

New features (by Miker)

 * View name of variables object, not going to declaration
 * Open object in separate window for viewing properties and methods of object
 * Friendly interface

Version 1.1.1
Now you can go back to the place that you performed the GoToDeclaration from. (A separate function must be added into EditorScripts for this) Fixed a small bug with selected variable name parsing.

Version 1.1
Searches the current method first. If the declaration is not found, goes to the root of the object and looks in the classDeclaration method. If still not found, continues on with the parent of the class.

Installation
void AOT_goToDeclaration(Editor e) { AxGoToDeclaration  goToDeclEngine; ;   infolog.globalCache.set("AxGoToDeclarationSource", "source_editor", e);
 * Import the xpo project. (contains 3 classes)
 * Recompile all (in case of errors)
 * Add the following code as a method into the EditorScripts class

goToDeclEngine = new AxGoToDeclaration(e); goToDeclEngine.goToDeclaration; } void AOT_goToDeclarationBack(Editor e) { ;   AxGoToDeclarationGoBack::main(new Args); }
 * Add the following code as a method into the EditorScripts class

User Guide
There is not much to describe. Just select the variable, right click, select Scripts\AOT\goToDeclaration and you are done. if the declaration of the selected variable is found, you will be moved to the corresponding line in the editor.

Known Issues (small inconveniences)
class Class1 {   Class2  classVar, classVar2; } ClassVar2 will not be found. (It is insecure because if you declare a class names classVar2, than the compilation of class1 will fail)
 * ParserClass does not parse the constructor (new) method. So variable declarations cannot be found from this method.
 * Does not find variables this, element, etc.
 * Does not find objects with AutoDeclaration set to Yes on forms, nor the datasources
 * Does not find variable declarations that are not secure, for example like the following:

Plans for upgrade (Suggestions)

 * Open AOT objects when this or element is selected (table, class, form, etc)
 * Open AOT objects with the property sheet for objects with AutoDeclaration = Yes
 * Include global classes into the search

Thanks

 * AndyD - for the timer AOT edit code and the selectedLine method modifications
 * Max Belugin - for ParserClass_class descripton
 * Alex55 - for the idea and basic implementation of AxGoToDeclarationGoBack class
 * Miker - version 1.1.2 implementation