Skip to content

Commit 5614632

Browse files
sderazolaeubi
authored andcommitted
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.
1 parent c9e6018 commit 5614632

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected void execute(IProgressMonitor monitor) throws CoreException, Invocatio
110110

111111
private void getChangeForBuild(IFile buildPropsFile, IProgressMonitor monitor, CompositeChange parent, final String localization) {
112112
// Create change
113-
TextFileChange[] changes = PDEModelUtility.changesForModelModication(new ModelModification(buildPropsFile) {
113+
TextFileChange[] changes = PDEModelUtility.changesForModelModification(new ModelModification(buildPropsFile) {
114114
@Override
115115
protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException {
116116

@@ -192,7 +192,7 @@ private void addBundleLocalization(ModelChange change, IProgressMonitor mon, Com
192192
return;
193193
}
194194
final String localiz = change.getBundleLocalization();
195-
TextFileChange[] result = PDEModelUtility.changesForModelModication(new ModelModification(manifest) {
195+
TextFileChange[] result = PDEModelUtility.changesForModelModification(new ModelModification(manifest) {
196196
@Override
197197
protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException {
198198
if (model instanceof IBundlePluginModelBase bundleModel) {

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public RefactoringParticipant[] loadParticipants(RefactoringStatus status, Shara
104104
protected void changeExtensionPoint(CompositeChange compositeChange, IProgressMonitor monitor) {
105105
IFile file = getModificationFile(fInfo.getBase());
106106
if (file != null) {
107-
compositeChange.addAll(PDEModelUtility.changesForModelModication(getExtensionPointModification(file), monitor));
107+
compositeChange
108+
.addAll(PDEModelUtility.changesForModelModification(getExtensionPointModification(file), monitor));
108109
}
109110
}
110111

@@ -115,7 +116,8 @@ private void findReferences(CompositeChange compositeChange, IProgressMonitor mo
115116
for (int i = 0; i < bases.length; i++) {
116117
IFile file = getModificationFile(bases[i]);
117118
if (file != null) {
118-
compositeChange.addAll(PDEModelUtility.changesForModelModication(getExtensionModification(file), subMonitor.split(1)));
119+
compositeChange.addAll(PDEModelUtility.changesForModelModification(getExtensionModification(file),
120+
subMonitor.split(1)));
119121
}
120122
subMonitor.setWorkRemaining(bases.length - i);
121123
}

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ public static void modifyModel(final ModelModification modification, final IProg
305305
}
306306
}
307307

308-
public static TextFileChange[] changesForModelModication(final ModelModification modification, final IProgressMonitor monitor) {
308+
public static TextFileChange[] changesForModelModification(final ModelModification modification,
309+
final IProgressMonitor monitor) {
309310
final PDEFormEditor editor = getOpenEditor(modification);
310311
if (editor != null) {
311312
Display.getDefault().syncExec(() -> {

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public static TextFileChange[] removeUnusedKeys(final IProject project, final IB
387387
return new TextFileChange[0];
388388
}
389389

390-
return PDEModelUtility.changesForModelModication(new ModelModification(propertiesFile) {
390+
return PDEModelUtility.changesForModelModification(new ModelModification(propertiesFile) {
391391
@Override
392392
protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException {
393393
if (!(model instanceof IBuildModel)) {

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws Co
136136
}
137137
}
138138
};
139-
Change[] changes = PDEModelUtility.changesForModelModication(modification, subMonitor);
139+
Change[] changes = PDEModelUtility.changesForModelModification(modification, subMonitor);
140140
for (Change changeItem : changes) {
141141
change.add(changeItem);
142142
}

0 commit comments

Comments
 (0)