Skip to content

Commit

Permalink
Prepare builds against 2024-12
Browse files Browse the repository at this point in the history
- Ensure that 2024-09 continues to build.
- Eliminate all Java 21 deprecation warnings.
- Provide org.eclipse.emf.common.util.CommonUtil.newURL(String) to
centralized URL creation via the deprecated constructor.
  • Loading branch information
merks committed Sep 11, 2024
1 parent 0259f2e commit 4db0a4f
Show file tree
Hide file tree
Showing 113 changed files with 457 additions and 384 deletions.
16 changes: 8 additions & 8 deletions doc/org.eclipse.emf.examples.jet.article2/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.examples.jet.article2; singleton:=true
Bundle-Version: 2.10.0.qualifier
Bundle-Version: 2.11.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.examples.jet.article2.TypesafeEnumPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.emf.examples.jet.article2;version="2.10.0",
org.eclipse.emf.examples.jet.article2.actionexample;version="2.10.0",
org.eclipse.emf.examples.jet.article2.codegen;version="2.10.0",
org.eclipse.emf.examples.jet.article2.model;version="2.10.0",
org.eclipse.emf.examples.jet.article2.ui;version="2.10.0"
Export-Package: org.eclipse.emf.examples.jet.article2;version="2.11.0",
org.eclipse.emf.examples.jet.article2.actionexample;version="2.11.0",
org.eclipse.emf.examples.jet.article2.codegen;version="2.11.0",
org.eclipse.emf.examples.jet.article2.model;version="2.11.0",
org.eclipse.emf.examples.jet.article2.ui;version="2.11.0"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.9.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.8.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.105.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.9.0,4.0.0)",
org.eclipse.jdt.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.jdt.core;bundle-version="[3.9.0,4.0.0)",
org.eclipse.jdt.launching;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.codegen;bundle-version="[2.24.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.common.ui;bundle-version="[2.23.0,3.0.0)"
org.eclipse.emf.codegen;bundle-version="[2.25.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.common.ui;bundle-version="[2.24.0,3.0.0)"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.emf.examples.jet.article2
2 changes: 1 addition & 1 deletion doc/org.eclipse.emf.examples.jet.article2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.examples.jet.article2</artifactId>
<version>2.10.0-SNAPSHOT</version>
<version>2.11.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@


import java.net.MalformedURLException;
import java.net.URL;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.CommonUtil;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
Expand All @@ -13,9 +15,6 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;

import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;


