Skip to content

Commit 883554f

Browse files
eclipse-pde-botakurtakov
authored andcommitted
Perform clean code of ui/org.eclipse.pde.bnd.ui
1 parent 65b77b2 commit 883554f

27 files changed

+259
-259
lines changed

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/Central.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
public class Central {
7979

8080
public static final String BNDTOOLS_NATURE = "bndtools.core.bndnature";
81-
81+
8282
private final static List<ModelListener> listeners = new CopyOnWriteArrayList<>();
8383

8484
public static IFile getWorkspaceBuildFile() throws Exception {

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/RepositoryUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class RepositoryUtils {
5454
return tracker.orElse(null);
5555
}, Objects::nonNull);
5656
}
57-
57+
5858

5959
public static List<RepositoryPlugin> listRepositories(final Workspace localWorkspace, final boolean hideCache) {
6060
if (localWorkspace == null) {
@@ -72,14 +72,14 @@ public static List<RepositoryPlugin> listRepositories(final Workspace localWorks
7272
// Workspace bndWorkspace = Central.getWorkspaceIfPresent();
7373
// if ((bndWorkspace == localWorkspace) && !bndWorkspace.isDefaultWorkspace())
7474
// repos.add(Central.getWorkspaceRepository());
75-
75+
7676
// TODO this is not perfect, because it is only working
7777
// if you are selecting a bnd project. Would be better if bnd WorkspaceRepository is added always
7878
// e.g. if there is at least one bnd project
7979
if (WorkspaceLayout.BND == localWorkspace.getLayout() && !localWorkspace.isDefaultWorkspace()) {
8080
repos.add(localWorkspace.getWorkspaceRepository());
8181
}
82-
82+
8383

8484
// Add the repos from the provided workspace
8585
for (RepositoryPlugin plugin : plugins) {

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/Resources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public synchronized static Image getImage(String key) {
9292
getImageDescriptor(key); // make sure the descriptor is added!
9393
return registry.get(key);
9494
}
95-
95+
9696
public synchronized static ScheduledExecutorService getScheduler() {
9797
if (scheduler == null) {
9898
scheduler = Executors.newScheduledThreadPool(4);

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/Workspaces.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public static Optional<Workspace> getWorkspace(IProject project) {
3838
if (bndProject != null) {
3939
return Optional.ofNullable(bndProject.getWorkspace());
4040
} else {
41-
41+
4242
if(isCnf(project)) {
43-
43+
4444
try {
4545
File wsDir = project.getLocation().toFile().getParentFile();
4646
return Optional.ofNullable(Workspace.getWorkspace(wsDir));
@@ -65,12 +65,12 @@ public static Optional<Workspace> getWorkspace(IProject project) {
6565
}
6666
}
6767
}
68-
68+
6969
}
7070
}
7171
return Optional.empty();
7272
}
73-
73+
7474
private static boolean isCnf(IProject project) {
7575
IPath projectPath = project.getLocation();
7676
if (projectPath != null) {

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/internal/Auxiliary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
public class Auxiliary implements WeavingHook {
5252
private final BundleTracker<Bundle> tracker;
5353
private final Deque<String> delta = new ConcurrentLinkedDeque<>();
54-
54+
5555
@Activate
5656
public Auxiliary(BundleContext context) {
5757
this.tracker = new BundleTracker<Bundle>(context, Bundle.RESOLVED + Bundle.ACTIVE + Bundle.STARTING, null) {

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/internal/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
public class FileUtils {
2828

29-
29+
3030
public static IFile[] getWorkspaceFiles(File javaFile) {
3131
IWorkspaceRoot root = ResourcesPlugin.getWorkspace()
3232
.getRoot();

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/internal/TemplateAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* https://www.eclipse.org/legal/epl-2.0/
88
*
99
* SPDX-License-Identifier: EPL-2.0
10-
*
10+
*
1111
* Contributors:
1212
* Christoph Läubrich - initial API and implementation
1313
*******************************************************************************/

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/model/repo/RepositoryTreeContentProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ private Object[] searchR5Repository(RepositoryPlugin repoPlugin, Repository osgi
399399
result = resultSet.toArray();
400400
return result;
401401
}
402-
403-
402+
403+
404404
// Define a LRU-like inner map (max n entries)
405405
private static Map<String, Object[]> createLRUMap(int n) {
406406
return new LinkedHashMap<String, Object[]>(n + 1, 1.0f, true) {

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/model/repo/SearchableRepositoryTreeContentProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Object[] getRepositoryBundles(RepositoryPlugin repo) {
4848

4949
return result;
5050
}
51-
51+
5252
public List<RepositoryBundleVersion> allRepoBundleVersions(final RepositoryPlugin rp) {
5353
Object[] result = getChildren(rp);
5454

ui/org.eclipse.pde.bnd.ui/src/org/eclipse/pde/bnd/ui/model/resolution/CapReqComparator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ private int compareCapToCap(Capability c1, Capability c2) {
9595
if (versionAttribName == null) {
9696
return 0;
9797
}
98-
98+
9999
Version v1 = highestVersion(c1.getAttributes().get(versionAttribName));
100100
Version v2 = highestVersion(c2.getAttributes().get(versionAttribName));
101-
101+
102102
return v1.compareTo(v2);
103103
}
104-
104+
105105
private static Version highestVersion(Object attr) {
106106
if (attr instanceof Version v) {
107107
return v;

0 commit comments

Comments
 (0)