Skip to content

Commit

Permalink
Fixed build script to allow running project successfully from within …
Browse files Browse the repository at this point in the history
…NetBeans.

Added check for too-high internal revision number in reactor code.
Increased persistence of tooltips (now that they're more informative)
  • Loading branch information
MauveCloud committed Apr 7, 2019
1 parent febd35b commit 44fa9d3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ jar {
}
}

task processAssets(type: Copy) {
from('src') {
include 'assets/**/*.png'
include 'Ic2ExpReactorPlanner/Bundle*.properties'
}
into 'build/classes/java/main'
}

run {
run.dependsOn processAssets
}

task processSource(type: Copy) {
from sourceSets.main.java
Expand Down
4 changes: 4 additions & 0 deletions src/Ic2ExpReactorPlanner/Reactor.java
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ private void readCodeString(final String code) {
BigintStorage storage = BigintStorage.inputBase64(code);
// read the code revision from the code itself instead of making it part of the prefix.
int codeRevision = storage.extract(255);
// Check if the code revision is supported yet.
if (codeRevision > 1) {
throw new IllegalArgumentException("Unsupported code revision in reactor code.");
}
// for code revision 1 or newer, read whether the reactor is pulsed and/or automated next.
if (codeRevision >= 1) {
pulsed = storage.extract(1) > 0;
Expand Down
2 changes: 2 additions & 0 deletions src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import javax.swing.JPanel;
import javax.swing.SpinnerNumberModel;
import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
import javax.swing.border.BevelBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
Expand Down Expand Up @@ -106,6 +107,7 @@ public class ReactorPlannerFrame extends javax.swing.JFrame {
*/
public ReactorPlannerFrame() {
initComponents();
ToolTipManager.sharedInstance().setDismissDelay((int)30e3);
Enumeration<AbstractButton> buttons = componentsGroup.getElements();
if (heatSpinner.getModel() instanceof SpinnerNumberModel) {
heatSpinnerModel = (SpinnerNumberModel)heatSpinner.getModel();
Expand Down

0 comments on commit 44fa9d3

Please sign in to comment.