diff --git a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/DesignPage.java b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/DesignPage.java index c006ab894..3e5a73cbd 100644 --- a/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/DesignPage.java +++ b/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/DesignPage.java @@ -455,6 +455,7 @@ private void internal_refreshGEF_withProgress() throws Exception { final Display display = Display.getCurrent(); IRunnableWithProgress runnable = new IRunnableWithProgress() { @Override + @SuppressWarnings("removal") public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { monitor.beginTask("Opening Design page.", 7); diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/editor/IDesignPageSite.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/editor/IDesignPageSite.java index fe4c2c5e9..2ada43394 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/core/editor/IDesignPageSite.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/editor/IDesignPageSite.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 @@ -74,7 +74,11 @@ public static IDesignPageSite getSite(ObjectInfo objectInfo) { * @return the {@link IProgressMonitor} to use for displaying progress during parsing (initiated * by {@link IDesignPage}). If parsing was complete, or we run tests, then * {@link NullProgressMonitor} will be returned. Never returns null. + * @deprecated The progress monitor should never be used outside of the parsing + * context. This method will be removed after the 2028-release. */ + @SuppressWarnings("removal") + @Deprecated(forRemoval = true, since = "2026-03") public static IProgressMonitor getProgressMonitor() { return DesignPageSite.getProgressMonitor(); } diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/editor/DesignPageSite.java b/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/editor/DesignPageSite.java index 16cda75bf..b8f784ab1 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/editor/DesignPageSite.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/editor/DesignPageSite.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 @@ -128,7 +128,9 @@ public static void setSite(ObjectInfo objectInfo, IDesignPageSite site) { * @return the {@link IProgressMonitor} to use for displaying progress during parsing (initiated * by {@link IDesignPage}). If parsing was complete, or we run tests, then * {@link NullProgressMonitor} will be returned. Never returns null. + * @deprecated The progress monitor should never be used outside of the parsing context. */ + @Deprecated(forRemoval = true, since = "2026-03") public static IProgressMonitor getProgressMonitor() { return m_progressMonitor != null ? m_progressMonitor : NULL_PROGRESS_MONITOR; } @@ -139,7 +141,9 @@ public static IProgressMonitor getProgressMonitor() { * * @param progressMonitor * the {@link IProgressMonitor} to use, may be null. + * @deprecated The progress monitor should never be used outside of the parsing context. */ + @Deprecated(forRemoval = true, since = "2026-03") public static void setProgressMonitor(IProgressMonitor progressMonitor) { m_progressMonitor = progressMonitor; }