[DEV] correct the GUI display of island
This commit is contained in:
parent
f00acc0744
commit
0376dfacab
@ -5,6 +5,7 @@
|
|||||||
open module org.atriasoft.island {
|
open module org.atriasoft.island {
|
||||||
exports org.atriasoft.island;
|
exports org.atriasoft.island;
|
||||||
exports org.atriasoft.island.model;
|
exports org.atriasoft.island.model;
|
||||||
|
exports org.atriasoft.island.actions;
|
||||||
exports org.atriasoft.island.model.manifest;
|
exports org.atriasoft.island.model.manifest;
|
||||||
//exports org.atriasoft.island.actions;
|
//exports org.atriasoft.island.actions;
|
||||||
|
|
||||||
|
@ -29,15 +29,40 @@ public class MainIsland {
|
|||||||
@ArgCommand("island")
|
@ArgCommand("island")
|
||||||
@ArgDescription("Package management system: download a specific worktree composed on artefact or real sources")
|
@ArgDescription("Package management system: download a specific worktree composed on artefact or real sources")
|
||||||
public static class MainConfig {
|
public static class MainConfig {
|
||||||
|
@ArgSubActions
|
||||||
|
static public final ActionList subActions = new ActionList();
|
||||||
|
|
||||||
|
static {
|
||||||
|
MainConfig.subActions.add(BaseInit.class);
|
||||||
|
MainConfig.subActions.add(BaseStatus.class);
|
||||||
|
MainConfig.subActions.add(BaseCheckout.class);
|
||||||
|
MainConfig.subActions.add(BaseSync.class);
|
||||||
|
MainConfig.subActions.add(BaseFetch.class);
|
||||||
|
MainConfig.subActions.add(BaseCommit.class);
|
||||||
|
MainConfig.subActions.add(BasePush.class);
|
||||||
|
MainConfig.subActions.add(VolatileAdd.class);
|
||||||
|
MainConfig.subActions.add(VolatileRemove.class);
|
||||||
|
MainConfig.subActions.add(VolatileList.class);
|
||||||
|
MainConfig.subActions.add(ManifestCheckout.class);
|
||||||
|
MainConfig.subActions.add(ManifestStatus.class);
|
||||||
|
MainConfig.subActions.add(Deliver.class);
|
||||||
|
MainConfig.subActions.add(DependencySync.class);
|
||||||
|
}
|
||||||
|
|
||||||
@ArgName("help")
|
@ArgName("help")
|
||||||
@ArgAlias('h')
|
@ArgAlias('h')
|
||||||
@ArgDescription("Display the application help")
|
@ArgDescription("Display the application help")
|
||||||
public boolean help = false;
|
public boolean help = false;
|
||||||
|
|
||||||
|
@ArgName("HELP")
|
||||||
|
@ArgAlias('H')
|
||||||
|
@ArgDescription("Display the application full help (with all actions helps)")
|
||||||
|
public boolean helpFull = false;
|
||||||
|
|
||||||
@ArgName("verbose")
|
@ArgName("verbose")
|
||||||
@ArgAlias('v')
|
@ArgAlias('v')
|
||||||
@ArgDescription("Display debug level (verbosity)")
|
@ArgDescription("Display debug level (verbosity)")
|
||||||
@ArgChoice({ "none>>0", "error>>1", "warning>>2", "info>>3", "debug>>4", "verbose>>5", "extreme_verbose>>6"})
|
@ArgChoice({ "none>>0", "error>>1", "warning>>2", "info>>3", "debug>>4", "verbose>>5", "extreme_verbose>>6" })
|
||||||
public int verbose = 2;
|
public int verbose = 2;
|
||||||
|
|
||||||
@ArgName("color")
|
@ArgName("color")
|
||||||
@ -65,32 +90,6 @@ public class MainIsland {
|
|||||||
@ArgDescription("Wait between 2 access on the server (needed when the server is really slow to remove ssh connection)")
|
@ArgDescription("Wait between 2 access on the server (needed when the server is really slow to remove ssh connection)")
|
||||||
public int wait = 0;
|
public int wait = 0;
|
||||||
|
|
||||||
@ArgSubActions
|
|
||||||
static public final ActionList subActions = new ActionList();
|
|
||||||
static {
|
|
||||||
MainConfig.subActions.add(BaseInit.class);
|
|
||||||
MainConfig.subActions.add(BaseStatus.class);
|
|
||||||
MainConfig.subActions.add(BaseCheckout.class);
|
|
||||||
MainConfig.subActions.add(BaseSync.class);
|
|
||||||
MainConfig.subActions.add(BaseFetch.class);
|
|
||||||
MainConfig.subActions.add(BaseCommit.class);
|
|
||||||
MainConfig.subActions.add(BasePush.class);
|
|
||||||
MainConfig.subActions.add(VolatileAdd.class);
|
|
||||||
MainConfig.subActions.add(VolatileRemove.class);
|
|
||||||
MainConfig.subActions.add(VolatileList.class);
|
|
||||||
MainConfig.subActions.add(ManifestCheckout.class);
|
|
||||||
MainConfig.subActions.add(ManifestStatus.class);
|
|
||||||
MainConfig.subActions.add(Deliver.class);
|
|
||||||
MainConfig.subActions.add(DependencySync.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean check_boolean(final String value) {
|
|
||||||
if (value.isEmpty() || value.equals("1") || value.equalsIgnoreCase("true")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void applyConfig() {
|
public void applyConfig() {
|
||||||
Env.setWaitBetweenSeverCommand(this.wait);
|
Env.setWaitBetweenSeverCommand(this.wait);
|
||||||
// Logger.setLevel(this.verbose);
|
// Logger.setLevel(this.verbose);
|
||||||
@ -99,12 +98,23 @@ public class MainIsland {
|
|||||||
Env.setFilterCommand(this.filter);
|
Env.setFilterCommand(this.filter);
|
||||||
Env.setFetchManifest(this.fetchManifest);
|
Env.setFetchManifest(this.fetchManifest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean check_boolean(final String value) {
|
||||||
|
if (value.isEmpty() || value.equals("1") || value.equalsIgnoreCase("true")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(final String[] args) throws ActionException {
|
public static void main(final String[] args) throws ActionException {
|
||||||
MainConfig tmp = new MainConfig();
|
final MainConfig tmp = new MainConfig();
|
||||||
ArgumentManager parser = new ArgumentManager(args, tmp, true);
|
final ArgumentManager parser = new ArgumentManager(args, tmp, true);
|
||||||
tmp.applyConfig();
|
tmp.applyConfig();
|
||||||
|
if (tmp.helpFull) {
|
||||||
|
parser.showHelpFull();
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
if (tmp.help) {
|
if (tmp.help) {
|
||||||
parser.showHelp();
|
parser.showHelp();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
@ -121,5 +131,5 @@ public class MainIsland {
|
|||||||
}
|
}
|
||||||
parser.executeAction();
|
parser.executeAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user