Skip to content

Commit 5f232e5

Browse files
committed
Apply Eclipse code style template
1 parent 5702979 commit 5f232e5

23 files changed

+194
-152
lines changed

src/main/java/org/scijava/plugin/FactoryPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* POSSIBILITY OF SUCH DAMAGE.
2727
* #L%
2828
*/
29+
2930
package org.scijava.plugin;
3031

3132
import org.scijava.Typed;
@@ -38,5 +39,6 @@
3839
* @param <O> Data type of objects created by the factory.
3940
*/
4041
public interface FactoryPlugin<D, O> extends SingletonPlugin, Typed<D> {
42+
4143
O create(D data);
4244
}

src/main/java/org/scijava/search/DefaultSearchAction.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public class DefaultSearchAction implements SearchAction {
4040
private final Runnable r;
4141
private final boolean closeSearch;
4242

43-
public DefaultSearchAction(final String label, final Runnable r, final boolean closeSearch) {
43+
public DefaultSearchAction(final String label, final Runnable r,
44+
final boolean closeSearch)
45+
{
4446
this.label = label;
4547
this.r = r;
4648
this.closeSearch = closeSearch;
@@ -55,9 +57,9 @@ public String toString() {
5557
public void run() {
5658
r.run();
5759
}
58-
59-
@Override
60-
public boolean willCloseSearch(){
60+
61+
@Override
62+
public boolean willCloseSearch() {
6163
return closeSearch;
6264
}
6365
}

src/main/java/org/scijava/search/DefaultSearchOperation.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
/**
4444
* Default implementation of {@link SearchOperation}.
45-
*
45+
*
4646
* @author Curtis Rueden
4747
*/
4848
public class DefaultSearchOperation implements SearchOperation {
@@ -71,7 +71,9 @@ public class DefaultSearchOperation implements SearchOperation {
7171
private boolean fuzzy;
7272
private long lastModifyTime;
7373

74-
public DefaultSearchOperation(final Context context, final SearchListener... callbacks) {
74+
public DefaultSearchOperation(final Context context,
75+
final SearchListener... callbacks)
76+
{
7577
listeners = callbacks;
7678
context.inject(this);
7779
threadService.run(() -> {
@@ -102,7 +104,7 @@ public DefaultSearchOperation(final Context context, final SearchListener... cal
102104
}
103105

104106
@Override
105-
public void setFuzzy(boolean fuzzy) {
107+
public void setFuzzy(final boolean fuzzy) {
106108
this.fuzzy = fuzzy;
107109
refreshModifyTime();
108110
}
@@ -141,10 +143,11 @@ private void refreshModifyTime() {
141143
lastModifyTime = System.currentTimeMillis();
142144
}
143145

144-
// -- Helper classes --
146+
// -- Helper classes --
145147

146148
private class SearchAttempt implements Runnable {
147-
private Searcher searcher;
149+
150+
private final Searcher searcher;
148151
private boolean valid = true;
149152

150153
private SearchAttempt(final Searcher searcher) {

src/main/java/org/scijava/search/DefaultSearchService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
* @author Curtis Rueden
4242
*/
4343
@Plugin(type = Service.class)
44-
public class DefaultSearchService extends AbstractSingletonService<SearchActionFactory> implements
45-
SearchService
44+
public class DefaultSearchService extends
45+
AbstractSingletonService<SearchActionFactory> implements SearchService
4646
{
47+
4748
@Parameter
4849
private PrefService prefService;
4950

src/main/java/org/scijava/search/SearchAction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* POSSIBILITY OF SUCH DAMAGE.
2727
* #L%
2828
*/
29+
2930
package org.scijava.search;
3031

3132
/**
@@ -34,14 +35,14 @@
3435
* {@link SearchActionFactory} plugins know how to generate these for specific
3536
* kinds of {@link SearchResult}.
3637
* </p>
37-
*
38+
*
3839
* @author Curtis Rueden
3940
* @see SearchService#actions(SearchResult)
4041
*/
4142
public interface SearchAction extends Runnable {
4243
// NB: No implementation needed.
43-
44-
default boolean willCloseSearch(){
44+
45+
default boolean willCloseSearch() {
4546
return true;
4647
}
4748
}

src/main/java/org/scijava/search/SearchEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public class SearchEvent {
4242
private final List<SearchResult> results;
4343
private final boolean exclusive;
4444

45-
public SearchEvent(final Searcher searcher,
46-
final List<SearchResult> results, final boolean exclusive)
45+
public SearchEvent(final Searcher searcher, final List<SearchResult> results,
46+
final boolean exclusive)
4747
{
4848
this.searcher = searcher;
4949
this.results = results;

src/main/java/org/scijava/search/SearchListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* POSSIBILITY OF SUCH DAMAGE.
2727
* #L%
2828
*/
29+
2930
package org.scijava.search;
3031

3132
/**

src/main/java/org/scijava/search/SearchOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public interface SearchOperation {
5959
* Intended to be called from the dispatch thread in response to the search
6060
* pane's text field being updated by the user.
6161
* </p>
62-
*
62+
*
6363
* @param text The query to be searched.
6464
*/
6565
void search(String text);
@@ -72,7 +72,7 @@ public interface SearchOperation {
7272
* Intended to be called from the dispatch thread in response to the search
7373
* pane's fuzzy matching checkbox being toggled by the user.
7474
* </p>
75-
*
75+
*
7676
* @param fuzzy Whether the search should perform "fuzzy" matching.
7777
*/
7878
void setFuzzy(boolean fuzzy);

src/main/java/org/scijava/search/SearchResult.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* POSSIBILITY OF SUCH DAMAGE.
2727
* #L%
2828
*/
29+
2930
package org.scijava.search;
3031

3132
import java.util.Map;
@@ -42,7 +43,10 @@
4243
public interface SearchResult {
4344

4445
String name();
46+
4547
String identifier();
48+
4649
String iconPath();
50+
4751
Map<String, String> properties();
4852
}

src/main/java/org/scijava/search/SearchService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public interface SearchService extends SingletonService<SearchActionFactory>,
4646

4747
/**
4848
* Begins an asynchronous and multi-threaded search operation.
49-
*
49+
*
5050
* @param callbacks The objects to be notified as search results are found.
5151
* Callbacks will be made on the thread doing the search,
5252
* <em>not</em> the dispatch thread; it is the responsibility of
@@ -60,7 +60,7 @@ default SearchOperation search(final SearchListener... callbacks) {
6060

6161
/**
6262
* Gets the suite of available actions for the given search result.
63-
*
63+
*
6464
* @param result The search result for which available actions are desired.
6565
* @return A list of actions which could possibly be executed for the result.
6666
*/

0 commit comments

Comments
 (0)