diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java index 8bf451c3c..06c95d821 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java @@ -58,7 +58,9 @@ import org.eclipse.jgit.util.CachedAuthenticator; * @since 4.0 */ public class ConsoleAuthenticator extends CachedAuthenticator { - /** Install this authenticator implementation into the JVM. */ + /** + * Install this authenticator implementation into the JVM. + */ public static void install() { final ConsoleAuthenticator c = new ConsoleAuthenticator(); if (c.cons == null) @@ -69,6 +71,7 @@ public class ConsoleAuthenticator extends CachedAuthenticator { private final Console cons = System.console(); + /** {@inheritDoc} */ @Override protected PasswordAuthentication promptPasswordAuthentication() { final String realm = formatRealm(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java index 0aa0cf484..f8442facb 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java @@ -61,7 +61,9 @@ import org.eclipse.jgit.transport.URIish; * @since 4.0 */ public class ConsoleCredentialsProvider extends CredentialsProvider { - /** Install this implementation as the default. */ + /** + * Install this implementation as the default. + */ public static void install() { final ConsoleCredentialsProvider c = new ConsoleCredentialsProvider(); if (c.cons == null) @@ -74,11 +76,13 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { private final Console cons = System.console(); + /** {@inheritDoc} */ @Override public boolean isInteractive() { return true; } + /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialItem i : items) { @@ -100,6 +104,7 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { return true; } + /** {@inheritDoc} */ @Override public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java index 08ec0964f..f0754b192 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java @@ -66,6 +66,14 @@ abstract class AbstractFetchCommand extends TextBuiltin { @Option(name = "--verbose", aliases = { "-v" }, usage = "usage_beMoreVerbose") private boolean verbose; + /** + * Show fetch result. + * + * @param r + * a {@link org.eclipse.jgit.transport.FetchResult} object. + * @throws java.io.IOException + * if any. + */ protected void showFetchResult(final FetchResult r) throws IOException { try (ObjectReader reader = db.newObjectReader()) { boolean shownURI = false; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java index 3c1359030..08a9f48c0 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java @@ -60,6 +60,7 @@ class Add extends TextBuiltin { @Argument(required = true, metaVar = "metaVar_filepattern", usage = "usage_filesToAddContentFrom") private List filepatterns = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java index e0a9244a8..086c9766a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java @@ -75,11 +75,13 @@ class AmazonS3Client extends TextBuiltin { @Argument(index = 3, metaVar = "metaVar_KEY", required = true) private String key; + /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { final AmazonS3 s3 = new AmazonS3(properties()); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java index cff0bf6c2..4721b3a0f 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java @@ -74,6 +74,7 @@ class Archive extends TextBuiltin { @Option(name = "--output", aliases = { "-o" }, metaVar = "metaVar_file", usage = "usage_archiveOutput") private String output; + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (tree == null) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java index 419325405..13a38dddf 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java @@ -134,6 +134,7 @@ class Blame extends TextBuiltin { private BlameResult blame; + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (file == null) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java index f6e3810a8..e6685c2f6 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java @@ -87,6 +87,12 @@ class Branch extends TextBuiltin { private List delete; + /** + * Delete branches + * + * @param names + * a {@link java.util.List} of branch names. + */ @Option(name = "--delete", aliases = { "-d" }, metaVar = "metaVar_branchNames", usage = "usage_deleteFullyMergedBranch", handler = OptionWithValuesListHandler.class) public void delete(List names) { @@ -98,6 +104,12 @@ class Branch extends TextBuiltin { private List deleteForce; + /** + * Forcefully delete branches + * + * @param names + * a {@link java.util.List} of branch names. + */ @Option(name = "--delete-force", aliases = { "-D" }, metaVar = "metaVar_branchNames", usage = "usage_deleteBranchEvenIfNotMerged", handler = OptionWithValuesListHandler.class) public void deleteForce(List names) { @@ -107,6 +119,12 @@ class Branch extends TextBuiltin { deleteForce = names; } + /** + * Forcefully create a list of branches + * + * @param branchAndStartPoint + * a branch name and a start point + */ @Option(name = "--create-force", aliases = { "-f" }, metaVar = "metaVar_branchAndStartPoint", usage = "usage_forceCreateBranchEvenExists", handler = OptionWithValuesListHandler.class) public void createForce(List branchAndStartPoint) { @@ -125,6 +143,12 @@ class Branch extends TextBuiltin { } } + /** + * Move or rename a branch + * + * @param currentAndNew + * the current and the new branch name + */ @Option(name = "--move", aliases = { "-m" }, metaVar = "metaVar_oldNewBranchNames", usage = "usage_moveRenameABranch", handler = OptionWithValuesListHandler.class) public void moveRename(List currentAndNew) { @@ -156,6 +180,7 @@ class Branch extends TextBuiltin { private int maxNameLength; + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (delete != null || deleteForce != null) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java index 2af1eca80..1f80301f6 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java @@ -80,6 +80,7 @@ class Checkout extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class) private List paths = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (createBranch) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java index ce4faf83a..6ae078c95 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java @@ -62,6 +62,7 @@ class Clean extends TextBuiltin { @Option(name = "--dryRun", aliases = { "-n" }) private boolean dryRun = false; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java index a8eb4742d..393c607a2 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java @@ -86,11 +86,13 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { @Argument(index = 1, metaVar = "metaVar_directory") private String localName; + /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (localName != null && gitdir != null) @@ -148,6 +150,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { } } + /** {@inheritDoc} */ @Override public void initializedSubmodules(Collection submodules) { try { @@ -161,6 +164,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { } } + /** {@inheritDoc} */ @Override public void cloningSubmodule(String path) { try { @@ -172,6 +176,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { } } + /** {@inheritDoc} */ @Override public void checkingOut(AnyObjectId commit, String path) { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java index 0562416a8..d7adaf841 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java @@ -50,7 +50,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; /** - * Annotation to document a {@link TextBuiltin}. + * Annotation to document a {@link org.eclipse.jgit.pgm.TextBuiltin}. *

* This is an optional annotation for TextBuiltin subclasses and it carries * documentation forward into the runtime system describing what the command is @@ -60,6 +60,8 @@ import java.lang.annotation.Target; @Target( { TYPE }) public @interface Command { /** + * Get the command name + * * @return name the command is invoked as from the command line. If the * (default) empty string is supplied the name will be generated * from the class name. @@ -67,11 +69,15 @@ public @interface Command { public String name() default ""; /** + * Get command description + * * @return one line description of the command's feature set. */ public String usage() default ""; /** + * If this command is considered to be commonly used + * * @return true if this command is considered to be commonly used. */ public boolean common() default false; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java index cf4c6e333..7bab69210 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java @@ -60,9 +60,10 @@ import java.util.Vector; /** * List of all commands known by jgit's command line tools. *

- * Commands are implementations of {@link TextBuiltin}, with an optional - * {@link Command} class annotation to insert additional documentation or - * override the default command name (which is guessed from the class name). + * Commands are implementations of {@link org.eclipse.jgit.pgm.TextBuiltin}, + * with an optional {@link org.eclipse.jgit.pgm.Command} class annotation to + * insert additional documentation or override the default command name (which + * is guessed from the class name). *

* Commands may be registered by adding them to a services file in the same JAR * (or classes directory) as the command implementation. The service file name @@ -90,6 +91,8 @@ public class CommandCatalog { } /** + * Get all commands sorted by their name + * * @return all known commands, sorted by command name. */ public static CommandRef[] all() { @@ -97,6 +100,8 @@ public class CommandCatalog { } /** + * Get all common commands sorted by their name + * * @return all common commands, sorted by command name. */ public static CommandRef[] common() { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java index e5f85324e..2c9bc0dc7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java @@ -50,7 +50,8 @@ import java.text.MessageFormat; import org.eclipse.jgit.pgm.internal.CLIText; /** - * Description of a command (a {@link TextBuiltin} subclass. + * Description of a command (a {@link org.eclipse.jgit.pgm.TextBuiltin} + * subclass). *

* These descriptions are lightweight compared to creating a command instance * and are therefore suitable for catalogs of "known" commands without linking @@ -102,6 +103,8 @@ public class CommandRef { } /** + * Get the name. + * * @return name the command is invoked as from the command line. */ public String getName() { @@ -109,6 +112,8 @@ public class CommandRef { } /** + * Get usage. + * * @return one line description of the command's feature set. */ public String getUsage() { @@ -116,6 +121,8 @@ public class CommandRef { } /** + * Is this command commonly used + * * @return true if this command is considered to be commonly used. */ public boolean isCommon() { @@ -123,6 +130,8 @@ public class CommandRef { } /** + * Get implementation class name + * * @return name of the Java class which implements this command. */ public String getImplementationClassName() { @@ -130,6 +139,8 @@ public class CommandRef { } /** + * Get implementation class loader + * * @return loader for {@link #getImplementationClassName()}. */ public ClassLoader getImplementationClassLoader() { @@ -137,6 +148,8 @@ public class CommandRef { } /** + * Create an instance of the command implementation + * * @return a new instance of the command implementation. */ public TextBuiltin create() { @@ -166,6 +179,7 @@ public class CommandRef { return r; } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java index befc4ec27..2e67c02cb 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java @@ -77,6 +77,7 @@ class Commit extends TextBuiltin { @Argument(metaVar = "metaVar_commitPaths", usage = "usage_CommitPaths") private List paths = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws NoHeadException, NoMessageException, ConcurrentRefUpdateException, JGitInternalException, Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java index f5c3f9aeb..f762c0d05 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java @@ -68,6 +68,7 @@ class Config extends TextBuiltin { @Option(name = "--file", aliases = { "-f" }, metaVar = "metaVar_file", usage = "usage_configFile") private File configFile; + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (list) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java index 51bb9792d..d0ada67fc 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java @@ -111,11 +111,13 @@ class Daemon extends TextBuiltin { @Argument(required = true, metaVar = "metaVar_directory", usage = "usage_directoriesToExport") List directory = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { PackConfig packConfig = new PackConfig(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java index 03e271199..f9c1cf5d3 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java @@ -65,6 +65,7 @@ class Describe extends TextBuiltin { @Option(name = "--match", usage = "usage_Match", metaVar = "metaVar_pattern") private List patterns = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java index a25f1e930..59de80c96 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java @@ -45,7 +45,8 @@ package org.eclipse.jgit.pgm; /** - * Indicates a {@link TextBuiltin} implementation has failed during execution. + * Indicates a {@link org.eclipse.jgit.pgm.TextBuiltin} implementation has + * failed during execution. *

* Typically the stack trace for a Die exception is not shown to the user as it * may indicate a simple error condition that the end-user can fix on their own, diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java index 16284d572..ed6f7b426 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java @@ -168,12 +168,14 @@ class Diff extends TextBuiltin { // END -- Options shared with Log + /** {@inheritDoc} */ @Override protected void init(final Repository repository, final String gitDir) { super.init(repository, gitDir); diffFmt = new DiffFormatter(new BufferedOutputStream(outs)); } + /** {@inheritDoc} */ @Override protected void run() throws Exception { diffFmt.setRepository(db); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java index 443240599..510406345 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java @@ -72,6 +72,7 @@ class DiffTree extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_path", handler = PathTreeFilterHandler.class) private TreeFilter pathFilter = TreeFilter.ALL; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (final TreeWalk walk = new TreeWalk(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java index f4b7708d3..bc7637286 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java @@ -131,6 +131,7 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback { @Argument(index = 1, metaVar = "metaVar_refspec") private List toget; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { @@ -164,6 +165,7 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback { } } + /** {@inheritDoc} */ @Override public void fetchingSubmodule(String name) { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java index 7289abb62..56172f57c 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java @@ -58,6 +58,7 @@ class Gc extends TextBuiltin { @Option(name = "--prune-preserved", usage = "usage_PrunePreserved") private boolean prunePreserved; + /** {@inheritDoc} */ @Override protected void run() throws Exception { Git git = Git.wrap(db); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java index 7b715751d..a081b7813 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java @@ -102,6 +102,7 @@ class Glog extends RevWalkTextBuiltin { frame.getContentPane().add(world); } + /** {@inheritDoc} */ @Override protected int walkLoop() throws Exception { graphPane.getCommitList().source(walk); @@ -113,11 +114,13 @@ class Glog extends RevWalkTextBuiltin { return graphPane.getCommitList().size(); } + /** {@inheritDoc} */ @Override protected void show(final RevCommit c) throws Exception { throw new UnsupportedOperationException(); } + /** {@inheritDoc} */ @Override protected RevWalk createWalk() { if (objects) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java index 22f3be9af..26276718d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java @@ -60,6 +60,7 @@ class IndexPack extends TextBuiltin { @Option(name = "--index-version", usage = "usage_indexFileFormatToCreate") private int indexVersion = -1; + /** {@inheritDoc} */ @Override protected void run() throws Exception { BufferedInputStream in = new BufferedInputStream(ins); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java index a7bee7f7b..f880fc207 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java @@ -66,11 +66,13 @@ class Init extends TextBuiltin { @Argument(index = 0, metaVar = "metaVar_directory") private String directory; + /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { InitCommand command = Git.init(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java index 1108ddd10..75542d445 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java @@ -184,12 +184,14 @@ class Log extends RevWalkTextBuiltin { dateFormatter = new GitDateFormatter(Format.DEFAULT); } + /** {@inheritDoc} */ @Override protected void init(final Repository repository, final String gitDir) { super.init(repository, gitDir); diffFmt = new DiffFormatter(new BufferedOutputStream(outs)); } + /** {@inheritDoc} */ @Override protected void run() throws Exception { diffFmt.setRepository(db); @@ -237,6 +239,7 @@ class Log extends RevWalkTextBuiltin { NoteMap.read(argWalk.getObjectReader(), notesCommit)); } + /** {@inheritDoc} */ @Override protected void show(final RevCommit c) throws Exception { outw.print(CLIText.get().commitLabel); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java index 7a5f3d811..9013ff6cf 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java @@ -70,6 +70,7 @@ class LsRemote extends TextBuiltin { @Argument(index = 0, metaVar = "metaVar_uriish", required = true) private String remote; + /** {@inheritDoc} */ @Override protected void run() throws Exception { LsRemoteCommand command = Git.lsRemoteRepository().setRemote(remote) @@ -89,6 +90,7 @@ class LsRemote extends TextBuiltin { } } + /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java index 398d305f6..c57f9f2c3 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java @@ -70,6 +70,7 @@ class LsTree extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = StopOptionHandler.class) private List paths = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (final TreeWalk walk = new TreeWalk(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java index 9d44dc08c..b29b09747 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java @@ -80,7 +80,9 @@ import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.Option; import org.kohsuke.args4j.OptionHandlerFilter; -/** Command line entry point. */ +/** + * Command line entry point. + */ public class Main { @Option(name = "--help", usage = "usage_displayThisHelpText", aliases = { "-h" }) private boolean help; @@ -105,7 +107,7 @@ public class Main { private ExecutorService gcExecutor; /** - * + *

Constructor for Main.

*/ public Main() { HttpTransport.setConnectionFactory(new HttpClientConnectionFactory()); @@ -129,7 +131,7 @@ public class Main { * * @param argv * arguments. - * @throws Exception + * @throws java.lang.Exception */ public static void main(final String[] argv) throws Exception { new Main().run(argv); @@ -150,7 +152,7 @@ public class Main { * * @param argv * arguments. - * @throws Exception + * @throws java.lang.Exception */ protected void run(final String[] argv) throws Exception { writer = createErrorWriter(); @@ -309,7 +311,7 @@ public class Main { * the {@code --git-dir} option given on the command line. May be * null if it was not supplied. * @return the repository to operate on. - * @throws IOException + * @throws java.io.IOException * the repository cannot be opened. */ protected Repository openGitDir(String aGitdir) throws IOException { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java index 1aab748a0..de059e941 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java @@ -101,6 +101,7 @@ class Merge extends TextBuiltin { @Option(name = "-m", usage = "usage_message") private String message; + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (squash && ff == FastForwardMode.NO_FF) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java index 975d5deee..62a88aeed 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java @@ -65,6 +65,7 @@ class MergeBase extends TextBuiltin { @Argument(index = 1, metaVar = "metaVar_commitish", required = true) private List commits = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { for (final RevCommit c : commits) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java index 389708e6e..309dca2a7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java @@ -113,6 +113,7 @@ class Push extends TextBuiltin { private boolean shownURI; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java index d7f895a30..f3baafb0b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java @@ -58,11 +58,13 @@ class ReceivePack extends TextBuiltin { @Argument(index = 0, required = true, metaVar = "metaVar_directory", usage = "usage_RepositoryToReceiveInto") File dstGitdir; + /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { final org.eclipse.jgit.transport.ReceivePack rp; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java index 86a021dee..6f4fcc248 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java @@ -57,6 +57,7 @@ class Reflog extends TextBuiltin { @Argument(metaVar = "metaVar_ref") private String ref; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java index 24916bd1c..948cbc554 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java @@ -84,6 +84,7 @@ class Remote extends TextBuiltin { @Argument(index = 2, metaVar = "metaVar_uriish") private String uri; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { @@ -143,6 +144,7 @@ class Remote extends TextBuiltin { } } + /** {@inheritDoc} */ @Override public void printUsage(final String message, final CmdLineParser clp) throws IOException { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java index bec5003a1..f557211fd 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java @@ -58,6 +58,7 @@ class Repo extends TextBuiltin { @Argument(required = true, metaVar = "metaVar_path", usage = "usage_pathToXml") private String path; + /** {@inheritDoc} */ @Override protected void run() throws Exception { new RepoCommand(db) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java index 4c19883c8..f84c84806 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java @@ -72,6 +72,7 @@ class Reset extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class) private List paths = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java index 4420abec1..8c88a5cdc 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java @@ -51,6 +51,7 @@ import org.eclipse.jgit.revwalk.RevTree; @Command(usage = "usage_RevList") class RevList extends RevWalkTextBuiltin { + /** {@inheritDoc} */ @Override protected void show(final RevCommit c) throws Exception { if (c.has(RevFlag.UNINTERESTING)) @@ -64,6 +65,7 @@ class RevList extends RevWalkTextBuiltin { outw.println(); } + /** {@inheritDoc} */ @Override protected void show(final ObjectWalk ow, final RevObject obj) throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java index 215703409..21adf738e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java @@ -70,6 +70,7 @@ class RevParse extends TextBuiltin { @Argument(index = 0, metaVar = "metaVar_commitish") private List commits = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (all) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java index 6b0744d51..3fc91013a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java @@ -149,6 +149,7 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { @Option(name = "--max-count", aliases = "-n", metaVar = "metaVar_n") private int maxCount = -1; + /** {@inheritDoc} */ @Override protected void run() throws Exception { walk = createWalk(); @@ -210,6 +211,11 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { } } + /** + * Create RevWalk + * + * @return a {@link org.eclipse.jgit.revwalk.RevWalk} object. + */ protected RevWalk createWalk() { RevWalk result; if (objects) @@ -222,6 +228,13 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { return result; } + /** + * Loop the walk + * + * @return number of RevCommits walked + * @throws java.lang.Exception + * if any. + */ protected int walkLoop() throws Exception { int n = 0; for (final RevCommit c : walk) { @@ -248,8 +261,8 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { * RevWalkTextBuiltin. * * @param c - * The current {@link RevCommit} - * @throws Exception + * The current {@link org.eclipse.jgit.revwalk.RevCommit} + * @throws java.lang.Exception */ protected abstract void show(final RevCommit c) throws Exception; @@ -260,10 +273,11 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { * process RevCommits. * * @param objectWalk - * the {@link ObjectWalk} used by {@link #walkLoop()} + * the {@link org.eclipse.jgit.revwalk.ObjectWalk} used by + * {@link #walkLoop()} * @param currentObject - * The current {@link RevObject} - * @throws Exception + * The current {@link org.eclipse.jgit.revwalk.RevObject} + * @throws java.lang.Exception */ protected void show(final ObjectWalk objectWalk, final RevObject currentObject) throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java index 32a5631e5..f59161039 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java @@ -59,6 +59,7 @@ class Rm extends TextBuiltin { @Option(name = "--", handler = StopOptionHandler.class) private List paths = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java index 5eda36f39..de04045e4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java @@ -165,12 +165,14 @@ class Show extends TextBuiltin { fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US); //$NON-NLS-1$ } + /** {@inheritDoc} */ @Override protected void init(final Repository repository, final String gitDir) { super.init(repository, gitDir); diffFmt = new DiffFormatter(new BufferedOutputStream(outs)); } + /** {@inheritDoc} */ @SuppressWarnings("boxing") @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java index e9d9df6a1..7b59d437a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java @@ -58,6 +58,7 @@ import org.eclipse.jgit.util.RefMap; @Command(usage = "usage_ShowRef") class ShowRef extends TextBuiltin { + /** {@inheritDoc} */ @Override protected void run() throws Exception { for (final Ref r : getSortedRefs()) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java index adcfea4dc..4238f207e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java @@ -86,6 +86,7 @@ class Status extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class) protected List filterPaths; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { @@ -261,6 +262,15 @@ class Status extends TextBuiltin { } } + /** + * Print section header + * + * @param pattern + * a {@link java.lang.String} object. + * @param arguments + * a {@link java.lang.Object} object. + * @throws java.io.IOException + */ protected void printSectionHeader(String pattern, Object... arguments) throws IOException { if (!porcelain) { @@ -272,6 +282,14 @@ class Status extends TextBuiltin { } } + /** + * Print String list + * + * @param list + * a {@link java.util.Collection} object. + * @return a int. + * @throws java.io.IOException + */ protected int printList(Collection list) throws IOException { if (!list.isEmpty()) { List sortedList = new ArrayList<>(list); @@ -286,6 +304,26 @@ class Status extends TextBuiltin { return 0; } + /** + * Print String list + * + * @param status1 + * a {@link java.lang.String} object. + * @param status2 + * a {@link java.lang.String} object. + * @param status3 + * a {@link java.lang.String} object. + * @param list + * a {@link java.util.Collection} object. + * @param set1 + * a {@link java.util.Collection} object. + * @param set2 + * a {@link java.util.Collection} object. + * @param set3 + * a {@link java.util.Collection} object. + * @return a int. + * @throws java.io.IOException + */ protected int printList(String status1, String status2, String status3, Collection list, Collection set1, Collection set2, diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java index dc4b037cf..43c1f54ab 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java @@ -80,6 +80,7 @@ class Tag extends TextBuiltin { @Argument(index = 1, metaVar = "metaVar_object") private ObjectId object; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java index c3b45e8de..bc3755d34 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java @@ -133,7 +133,11 @@ public abstract class TextBuiltin { commandName = name; } - /** @return true if {@link #db}/{@link #getRepository()} is required. */ + /** + * If this command requires a repository. + * + * @return true if {@link #db}/{@link #getRepository()} is required + */ protected boolean requiresRepository() { return true; } @@ -214,7 +218,7 @@ public abstract class TextBuiltin { * * @param args * command line arguments passed after the command name. - * @throws Exception + * @throws java.lang.Exception * an error occurred while processing the command. The main * framework will catch the exception and print a message on * standard error. @@ -233,7 +237,7 @@ public abstract class TextBuiltin { * * @param args * the arguments supplied on the command line, if any. - * @throws IOException + * @throws java.io.IOException */ protected void parseArguments(final String[] args) throws IOException { final CmdLineParser clp = new CmdLineParser(this); @@ -260,7 +264,8 @@ public abstract class TextBuiltin { * Print the usage line * * @param clp - * @throws IOException + * a {@link org.eclipse.jgit.pgm.opt.CmdLineParser} object. + * @throws java.io.IOException */ public void printUsageAndExit(final CmdLineParser clp) throws IOException { printUsageAndExit("", clp); //$NON-NLS-1$ @@ -270,8 +275,10 @@ public abstract class TextBuiltin { * Print an error message and the usage line * * @param message + * a {@link java.lang.String} object. * @param clp - * @throws IOException + * a {@link org.eclipse.jgit.pgm.opt.CmdLineParser} object. + * @throws java.io.IOException */ public void printUsageAndExit(final String message, final CmdLineParser clp) throws IOException { printUsage(message, clp); @@ -279,11 +286,13 @@ public abstract class TextBuiltin { } /** + * Print usage help text. + * * @param message * non null * @param clp * parser used to print options - * @throws IOException + * @throws java.io.IOException * @since 4.2 */ protected void printUsage(final String message, final CmdLineParser clp) @@ -302,6 +311,8 @@ public abstract class TextBuiltin { } /** + * Get error writer + * * @return error writer, typically this is standard error. * @since 4.2 */ @@ -310,6 +321,8 @@ public abstract class TextBuiltin { } /** + * Get output writer + * * @return output writer, typically this is standard output. * @since 4.9 */ @@ -318,6 +331,8 @@ public abstract class TextBuiltin { } /** + * Get resource bundle with localized texts + * * @return the resource bundle that will be passed to args4j for purpose of * string localization */ @@ -330,7 +345,7 @@ public abstract class TextBuiltin { *

* This method should only be invoked by {@link #execute(String[])}. * - * @throws Exception + * @throws java.lang.Exception * an error occurred while processing the command. The main * framework will catch the exception and print a message on * standard error. @@ -338,6 +353,8 @@ public abstract class TextBuiltin { protected abstract void run() throws Exception; /** + * Get the repository + * * @return the repository this command accesses. */ public Repository getRepository() { @@ -352,6 +369,8 @@ public abstract class TextBuiltin { } /** + * Exit the command with an error message + * * @param why * textual explanation * @return a runtime exception the caller is expected to throw @@ -361,6 +380,8 @@ public abstract class TextBuiltin { } /** + * Exit the command with an error message and an exception + * * @param why * textual explanation * @param cause @@ -372,8 +393,11 @@ public abstract class TextBuiltin { } /** + * Exit the command + * * @param aborted - * boolean indicating that the execution has been aborted before running + * boolean indicating that the execution has been aborted before + * running * @return a runtime exception the caller is expected to throw * @since 3.4 */ @@ -382,6 +406,8 @@ public abstract class TextBuiltin { } /** + * Exit the command + * * @param aborted * boolean indicating that the execution has been aborted before * running @@ -405,6 +431,8 @@ public abstract class TextBuiltin { } /** + * Check if the arguments contain a help option + * * @param args * non null * @return true if the given array contains help option diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java index 447374d69..5d032d208 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java @@ -62,11 +62,13 @@ class UploadPack extends TextBuiltin { @Argument(index = 0, required = true, metaVar = "metaVar_directory", usage = "usage_RepositoryToReadFrom") File srcGitdir; + /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { final org.eclipse.jgit.transport.UploadPack up; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java index 6bed9c602..5efc03b28 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java @@ -55,6 +55,7 @@ import org.eclipse.jgit.pgm.internal.CLIText; @Command(common = true, usage = "usage_DisplayTheVersionOfJgit") class Version extends TextBuiltin { + /** {@inheritDoc} */ @Override protected void run() throws Exception { // read the Implementation-Version from Manifest @@ -73,6 +74,7 @@ class Version extends TextBuiltin { outw.println(MessageFormat.format(CLIText.get().jgitVersion, version)); } + /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java index 71c8db8e4..248eaac8a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java @@ -95,6 +95,7 @@ class BenchmarkReftable extends TextBuiltin { @Argument(index = 1) private String reftablePath; + /** {@inheritDoc} */ @Override protected void run() throws Exception { switch (test) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java index 8de57e322..5f8ebdb1a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java @@ -130,11 +130,13 @@ class DiffAlgorithms extends TextBuiltin { private ThreadMXBean mxBean; + /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { mxBean = ManagementFactory.getThreadMXBean(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java index 9dc47210d..973b0d765 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java @@ -214,11 +214,13 @@ class LfsStore extends TextBuiltin { String secretKey; + /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { AppServer server = new AppServer(port); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java index d3a0a3e14..127e54174 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java @@ -57,6 +57,7 @@ import org.eclipse.jgit.pgm.internal.CLIText; @Command(usage = "usage_MakeCacheTree") class MakeCacheTree extends TextBuiltin { + /** {@inheritDoc} */ @Override protected void run() throws Exception { final DirCache cache = db.readDirCache(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java index 07bfc4b5f..0194cca49 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java @@ -54,6 +54,7 @@ import org.eclipse.jgit.pgm.internal.CLIText; @Command(usage = "usage_ReadDirCache") class ReadDirCache extends TextBuiltin { + /** {@inheritDoc} */ @Override protected void run() throws Exception { final int cnt = 100; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java index 9b8db3e0f..fda19017d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java @@ -63,6 +63,7 @@ class ReadReftable extends TextBuiltin { @Argument(index = 1, required = false) private String ref; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (FileInputStream in = new FileInputStream(input); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java index da602d0b8..2e41eec7c 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java @@ -114,6 +114,7 @@ class RebuildCommitGraph extends TextBuiltin { private Map rewrites = new HashMap<>(); + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (!really && !db.getRefDatabase().getRefs(ALL).isEmpty()) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java index 8cde5138a..317248395 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java @@ -73,6 +73,7 @@ class RebuildRefTree extends TextBuiltin { private String txnNamespace; private String txnCommitted; + /** {@inheritDoc} */ @Override protected void run() throws Exception { try (ObjectReader reader = db.newObjectReader(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java index e287425d7..20fa4a3fe 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java @@ -57,6 +57,7 @@ import org.eclipse.jgit.pgm.internal.CLIText; @Command(usage = "usage_ShowCacheTree") class ShowCacheTree extends TextBuiltin { + /** {@inheritDoc} */ @Override protected void run() throws Exception { final DirCache cache = db.readDirCache(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java index 415c7d320..a960ec6dd 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java @@ -59,6 +59,7 @@ class ShowCommands extends TextBuiltin { @Option(name = "--pretty", metaVar = "metaVar_commandDetail", usage = "usage_alterTheDetailShown") private Format pretty = Format.USAGE; + /** {@inheritDoc} */ @Override protected void run() throws Exception { final CommandRef[] list = CommandCatalog.all(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java index bb4f73d7d..7f99d76bd 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java @@ -64,6 +64,7 @@ class ShowDirCache extends TextBuiltin { @Option(name = "--millis", aliases = { "-m" }, usage = "usage_showTimeInMilliseconds") private boolean millis = false; + /** {@inheritDoc} */ @Override protected void run() throws Exception { final SimpleDateFormat fmt; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java index 150fe6eec..bbc1b0f33 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java @@ -72,6 +72,7 @@ class ShowPackDelta extends TextBuiltin { @Argument(index = 0) private ObjectId objectId; + /** {@inheritDoc} */ @Override protected void run() throws Exception { ObjectReader reader = db.newObjectReader(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index ce582010f..83b7bcea2 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -262,11 +262,13 @@ class TextHashFunctions extends TextBuiltin { @Option(name = "--repository", aliases = { "-r" }, metaVar = "GIT_DIR", usage = "Repository to scan") List gitDirs = new ArrayList<>(); + /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } + /** {@inheritDoc} */ @Override protected void run() throws Exception { if (gitDirs.isEmpty()) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java index dffb57989..b38de14af 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java @@ -75,6 +75,7 @@ class VerifyReftable extends TextBuiltin { @Argument(index = 1) private String reftablePath; + /** {@inheritDoc} */ @Override protected void run() throws Exception { List refs = WriteReftable.readRefs(lsRemotePath); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java index 42428c774..d3b0005ef 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java @@ -51,6 +51,7 @@ import org.eclipse.jgit.pgm.internal.CLIText; @Command(usage = "usage_WriteDirCache") class WriteDirCache extends TextBuiltin { + /** {@inheritDoc} */ @Override protected void run() throws Exception { final DirCache cache = db.readDirCache(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java index 76ffa194a..6cbc1b082 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java @@ -104,6 +104,7 @@ class WriteReftable extends TextBuiltin { @Argument(index = 1) private String out; + /** {@inheritDoc} */ @SuppressWarnings({ "nls", "boxing" }) @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java index dfb489d82..b3ad8bf40 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java @@ -79,6 +79,8 @@ public class CLIText extends TranslationBundle { } /** + * Format text + * * @param text * the text to format. * @return a new Format instance. @@ -88,6 +90,8 @@ public class CLIText extends TranslationBundle { } /** + * Get an instance of this translation bundle + * * @return an instance of this translation bundle */ public static CLIText get() { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java index 587f98ca5..6fe792716 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java @@ -68,7 +68,8 @@ import org.kohsuke.args4j.spi.Parameters; import org.kohsuke.args4j.spi.Setter; /** - * Custom argument handler {@link AbstractTreeIterator} from string values. + * Custom argument handler + * {@link org.eclipse.jgit.treewalk.AbstractTreeIterator} from string values. *

* Assumes the parser has been initialized with a Repository. */ @@ -82,8 +83,11 @@ public class AbstractTreeIteratorHandler extends * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public AbstractTreeIteratorHandler(final CmdLineParser parser, final OptionDef option, @@ -92,6 +96,7 @@ public class AbstractTreeIteratorHandler extends clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -144,6 +149,7 @@ public class AbstractTreeIteratorHandler extends return 1; } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_treeish; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java index 3dcb2a314..e071bdf83 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java @@ -61,11 +61,9 @@ import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.treewalk.AbstractTreeIterator; -import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.IllegalAnnotationError; import org.kohsuke.args4j.NamedOptionDef; -import org.kohsuke.args4j.Option; import org.kohsuke.args4j.OptionDef; import org.kohsuke.args4j.OptionHandlerRegistry; import org.kohsuke.args4j.spi.OptionHandler; @@ -105,9 +103,10 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { * them into the given object. * * @param bean - * instance of a class annotated by {@link Option} and - * {@link Argument}. this object will receive values. - * + * instance of a class annotated by + * {@link org.kohsuke.args4j.Option} and + * {@link org.kohsuke.args4j.Argument}. this object will receive + * values. * @throws IllegalAnnotationError * if the option bean class is using args4j annotations * incorrectly. @@ -121,8 +120,10 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { * them into the given object. * * @param bean - * instance of a class annotated by {@link Option} and - * {@link Argument}. this object will receive values. + * instance of a class annotated by + * {@link org.kohsuke.args4j.Option} and + * {@link org.kohsuke.args4j.Argument}. this object will receive + * values. * @param repo * repository this parser can translate options through. * @throws IllegalAnnotationError @@ -140,6 +141,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { this.db = repo; } + /** {@inheritDoc} */ @Override public void parseArgument(final String... args) throws CmdLineException { final ArrayList tmp = new ArrayList<>(args.length); @@ -223,6 +225,8 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { } /** + * Check if array contains help option + * * @param args * non null * @return true if the given array contains help option @@ -292,6 +296,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { } } + /** {@inheritDoc} */ @Override protected OptionHandler createOptionHandler(OptionDef o, Setter setter) { if (o instanceof NamedOptionDef) @@ -301,6 +306,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { } + /** {@inheritDoc} */ @Override public void printSingleLineUsage(Writer w, ResourceBundle rb) { List options = getOptions(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java index 74bab2d2e..0e5b0f5b1 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java @@ -56,7 +56,8 @@ import org.kohsuke.args4j.spi.Parameters; import org.kohsuke.args4j.spi.Setter; /** - * Custom argument handler {@link ObjectId} from string values. + * Custom argument handler {@link org.eclipse.jgit.lib.ObjectId} from string + * values. *

* Assumes the parser has been initialized with a Repository. */ @@ -69,8 +70,11 @@ public class ObjectIdHandler extends OptionHandler { * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public ObjectIdHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { @@ -78,6 +82,7 @@ public class ObjectIdHandler extends OptionHandler { clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -96,6 +101,7 @@ public class ObjectIdHandler extends OptionHandler { CLIText.format(CLIText.get().notAnObject), name); } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_object; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java index 3de7a8109..7d7c80650 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java @@ -19,15 +19,21 @@ import org.kohsuke.args4j.spi.Setter; public class OptionWithValuesListHandler extends OptionHandler> { /** + * Constructor for OptionWithValuesListHandler. + * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public OptionWithValuesListHandler(CmdLineParser parser, OptionDef option, Setter> setter) { super(parser, option, setter); } + /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final List list = new ArrayList<>(); @@ -44,6 +50,7 @@ public class OptionWithValuesListHandler extends OptionHandler> { return list.size(); } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_values; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java index b873c3dc2..1a6b65625 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java @@ -59,10 +59,11 @@ import org.kohsuke.args4j.spi.Parameters; import org.kohsuke.args4j.spi.Setter; /** - * Create a {@link TreeFilter} to patch math names. + * Create a {@link org.eclipse.jgit.treewalk.filter.TreeFilter} to patch math + * names. *

* This handler consumes all arguments to the end of the command line, and is - * meant to be used on an {@link Option} of name "--". + * meant to be used on an {@link org.kohsuke.args4j.Option} of name "--". */ public class PathTreeFilterHandler extends OptionHandler { /** @@ -71,14 +72,18 @@ public class PathTreeFilterHandler extends OptionHandler { * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public PathTreeFilterHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { super(parser, option, setter); } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { final List filters = new ArrayList<>(); @@ -102,6 +107,7 @@ public class PathTreeFilterHandler extends OptionHandler { return filters.size(); } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_paths; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java index f50c7aded..dd8520af7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java @@ -53,7 +53,8 @@ import org.kohsuke.args4j.spi.Parameters; import org.kohsuke.args4j.spi.Setter; /** - * Custom argument handler {@link RefSpec} from string values. + * Custom argument handler {@link org.eclipse.jgit.transport.RefSpec} from + * string values. *

* Assumes the parser has been initialized with a Repository. */ @@ -64,20 +65,25 @@ public class RefSpecHandler extends OptionHandler { * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public RefSpecHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { super(parser, option, setter); } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { setter.addValue(new RefSpec(params.getParameter(0))); return 1; } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_refspec; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java index 27555e344..d2fa76432 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java @@ -60,7 +60,8 @@ import org.kohsuke.args4j.spi.Parameters; import org.kohsuke.args4j.spi.Setter; /** - * Custom argument handler {@link RevCommit} from string values. + * Custom argument handler {@link org.eclipse.jgit.revwalk.RevCommit} from + * string values. *

* Assumes the parser has been initialized with a Repository. */ @@ -73,8 +74,11 @@ public class RevCommitHandler extends OptionHandler { * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public RevCommitHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { @@ -82,6 +86,7 @@ public class RevCommitHandler extends OptionHandler { clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { String name = params.getParameter(0); @@ -145,6 +150,7 @@ public class RevCommitHandler extends OptionHandler { setter.addValue(c); } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_commitish; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java index 15ed5890e..9444363be 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java @@ -59,7 +59,8 @@ import org.kohsuke.args4j.spi.Parameters; import org.kohsuke.args4j.spi.Setter; /** - * Custom argument handler {@link RevTree} from string values. + * Custom argument handler {@link org.eclipse.jgit.revwalk.RevTree} from string + * values. *

* Assumes the parser has been initialized with a Repository. */ @@ -72,8 +73,11 @@ public class RevTreeHandler extends OptionHandler { * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public RevTreeHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { @@ -81,6 +85,7 @@ public class RevTreeHandler extends OptionHandler { clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -112,6 +117,7 @@ public class RevTreeHandler extends OptionHandler { return 1; } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_treeish; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java index ae5263fba..d60071f17 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java @@ -57,8 +57,9 @@ import org.kohsuke.args4j.spi.Setter; /** * Custom Argument handler for jgit command selection. *

- * Translates a single argument string to a {@link TextBuiltin} instance which - * we can execute at runtime with the remaining arguments of the parser. + * Translates a single argument string to a + * {@link org.eclipse.jgit.pgm.TextBuiltin} instance which we can execute at + * runtime with the remaining arguments of the parser. */ public class SubcommandHandler extends OptionHandler { private final org.eclipse.jgit.pgm.opt.CmdLineParser clp; @@ -69,8 +70,11 @@ public class SubcommandHandler extends OptionHandler { * This constructor is used only by args4j. * * @param parser + * a {@link org.kohsuke.args4j.CmdLineParser} object. * @param option + * a {@link org.kohsuke.args4j.OptionDef} object. * @param setter + * a {@link org.kohsuke.args4j.spi.Setter} object. */ public SubcommandHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { @@ -78,6 +82,7 @@ public class SubcommandHandler extends OptionHandler { clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } + /** {@inheritDoc} */ @Override public int parseArguments(final Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -95,6 +100,7 @@ public class SubcommandHandler extends OptionHandler { return 1; } + /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_command; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java index e22b2e49b..2487a926d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java @@ -71,6 +71,8 @@ import org.kohsuke.args4j.spi.StringOptionHandler; public class UntrackedFilesHandler extends StringOptionHandler { /** + *

Constructor for UntrackedFilesHandler.

+ * * @param parser * The parser to which this handler belongs to. * @param option @@ -83,6 +85,7 @@ public class UntrackedFilesHandler extends StringOptionHandler { super(parser, option, setter); } + /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { String alias = params.getParameter(-1);