+
+ // Obtain IServiceLocator implementer, e.g. from PlatformUI.getWorkbench():
+ IServiceLocator serviceLocator = PlatformUI.getWorkbench();
+ // or a site from within a editor or view:
+ // IServiceLocator serviceLocator = getSite();
+
+ ICommandService commandService = serviceLocator.getService(ICommandService.class);
+
+
+ // Lookup commmand with its ID
+ Command command = commandService.getCommand("org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession"); //$NON-NLS-1$
+
+ // Optionally pass a ExecutionEvent instance, default no-param arg creates blank event
+ try {
+ // execute new connection command directly
+ command.executeWithChecks(new ExecutionEvent());
+ // FIX THIS OH GOD THE INHUMANITY
+ } catch (Exception e) {
+
+ e.printStackTrace();
+ }
+