|
1566 | 1566 | }); |
1567 | 1567 | }); |
1568 | 1568 | </script> |
1569 | | -<style> |
1570 | | -.hidden { |
1571 | | - display: none; |
1572 | | -} |
1573 | | - |
1574 | | -.switch { |
1575 | | - border-width: 1px 1px 0 1px; |
1576 | | - border-style: solid; |
1577 | | - border-color: #7a2518; |
1578 | | - display: inline-block; |
1579 | | -} |
1580 | | - |
1581 | | -.switch--item { |
1582 | | - padding: 10px; |
1583 | | - background-color: #ffffff; |
1584 | | - color: #7a2518; |
1585 | | - display: inline-block; |
1586 | | - cursor: pointer; |
1587 | | -} |
1588 | | - |
1589 | | -.switch--item.selected { |
1590 | | - background-color: #7a2519; |
1591 | | - color: #ffffff; |
1592 | | -} |
1593 | | - |
1594 | | -</style> |
1595 | | -<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script> |
1596 | | -<script type="text/javascript"> |
1597 | | -function addBlockSwitches() { |
1598 | | - $('.primary').each(function() { |
1599 | | - primary = $(this); |
1600 | | - createSwitchItem(primary, createBlockSwitch(primary)).item.addClass("selected"); |
1601 | | - primary.children('.title').remove(); |
1602 | | - }); |
1603 | | - $('.secondary').each(function(idx, node) { |
1604 | | - secondary = $(node); |
1605 | | - primary = findPrimary(secondary); |
1606 | | - switchItem = createSwitchItem(secondary, primary.children('.switch')); |
1607 | | - switchItem.content.addClass('hidden'); |
1608 | | - findPrimary(secondary).append(switchItem.content); |
1609 | | - secondary.remove(); |
1610 | | - }); |
1611 | | -} |
1612 | | - |
1613 | | -function createBlockSwitch(primary) { |
1614 | | - blockSwitch = $('<div class="switch"></div>'); |
1615 | | - primary.prepend(blockSwitch); |
1616 | | - return blockSwitch; |
1617 | | -} |
1618 | | - |
1619 | | -function findPrimary(secondary) { |
1620 | | - candidate = secondary.prev(); |
1621 | | - while (!candidate.is('.primary')) { |
1622 | | - candidate = candidate.prev(); |
1623 | | - } |
1624 | | - return candidate; |
1625 | | -} |
1626 | | - |
1627 | | -function createSwitchItem(block, blockSwitch) { |
1628 | | - blockName = block.children('.title').text(); |
1629 | | - content = block.children('.content').first().append(block.next('.colist')); |
1630 | | - item = $('<div class="switch--item">' + blockName + '</div>'); |
1631 | | - item.on('click', '', content, function(e) { |
1632 | | - $(this).addClass('selected'); |
1633 | | - $(this).siblings().removeClass('selected'); |
1634 | | - e.data.siblings('.content').addClass('hidden'); |
1635 | | - e.data.removeClass('hidden'); |
1636 | | - }); |
1637 | | - blockSwitch.append(item); |
1638 | | - return {'item': item, 'content': content}; |
1639 | | -} |
1640 | | - |
1641 | | -$(addBlockSwitches); |
1642 | | - |
1643 | | -</script> |
| 1569 | +<style> |
| 1570 | +.hidden { |
| 1571 | + display: none; |
| 1572 | +} |
| 1573 | + |
| 1574 | +.switch { |
| 1575 | + border-width: 1px 1px 0 1px; |
| 1576 | + border-style: solid; |
| 1577 | + border-color: #7a2518; |
| 1578 | + display: inline-block; |
| 1579 | +} |
| 1580 | + |
| 1581 | +.switch--item { |
| 1582 | + padding: 10px; |
| 1583 | + background-color: #ffffff; |
| 1584 | + color: #7a2518; |
| 1585 | + display: inline-block; |
| 1586 | + cursor: pointer; |
| 1587 | +} |
| 1588 | + |
| 1589 | +.switch--item.selected { |
| 1590 | + background-color: #7a2519; |
| 1591 | + color: #ffffff; |
| 1592 | +} |
| 1593 | + |
| 1594 | +</style> |
| 1595 | +<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script> |
| 1596 | +<script type="text/javascript"> |
| 1597 | +function addBlockSwitches() { |
| 1598 | + $('.primary').each(function() { |
| 1599 | + primary = $(this); |
| 1600 | + createSwitchItem(primary, createBlockSwitch(primary)).item.addClass("selected"); |
| 1601 | + primary.children('.title').remove(); |
| 1602 | + }); |
| 1603 | + $('.secondary').each(function(idx, node) { |
| 1604 | + secondary = $(node); |
| 1605 | + primary = findPrimary(secondary); |
| 1606 | + switchItem = createSwitchItem(secondary, primary.children('.switch')); |
| 1607 | + switchItem.content.addClass('hidden'); |
| 1608 | + findPrimary(secondary).append(switchItem.content); |
| 1609 | + secondary.remove(); |
| 1610 | + }); |
| 1611 | +} |
| 1612 | + |
| 1613 | +function createBlockSwitch(primary) { |
| 1614 | + blockSwitch = $('<div class="switch"></div>'); |
| 1615 | + primary.prepend(blockSwitch); |
| 1616 | + return blockSwitch; |
| 1617 | +} |
| 1618 | + |
| 1619 | +function findPrimary(secondary) { |
| 1620 | + candidate = secondary.prev(); |
| 1621 | + while (!candidate.is('.primary')) { |
| 1622 | + candidate = candidate.prev(); |
| 1623 | + } |
| 1624 | + return candidate; |
| 1625 | +} |
| 1626 | + |
| 1627 | +function createSwitchItem(block, blockSwitch) { |
| 1628 | + blockName = block.children('.title').text(); |
| 1629 | + content = block.children('.content').first().append(block.next('.colist')); |
| 1630 | + item = $('<div class="switch--item">' + blockName + '</div>'); |
| 1631 | + item.on('click', '', content, function(e) { |
| 1632 | + $(this).addClass('selected'); |
| 1633 | + $(this).siblings().removeClass('selected'); |
| 1634 | + e.data.siblings('.content').addClass('hidden'); |
| 1635 | + e.data.removeClass('hidden'); |
| 1636 | + }); |
| 1637 | + blockSwitch.append(item); |
| 1638 | + return {'item': item, 'content': content}; |
| 1639 | +} |
| 1640 | + |
| 1641 | +$(addBlockSwitches); |
| 1642 | + |
| 1643 | +</script> |
1644 | 1644 |
|
1645 | 1645 | </head> |
1646 | 1646 | <body class="article"> |
1647 | 1647 | <div id="header"> |
1648 | 1648 | <h1>A Whirlwind Tour of Picocli</h1> |
1649 | 1649 | <div class="details"> |
1650 | 1650 | <span id="author" class="author">Remko Popma</span><br> |
1651 | | -<span id="revnumber">version 4.6.1</span> |
| 1651 | +<span id="revnumber">version 4.6.2</span> |
1652 | 1652 | </div> |
1653 | 1653 | </div> |
1654 | 1654 | <div id="content"> |
@@ -1722,7 +1722,7 @@ <h3 id="_a_checksum_utility">A CheckSum Utility</h3> |
1722 | 1722 | <span class="annotation">@Option</span>(names = {<span class="string"><span class="delimiter">"</span><span class="content">-a</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content">--algorithm</span><span class="delimiter">"</span></span>}, description = <span class="string"><span class="delimiter">"</span><span class="content">MD5, SHA-1, SHA-256, ...</span><span class="delimiter">"</span></span>) |
1723 | 1723 | <span class="directive">private</span> <span class="predefined-type">String</span> algorithm = <span class="string"><span class="delimiter">"</span><span class="content">MD5</span><span class="delimiter">"</span></span>; |
1724 | 1724 |
|
1725 | | - <span class="directive">public</span> <span class="directive">static</span> <span class="type">void</span> main(<span class="predefined-type">String</span><span class="type">[]</span> args) <span class="directive">throws</span> <span class="exception">Exception</span> { |
| 1725 | + <span class="directive">public</span> <span class="directive">static</span> <span class="type">void</span> main(<span class="predefined-type">String</span><span class="type">[]</span> args) { |
1726 | 1726 | <span class="comment">// CheckSum implements Callable, so parsing, error handling and handling user</span> |
1727 | 1727 | <span class="comment">// requests for usage help or version help can be done with one line of code.</span> |
1728 | 1728 | CommandLine.call(<span class="keyword">new</span> CheckSum(), args); |
@@ -2928,7 +2928,7 @@ <h3 id="_micronaut">Micronaut</h3> |
2928 | 2928 | <span class="annotation">@Option</span>(names = {<span class="string"><span class="delimiter">"</span><span class="content">-x</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content">--option</span><span class="delimiter">"</span></span>}, description = <span class="string"><span class="delimiter">"</span><span class="content">example option</span><span class="delimiter">"</span></span>) |
2929 | 2929 | <span class="type">boolean</span> flag; |
2930 | 2930 |
|
2931 | | - <span class="directive">public</span> <span class="directive">static</span> <span class="type">void</span> main(<span class="predefined-type">String</span><span class="type">[]</span> args) <span class="directive">throws</span> <span class="exception">Exception</span> { |
| 2931 | + <span class="directive">public</span> <span class="directive">static</span> <span class="type">void</span> main(<span class="predefined-type">String</span><span class="type">[]</span> args) { |
2932 | 2932 | <span class="comment">// let Micronaut instantiate and inject services</span> |
2933 | 2933 | PicocliRunner.run(MyMicronautApp.class, args); |
2934 | 2934 | } |
@@ -3086,8 +3086,8 @@ <h2 id="_conclusion">Conclusion</h2> |
3086 | 3086 | </div> |
3087 | 3087 | <div id="footer"> |
3088 | 3088 | <div id="footer-text"> |
3089 | | -Version 4.6.1<br> |
3090 | | -Last updated 2020-11-21 19:22:42 +0900 |
| 3089 | +Version 4.6.2<br> |
| 3090 | +Last updated 2021-09-28 10:52:49 +0900 |
3091 | 3091 | </div> |
3092 | 3092 | </div> |
3093 | 3093 | </body> |
|
0 commit comments