package cn.com.origin.autocode.handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import cn.com.origin.autocodemanager.common.TCPreferenceUitl;
import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.kernel.TCSession;

public class HandlerControlTest  extends AbstractHandler {
	public Object execute(ExecutionEvent arg0) throws ExecutionException {
		return null;
	}
	public boolean isEnabled() {
		String origin_handlerTest="origin_handlerTest";
		TCSession	session = (TCSession) AIFUtility.getCurrentApplication().getSession();
		if (TCPreferenceUitl.isTrueTCPreferenceValue(session, origin_handlerTest)) {
			return false;
		} else {
			return true;
		}
	}
}