/**
* The plug-in runtime class for the TypesafeEnum plug-in.
Expand Down Expand Up @@ -44,7 +43,7 @@ public static ImageDescriptor getImageDescriptor(String name)
{
String base = getDefault().getBundle().getEntry("/").toString();
String uri = base + name;
return ImageDescriptor.createFromURL(new URL(uri));
return ImageDescriptor.createFromURL(CommonUtil.newURL(uri));

}
catch (MalformedURLException e)
Expand Down
2 changes: 1 addition & 1 deletion examples/org.eclipse.emf.examples-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.examples"
label="%featureName"
version="2.24.0.qualifier"
version="2.25.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion examples/org.eclipse.emf.examples-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.examples</artifactId>
<version>2.24.0-SNAPSHOT</version>
<version>2.25.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
6 changes: 3 additions & 3 deletions examples/org.eclipse.emf.java.editor/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.java.editor; singleton:=true
Bundle-Version: 2.11.0.qualifier
Bundle-Version: 2.12.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.java.presentation.JavaEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.emf.java.presentation;version="2.11.0"
Export-Package: org.eclipse.emf.java.presentation;version="2.12.0"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.9.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.8.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.9.0,4.0.0)",
org.eclipse.emf.java.edit;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.edit.ui;bundle-version="[2.24.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.edit.ui;bundle-version="[2.25.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.38.0,3.0.0)";visibility:=reexport
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.emf.java.editor
2 changes: 1 addition & 1 deletion examples/org.eclipse.emf.java.editor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.java.editor</artifactId>
<version>2.11.0-SNAPSHOT</version>
<version>2.12.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import java.io.IOException;
import java.io.InputStream;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
Expand Down Expand Up @@ -42,6 +41,54 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.command.CommandStackListener;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.ui.MarkerHelper;
import org.eclipse.emf.common.ui.ViewerPane;
import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
import org.eclipse.emf.common.ui.viewer.IViewerProvider;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.CommonUtil;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.UniqueEList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.emf.java.JClass;
import org.eclipse.emf.java.JCompilationUnit;
import org.eclipse.emf.java.provider.JavaItemProviderAdapterFactory;
import org.eclipse.emf.java.util.JavaPackageResourceFactoryImpl;
import org.eclipse.emf.java.util.JavaPackageResourceImpl;
import org.eclipse.emf.java.util.JavaResourceFactoryImpl;
import org.eclipse.emf.java.util.JavaUtil;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
Expand Down Expand Up @@ -102,58 +149,6 @@
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;

import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.command.CommandStackListener;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;

import org.eclipse.emf.common.ui.MarkerHelper;
import org.eclipse.emf.common.ui.ViewerPane;
import org.eclipse.emf.common.ui.editor.ProblemEditorPart;

import org.eclipse.emf.common.ui.viewer.IViewerProvider;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.UniqueEList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;

import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;

import org.eclipse.emf.java.JClass;
import org.eclipse.emf.java.JCompilationUnit;
import org.eclipse.emf.java.provider.JavaItemProviderAdapterFactory;
import org.eclipse.emf.java.util.JavaPackageResourceFactoryImpl;
import org.eclipse.emf.java.util.JavaPackageResourceImpl;
import org.eclipse.emf.java.util.JavaResourceFactoryImpl;
import org.eclipse.emf.java.util.JavaUtil;

//import org.eclipse.swt.events.ControlAdapter;
//import org.eclipse.swt.events.ControlEvent;

Expand Down Expand Up @@ -2170,7 +2165,7 @@ public void setupClassLoader(IProject project)
case IClasspathEntry.CPE_LIBRARY:
case IClasspathEntry.CPE_CONTAINER:
{
libraryURLs.add(new URL(URI.createFileURI(classpathEntry.getPath().toString()).toString()));
libraryURLs.add(CommonUtil.newURL(URI.createFileURI(classpathEntry.getPath().toString()).toString()));
break;
}
case IClasspathEntry.CPE_SOURCE:
Expand All @@ -2183,7 +2178,7 @@ public void setupClassLoader(IProject project)
IProject referencedProject = workspaceRoot.getProject(classpathEntry.getPath().segment(0));
IJavaProject referencedJavaProject = JavaCore.create(referencedProject);
IContainer container = workspaceRoot.getFolder(referencedJavaProject.getOutputLocation());
libraryURLs.add(new URL(URI.createFileURI(container.getLocation().toString() + "/").toString()));
libraryURLs.add(CommonUtil.newURL(URI.createFileURI(container.getLocation().toString() + "/").toString()));

getAllReferencedProjects(libraryURLs, referencedProject.getDescription().getReferencedProjects());
getAllReferencedProjects(libraryURLs, referencedProject.getDescription().getDynamicReferences());
Expand Down Expand Up @@ -2231,7 +2226,7 @@ public void getAllReferencedProjects(Collection<URL> libraryURLs, IProject [] pr
IJavaProject referencedJavaProject = JavaCore.create(project);
IContainer container = project.getWorkspace().getRoot().getFolder(referencedJavaProject.getOutputLocation());

libraryURLs.add(new URL(URI.createFileURI(container.getLocation().toString() + "/").toString()));
libraryURLs.add(CommonUtil.newURL(URI.createFileURI(container.getLocation().toString() + "/").toString()));
getAllReferencedProjects(libraryURLs, project.getDescription().getReferencedProjects());
getAllReferencedProjects(libraryURLs, project.getDescription().getDynamicReferences());
}
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf"
label="%featureName"
version="2.39.0.qualifier"
version="2.40.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf</artifactId>
<version>2.39.0-SNAPSHOT</version>
<version>2.40.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.all-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.all"
label="%featureName"
version="2.39.0.qualifier"
version="2.40.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.all-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.all</artifactId>
<version>2.39.0-SNAPSHOT</version>
<version>2.40.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

<build>
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.base-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.base"
label="%featureName"
version="2.38.0.qualifier"
version="2.39.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.base-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.base</artifactId>
<version>2.38.0-SNAPSHOT</version>
<version>2.39.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.codegen-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.codegen"
label="%featureName"
version="2.25.0.qualifier"
version="2.26.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.codegen-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.codegen</artifactId>
<version>2.25.0-SNAPSHOT</version>
<version>2.26.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.codegen.ecore-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.codegen.ecore"
label="%featureName"
version="2.39.0.qualifier"
version="2.40.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.codegen.ecore-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.codegen.ecore</artifactId>
<version>2.39.0-SNAPSHOT</version>
<version>2.40.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.codegen.ui-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.codegen.ui"
label="%featureName"
version="2.26.0.qualifier"
version="2.27.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.codegen.ui-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.codegen.ui</artifactId>
<version>2.26.0-SNAPSHOT</version>
<version>2.27.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.common-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.common"
label="%featureName"
version="2.32.0.qualifier"
version="2.33.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
Expand Down
2 changes: 1 addition & 1 deletion features/org.eclipse.emf.common-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.common</artifactId>
<version>2.32.0-SNAPSHOT</version>
<version>2.33.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>

</project>
Loading

0 comments on commit 4db0a4f

Please sign in to comment.