forked from eclipse-efx/efxclipse-rt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6dbaa73
commit 016bcde
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...pse.fx.core/src/org/eclipse/fx/core/bindings/internal/FxBindingsInstanceTypeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> - 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<FXBindings.Instance> { | ||
|
||
@Override | ||
public Class<? extends FXBindings.Instance> getType(Type s) { | ||
return FXBindings.Instance.class; | ||
} | ||
|
||
@Override | ||
public boolean test(Type t) { | ||
return FXBindings.Instance.class == t; | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
...ore/src/org/eclipse/fx/core/observable/internal/FxObservableUtilInstanceTypeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> - 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<FXObservableUtil.Instance> { | ||
|
||
@Override | ||
public Class<? extends FXObservableUtil.Instance> getType(Type s) { | ||
return FXObservableUtil.Instance.class; | ||
} | ||
|
||
@Override | ||
public boolean test(Type t) { | ||
return FXObservableUtil.Instance.class == t; | ||
} | ||
|
||
} |