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
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ant.internal.ui.views.actions;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.program.Program;
import org.eclipse.ui.ISharedImages;
Expand All @@ -36,11 +35,9 @@ public EditorImageDescriptor(Program program) {

@Override
public boolean equals(Object o) {
if (!(o instanceof EditorImageDescriptor)) {
if (!(o instanceof EditorImageDescriptor other)) {
return false;
}
EditorImageDescriptor other = (EditorImageDescriptor) o;

// See if there is a name - compare it if so and compare the programs if not
String otherName = other.program.getName();
if (otherName == null) {
Expand All @@ -49,22 +46,14 @@ public boolean equals(Object o) {
return otherName.equals(program.getName());
}

/**
* Returns an SWT Image that is described by the information in this descriptor. Each call returns a new Image.
*/
public Image getImage() {
return createImage();
}

@Override
public ImageData getImageData() {

ImageData defaultImage = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE).getImageData();
public ImageData getImageData(int zoom) {
ImageData defaultImage = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE).getImageData(zoom);
if (defaultImage == null) {
return null;
}
ImageData data = null;
if (program == null || ((data = program.getImageData()) == null)) {
if (program == null || ((data = program.getImageData(zoom)) == null)) {
return defaultImage;
}

Expand Down
2 changes: 1 addition & 1 deletion ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ant.ui; singleton:=true
Bundle-Version: 3.10.0.qualifier
Bundle-Version: 3.10.100.qualifier
Bundle-Activator: org.eclipse.ant.internal.ui.AntUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2013 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -76,12 +76,7 @@ public static ImageDescriptor getImageDescriptor(Object object, IDebugModelPrese

public static ImageDescriptor getImageDescriptor(Image image) {
if (image != null) {
ImageDescriptor descriptor = fgImages.get(image);
if (descriptor == null) {
descriptor = new ImageImageDescriptor(image);
fgImages.put(image, descriptor);
}
return descriptor;
return fgImages.computeIfAbsent(image, ImageDescriptor::createFromImage);
}
return null;
}
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion ua/org.eclipse.help.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %help_system_plugin_name
Bundle-SymbolicName: org.eclipse.help.ui; singleton:=true
Bundle-Version: 4.8.0.qualifier
Bundle-Version: 4.8.100.qualifier
Bundle-Activator: org.eclipse.help.ui.internal.HelpUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2016 IBM Corporation and others.
* Copyright (c) 2000, 2025 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 @@ -22,9 +22,10 @@
import org.eclipse.help.internal.toc.Toc;
import org.eclipse.help.ui.internal.HelpUIResources;
import org.eclipse.help.ui.internal.IHelpUIConstants;
import org.eclipse.help.ui.internal.util.OverlayIcon;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DecorationOverlayIcon;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ITreeViewerListener;
import org.eclipse.jface.viewers.LabelProvider;
Expand Down Expand Up @@ -159,8 +160,8 @@ private boolean isNotEmpty(ITopic topic) {
}

private boolean isNotEmpty(ITopic[] topics) {
for (int i = 0; i < topics.length; i++) {
if (isNotEmpty(topics[i]))
for (ITopic topic : topics) {
if (isNotEmpty(topic))
return true;
}
return false;
Expand Down Expand Up @@ -205,8 +206,7 @@ private void initializeImages() {
.getImageDescriptor(IHelpUIConstants.IMAGE_CONTAINER);
ImageDescriptor ovr = HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_DOC_OVR);
ImageDescriptor desc = new OverlayIcon(base,
new ImageDescriptor[][] { { ovr } });
ImageDescriptor desc = new DecorationOverlayIcon(base, ovr, IDecoration.TOP_RIGHT);
containerWithTopicImage = desc.createImage();
}

Expand Down Expand Up @@ -239,8 +239,7 @@ protected String getHref(IHelpResource res) {

public void selectReveal(String href) {
IToc[] tocs = HelpSystem.getTocs();
for (int i = 0; i < tocs.length; i++) {
IToc toc = tocs[i];
for (IToc toc : tocs) {
ITopic topic = toc.getTopic(href);
if (topic != null) {
selectReveal(topic);
Expand Down
Loading