All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.katalon.platform.internal.EclipseContextService Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy