From 245afaa8268801942e84d2d2c68d29bc662e6fc5 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 2 Sep 2026 07:49:44 +0200 Subject: [PATCH 1/2] Remove unused internal classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These 14 classes have no remaining references in the platform, JDT, PDE, SWT, equinox or p2 sources, and none are registered from a plugin.xml. XMLContentDescriber is an empty subclass of the API class of the same name in org.eclipse.core.runtime.content, which is the one plugin.xml registers. Both Convert classes are referenced only from an older copy of their own bundle on the build path, not from any source. Assisted-by: multiple AI agents and layers of automated tooling 🤖 --- .../internal/ui/AntPropertyValueProvider.java | 60 ------- .../AntJavaLaunchDelegate.java | 49 ----- .../IAntLaunchConfigurationConstants.java | 168 ------------------ .../internal/ui/preferences/MessageLine.java | 87 --------- .../internal/ui/viewers/ILabelResult.java | 51 ------ .../resources/refresh/win32/Convert.java | 53 ------ .../eclipse/core/internal/utils/Convert.java | 77 -------- .../internal/content/XMLContentDescriber.java | 49 ----- .../compare/internal/ListContentProvider.java | 57 ------ .../IResourceMappingResourceFilter.java | 35 ---- .../ui/history/OpenLocalFileAction.java | 90 ---------- .../mapping/ResourceMappingLabelProvider.java | 61 ------- .../ui/synchronize/RegexDiffComparator.java | 78 -------- .../process/internal/IContextHelpIds.java | 30 ---- 14 files changed, 945 deletions(-) delete mode 100644 ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntPropertyValueProvider.java delete mode 100644 ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java delete mode 100644 ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java delete mode 100644 ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java delete mode 100644 debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java delete mode 100644 resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Convert.java delete mode 100644 resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Convert.java delete mode 100644 runtime/bundles/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java delete mode 100644 team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java delete mode 100644 team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java delete mode 100644 team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java delete mode 100644 team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java delete mode 100644 team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RegexDiffComparator.java delete mode 100644 terminal/bundles/org.eclipse.terminal.connector.process/src/org/eclipse/terminal/connector/process/internal/IContextHelpIds.java diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntPropertyValueProvider.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntPropertyValueProvider.java deleted file mode 100644 index 8d2314b1355..00000000000 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntPropertyValueProvider.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2006 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; - -import org.eclipse.ant.core.IAntPropertyValueProvider; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jdt.core.JavaCore; - -/** - * Dynamic provider for Ant properties. - * - * Provides the dynamic values for the following Ant properties: - * - * - * - * @since 3.1 - */ -public class AntPropertyValueProvider implements IAntPropertyValueProvider { - /** - * Returns the dynamic property values for Ant properties. - * - * @param propertyName - * The name of the property to resolve the value for - * @return The resolved value for the property - * @see org.eclipse.ant.core.IAntPropertyValueProvider#getAntPropertyValue(String) - */ - @Override - public String getAntPropertyValue(String propertyName) { - String value = null; - if ("eclipse.target".equals(propertyName)) { //$NON-NLS-1$ - try { - IPath home = JavaCore.getClasspathVariable("ECLIPSE_HOME"); //$NON-NLS-1$ - if (home != null) { - value = home.toFile().getAbsolutePath(); - if (value.endsWith("/")) { //$NON-NLS-1$ - value = value.substring(0, value.length() - 1); - } - } - } - catch (Exception e) { - AntUIPlugin.log(e); - } - } - return value; - } -} diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java deleted file mode 100644 index 8b1eaa0adf4..00000000000 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2013 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.launchConfigurations; - -import org.eclipse.ant.internal.core.IAntCoreConstants; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; -import org.eclipse.jdt.launching.JavaLaunchDelegate; - -/** - * Used by the AntLaunchDelegate for Ant builds in a separate VM The sub-classing is needed to be able to launch an Ant build from a non-Java project - */ -public class AntJavaLaunchDelegate extends JavaLaunchDelegate { - @Override - public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { - try { - return super.preLaunchCheck(configuration, mode, monitor); - } - catch (CoreException ce) { - // likely dealing with a non-Java project - } - // no need to check for breakpoints as always in run mode - return true; - } - - @Override - public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException { - try { - return super.getProgramArguments(configuration); - } - catch (CoreException ce) { - // do nothing - } - return configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING); - } -} diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java deleted file mode 100644 index bf4eab2e326..00000000000 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2009 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.launchConfigurations; - -import org.eclipse.ant.launching.IAntLaunchConstants; -import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; -import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants; - -/** - * Constant definitions for Ant launch configurations. - *

- * Constant definitions only; not to be implemented. - *

- * - * @since 3.0 - * @noimplement This interface is not intended to be implemented by clients. - * @deprecated This interface has been replaced with {@link IAntLaunchConstants} - */ -@Deprecated -public interface IAntLaunchConfigurationConstants { - - /** - * String attribute indicating the custom runtime classpath to use for an Ant build. Default value is null which indicates that the - * global classpath is to be used. Format is a comma separated listing of URLs. - * - * @deprecated no longer supported: use {@link IJavaLaunchConfigurationConstants#ATTR_CLASSPATH_PROVIDER} - * @see IJavaLaunchConfigurationConstants#ATTR_DEFAULT_CLASSPATH - */ - @Deprecated - public static final String ATTR_ANT_CUSTOM_CLASSPATH = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_CUSTOM_CLASSPATH"; //$NON-NLS-1$ - /** - * String attribute indicating the custom Ant home to use for an Ant build. Default value is null which indicates that no Ant home is - * to be set - * - * @deprecated no longer supported: use {@link IJavaLaunchConfigurationConstants#ATTR_CLASSPATH_PROVIDER} - * @see IJavaLaunchConfigurationConstants#ATTR_DEFAULT_CLASSPATH - */ - @Deprecated - public static final String ATTR_ANT_HOME = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_HOME"; //$NON-NLS-1$ - - /** - * String attribute indicating the Ant targets to execute. Default value is null which indicates that the default target is to be - * executed. Format is a comma separated listing of targets. - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS; - /** - * String attribute indicating the Ant targets to execute after a clean (full build) for an Ant builder. Default value is null which - * indicates that the default target is to be executed. Format is a comma separated listing of targets. - * - * @since 3.1 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS; - /** - * String attribute indicating the Ant targets to execute during a manual build for an Ant builder. Default value is null which - * indicates that the default target is to be executed. Format is a comma separated listing of targets. - * - * @since 3.1 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_MANUAL_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS; - /** - * String attribute indicating the Ant targets to execute during an auto build for an Ant builder. Default value is null which - * indicates that the default target is to be executed. Format is a comma separated listing of targets. - * - * @since 3.1 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_AUTO_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS; - /** - * String attribute indicating the Ant targets to execute during a clean for an Ant builder. Default value is null which indicates - * that the default target is to be executed. Format is a comma separated listing of targets. - * - * @since 3.1 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_CLEAN_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS; - /** - * Boolean attribute indicating whether or not target specification for an Ant builder has been updated for 3.1 - * - * @since 3.1 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_TARGETS_UPDATED = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_TARGETS_UPDATED; - /** - * Map attribute indicating the Ant properties to be defined during the build. Default value is null which indicates no additional - * properties will be defined. - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_PROPERTIES = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES; - /** - * String attribute indicating the Ant targets to execute. Default value is null which indicates that no additional property files - * will be defined. Format is a comma separated listing of property files. - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_ANT_PROPERTY_FILES = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTY_FILES; - /** - * Boolean attribute indicating whether or not internal targets (targets with no description) should be hidden from the user in the launch - * configuration dialog. Default value is false which indicates that all targets will be displayed. - * - * @since 3.0 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_HIDE_INTERNAL_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_HIDE_INTERNAL_TARGETS; - /** - * Integer attribute indicating which column targets should be sorted on. A value of 0 indicates target name, 1 indicates target description, and - * -1 indicates no sort. Default value is -1. - * - * @since 3.0 - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ATTR_SORT_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_SORT_TARGETS; - /** - * Ant launch configuration type identifier. - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE; - /** - * Ant builder launch configuration type identifier. Ant project builders are of this type. - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE; - /** - * Identifier for Ant processes (value org.eclipse.ant.ui.antProcess). This identifier is set as the value for the - * IProcess.ATTR_PROCESS_TYPE attribute in processes created by the Ant launch delegate. - * - * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} - */ - @Deprecated - public static final String ID_ANT_PROCESS_TYPE = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ID_ANT_PROCESS_TYPE; -} diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java deleted file mode 100644 index 383c19d0869..00000000000 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2011 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.preferences; - -import org.eclipse.ant.internal.core.IAntCoreConstants; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.CLabel; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.PlatformUI; - -/** - * A message line displaying a status. - */ -public class MessageLine extends CLabel { - - private static final RGB ERROR_BACKGROUND_RGB = new RGB(230, 226, 221); - - private final Color fNormalMsgAreaBackground; - private Color fErrorMsgAreaBackground; - - /** - * Creates a new message line as a child of the given parent. - */ - public MessageLine(Composite parent) { - this(parent, SWT.LEFT); - } - - /** - * Creates a new message line as a child of the parent and with the given SWT stylebits. - */ - public MessageLine(Composite parent, int style) { - super(parent, style); - fNormalMsgAreaBackground = getBackground(); - fErrorMsgAreaBackground = null; - } - - private Image findImage(IStatus status) { - if (status.isOK()) { - return null; - } else if (status.matches(IStatus.ERROR)) { - return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); - } else if (status.matches(IStatus.WARNING)) { - return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); - } else if (status.matches(IStatus.INFO)) { - return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); - } - return null; - } - - /** - * Sets the message and image to the given status. null is a valid argument and will set the empty text and no image - */ - public void setErrorStatus(IStatus status) { - if (status != null) { - String message = status.getMessage(); - if (message != null && message.length() > 0) { - setText(message); - setImage(findImage(status)); - if (fErrorMsgAreaBackground == null) { - fErrorMsgAreaBackground = new Color(ERROR_BACKGROUND_RGB); - } - setBackground(fErrorMsgAreaBackground); - return; - } - } - setText(IAntCoreConstants.EMPTY_STRING); - setImage(null); - setBackground(fNormalMsgAreaBackground); - } - -} diff --git a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java deleted file mode 100644 index a98931c85d0..00000000000 --- a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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.debug.internal.ui.viewers; - -import org.eclipse.jface.viewers.TreePath; -import org.eclipse.swt.graphics.Image; - - -/** - * Results of collecting an asynchronous label in a tree. - * - * @since 3.2 - */ -public interface ILabelResult { - - /** - * Returns the labels for the element. One for each column. - */ - String[] getLabels(); - - /** - * Returns the images for the element. - */ - Image[] getImages(); - - /** - * Returns the element the label is for. - */ - Object getElement(); - - /** - * Returns the path to the element in the tree. - */ - TreePath getTreePath(); - - /** - * Returns this element's depth in the tree. - */ - int getDepth(); -} diff --git a/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Convert.java b/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Convert.java deleted file mode 100644 index 4773341e96e..00000000000 --- a/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Convert.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2002, 2007 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 - Initial API and implementation - *******************************************************************************/ -package org.eclipse.core.internal.resources.refresh.win32; - -import java.io.*; - -/** - * Performs character to byte conversion for passing strings to native win32 - * methods. - */ -public class Convert { - - /* - * Obtains the default encoding on this platform - */ - private static String defaultEncoding = new InputStreamReader(new ByteArrayInputStream(new byte[0])).getEncoding(); - - /** - * Converts the given String to bytes using the platforms default - * encoding. - * - * @param target The String to be converted, can not be null. - * @return byte[] The resulting bytes, or null. - */ - /** - * Calling String.getBytes() creates a new encoding object and other garbage. - * This can be avoided by calling String.getBytes(String encoding) instead. - */ - public static byte[] toPlatformBytes(String target) { - if (defaultEncoding == null) { - return target.getBytes(); - } - // try to use the default encoding - try { - return target.getBytes(defaultEncoding); - } catch (UnsupportedEncodingException e) { - // null the default encoding so we don't try it again - defaultEncoding = null; - return target.getBytes(); - } - } -} diff --git a/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Convert.java b/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Convert.java deleted file mode 100644 index b59ffc8459f..00000000000 --- a/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Convert.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2017 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.core.internal.utils; - -import java.nio.charset.StandardCharsets; - -public class Convert { - - /** - * Converts the string argument to a byte array. - */ - public static String fromUTF8(byte[] b) { - return new String(b, StandardCharsets.UTF_8); - } - - /** - * Converts the string argument to a byte array. - */ - public static byte[] toUTF8(String s) { - return s.getBytes(StandardCharsets.UTF_8); - } - - /** - * Performs conversion of a long value to a byte array representation. - * - * @see #bytesToLong(byte[]) - */ - public static byte[] longToBytes(long value) { - - // A long value is 8 bytes in length. - byte[] bytes = new byte[8]; - - // Convert and copy value to byte array: - // -- Cast long to a byte to retrieve least significant byte; - // -- Left shift long value by 8 bits to isolate next byte to be converted; - // -- Repeat until all 8 bytes are converted (long = 64 bits). - // Note: In the byte array, the least significant byte of the long is held in - // the highest indexed array bucket. - - for (int i = 0; i < bytes.length; i++) { - bytes[(bytes.length - 1) - i] = (byte) value; - value >>>= 8; - } - - return bytes; - } - - /** - * Performs conversion of a byte array to a long representation. - * - * @see #longToBytes(long) - */ - public static long bytesToLong(byte[] value) { - - long longValue = 0L; - - // See method convertLongToBytes(long) for algorithm details. - for (byte element : value) { - // Left shift has no effect thru first iteration of loop. - longValue <<= 8; - longValue ^= element & 0xFF; - } - - return longValue; - } -} diff --git a/runtime/bundles/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java b/runtime/bundles/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java deleted file mode 100644 index c500771da09..00000000000 --- a/runtime/bundles/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2010 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.core.internal.content; - -/** - * DO NOT REMOVE, used in a product. - * - * A content describer for XML files. This class provides basis for XML-based - * content describers. - *

- * The document is detected by the describer as VALID, if it - * contains an xml declaration with <?xml prefix and the - * encoding in the declaration is correct. - *

- * Below are sample declarations recognized by the describer as - * VALID - * - * - * @noinstantiate This class is not intended to be instantiated by clients. - * Clients should use it to provide their own XML-based - * describers that can be referenced by the "describer" - * configuration element in extensions to the - * org.eclipse.core.contenttype.contentTypes extension - * point. - * - * @see org.eclipse.core.runtime.content.IContentDescriber - * @see "http://www.w3.org/TR/REC-xml *" - * - * @deprecated As of 3.5, replaced by {@link org.eclipse.core.runtime.content.XMLContentDescriber} - */ -@Deprecated -public class XMLContentDescriber extends org.eclipse.core.runtime.content.XMLContentDescriber { -} diff --git a/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java b/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java deleted file mode 100644 index 8ae77e42c35..00000000000 --- a/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2011 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.compare.internal; - -import java.util.List; - -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.Viewer; - -/** - * A specialized content provider to show a list of editor parts. - */ -public class ListContentProvider implements IStructuredContentProvider { - List fContents; - - public ListContentProvider() { - // nothing to do - } - - @Override - public Object[] getElements(Object input) { - if (fContents != null && fContents == input) { - return fContents.toArray(); - } - return new Object[0]; - } - - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - if (newInput instanceof List) { - fContents = (List) newInput; - } else { - fContents= null; - // we use a fixed set. - } - } - - @Override - public void dispose() { - // empty default implementation - } - - public boolean isDeleted(Object o) { - return fContents != null && !fContents.contains(o); - } -} diff --git a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java b/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java deleted file mode 100644 index 25464684460..00000000000 --- a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 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.team.internal.ui.dialogs; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.mapping.ResourceMapping; -import org.eclipse.core.resources.mapping.ResourceTraversal; -import org.eclipse.core.runtime.CoreException; - -/** - * A filter for selecting resources of a resource mapping for - * inclusion in a view. - */ -public interface IResourceMappingResourceFilter { - - /** - * Return whether the resource should be included in this filter. - * @param resource the resource - * @param mapping the mapping chiehc containes the resource - * @param traversal the traversal from which the resource was obtained - * @return whether the resource passes the filter - */ - boolean select(IResource resource, ResourceMapping mapping, ResourceTraversal traversal) throws CoreException; -} diff --git a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java b/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java deleted file mode 100644 index 88eea79eca0..00000000000 --- a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java +++ /dev/null @@ -1,90 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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.team.internal.ui.history; - -import java.io.IOException; -import java.io.InputStream; - -import org.eclipse.core.resources.IFileState; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.content.IContentType; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.team.internal.ui.TeamUIMessages; -import org.eclipse.team.internal.ui.TeamUIPlugin; -import org.eclipse.ui.IEditorDescriptor; -import org.eclipse.ui.IEditorRegistry; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.BaseSelectionListenerAction; - -public class OpenLocalFileAction extends BaseSelectionListenerAction { - - protected OpenLocalFileAction(String text) { - super(text); - } - - @Override - public void run() { - try { - IStructuredSelection structSel = getStructuredSelection(); - - Object[] objArray = structSel.toArray(); - - for (Object obj : objArray) { - IFileState state = (IFileState) obj; - if (!state.exists()) { - MessageDialog.openError(TeamUIPlugin.getActivePage().getActivePart().getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevisionTitle, TeamUIMessages.OpenRevisionAction_DeletedRevisionMessage); - } else { - String id = getEditorID(state.getName(), state.getContents()); - IWorkbenchPage page = TeamUIPlugin.getActivePage(); - if (page != null) { - page.openEditor(new FileRevisionEditorInput(state), id); - } - } - } - - } catch (Exception e) { - - } - } - - /* private */String getEditorID(String fileName, InputStream contents) { - IWorkbench workbench = PlatformUI.getWorkbench(); - IEditorRegistry registry = workbench.getEditorRegistry(); - - IContentType type = null; - if (contents != null) { - try { - type = Platform.getContentTypeManager().findContentTypeFor(contents, fileName); - } catch (IOException e) { - - } - } - if (type == null) { - type = Platform.getContentTypeManager().findContentTypeFor(fileName); - } - IEditorDescriptor descriptor = registry.getDefaultEditor(fileName, type); - String id; - if (descriptor == null) { - id = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$ - } else { - id = descriptor.getId(); - } - - return id; - } - -} diff --git a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java b/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java deleted file mode 100644 index 3b5523c19f3..00000000000 --- a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 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.team.internal.ui.mapping; - -import org.eclipse.core.resources.mapping.ModelProvider; -import org.eclipse.core.resources.mapping.ResourceMapping; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.model.WorkbenchLabelProvider; - -public class ResourceMappingLabelProvider extends LabelProvider { - WorkbenchLabelProvider provider = new WorkbenchLabelProvider(); - @Override - public String getText(Object element) { - if (element instanceof ResourceMapping mapping) { - String text = provider.getText(mapping.getModelObject()); - if (text != null && text.length() > 0) { - return text; - } - return super.getText(mapping.getModelObject()); - } - if (element instanceof ModelProvider provider) { - return provider.getDescriptor().getLabel(); - } - String text = provider.getText(element); - if (text != null && text.length() > 0) { - return text; - } - return super.getText(element); - } - @Override - public Image getImage(Object element) { - Image image = provider.getImage(element); - if (image != null) { - return image; - } - if (element instanceof ResourceMapping mapping) { - image = provider.getImage(mapping.getModelObject()); - if (image != null) { - return image; - } - } - return super.getImage(element); - } - @Override - public void dispose() { - provider.dispose(); - super.dispose(); - } -} \ No newline at end of file diff --git a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RegexDiffComparator.java b/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RegexDiffComparator.java deleted file mode 100644 index 7bafcc7166d..00000000000 --- a/team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RegexDiffComparator.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 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.team.internal.ui.synchronize; - -import java.util.regex.Pattern; - -import org.eclipse.compare.internal.DocLineComparator; -import org.eclipse.compare.rangedifferencer.RangeDifference; -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.IRegion; - -/** - * Compute differences between local and remote contents and checks if all match - * the given regex pattern. If there is at least one diff whose either left or - * right side don't match the pattern - * {@link #compareRangeDifferences(RangeDifference[], IDocument, IDocument)} - * returns false. - */ -public class RegexDiffComparator extends RangeDifferenceComparator { - - private final Pattern pattern; - - public RegexDiffComparator(Pattern pattern, boolean ignoreWhitespace) { - super(ignoreWhitespace); - this.pattern = pattern; - } - - @Override - protected boolean compareRangeDifferences(RangeDifference[] ranges, - IDocument lDoc, IDocument rDoc) { - try { - for (RangeDifference diff : ranges) { - if (diff.kind() == RangeDifference.NOCHANGE) { - continue; - } - - DocLineComparator sleft = new DocLineComparator(lDoc, null, - shouldIgnoreWhitespace()); - DocLineComparator sright = new DocLineComparator(rDoc, null, - shouldIgnoreWhitespace()); - - IRegion lRegion = lDoc.getLineInformation(diff.leftStart()); - int leftEnd = sleft.getTokenStart(diff.leftStart() - + diff.leftLength()); - String left = lDoc.get(lRegion.getOffset(), - leftEnd - lRegion.getOffset()); - IRegion rRegion = rDoc.getLineInformation(diff.rightStart()); - int rightEnd = sright.getTokenStart(diff.rightStart() - + diff.rightLength()); - String right = rDoc.get(rRegion.getOffset(), - rightEnd - rRegion.getOffset()); - - boolean m1 = pattern.matcher(left).matches(); - boolean m2 = pattern.matcher(right).matches(); - - if (!m1 && !m2) { - // it's false that all diffs match the pattern - return false; - } - } - } catch (BadLocationException e) { - // ignore - } - return true; - } -} \ No newline at end of file diff --git a/terminal/bundles/org.eclipse.terminal.connector.process/src/org/eclipse/terminal/connector/process/internal/IContextHelpIds.java b/terminal/bundles/org.eclipse.terminal.connector.process/src/org/eclipse/terminal/connector/process/internal/IContextHelpIds.java deleted file mode 100644 index 57d9ef0d5f4..00000000000 --- a/terminal/bundles/org.eclipse.terminal.connector.process/src/org/eclipse/terminal/connector/process/internal/IContextHelpIds.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2018 Wind River Systems, Inc. and others. All rights reserved. - * 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: - * Wind River Systems - initial API and implementation - *******************************************************************************/ -package org.eclipse.terminal.connector.process.internal; - -/** - * Context help id definitions. - */ -public interface IContextHelpIds { - - /** - * UI plug-in common context help id prefix. - */ - public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$ - - // ***** Message dialog boxes ***** - - /** - * Process connector: Create process failed - */ - public final static String MESSAGE_CREATE_PROCESS_FAILED = PREFIX + ".status.messageCreateProcessFailed"; //$NON-NLS-1$ -} From 16261e03b170678d341c82314d91aa86211b1d70 Mon Sep 17 00:00:00 2001 From: Eclipse Platform Bot Date: Wed, 2 Sep 2026 06:05:36 +0000 Subject: [PATCH 2/2] Version bump(s) for 4.42 stream --- ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF | 2 +- .../bundles/org.eclipse.core.contenttype/META-INF/MANIFEST.MF | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF b/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF index 78c356a2ce4..5110860093d 100644 --- a/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF +++ b/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF @@ -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.600.qualifier +Bundle-Version: 3.10.700.qualifier Bundle-Activator: org.eclipse.ant.internal.ui.AntUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/runtime/bundles/org.eclipse.core.contenttype/META-INF/MANIFEST.MF b/runtime/bundles/org.eclipse.core.contenttype/META-INF/MANIFEST.MF index cdc4253398c..4a273249ae4 100644 --- a/runtime/bundles/org.eclipse.core.contenttype/META-INF/MANIFEST.MF +++ b/runtime/bundles/org.eclipse.core.contenttype/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.core.contenttype; singleton:=true -Bundle-Version: 3.9.900.qualifier +Bundle-Version: 3.9.1000.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Require-Bundle: org.eclipse.equinox.preferences;bundle-version="[3.2.0,4.0.0)",