BookmarkSubscribeRSS Feed
data_snawb
Fluorite | Level 6

I am playing around with delivering a suite of macros to some of my customers and while I have external documentation on them, I would like to provide built in descriptions within EG. An example of this would be when you type the keyword "data" and mouse over it, you get the description tool tip that pops up. In the example of mousing over the "data" keyword text has bold formatting as well as carriage returns. When writing your own macro, you have the ability to customize and create this description by inserting a comment after a parameter. This can be done for multiple parameters. 

 

My question is how do I format this description? I've tried many common escape sequences trying to get this to happen to no avail. What I'd like to see is the ability to have the description have line breaks so I can provide something like

 

Description:

Syntax:

Examples:

    1)

    2)

 

Instead what I get it all of that run together: "Description: Syntax: Examples: 1) 2)"

 

Code Example:

%macro foo(bar /* Description:
                  Syntax:
                  Examples:
                      1)
                      2)
                */);

    /* code to execute here */
%mend foo;

%foo(value);

Tool tip built in stating can be customized.

EGToolTipBefore.png

 

Tool tip with customization:

EGToolTipAfter.png

 

Edit: added Screenshots

6 REPLIES 6
Tom
Super User Tom
Super User

Does EG have the SNIPPETS concept that is in SAS/Studio?

Perhaps you can make something like that rather than pop-up text.

data_snawb
Fluorite | Level 6

Thank you for your response. Unfortunately, snippets is not what I'm looking for in this case. EG does in fact have snippet functionality though. I'm looking at modifying the context within the tool tip that pops up explaining what the keyword is. I have added screenshots to the original post for clarification.

data_snawb
Fluorite | Level 6

Thank you for your response. Ideally they would like to avoid custom tasks in EG as ultimately everything will be submitted for batch so the EGP is not being used in production.

Tom
Super User Tom
Super User

This is how I format macro header.  I don't use EG, can you see if that style works with its "tooltip" feature?

%macro xxx
/*----------------------------------------------------------------------
Short description
----------------------------------------------------------------------*/
(p1=P1     /* Parameter one description */
,p1=P1     /* Parameter two description */
);

/*----------------------------------------------------------------------
Usage:

one or more usage examples
------------------------------------------------------------------------
Notes:

additional information
-----------------------------------------------------------------------
History:

yyyy-mm-dd username Creation
----------------------------------------------------------------------*/
data_snawb
Fluorite | Level 6

Thank you for your response. This is looking like the route we're going to have to go. The idea was for them to not have to look at the macro/header in another file or any external documentation. I may add a macro parameter for help. If it's used then it returns the help information to their log like when using commands on a terminal/command line with a help switch. In the long run once they're comfortable with the macro the need to refer to documentation drops drastically. This would also work with any other client and not just EG specific.

 

I would still be curious to know if anyone finds out this EG tool tip formatting thing just because I enjoy knowing how things work.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2091 views
  • 0 likes
  • 3 in conversation