com.mindoo.remote.api.org.eclipse.ui
Interface IRemotePageService

All Known Subinterfaces:
IRemoteWorkbenchWindow

public interface IRemotePageService

Remote API Wrapper for the org.eclipse.ui.IPageService (Online documentation)

Original documentation:
A page service tracks the page and perspective lifecycle events within a workbench window.


Field Summary
static int ALLEVENTS
           
static int PERSPECTIVEACTIVATED
          Bit flag to get notified when a perspective was activated
static int PERSPECTIVECHANGED
          Bit flag to get notified when a perspective has changed in some way (e.g. editor area hidden, perspective reset, view show/hide, editor open/close, ...).
 
Method Summary
 void addPerspectiveListenerSSJSLib(int eventMask, java.lang.String uniqueId, java.lang.String server, java.lang.String dbPath, java.lang.String ssjsLibName, java.lang.String methodName, java.lang.Object data)
          Use this method to get notified of perspective events in the system, e.g. that a perspective has been activated or changed.
 void removePerspectiveListenerSSJSLib(java.lang.String uniqueId)
          Use this method to unregister a preregistered listener
 

Field Detail

PERSPECTIVEACTIVATED

static final int PERSPECTIVEACTIVATED
Bit flag to get notified when a perspective was activated

See Also:
Constant Field Values

PERSPECTIVECHANGED

static final int PERSPECTIVECHANGED
Bit flag to get notified when a perspective has changed in some way (e.g. editor area hidden, perspective reset, view show/hide, editor open/close, ...).

See Also:
Constant Field Values

ALLEVENTS

static final int ALLEVENTS
See Also:
Constant Field Values
Method Detail

addPerspectiveListenerSSJSLib

void addPerspectiveListenerSSJSLib(int eventMask,
                                   java.lang.String uniqueId,
                                   java.lang.String server,
                                   java.lang.String dbPath,
                                   java.lang.String ssjsLibName,
                                   java.lang.String methodName,
                                   java.lang.Object data)
                                   throws RemoteEclipseAPIException
Use this method to get notified of perspective events in the system, e.g. that a perspective has been activated or changed.

Please note that the code in the SSJS library is launched using an alternative JavaScript engine. That means that it's not possible to use Java classes inside the NSF and @formula code known from SSJS (we just use the design element and the JavaScript editor to enter/store code), however it is possible to use the JDK's classes and Eclipse APIs.

The XPages2Eclipse API will use the following call syntax to call the JavaScript method:

methodName(uniqueId:String, eventBit:int, page:IRemoteWorkbenchPage, perspectiveDesc:IRemotePerspectiveDescriptor, changeId:String, data:String);
(Parameter changeId is null for perspectiveActivated event)


The code is executed asynchronously in a background thread, the API will automatically delegate UI accessing calls to the SWT UI thread (e.g. opening new viewparts via the remote API).

In addition, the API keeps the order of events for a listener with a specific uniqueId.

The following global variables will automatically be filled with values:

session - the current session
database - the database of the SSJS library design element
eclipseconnection - a handle for a remote API connection

Parameters:
eventMask - bitmask of events that are relevant for this listener, -1 means all events
uniqueId - unique id to be used when calling removePerspectiveListenerSSJSLib(String), existing listeners with this ID will be overwritten
server - server of SSJS database
dbPath - filepath of SSJS database
ssjsLibName - SSJS library name
methodName - method name in JavaScript
data - any value that will be passed to the JS function as last method argument
Throws:
RemoteEclipseAPIException
See Also:
PERSPECTIVEACTIVATED, PERSPECTIVECHANGED

removePerspectiveListenerSSJSLib

void removePerspectiveListenerSSJSLib(java.lang.String uniqueId)
Use this method to unregister a preregistered listener

Parameters:
uniqueId - unique id that was used when calling {@link #addPerspectiveListenerSSJSLib(int, String, String, String, String, String, Object)