Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.doc.comment.support=disabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
Expand All @@ -49,10 +49,10 @@ org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
Expand All @@ -65,6 +65,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
Expand Down
4 changes: 1 addition & 3 deletions runtime/bundles/org.eclipse.e4.core.di/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ Export-Package: org.eclipse.e4.core.di;version="1.7.0",
org.eclipse.e4.core.internal.di.osgi;x-internal:=true,
org.eclipse.e4.core.internal.di.shared;x-friends:="org.eclipse.e4.core.contexts,org.eclipse.e4.core.di.extensions.supplier"
Require-Bundle: org.eclipse.e4.core.di.annotations;bundle-version="[1.4.0,2.0.0)";visibility:=reexport
Import-Package: jakarta.annotation;version="[2.0.0,4.0.0)",
jakarta.inject;version="[2,3)",
org.eclipse.osgi.framework.log;version="1.1.0",
Import-Package: org.eclipse.osgi.framework.log;version="1.1.0",
org.osgi.framework;version="[1.8.0,2.0.0)",
org.osgi.util.tracker;version="[1.5.1,2.0.0)"
Automatic-Module-Name: org.eclipse.e4.core.di
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2017 IBM Corporation and others.
* Copyright (c) 2010, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -14,10 +14,6 @@
*******************************************************************************/
package org.eclipse.e4.core.di;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import jakarta.inject.Scope;
import jakarta.inject.Singleton;
import java.lang.annotation.Annotation;
import org.eclipse.e4.core.di.suppliers.PrimaryObjectSupplier;

Expand All @@ -37,7 +33,8 @@
* The injection of values is generally done as a number of calls. User objects
* that want to finalize the injected data (for instance, to perform
* calculations based on multiple injected values) can place such calculations
* in a method with the {@link PostConstruct} annotation.
* in a method with the {@link jakarta.annotation.PostConstruct PostConstruct}
* annotation.
* </p>
* <p>
* When injecting values, all fields are injected prior to injection of methods.
Expand All @@ -51,7 +48,8 @@
* </p>
* <p>
* When supplier is disposed, the injector will attempt to notify all injected
* objects by calling methods with the {@link PreDestroy} annotation.
* objects by calling methods with the {@link jakarta.annotation.PreDestroy
* PreDestroy} annotation.
*
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
Expand Down Expand Up @@ -156,8 +154,8 @@
* @param objectSupplier primary object supplier for the injection
* @return an instance of the specified class
* @throws InjectionException if an exception occurred while performing this operation
* @see Scope
* @see Singleton
* @see jakarta.inject.Scope

Check warning on line 157 in runtime/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Restriction

ERROR: Access restriction: The type 'Scope' is not accessible (restriction on classpath entry '/home/jenkins/agent/workspace/eclipse.platform_PR-2649/.m2/repository/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar')
* @see jakarta.inject.Singleton

Check warning on line 158 in runtime/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Restriction

ERROR: Access restriction: The type 'Singleton' is not accessible (restriction on classpath entry '/home/jenkins/agent/workspace/eclipse.platform_PR-2649/.m2/repository/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar')
*/
<T> T make(Class<T> clazz, PrimaryObjectSupplier objectSupplier) throws InjectionException;

Expand All @@ -174,8 +172,8 @@
* @param staticSupplier additional object supplier for the injection, changes in injected values are not tracked
* @return an instance of the specified class
* @throws InjectionException if an exception occurred while performing this operation
* @see Scope
* @see Singleton
* @see jakarta.inject.Scope

Check warning on line 175 in runtime/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Restriction

ERROR: Access restriction: The type 'Scope' is not accessible (restriction on classpath entry '/home/jenkins/agent/workspace/eclipse.platform_PR-2649/.m2/repository/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar')
* @see jakarta.inject.Singleton

Check warning on line 176 in runtime/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Restriction

ERROR: Access restriction: The type 'Singleton' is not accessible (restriction on classpath entry '/home/jenkins/agent/workspace/eclipse.platform_PR-2649/.m2/repository/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar')
*/
<T> T make(Class<T> clazz, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier staticSupplier) throws InjectionException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2010 IBM Corporation and others.
* Copyright (c) 2009, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.e4.core.di.suppliers;

import org.osgi.framework.BundleContext;

/**
* The base class for an "object supplier" - something that knows how to
* instantiate objects corresponding to the object descriptor. Extended object
Expand All @@ -39,15 +37,15 @@ abstract public class ExtendedObjectSupplier {
* The OSGi service name for an object provider service. This name can be used to obtain
* instances of the service.
*
* @see BundleContext#getServiceReference(String)
* @see org.osgi.framework.BundleContext#getServiceReference(String)
*/
public static final String SERVICE_NAME = ExtendedObjectSupplier.class.getName();

/**
* An OSGi service property used to indicate the context key this function should be registered
* in.
*
* @see BundleContext#getServiceReference(String)
* @see org.osgi.framework.BundleContext#getServiceReference(String)
*/
public static final String SERVICE_CONTEXT_KEY = "dependency.injection.annotation"; //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2015 IBM Corporation and others.
* Copyright (c) 2010, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -13,11 +13,8 @@
*******************************************************************************/
package org.eclipse.e4.core.internal.di;

import jakarta.inject.Named;
import java.lang.reflect.Field;
import org.eclipse.e4.core.di.IInjector;
import org.eclipse.e4.core.di.InjectionException;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.di.suppliers.IObjectDescriptor;
import org.eclipse.e4.core.di.suppliers.PrimaryObjectSupplier;

Expand All @@ -29,11 +26,7 @@
*/
public class ClassRequestor extends Requestor<Class<?>> {

@Optional
@Named("e4.internal.injectionLink")
final static public String pseudoVariable = null;

private static IObjectDescriptor[] pseudoVariableDescriptor;
private static IObjectDescriptor[] pseudoVariableDescriptor = {};

public ClassRequestor(Class<?> clazz, IInjector injector, PrimaryObjectSupplier primarySupplier, PrimaryObjectSupplier tempSupplier, Object requestingObject, boolean track) {
super(clazz, injector, primarySupplier, tempSupplier, requestingObject, track);
Expand All @@ -47,18 +40,6 @@ public Object execute() throws InjectionException {

@Override
public IObjectDescriptor[] calcDependentObjects() {
if (pseudoVariableDescriptor == null) {
Field field = null;
try {
field = ClassRequestor.class.getField("pseudoVariable"); //$NON-NLS-1$
} catch (SecurityException | NoSuchFieldException e) {
e.printStackTrace(); // tested - not going to happen
return null;
}
pseudoVariableDescriptor = new IObjectDescriptor[] {
new ObjectDescriptor(field.getGenericType(), field.getAnnotations()) };
}

return pseudoVariableDescriptor;
}

Expand All @@ -69,7 +50,7 @@ public String toString() {
tmp.append(location.getSimpleName());
}
tmp.append('.');
tmp.append(pseudoVariable);
tmp.append("pseudoVariable"); //$NON-NLS-1$
return tmp.toString();
}
}
Loading