/*
(non-Javadoc)
@see org.eclipse.ui.part.IShowInSource#getShowInContext()
14843
public ShowInContext getShowInContext()
	{
		IProcess process = getProcess();
		if (process == null)
		{
			return null;
		}
		IDebugTarget target = (IDebugTarget) process.getAdapter(IDebugTarget.class);
		ISelection selection = null;
		if (target == null)
		{
			selection = new TreeSelection(new TreePath(new Object[] {
					DebugPlugin.getDefault().getLaunchManager(),
					process.getLaunch(), process }));
		} else
		{
			selection = new TreeSelection(new TreePath(new Object[] {
					DebugPlugin.getDefault().getLaunchManager(),
					target.getLaunch(), target }));
		}
		return new ShowInContext(null, selection);
	}
1031708
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            clsContext = classContext;
            JavaClass cls = classContext.getJavaClass();
            if (cls.isInterface())
                return;
            superClasses = cls.getSuperClasses();
            cls.accept(this);
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            clsContext = null;
            superClasses = null;
        }
    }
425520
private ScriptValidationContext getScriptValidationContext() {
        if (scriptValidationContext == null) {
            scriptValidationContext = new ScriptValidationContext(messageType.toString());

            getAction().getValidationContexts().add(scriptValidationContext);
        }

        return scriptValidationContext;
    }
563881
public static I_CmsContextMenuCommand getContextMenuCommand() {

        return new I_CmsContextMenuCommand() {

            public void execute(CmsUUID structureId, I_CmsContextMenuHandler handler, CmsContextMenuEntryBean bean) {

                openWorkplace(structureId, false);
            }

            public A_CmsContextMenuItem getItemWidget(
                CmsUUID structureId,
                I_CmsContextMenuHandler handler,
                CmsContextMenuEntryBean bean) {

                return null;
            }

            public boolean hasItemWidget() {

                return false;
            }
        };
    }
626277
public static Context getApplicationContext() {
        com.ardikars.jxnet.context.Context context = com.ardikars.jxnet.context.Application.getApplicationContext();
        return new ApplicationContext(context);
    }
119966
public static String getContextPath() {
        if (null != contextPath) {
            return contextPath;
        }

        final String contextPathConf = getLatkeProperty("contextPath");
        if (null != contextPathConf) {
            contextPath = contextPathConf;

            return contextPath;
        }

        final ServletContext servletContext = AbstractServletListener.getServletContext();
        contextPath = servletContext.getContextPath();

        return contextPath;
    }
924258
@Override
    public String getContextPath() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getContextPath();
        } finally {
            collaborator.postInvoke();
        }
    }
560370
protected InvocationContextImpl getInvocationContext() {
        // does not seem useful to cache one of these per bean instance; create a new one
        InvocationContextImpl invocationContext = createInvocationContext();
        invocationContext.initialize(ivEjbInstance, ivEjbManagedObjectContext, ivInterceptors);
        return invocationContext;
    }
455279
public ClassContext getClassContext(JavaClass javaClass) {
        // This is a bit silly since we're doing an unnecessary
        // ClassDescriptor->JavaClass lookup.
        // However, we can be assured that it will succeed.

        ClassDescriptor classDescriptor = DescriptorFactory.instance().getClassDescriptor(
                ClassName.toSlashedClassName(javaClass.getClassName()));

        try {
            return Global.getAnalysisCache().getClassAnalysis(ClassContext.class, classDescriptor);
        } catch (CheckedAnalysisException e) {
            IllegalStateException ise = new IllegalStateException("Could not get ClassContext for JavaClass");
            ise.initCause(e);
            throw ise;
        }
    }
611873
private Context getContext() {
        Context context = mContext.get();
        if (context == null) {
            throw new IllegalStateException("Context used by the instance has been destroyed.");
        }
        return context;
    }
121786
public ServletContext getCurrentServletContext() {
        final ClassLoader cl = getContextClassLoader();
        if (cl == null) {
            return null;
        }
        return servletContexts.get(cl);
    }
1189025
private static ContextRuntime getRootContext(final Injector injector,
                                               final Configuration rootContextConfiguration,
                                               final Optional<Configuration> rootServiceConfiguration)
      throws ContextClientCodeException {
    final ContextRuntime result;
    if (rootServiceConfiguration.isPresent()) {
      final Injector rootServiceInjector;
      try {
        rootServiceInjector = injector.forkInjector(rootServiceConfiguration.get());
      } catch (final BindException e) {
        throw new ContextClientCodeException(ContextClientCodeException.getIdentifier(rootContextConfiguration),
            Optional.<String>empty(), "Unable to instatiate the root context", e);
      }
      result = new ContextRuntime(rootServiceInjector, rootContextConfiguration);
    } else {
      result = new ContextRuntime(injector.forkInjector(), rootContextConfiguration);
    }
    return result;
  }
1082761
@Override
    protected com.ibm.ws.webcontainer.srt.SRTConnectionContext getConnectionContext() {
        // SRTConnectionContext srt = _threadLocal.get();
        // if (srt == null) {
        // srt = new SRTConnectionContext();
        // _threadLocal.set(srt);
        // }
        // return srt;

        /*
         * TODO: Investigate performance impact of removing thread locals and
         * instead creating a new connection context each time. The threadlocal
         * approach causes problems for requests that go async as a subsequent
         * request may use the same thread and therefore get the same
         * SRTServletRequest instance from the SRTConnectionContext.
         */

        // return new SRTConnectionContext();
        return connContextPool.get();
    }
598277
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass cls = classContext.getJavaClass();
        clsVersion = cls.getMajor();
        super.visitClassContext(classContext);
    }
526252
protected String getContextPath(){

        if(context != null) return context;

        if(get("context_path") == null){
            throw new ViewException("context_path missing - red alarm!");
        }
        return  get("context_path").toString();
    }
90019
@SuppressWarnings("unchecked") //
  public static <T> T getDaggerComponent(Context context) {
    //noinspection ResourceType
    return (T) context.getSystemService(SERVICE_NAME);
  }
606965
public static Context getContext() {
        Context context = LOCAL.get();
        if (context == null) {
            context = new Context(null, null);
            LOCAL.set(context);
        }
        return context;
    }