blob: 4f37a642cebc348bb0ac5e43921605745d34f834 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.e4.core.services.internal.context;
import org.eclipse.e4.core.services.IDisposable;
import org.eclipse.e4.core.services.context.IEclipseContext;
import org.eclipse.e4.core.services.context.IEclipseContextAware;
/**
* Test class to check injection mechanism
*/
public class ObjectContextAware implements IEclipseContextAware, IDisposable {
protected IEclipseContext equinoxContext;
private boolean finalized;
private boolean disposed;
public ObjectContextAware() {
finalized = false;
disposed = false;
}
public void contextSet(IEclipseContext context) {
equinoxContext = context;
finalized = true;
}
public void dispose() {
equinoxContext = null;
disposed = true;
}
public IEclipseContext getEquinoxContext() {
return equinoxContext;
}
public boolean isFinalized() {
return finalized;
}
public boolean isDisposed() {
return disposed;
}
}