Skip to content

Commit 6e61a7c

Browse files
committed
Suppress warnings for deprecated methods using IFileTypeInfo
IFileTypeInfo has been deprecated for removal. Some methods using the type have been deprecated for removal accordingly. However, those methods produce warnings because of the usage of a type that is deprecated for removal. This change applies warning suppressions to those methods as they are properly declared as deprecated for removal and will be removed together with the deprecated type.
1 parent 4bb6655 commit 6e61a7c

File tree

1 file changed

+8
-0
lines changed
  • team/bundles/org.eclipse.team.core/src/org/eclipse/team/core

1 file changed

+8
-0
lines changed

team/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,24 @@
6565
*/
6666
public final class Team {
6767

68+
@SuppressWarnings("removal")
69+
@Deprecated
6870
private static class StringMappingWrapper implements IFileTypeInfo {
6971

7072
private final IStringMapping fMapping;
7173

74+
@Deprecated
7275
public StringMappingWrapper(IStringMapping mapping) {
7376
fMapping= mapping;
7477
}
7578

79+
@Deprecated
7680
@Override
7781
public String getExtension() {
7882
return fMapping.getString();
7983
}
8084

85+
@Deprecated
8186
@Override
8287
public int getType() {
8388
return fMapping.getType();
@@ -190,6 +195,7 @@ public static boolean isIgnored(IFile file) {
190195
* @return all known file types
191196
* @deprecated Use <code>getFileContentManager().getExtensionMappings()</code> instead.
192197
*/
198+
@SuppressWarnings("removal")
193199
@Deprecated(forRemoval = true, since = "2025-03")
194200
public static IFileTypeInfo[] getAllTypes() {
195201
final IStringMapping [] mappings= fFileContentManager.getExtensionMappings();
@@ -542,11 +548,13 @@ public static IIgnoreInfo[] getDefaultIgnores() {
542548
* @since 3.0
543549
* @deprecated Use Team.getFileContentManager().getDefaultExtensionMappings() instead.
544550
*/
551+
@SuppressWarnings("removal")
545552
@Deprecated(forRemoval = true, since = "2025-03")
546553
public static IFileTypeInfo[] getDefaultTypes() {
547554
return asFileTypeInfo(getFileContentManager().getDefaultExtensionMappings());
548555
}
549556

557+
@SuppressWarnings("removal")
550558
private static IFileTypeInfo [] asFileTypeInfo(IStringMapping [] mappings) {
551559
final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length];
552560
for (int i = 0; i < infos.length; i++) {

0 commit comments

Comments
 (0)