com.katalon.platform.internal.EclipseContextService Maven / Gradle / Ivy
package com.katalon.platform.internal;
import org.eclipse.e4.core.contexts.IEclipseContext;
public class EclipseContextService {
private static IEclipseContext platformContext;
private static IEclipseContext workbenchContext;
public static void lookupPlatformContext(IEclipseContext context) {
platformContext = context;
}
public static void lookupWorkbenchContext(IEclipseContext context) {
workbenchContext = context;
}
public static T getPlatformService(Class clazz) {
return platformContext != null ? platformContext.get(clazz) : null;
}
public static T getWorkbenchService(Class clazz) {
return workbenchContext != null ? workbenchContext.get(clazz) : null;
}
}