Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ua/org.eclipse.help/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
Expand Down
8 changes: 0 additions & 8 deletions ua/org.eclipse.help/.settings/.api_filters
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.help" version="2">
<resource path="META-INF/MANIFEST.MF">
<filter comment="https://github.com/eclipse-platform/eclipse.platform/pull/2329" id="926941240">
<message_arguments>
<message_argument value="3.11.0"/>
<message_argument value="3.10.600"/>
</message_arguments>
</filter>
</resource>
<resource path="META-INF/MANIFEST.MF" type="org.eclipse.help.IHelp">
<filter comment="https://github.com/eclipse-platform/eclipse.platform/pull/2329" id="305324134">
<message_arguments>
Expand Down
6 changes: 3 additions & 3 deletions ua/org.eclipse.help/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -106,7 +106,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,NORMAL
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,HELP
Expand Down
2 changes: 1 addition & 1 deletion ua/org.eclipse.help/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ Import-Package: javax.xml.parsers,
org.w3c.dom,
org.xml.sax,
org.xml.sax.helpers
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.help
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -96,8 +95,8 @@
static {
Platform.getExtensionRegistry().addRegistryChangeListener(event -> {
IExtensionDelta[] deltas = event.getExtensionDeltas(HelpPlugin.PLUGIN_ID, CONTENTPRODUCER_XP_NAME);
for (int i = 0; i < deltas.length; i++) {
IExtension extension = deltas[i].getExtension();
for (IExtensionDelta element : deltas) {
IExtension extension = element.getExtension();
String affectedPlugin = extension.getContributor().getName();
// reset producer for the affected plugin,
// it will be recreated on demand
Expand Down Expand Up @@ -154,9 +153,8 @@

checkForDuplicateExtensionElements(elements);

for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
if (!elements[i].getContributor().getName().equals(pluginId)) {
for (IConfigurationElement element : elements) {
if (!element.getContributor().getName().equals(pluginId)) {
continue;
}
if (BINDING.equals(element.getName())) {
Expand All @@ -182,8 +180,7 @@
isCheckedForDuplicates = true;
Set<String> logged = new HashSet<>();
Set<String> keys = new HashSet<>();
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
for (IConfigurationElement element : elements) {
String pluginName = element.getContributor().getName();
String key = pluginName;
if (logged.contains(key)) {
Expand All @@ -204,8 +201,7 @@

private static ProducerDescriptor findContentProducer(IConfigurationElement [] elements, String refId) {
// try existing ones
for (Iterator<Object> iter = contentProducers.values().iterator(); iter.hasNext();) {
Object obj = iter.next();
for (Object obj : contentProducers.values()) {
if (obj instanceof ProducerDescriptor desc) {
if (desc.matches(refId)) {
return desc;
Expand All @@ -215,11 +211,11 @@
// not created yet. Find the matching configuration element,
// take its contributing pluginId and get the descriptor
// for that plug-in
for (int i=0; i<elements.length; i++) {
if (CONTENTPRODUCER_XP_NAME.equals(elements[i].getName())) {
String id = elements[i].getDeclaringExtension().getUniqueIdentifier();
for (IConfigurationElement element : elements) {
if (CONTENTPRODUCER_XP_NAME.equals(element.getName())) {
String id = element.getDeclaringExtension().getUniqueIdentifier();
if (refId.equals(id)) {
Object obj = getProducerDescriptor(elements[i].getContributor().getName());
Object obj = getProducerDescriptor(element.getContributor().getName());
if (obj instanceof ProducerDescriptor) {
return (ProducerDescriptor)obj;
}
Expand All @@ -242,9 +238,9 @@
}
Locale l;
if (locale.length() >= 5) {
l = new Locale(locale.substring(0, 2), locale.substring(3, 5));
l = Locale.of(locale.substring(0, 2), locale.substring(3, 5));
} else if (locale.length() >= 2) {
l = new Locale(locale.substring(0, 2), ""); //$NON-NLS-1$
l = Locale.of(locale.substring(0, 2), ""); //$NON-NLS-1$
} else {
l = Locale.getDefault();
}
Expand Down Expand Up @@ -291,14 +287,14 @@
Map<String, Object> cache = zipCache;
ArrayList<String> pathPrefix = getPathPrefix(locale);

for (int i = 0; i < pathPrefix.size(); i++) {
for (String element : pathPrefix) {

// finds the zip file by either using a cached location, or
// calling Platform.find - the result is cached for future use.
Object cached = cache.get(pluginID + '/' + pathPrefix.get(i) + zip);
Object cached = cache.get(pluginID + '/' + element + zip);
if (cached == null) {
try {
URL url = FileLocator.find(pluginDesc, IPath.fromOSString(pathPrefix.get(i) + zip), null);
URL url = FileLocator.find(pluginDesc, IPath.fromOSString(element + zip), null);
if (url != null) {
URL realZipURL = FileLocator.toFileURL(FileLocator.resolve(url));
cached = realZipURL.toExternalForm();
Expand All @@ -309,7 +305,7 @@
cached = ZIP_NOT_FOUND;
}
// cache it
cache.put(pluginID + '/' + pathPrefix.get(i) + zip, cached);
cache.put(pluginID + '/' + element + zip, cached);
}

if (cached == ZIP_NOT_FOUND || cached.toString().startsWith("jar:")) { //$NON-NLS-1$
Expand All @@ -319,7 +315,7 @@
// cached should be a zip file that is actually on the filesystem
// now check if the file is in this zip
try {
URL jurl = new URL("jar", "", (String) cached + "!/" + file); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

Check warning on line 318 in ua/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Deprecation

NORMAL: The constructor URL(String, String, String) is deprecated since version 20
URLConnection jconnection = jurl.openConnection();
jconnection.setDefaultUseCaches(false);
jconnection.setUseCaches(false);
Expand Down Expand Up @@ -371,8 +367,8 @@
public static URL find(Bundle pluginDesc, IPath flatFilePath, ArrayList<String> pathPrefix) {

// try to find the actual file.
for (int i = 0; i < pathPrefix.size(); i++) {
URL url = FileLocator.find(pluginDesc, IPath.fromOSString(pathPrefix.get(i) + flatFilePath), null);
for (String element : pathPrefix) {
URL url = FileLocator.find(pluginDesc, IPath.fromOSString(element + flatFilePath), null);
if (url != null) {
return url;
}
Expand Down Expand Up @@ -447,8 +443,8 @@
directory = directory.substring(0, directory.length() - 1);
}
ArrayList<String> pathPrefix = getPathPrefix(locale);
for (int i = 0; i < pathPrefix.size(); i++) {
String path = pathPrefix.get(i) + directory;
for (String element : pathPrefix) {
String path = element + directory;
if (path.length() == 0) {
path = "/"; //$NON-NLS-1$
}
Expand Down
Loading