Skip to content

Commit

Permalink
regenerated purexbase
Browse files Browse the repository at this point in the history
Note that the old custom RuntimeInjectorProvider was removed. It was
already useless because the bindClassLoaderToInstance generated already
worked.
  • Loading branch information
LorenzoBettini committed May 21, 2024
1 parent 1f5fbbb commit 0d1c539
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2023 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2011, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down Expand Up @@ -48,10 +48,12 @@ public Injector createInjector() {
protected PureXbaseRuntimeModule createRuntimeModule() {
// make it work also with Maven/Tycho and OSGI
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672
// allows for bindClassLoaderToInstance to get the class loader of the bundle
// containing the instance of the injector provider (possibly inherited)
return new PureXbaseRuntimeModule() {
@Override
public ClassLoader bindClassLoaderToInstance() {
return PureXbaseInjectorProvider.class
return PureXbaseInjectorProvider.this.getClass()
.getClassLoader();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.google.inject.Inject;

@RunWith(XtextRunner.class)
@InjectWith(RuntimeInjectorProvider.class)
@InjectWith(PureXbaseInjectorProvider.class)
public class CompilerTest {
@Rule
@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Eva Poell - Tests for Try with Resources and ternary if
*/
@RunWith(XtextRunner.class)
@InjectWith(RuntimeInjectorProvider.class)
@InjectWith(PureXbaseInjectorProvider.class)
public class PureXbaseInterpreterTest extends AbstractXbaseEvaluationTest {
@Inject
private ParseHelper<Model> parseHelper;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


@RunWith(XtextRunner.class)
@InjectWith(RuntimeInjectorProvider.class)
@InjectWith(PureXbaseInjectorProvider.class)
public class XbaseIntegrationTest extends AbstractXbaseEvaluationTest {

@Inject private CompilationTestHelper helper;
Expand Down

0 comments on commit 0d1c539

Please sign in to comment.