Skip to content

Commit 224b47e

Browse files
committed
some formatting
1 parent 12394c8 commit 224b47e

File tree

1 file changed

+9
-9
lines changed
  • eclipse-language-servers/org.springframework.tooling.ls.eclipse.gotosymbol/src/org/springframework/tooling/ls/eclipse/gotosymbol/dialogs

1 file changed

+9
-9
lines changed

eclipse-language-servers/org.springframework.tooling.ls.eclipse.gotosymbol/src/org/springframework/tooling/ls/eclipse/gotosymbol/dialogs/GotoSymbolSection.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2016, 2019, 2020 Rogue Wave Software Inc. and others.
2+
* Copyright (c) 2016, 2021 Rogue Wave Software Inc. and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -147,7 +147,7 @@ public Color getToolTipForegroundColor(Object object) {
147147
public String getToolTipText(Object element) {
148148
if (element instanceof Match) {
149149
SymbolInformation si = getSymbolInformation((Match<?>)element);
150-
if (si!=null) {
150+
if (si != null) {
151151
return si.getName();
152152
}
153153
}
@@ -199,8 +199,7 @@ public void dispose() {
199199
}
200200

201201
protected String getSymbolLocationText(SymbolInformation symbol) {
202-
Optional<String> location = GotoSymbolSection.this
203-
.getSymbolLocation(symbol);
202+
Optional<String> location = GotoSymbolSection.this.getSymbolLocation(symbol);
204203
if (location.isPresent()) {
205204
return " -- [" + location.get() + "]";
206205
}
@@ -262,6 +261,7 @@ public void createContents(Composite dialogArea) {
262261
disposables.add(model.getSymbols().onChange(UIValueListener.from((e, v) -> {
263262
if (!viewer.getControl().isDisposed()) viewer.refresh();
264263
})));
264+
265265
//TODO: somehow show selection in local file, (but not in other file ?)
266266
// viewer.addSelectionChangedListener(event -> {
267267
// IStructuredSelection selection = (IStructuredSelection) event.getSelection();
@@ -373,7 +373,7 @@ private String inputDialog(String dialogTitle, String prompt, String defaultValu
373373
public void run() {
374374
InputDialog dlg = new InputDialog(owner.getShell(), dialogTitle, prompt, defaultValue, null);
375375
int code = dlg.open();
376-
if (code==IDialogConstants.OK_ID) {
376+
if (code == IDialogConstants.OK_ID) {
377377
result.set(dlg.getValue());
378378
}
379379
}
@@ -388,7 +388,7 @@ public void keyPressed(KeyEvent e) {
388388
if (list.getTree().getItemCount() > 0) {
389389
list.getTree().setFocus();
390390
TreeItem[] items = list.getTree().getItems();
391-
if (items!=null && items.length>0) {
391+
if (items != null && items.length > 0) {
392392
list.getTree().setSelection(items[0]);
393393
//programatic selection may not fire selection events so...
394394
list.getTree().notifyListeners(SWT.Selection,
@@ -452,7 +452,7 @@ private SymbolInformation getTarget(TreeViewer list) {
452452
Object selected = ss.getFirstElement();
453453
if (selected instanceof Match) {
454454
SymbolInformation si = getSymbolInformation((Match<?>) selected);
455-
if (si!=null) {
455+
if (si != null) {
456456
return si;
457457
}
458458
}
@@ -464,12 +464,12 @@ private SymbolInformation getTarget(TreeViewer list) {
464464

465465
private SymbolInformation getFirstElement(TreeViewer list) {
466466
TreeItem[] items = list.getTree().getItems();
467-
if (items!=null && items.length>0) {
467+
if (items != null && items.length>0) {
468468
TreeItem item = items[0];
469469
Object data = item.getData();
470470
if (data instanceof Match) {
471471
SymbolInformation si = getSymbolInformation((Match<?>) data);
472-
if (si!=null) {
472+
if (si != null) {
473473
return si;
474474
}
475475
}

0 commit comments

Comments
 (0)