More work on the website.

This commit is contained in:
Reinier Zwitserloot committed 2009-07-11 00:43:53 +02:00
1 parent 08bc31232f
commit 762bcba007
7 files changed
+137 -13

No files matched your search

+4 -2
View File
@@ -12,8 +12,9 @@ A lot has been tried:
Tried tactics, and why they won't work:
- Replace every 'return', 'break', and 'continue' statement (for the latter 2, only if they break/continue out of the try block) with a block that first sets a uniquely named flag before doing the operati
Then, check that flag in the finally block to see if the cleanup call should be guarded by a try/catchThrowable. This doesn't work, because its not possible to instrument the 4th way out of a try block
- Replace every 'return', 'break', and 'continue' statement (for the latter 2, only if they break/continue out of the try block) with a block that first sets a uniquely named flag before doing the operation.
Then, check that flag in the finally block to see if the cleanup call should be guarded by a try/catchThrowable. This doesn't work, because its not possible to instrument the 4th way out of a try block:
just running to the end of it. Putting a 'flag = true;' at the end isn't safe, because that might be unreachable code.
- Put catch blocks in for all relevant exceptions (RuntimeException, Error, all exceptions declared as thrown by the method, and all types of exceptions of the catch blocks of encapsulating try blocks.
This doesn't work, partly because it'll fail for sneakily thrown exceptions, but mostly because you can't just catch an exception listed in the 'throws' clause of the method body; catching an exception
@@ -21,6 +22,7 @@ A lot has been tried:
- Put in a blanket catch Throwable to set the flag. Two problems with this:
First, sneaky throw can't be done. Thread.stop invokes a security manager and triggers a warning, Calling a sneakyThrow method creates a runtime dependency on lombok, constructing a sneakyThrow in-class
requires either lots of "$1" classes that clog up permgen, or are slow and require reflection tricks to load live off of a byte array literal.
Secondly, this would mean that any statements in the try body that throw an exception aren't flagged to the user as needing to be handled. Unacceptable.
The Cleanup annotation now also calls the cleanup method for you, and will call it at the END of the current scope. The following plans have been tried and abandoned:
+39
View File
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />
<script src="logi/jQuery-all.js" type="text/javascript"></script>
<script src="index.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="logi/reset.css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta name="description" content="Spice up your java" />
<title>Project Lombok</title>
<!--[if lt IE 7]><script type="text/javascript" src="logi/iepngfix_tilebg.js"></script><![endif]-->
<style type="text/css">
code {
font-size: 12px;
font-family: monospaced;
}
#downloadLink {
font-size: 14px;
}
.meat {
margin: 16px auto 0 auto;
width: 800px;
}
</style>
</head><body>
<div class="meat">
<h1>Download Lombok</h1>
<p id="downloadHelp">
Just double-click the <code>lombok.jar</code> file you've downloaded to install lombok into
your IDE. <code>lombok.jar</code> is also the jar you use as a project dependency
(include it in your classpath when compiling with <code>javac</code> or add it to your project
library list in your java IDE). It's the only jar you need!
</p>
<a href="http://projectlombok.googlecode.com/files/lombok.jar" id="downloadLink">
Download now!
</a>
</div>
</body></html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+34 -1
View File
@@ -13,7 +13,7 @@ h1 {
text-align: center;
}
.buttonBar a {
#buttonBar a.js {
color: black;
text-decoration: none;
}
@@ -21,6 +21,10 @@ h1 {
.buttonBar {
-webkit-border-top-right-radius: 15px 15px;
-webkit-border-top-left-radius: 15px 15px;
-moz-border-radius-topright: 15px;
-moz-border-radius-topleft: 15px;
border-top-right-radius: 15px 15px;
border-top-left-radius: 15px 15px;
background-image: url(buttonbar.jpg);
width: 800px;
height: 170px;
@@ -29,6 +33,10 @@ h1 {
.endBar {
-webkit-border-bottom-right-radius: 15px 15px;
-webkit-border-bottom-left-radius: 15px 15px;
-moz-border-radius-bottomright: 15px;
-moz-border-radius-bottomleft: 15px;
border-bottom-right-radius: 15px 15px;
border-bottom-left-radius: 15px 15px;
background-image: url(buttonbar.jpg);
width: 800px;
height: 30px;
@@ -69,6 +77,10 @@ h1 {
height: 56px;
}
code {
font-weight: bold;
}
.download img {
margin: 4px 20px 4px 16px;
float: left;
@@ -81,6 +93,27 @@ h1 {
font-weight: bold;
}
#downloadInfo {
display: block;
position: absolute;
left: 50%;
top: 35px;
font-size: 16px;
margin-left: -400px;
}
#downloadInfo p {
margin: 12px;
}
.downloadActions {
margin-top: 16px;
margin-left: 32px;
}
.downloadActions a {
display: block;
}
.proxyVideo {
width: 800px;
height: 480px;
+16 -9
View File
@@ -5,31 +5,38 @@
<script src="index.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="logi/reset.css" />
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta name="description" content="Spice up your java" />
<title>Project Lombok</title>
<!--[if lt IE 7]><script type="text/javascript" src="logi/iepngfix_tilebg.js"></script><![endif]-->
</head><body>
<div id="downloadInfo" class="buttonBar" style="display: none;">
<span></span>
<div class="downloadActions">
<a class="backToBar" href="http://projectlombok.googlecode.com/files/lombok.jar">Okay, download <strong>lombok</strong></a>
<a href="#" class="backToBar">No, don't</a>
</div>
</div>
<div class="meat">
<h1>Project Lombok</h1>
<div class="buttonBar">
<a class="button" href="overview.html">
<div id="buttonBar" class="buttonBar">
<a class="button" href="http://wiki.github.com/rzwitserloot/lombok/features">
<img src="icon_overview.png" />
<span>Feature Overview</span>
</a>
<a class="button" href="mailinglist.html">
<a class="button" href="http://groups.google.com/group/project-lombok">
<img src="icon_discussion.png" />
<span>Mailing List</span>
<span>Discuss / Help</span>
</a>
<a class="button" href="contribute.html">
<a class="button" href="http://wiki.github.com/rzwitserloot/lombok/contributing">
<img src="icon_contribute.png" />
<span>Contribute</span>
</a>
<a class="button" href="bugs.html">
<a class="button" href="http://code.google.com/p/projectlombok/issues/list">
<img src="icon_bugs.png" />
<span>Report a Bug</span>
<span>Report an issue</span>
</a>
<a class="download" href="download.html">
<a class="download" id="downloadLink" href="download.html">
<img src="icon_download.png" />
<span>Download!</span>
</a>
+43 -1
View File
@@ -1,8 +1,50 @@
$(function() {
addGlow();
fixDownloadLink();
});
function fixDownloadLink() {
$("#downloadLink").attr("href", "http://projectlombok.googlecode.com/files/lombok.jar")
.click(function(event) {
showDownloadInfo();
event.preventDefault();
});
$(".backToBar").click(function(event) {
$("#downloadInfo").hide();
});
}
function showDownloadInfo() {
if ( !$("#downloadInfo").data("filled") ) {
$("#downloadInfo").data("filled", true);
$.ajax({
type: "GET",
url: "download.html",
success: function(html) {
var pos = html.search(/<p\s+id\s*=\s*"downloadHelp"[^>]*>/i);
if ( pos == -1 ) return;
html = html.substring(pos);
pos = html.search(">");
html = html.substring(pos + 1);
pos = html.search(/<\s*\/\s*p\s*>/);
html = html.substring(0, pos);
var p = $("<p>").html(html).append($("#downloadInfo .downloadActions"));
$("#downloadInfo span:first-child").replaceWith(p);
$("#downloadInfo").show();
}
});
} else {
$("#downloadInfo").show();
}
}
function addGlow() {
$("a").addClass("js");
$(".button,.download").addGlow({
radius: 20,
textColor: '#00f',
haloColor: '#00f',
duration: 500
});
});
}
+1
View File
@@ -33,6 +33,7 @@ del{
}
img{
border: 0;
display:inline-block;
vertical-align:bottom;
}