Fix some minor checkstyle warnings 61/39261/3
authorMichael Vorburger <vorburger@redhat.com>
Wed, 27 Apr 2016 18:47:07 +0000 (20:47 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 23 May 2016 15:37:51 +0000 (17:37 +0200)
Change-Id: If32f2d7c09404f647b5453d2adbe692dc4dd3277
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
plugins/org.opendaylight.yangide.core/src/org/opendaylight/yangide/core/YangCorePlugin.java
plugins/org.opendaylight.yangide.core/src/org/opendaylight/yangide/core/buffer/BufferManager.java
plugins/org.opendaylight.yangide.core/src/org/opendaylight/yangide/core/indexing/IndexAllProject.java
plugins/org.opendaylight.yangide.ext.model.editor/src/main/java/org/opendaylight/yangide/ext/model/editor/Activator.java
plugins/org.opendaylight.yangide.m2e.yang/src/org/opendaylight/yangide/m2e/yang/YangM2EPlugin.java

index 634b1bb1f27a89af8ed26d3b7f1faed67e90a0c5..10c5cf96e8fb8463b521aa06ac554687c29ebb46 100644 (file)
@@ -21,8 +21,6 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
 import org.opendaylight.yangide.core.model.YangElement;
 import org.opendaylight.yangide.core.model.YangFile;
 import org.opendaylight.yangide.core.model.YangFolder;
@@ -31,19 +29,20 @@ import org.opendaylight.yangide.core.model.YangJarFile;
 import org.opendaylight.yangide.core.model.YangModel;
 import org.opendaylight.yangide.core.model.YangModelManager;
 import org.opendaylight.yangide.core.model.YangProject;
+import org.osgi.framework.BundleContext;
 
 /**
- * The activator class controls the plug-in life cycle
+ * The activator class controls the plug-in life cycle.
  */
 public class YangCorePlugin extends Plugin {
 
-    /** The plug-in ID */
+    /* The plug-in ID. */
     public static final String PLUGIN_ID = "org.opendaylight.yangide.core"; //$NON-NLS-1$
 
     /** Problem marker ID. */
     public static final String YANGIDE_PROBLEM_MARKER = "org.opendaylight.yangide.core.problem";
 
-    /** The shared instance */
+    /* The shared instance */
     private static YangCorePlugin plugin;
 
     @Override
@@ -144,10 +143,6 @@ public class YangCorePlugin extends Plugin {
         return new YangJarFile(path, getYangModel());
     }
 
-    /**
-     * @param deltaRes
-     * @return
-     */
     public static YangElement create(IResource resource) {
         switch (resource.getType()) {
         case IResource.PROJECT:
@@ -166,10 +161,7 @@ public class YangCorePlugin extends Plugin {
         IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(path));
         return createYangFile(file);
     }
-    
-    /**
-     * @param resource
-     */
+
     public static YangFile createYangFile(IResource resource) {
         return new YangFile((IFile) resource, create(resource.getParent()));
     }
index 0ea2bc339fd2270341963347bae452a2a87139c3..661830ff8c2c1912e134cc3abfa23de543a1415c 100644 (file)
@@ -72,7 +72,7 @@ public class BufferManager {
     /**
      * Returns the default buffer manager.
      */
-    public synchronized static BufferManager getDefaultBufferManager() {
+    public static synchronized BufferManager getDefaultBufferManager() {
         if (DEFAULT_BUFFER_MANAGER == null) {
             DEFAULT_BUFFER_MANAGER = new BufferManager();
         }
@@ -81,7 +81,7 @@ public class BufferManager {
 
     /**
      * Returns an enumeration of all open buffers.
-     * <p>
+     *
      * The <code>Enumeration</code> answered is thread safe.
      *
      * @see OverflowingLRUCache
index dadc81c7f658b7045d4be5a58f784ba00bba817f..a8bf12d5bde6c14a82b7dc2b1632aee437bc812e 100644 (file)
@@ -121,11 +121,11 @@ public class IndexAllProject extends IndexRequest {
             // java project doesn't exist: ignore
         }
 
-        for (IPath iPath : externalJarsPath) {
-            try (JarFile jarFile = new JarFile(iPath.toFile())) {
+        for (IPath path : externalJarsPath) {
+            try (JarFile jarFile = new JarFile(path.toFile())) {
                 ZipEntry entry = jarFile.getEntry("META-INF/yang/");
                 if (entry != null) {
-                    this.manager.addJarFile(project, iPath);
+                    this.manager.addJarFile(project, path);
                 }
             } catch (IOException e) {
                 YangCorePlugin.log(e);
@@ -150,8 +150,8 @@ public class IndexAllProject extends IndexRequest {
                 return true;
             }, IResource.NONE);
 
-            for (IFile iFile : indexedFiles) {
-                this.manager.addSource(iFile);
+            for (IFile file : indexedFiles) {
+                this.manager.addSource(file);
             }
         } catch (CoreException e) {
             this.manager.removeIndexFamily(project);
index eed5271658b29aaf7f24d307bff5a87434b91d73..03436c9daad297a0d2404e05564601ec5855efb4 100644 (file)
@@ -11,12 +11,11 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
 import org.opendaylight.yangide.core.YangModelException;
+import org.osgi.framework.BundleContext;
 
 /**
- * The activator class controls the plug-in life cycle
+ * The activator class controls the plug-in life cycle.
  */
 public class Activator extends AbstractUIPlugin {
 
@@ -26,28 +25,15 @@ public class Activator extends AbstractUIPlugin {
     // The shared instance
     private static Activator plugin;
 
-    /**
-     * The constructor
-     */
     public Activator() {
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-     */
     @Override
     public void start(BundleContext context) throws Exception {
         super.start(context);
         plugin = this;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
-     */
     @Override
     public void stop(BundleContext context) throws Exception {
         plugin = null;
@@ -55,7 +41,7 @@ public class Activator extends AbstractUIPlugin {
     }
 
     /**
-     * Returns the shared instance
+     * Returns the shared instance.
      *
      * @return the shared instance
      */
@@ -64,7 +50,7 @@ public class Activator extends AbstractUIPlugin {
     }
 
     /**
-     * Returns an image descriptor for the image file at the given plug-in relative path
+     * Returns an image descriptor for the image file at the given plug-in relative path.
      *
      * @param path the path
      * @return the image descriptor
@@ -76,7 +62,6 @@ public class Activator extends AbstractUIPlugin {
     /**
      * Reports log to Error Log view.
      *
-     * @param statusErrorID plugin related error ID
      * @param message error message
      */
     public static void log(Throwable e, String message) {
@@ -104,7 +89,7 @@ public class Activator extends AbstractUIPlugin {
     public static void log(IStatus status) {
         getDefault().getLog().log(status);
     }
-    
+
     /**
      * Reports log to Error Log view.
      *
index bf1ece2c68e39228cd6744666d540b7833c5237c..457dcb177ac0110594dc74f3d2d688a1950bca30 100644 (file)
@@ -10,16 +10,17 @@ package org.opendaylight.yangide.m2e.yang;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
 import org.opendaylight.yangide.core.YangCorePlugin;
 import org.opendaylight.yangide.ui.YangUIPlugin;
 import org.opendaylight.yangide.ui.preferences.YangPreferenceConstants;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
 /**
+ * YANG IDE M2E Eclipse Plugin.
+ *
  * @author Konstantin Zaitsev
- * date: Jul 2, 2014
+ * @since Jul 2, 2014
  */
 public class YangM2EPlugin extends Plugin implements BundleActivator {
     // The plug-in ID
@@ -47,7 +48,7 @@ public class YangM2EPlugin extends Plugin implements BundleActivator {
     }
 
     /**
-     * Returns the shared instance
+     * Returns the shared instance.
      *
      * @return the shared instance
      */
@@ -55,7 +56,7 @@ public class YangM2EPlugin extends Plugin implements BundleActivator {
         return plugin;
     }
 
-    public static void traceTime(String category, String message, long start, long end) {
+    static void traceTime(String category, String message, long start, long end) {
         if (YangUIPlugin.getDefault().getPreferenceStore().getBoolean(YangPreferenceConstants.ENABLE_TRACING)) {
             Status status = new Status(IStatus.INFO, YangM2EPlugin.PLUGIN_ID, "[" + category + "] " + message + ": "
                     + (end - start) + "ms");