From 362ea6dc9fabaa320bd53df51337ec1218b3b1aa Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Mon, 14 Jul 2025 21:41:21 +0200 Subject: [PATCH] Add missing `@Deprecated` annotations The methods need to be implemented because they are specified by the interface. Mark them as deprecated to avoid the resulting deprecation warning. --- org.eclipse.wb.core.databinding/META-INF/MANIFEST.MF | 2 +- .../eclipse/wb/internal/core/databinding/ui/UiUtils.java | 6 +++++- .../contentproviders/CheckboxTreeViewerWrapper.java | 3 ++- .../wb/internal/core/editor/palette/DesignerPalette.java | 7 +++++++ .../core/utils/ast/binding/DesignerTypeBinding.java | 1 + .../wb/internal/core/utils/jdt/core/SubtypesScope.java | 6 +++++- .../org/eclipse/wb/core/controls/test/PaletteTest.java | 9 ++++++++- 7 files changed, 29 insertions(+), 5 deletions(-) diff --git a/org.eclipse.wb.core.databinding/META-INF/MANIFEST.MF b/org.eclipse.wb.core.databinding/META-INF/MANIFEST.MF index 2fd32833a..032089083 100644 --- a/org.eclipse.wb.core.databinding/META-INF/MANIFEST.MF +++ b/org.eclipse.wb.core.databinding/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wb.core.databinding;singleton:=true -Bundle-Version: 1.9.900.qualifier +Bundle-Version: 1.9.1000.qualifier Bundle-Activator: org.eclipse.wb.internal.core.databinding.Activator Bundle-Vendor: %providerName Require-Bundle: org.eclipse.ui;bundle-version="[3.206.0,4.0.0)", diff --git a/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/UiUtils.java b/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/UiUtils.java index df4298aee..20b6bf0be 100644 --- a/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/UiUtils.java +++ b/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/UiUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2023 Google, Inc. + * Copyright (c) 2011, 2025 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -260,20 +260,24 @@ public IPath[] enclosingProjectsAndJars() { } @Override + @Deprecated public boolean includesBinaries() { return true; } @Override + @Deprecated public boolean includesClasspaths() { return true; } @Override + @Deprecated public void setIncludesBinaries(boolean includesBinaries) { } @Override + @Deprecated public void setIncludesClasspaths(boolean includesClasspaths) { } } diff --git a/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/editor/contentproviders/CheckboxTreeViewerWrapper.java b/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/editor/contentproviders/CheckboxTreeViewerWrapper.java index 096db87f9..2f0b51300 100644 --- a/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/editor/contentproviders/CheckboxTreeViewerWrapper.java +++ b/org.eclipse.wb.core.databinding/src/org/eclipse/wb/internal/core/databinding/ui/editor/contentproviders/CheckboxTreeViewerWrapper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Google, Inc. + * Copyright (c) 2011, 2025 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -60,6 +60,7 @@ public void setCheckedElements(Object[] elements) { } @Override + @Deprecated public void setAllChecked(boolean state) { m_viewer.setAllChecked(state); } diff --git a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/palette/DesignerPalette.java b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/palette/DesignerPalette.java index 3a77b7b10..b8b3765ce 100644 --- a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/palette/DesignerPalette.java +++ b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/palette/DesignerPalette.java @@ -354,6 +354,7 @@ public boolean isEnabled() { // //////////////////////////////////////////////////////////////////////////// @Override + @Deprecated public boolean activate(boolean reload) { return entryInfo.createTool(reload) != null; } @@ -422,11 +423,13 @@ public List getChildren() { } @Override + @Deprecated public boolean isOpen() { return m_open; } @Override + @Deprecated public void setOpen(boolean open) { m_open = open; m_openCategories.put(categoryId, open); @@ -452,6 +455,7 @@ private void showPalette() { // set IPalette m_paletteRoot = new DesignerRoot() { @Override + @Deprecated public void addPopupActions(IMenuManager menuManager, Object target, int iconsType) { new DesignerPalettePopupActions(getOperations()).addPopupActions( menuManager, @@ -460,11 +464,13 @@ public void addPopupActions(IMenuManager menuManager, Object target, int iconsTy } @Override + @Deprecated public void selectDefault() { m_editPartViewer.getEditDomain().loadDefaultTool(); } @Override + @Deprecated public void moveCategory(ICategory _category, ICategory _nextCategory) { CategoryInfo category = m_visualToCategoryInfo.get(_category); CategoryInfo nextCategory = m_visualToCategoryInfo.get(_nextCategory); @@ -472,6 +478,7 @@ public void moveCategory(ICategory _category, ICategory _nextCategory) { } @Override + @Deprecated public void moveEntry(IEntry _entry, ICategory _targetCategory, IEntry _nextEntry) { EntryInfo entry = m_visualToEntryInfo.get(_entry); CategoryInfo category = m_visualToCategoryInfo.get(_targetCategory); diff --git a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/ast/binding/DesignerTypeBinding.java b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/ast/binding/DesignerTypeBinding.java index dd8b5bcfb..043061549 100644 --- a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/ast/binding/DesignerTypeBinding.java +++ b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/ast/binding/DesignerTypeBinding.java @@ -330,6 +330,7 @@ public int getModifiers() { } @Override + @Deprecated public int getDeclaredModifiers() { return m_declaredModifiers; } diff --git a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/jdt/core/SubtypesScope.java b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/jdt/core/SubtypesScope.java index 79cedd487..25f8f5ad8 100644 --- a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/jdt/core/SubtypesScope.java +++ b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/utils/jdt/core/SubtypesScope.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Google, Inc. + * Copyright (c) 2011, 2025 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -93,21 +93,25 @@ public IPath[] enclosingProjectsAndJars() { // //////////////////////////////////////////////////////////////////////////// @Override + @Deprecated public boolean includesBinaries() { return m_hierarchyScope.includesBinaries(); } @Override + @Deprecated public boolean includesClasspaths() { return m_hierarchyScope.includesClasspaths(); } @Override + @Deprecated public void setIncludesBinaries(boolean includesBinaries) { m_hierarchyScope.setIncludesBinaries(includesBinaries); } @Override + @Deprecated public void setIncludesClasspaths(boolean includesClasspaths) { m_hierarchyScope.setIncludesClasspaths(includesClasspaths); } diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/controls/test/PaletteTest.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/controls/test/PaletteTest.java index 8c47c533e..4b84bc1f9 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/core/controls/test/PaletteTest.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/controls/test/PaletteTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. and others. + * Copyright (c) 2011, 2025 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -156,6 +156,7 @@ private static final class PaletteImpl extends DesignerRoot { /** {@inheritDoc} */ @Override + @Deprecated public void addPopupActions(IMenuManager menuManager, Object target, int iconType) { } @@ -165,14 +166,17 @@ public void addPopupActions(IMenuManager menuManager, Object target, int iconTyp // //////////////////////////////////////////////////////////////////////////// @Override + @Deprecated public void selectDefault() { } @Override + @Deprecated public void moveCategory(ICategory category, ICategory nextCategory) { } @Override + @Deprecated public void moveEntry(IEntry entry, ICategory targetCategory, IEntry nextEntry) { } } @@ -201,11 +205,13 @@ public CategoryImpl(String text, boolean open) { //////////////////////////////////////////////////////////////////////////// @Override + @Deprecated public boolean isOpen() { return m_open; } @Override + @Deprecated public void setOpen(boolean b) { m_open = b; } @@ -244,6 +250,7 @@ public boolean isEnabled() { // //////////////////////////////////////////////////////////////////////////// @Override + @Deprecated public boolean activate(boolean reload) { return true; }