Code highlighting

Thursday, February 08, 2007


I haven't posted in a while. Work, work...

Well, meanwhile, I made some new handy tool for Axapta developers.

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

Functional capabilities
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.

In order to use the tool simply import the project
and post the following code as a new method of the EditorScripts class:

void AOT_goToDeclaration(Editor e)
AxGoToDeclaration goToDeclEngine;
goToDeclEngine = new AxGoToDeclaration(e);

Known Issues:
  • 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

What is planned for upgrade:
  1. Open AOT objects when this or element is selected (table, class, form, etc)
  2. Open AOT objects with the property sheet for objects with AutoDeclaration = Yes
  3. Include global classes into the search


Thanks to

  • AndyD - for the timer AOT edit code and the selectedLine method modifications
  • MaxBelugin - for ParserClass description


If you have any comments or suggestions, please feel free to contact me.

No comments:

Post a Comment

Please don't forget to leave your contact details if you expect a reply from me. Thank you