From ed7ee34d61f9fc3bce597d3d32508c9e31a3135c Mon Sep 17 00:00:00 2001 From: Sabrina Diaz-Erazo Date: Thu, 21 Aug 2025 15:15:44 -0700 Subject: [PATCH] Possible misspelling of function name for changesForModelModication() The change from changesForModelModication() to changesForModelModification() (originally declared in the PDEModelUtility.java file) is being made to improve the coding and debugging experience for developers. One of the parameters that this function takes in is final ModelModification modification, which makes me think that Modication should be Modification instead. This would help save time with debugging since when I was working on Issue 1813, I saw that there was an error message with the function and I could not figure out what was wrong until I saw that I misspelled the function by one letter. --- .../pde/internal/ui/nls/ExternalizeStringsOperation.java | 4 ++-- .../ui/refactoring/RenameExtensionPointProcessor.java | 6 ++++-- .../org/eclipse/pde/internal/ui/util/PDEModelUtility.java | 3 ++- .../pde/internal/ui/wizards/tools/OrganizeManifest.java | 2 +- .../ui/wizards/tools/OrganizeManifestsProcessor.java | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java index a9f2676ed6c..6301d264bb4 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java @@ -110,7 +110,7 @@ protected void execute(IProgressMonitor monitor) throws CoreException, Invocatio private void getChangeForBuild(IFile buildPropsFile, IProgressMonitor monitor, CompositeChange parent, final String localization) { // Create change - TextFileChange[] changes = PDEModelUtility.changesForModelModication(new ModelModification(buildPropsFile) { + TextFileChange[] changes = PDEModelUtility.changesForModelModification(new ModelModification(buildPropsFile) { @Override protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException { @@ -192,7 +192,7 @@ private void addBundleLocalization(ModelChange change, IProgressMonitor mon, Com return; } final String localiz = change.getBundleLocalization(); - TextFileChange[] result = PDEModelUtility.changesForModelModication(new ModelModification(manifest) { + TextFileChange[] result = PDEModelUtility.changesForModelModification(new ModelModification(manifest) { @Override protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException { if (model instanceof IBundlePluginModelBase bundleModel) { diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java index 86348a5bf48..b1b357139f2 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java @@ -104,7 +104,8 @@ public RefactoringParticipant[] loadParticipants(RefactoringStatus status, Shara protected void changeExtensionPoint(CompositeChange compositeChange, IProgressMonitor monitor) { IFile file = getModificationFile(fInfo.getBase()); if (file != null) { - compositeChange.addAll(PDEModelUtility.changesForModelModication(getExtensionPointModification(file), monitor)); + compositeChange + .addAll(PDEModelUtility.changesForModelModification(getExtensionPointModification(file), monitor)); } } @@ -115,7 +116,8 @@ private void findReferences(CompositeChange compositeChange, IProgressMonitor mo for (int i = 0; i < bases.length; i++) { IFile file = getModificationFile(bases[i]); if (file != null) { - compositeChange.addAll(PDEModelUtility.changesForModelModication(getExtensionModification(file), subMonitor.split(1))); + compositeChange.addAll(PDEModelUtility.changesForModelModification(getExtensionModification(file), + subMonitor.split(1))); } subMonitor.setWorkRemaining(bases.length - i); } diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java index e021125339a..e665008fc91 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java @@ -305,7 +305,8 @@ public static void modifyModel(final ModelModification modification, final IProg } } - public static TextFileChange[] changesForModelModication(final ModelModification modification, final IProgressMonitor monitor) { + public static TextFileChange[] changesForModelModification(final ModelModification modification, + final IProgressMonitor monitor) { final PDEFormEditor editor = getOpenEditor(modification); if (editor != null) { Display.getDefault().syncExec(() -> { diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java index 83722e92c1d..6cc9e0d7190 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java @@ -387,7 +387,7 @@ public static TextFileChange[] removeUnusedKeys(final IProject project, final IB return new TextFileChange[0]; } - return PDEModelUtility.changesForModelModication(new ModelModification(propertiesFile) { + return PDEModelUtility.changesForModelModification(new ModelModification(propertiesFile) { @Override protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException { if (!(model instanceof IBuildModel)) { diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java index 1e0f1b270e1..2ba06df1da8 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java @@ -136,7 +136,7 @@ protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws Co } } }; - Change[] changes = PDEModelUtility.changesForModelModication(modification, subMonitor); + Change[] changes = PDEModelUtility.changesForModelModification(modification, subMonitor); for (Change changeItem : changes) { change.add(changeItem); }