Skip to content

Commit 6c8773c

Browse files
eclipse-pde-botlaeubi
authored andcommitted
Perform clean code of ui/org.eclipse.pde.spy.bundle
1 parent 8c4801e commit 6c8773c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ui/org.eclipse.pde.spy.bundle/src/org/eclipse/pde/spy/bundle/BundleSpyPart.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ public void createControls(Composite parent) {
111111
filterText.setMessage(Messages.BundleSpyPart_10);
112112
filterText.setToolTipText(
113113
Messages.BundleSpyPart_11);
114-
if (lastFilterText != null)
114+
if (lastFilterText != null) {
115115
filterText.setText(lastFilterText);
116+
}
116117
bundleFilter.setPattern(lastFilterText);
117118
filterText.addKeyListener(KeyListener.keyReleasedAdapter(e -> {
118119
String textToSearch = filterText.getText();

ui/org.eclipse.pde.spy.bundle/src/org/eclipse/pde/spy/bundle/internal/BundleDataFilter.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,20 @@ public boolean select(Viewer viewer, Object parentElement, Object element) {
3838

3939
public String getBundleStrings(Bundle b, int nbColumn) {
4040
StringBuilder sb = new StringBuilder();
41-
for (int i = 0; i < nbColumn; i++)
41+
for (int i = 0; i < nbColumn; i++) {
4242
sb.append(BundleDataProvider.getText(b, i)).append(" "); //$NON-NLS-1$
43+
}
4344

4445
return sb.toString();
4546
}
4647

4748
/** Set the pattern and use it as lowercase */
4849
public void setPattern(String newPattern) {
49-
if ((newPattern == null) || (newPattern.length() == 0))
50+
if ((newPattern == null) || (newPattern.length() == 0)) {
5051
pattern = null;
51-
else
52+
} else {
5253
pattern = newPattern.toLowerCase();
54+
}
5355
}
5456

5557
public boolean matchText(String text) {

0 commit comments

Comments
 (0)