diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/bindings/internal/FxBindingsInstanceTypeProvider.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/bindings/internal/FxBindingsInstanceTypeProvider.java new file mode 100644 index 000000000..b7cccfd7b --- /dev/null +++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/bindings/internal/FxBindingsInstanceTypeProvider.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2017 BestSolution.at 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: + * Martin Bluehweis - initial API and implementation + *******************************************************************************/ +package org.eclipse.fx.core.bindings.internal; + +import java.lang.reflect.Type; + +import org.eclipse.fx.core.TypeTypeProviderService; +import org.eclipse.fx.core.bindings.FXBindings; +import org.osgi.service.component.annotations.Component; + +/** + * Type provider for @Inject @LocalInstance FXBindings.Instance loader + */ +@Component +public class FxBindingsInstanceTypeProvider implements TypeTypeProviderService { + + @Override + public Class getType(Type s) { + return FXBindings.Instance.class; + } + + @Override + public boolean test(Type t) { + return FXBindings.Instance.class == t; + } + +} \ No newline at end of file diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/observable/internal/FxObservableUtilInstanceTypeProvider.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/observable/internal/FxObservableUtilInstanceTypeProvider.java new file mode 100644 index 000000000..8abc8d638 --- /dev/null +++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/observable/internal/FxObservableUtilInstanceTypeProvider.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2017 BestSolution.at 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: + * Martin Bluehweis - initial API and implementation + *******************************************************************************/ +package org.eclipse.fx.core.observable.internal; + +import java.lang.reflect.Type; + +import org.eclipse.fx.core.TypeTypeProviderService; +import org.eclipse.fx.core.observable.FXObservableUtil; +import org.osgi.service.component.annotations.Component; + +/** + * Type provider for @Inject @LocalInstance FXObservableUtil.Instance loader + */ +@Component +public class FxObservableUtilInstanceTypeProvider implements TypeTypeProviderService { + + @Override + public Class getType(Type s) { + return FXObservableUtil.Instance.class; + } + + @Override + public boolean test(Type t) { + return FXObservableUtil.Instance.class == t; + } + +} \ No newline at end of file