IDE API Operations

The component API IDE_API_1 provides an interface to selected IDE functionality, enabling menu and worksheet plug-ins to refresh editors or send messages to the Messages Output tab.

To call these operations, use the activate command:

activate "IDE_API_1".ideApiOperation{(Params)}

The following operations are available:

IDE_API_1.navigateTo(pURL, forceRefresh)

Open the editor for the object specified in the URL. For URL strings that point to sub objects, Uniface navigates to the requested object, also when the editor is already open. The parameter forceRefresh will force a view refresh in the requested editor, also when that one was already open.

  • pUrl—string; URL of a development object (optionally including the worksheet, window, or location) in a format that conforms to the syntax used in the U-Bar. For more information, see U-Bar Syntax.

    The URL is normally for a main development object, for example cpt:MYCOMPONENT or ent:MYENTITY, but it could be for a subobject, or even a specific worksheet, window, or location in the Script Editor. For example:

    cpt:COMPONENT/ent:ENTITY.MODEL/fld:FIELD/prop:USCRIPT/pos:5,2
    aps:MY_APS window=2.

  • forceRefresh —boolean; refresh the editor specified by the URL.

IDE_API_1.refreshEditor(pUrl)

Refresh the editor specified by the URL.

  • pUrl—string; URL of a Main Development Object, in the format ObjectType:ObjectName. For example, cpt:MY_COMPONENT, ent:SALES_ORDER.SALES, aps:MY_APP, libsnp:MYSNIPPETS, and so on.

IDE_API_1.refreshAllEditors()

Refresh all open editors.

IDE_API_1.outputMessage(pMessage)

Activate the Message tab and display the provided message.

pMessage—string; defines the message to be displayed in the IDE.

Example

The following operation sends a message to the Messages tab by calling the IDE API operation outputMessage.

operation ws_refresh
  activate "IDE_API_1".outputMessage("Refresh Worksheet requested (instance=%%$instancename)")
  if ($procerror != 0)
    putmess "Activate error: %%$procerror%%%, %%$procerrorcontext%%%"
  endif
 end