Skip to content

Commit

Permalink
Migrate from javax.inject/annotation to jakarta.inject/annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Oct 30, 2023
1 parent 537f110 commit 53c7077
Show file tree
Hide file tree
Showing 101 changed files with 253 additions and 245 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Export-Package: org.eclipse.e4.tools.compat.internal;version="0.12.0.qualifier";
org.eclipse.e4.tools.compat.parts;version="0.12.0.qualifier";x-internal:=true
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
Import-Package: javax.inject;version="[1.0.0,2.0.0)",
Import-Package: jakarta.inject;version="[2.0.0,3.0.0)",
org.eclipse.e4.ui.workbench.swt
Automatic-Module-Name: org.eclipse.e4.tools.compat
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.eclipse.e4.tools.compat.internal;

import javax.inject.Inject;

import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.osgi.framework.FrameworkUtil;

import jakarta.inject.Inject;

@SuppressWarnings("restriction")
public class DefaultLoggerProvider implements ILoggerProvider {
@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.util.ArrayList;

import javax.inject.Inject;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
Expand All @@ -15,6 +13,8 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;

import jakarta.inject.Inject;

/**
* The workbench implementation of the logger service.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
org.eclipse.e4.emf.xpath,
org.eclipse.ui.forms;bundle-version="3.7.200"
Bundle-ActivationPolicy: lazy
Import-Package: javax.annotation;version="[1.2.0,2.0.0)",
javax.inject;version="[1.0.0,2.0.0)",
Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)",
jakarta.inject;version="[2.0.0,3.0.0)",
org.osgi.framework;version="[1.5.0,2.0.0)",
org.osgi.service.event;version="[1.3.0,2.0.0)"
Export-Package: org.eclipse.e4.tools.emf.ui.common;version="0.12.0.qualifier";x-friends:="org.eclipse.e4.tools.emf.editor3x,org.eclipse.e4.tools.model.spy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
import java.util.List;
import java.util.Objects;

import javax.annotation.PreDestroy;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.core.databinding.property.value.IValueProperty;
Expand Down Expand Up @@ -69,6 +66,9 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;

import jakarta.annotation.PreDestroy;
import jakarta.inject.Inject;

/**
* @param <M> type of the master object
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
import java.util.Map;
import java.util.Objects;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Named;

import org.eclipse.core.databinding.ObservablesManager;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.list.WritableList;
Expand Down Expand Up @@ -250,6 +245,11 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import jakarta.inject.Inject;
import jakarta.inject.Named;

public class ModelEditor implements IGotoObject {
private static final String ORG_ECLIPSE_E4_TOOLS_MODELEDITOR_FILTEREDTREE_ENABLED_XMITAB_DISABLED = "org.eclipse.e4.tools.modeleditor.filteredtree.enabled.xmitab.disabled";//$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
Expand Down Expand Up @@ -60,6 +58,8 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public abstract class AbstractPartEditor<M extends MPart> extends AbstractComponentEditor<M> {
private Composite composite;
private EMFDataBindingContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -48,6 +46,8 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class AddonsEditor extends AbstractComponentEditor<MAddon> {
private Composite composite;
private EMFDataBindingContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
import java.util.Iterator;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -80,6 +77,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

public class ApplicationEditor extends AbstractComponentEditor<MApplication> {

private Composite composite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -78,6 +75,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

public class AreaEditor extends AbstractComponentEditor<MArea> {

private Composite composite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
import java.util.Arrays;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.e4.tools.emf.ui.common.Util;
Expand Down Expand Up @@ -54,6 +51,9 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

public class BindingContextEditor extends AbstractComponentEditor<MBindingContext> {
private Composite composite;
private EMFDataBindingContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
import java.util.Arrays;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.e4.tools.emf.ui.common.Util;
Expand Down Expand Up @@ -61,6 +58,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

public class BindingTableEditor extends AbstractComponentEditor<MBindingTable> {

private Composite composite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.e4.tools.emf.ui.common.Util;
Expand All @@ -39,6 +37,8 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class CategoryEditor extends AbstractComponentEditor<MCategory> {

private Composite composite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
import java.util.Arrays;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.e4.core.contexts.IEclipseContext;
Expand Down Expand Up @@ -64,6 +61,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

public class CommandEditor extends AbstractComponentEditor<MCommand> {

private Composite composite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.e4.tools.emf.ui.common.Util;
Expand All @@ -42,6 +40,8 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class CommandParameterEditor extends AbstractComponentEditor<MCommandParameter> {
private Composite composite;
private EMFDataBindingContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.e4.tools.emf.ui.common.IEditorFeature.FeatureClass;
Expand Down Expand Up @@ -60,6 +57,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

public class CompositePartEditor extends AbstractPartEditor<MCompositePart> {
private final List<Action> actions = new ArrayList<>();
private final List<Action> actionsImport = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
Expand All @@ -40,6 +38,8 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class CoreExpressionEditor extends AbstractComponentEditor<MCoreExpression> {
private Composite composite;
private EMFDataBindingContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
Expand All @@ -39,6 +37,8 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import jakarta.inject.Inject;

public class DirectMenuItemEditor extends MenuItemEditor<MDirectMenuItem> {
@Inject
IEclipseContext eclipseContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.e4.core.contexts.IEclipseContext;
Expand All @@ -36,6 +34,8 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import jakarta.inject.Inject;

public class DirectToolItemEditor extends ToolItemEditor<MDirectToolItem> {
@Inject
IEclipseContext eclipseContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.core.resources.IProject;
Expand All @@ -44,6 +42,8 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class DynamicMenuContributionEditor extends AbstractComponentEditor<MDynamicMenuContribution> {

private Composite composite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.list.WritableList;
Expand All @@ -41,6 +39,8 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class HandledMenuItemEditor extends MenuItemEditor<MHandledMenuItem> {
@Inject
private IModelResource resource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;

import javax.inject.Inject;

import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.WritableValue;
Expand All @@ -40,6 +38,8 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import jakarta.inject.Inject;

public class HandledToolItemEditor extends ToolItemEditor<MHandledToolItem> {
@Inject
private IModelResource resource;
Expand Down
Loading

0 comments on commit 53c7077

Please sign in to comment.