Skip to content

Commit f33cca7

Browse files
author
nmacedo
committed
version update
1 parent fa9be67 commit f33cca7

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

electrum/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>pt.uminho.haslab.electrum</groupId>
55
<artifactId>electrum</artifactId>
6-
<version>0.2.0</version>
6+
<version>1.0.0</version>
77
<name>electrum</name>
88
<packaging>jar</packaging>
99
<profiles>

electrum/src/main/java/edu/mit/csail/sdg/alloy4/MailBug.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private static boolean isGUI(Throwable ex) {
103103
private static String prepareCrashReport (Thread thread, Throwable ex, String email, String problem) {
104104
StringWriter sw = new StringWriter();
105105
PrintWriter pw = new PrintWriter(sw);
106-
pw.printf("Alloy Analyzer %s crash report (Build Date = %s)\n", Version.version(), Version.buildDate());
106+
pw.printf("Alloy Analyzer %s (Electrum Analyzer %s) crash report (Build Date = %s)\n", Version.version(), Version.eleVersion(), Version.buildDate());
107107
pw.printf("\n========================= Email ============================\n%s\n", Util.convertLineBreak(email).trim());
108108
pw.printf("\n========================= Problem ==========================\n%s\n", Util.convertLineBreak(problem).trim());
109109
pw.printf("\n========================= Thread Name ======================\n%s\n", thread.getName().trim());

electrum/src/main/java/edu/mit/csail/sdg/alloy4/Version.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ private Version() { }
3333
/** Returns the build number. */
3434
public static int buildNumber() { return Integer.MAX_VALUE; }
3535

36-
/** Returns the version string. */
36+
/** Returns the Alloy version string. */
3737
public static String version() { return "4.2.?"; }
3838

39+
/** Returns the Electrum version string. */
40+
public static String eleVersion() { return "1.0.?"; }
41+
3942
/** Returns the build date. */
4043
public static String buildDate() { return "unknown"; }
4144

electrum/src/main/java/edu/mit/csail/sdg/alloy4whole/SimpleCLI.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,13 @@ private static void copyFromJAR() {
304304
private static synchronized String alloyHome() {
305305
String temp=System.getProperty("java.io.tmpdir");
306306
if (temp==null || temp.length()==0)
307-
OurDialog.fatal("Error. JVM need to specify a temporary directory using java.io.tmpdir property.");
307+
throw new RuntimeException("Error. JVM need to specify a temporary directory using java.io.tmpdir property.");
308308
String username=System.getProperty("user.name");
309309
File tempfile=new File(temp+File.separatorChar+"alloy4tmp40-"+(username==null?"":username));
310310
tempfile.mkdirs();
311311
String ans=Util.canon(tempfile.getPath());
312312
if (!tempfile.isDirectory()) {
313-
OurDialog.fatal("Error. Cannot create the temporary directory "+ans);
314-
}
315-
if (!Util.onWindows()) {
316-
String[] args={"chmod", "700", ans};
317-
try {Runtime.getRuntime().exec(args).waitFor();}
318-
catch (Throwable ex) {} // We only intend to make a best effort.
313+
throw new RuntimeException("Error. Cannot create the temporary directory "+ans);
319314
}
320315
return ans;
321316
}

electrum/src/main/java/edu/mit/csail/sdg/alloy4whole/SimpleGUI.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import java.util.Scanner;
5353
import java.util.Set;
5454
import java.util.prefs.Preferences;
55-
import java.util.regex.Pattern;
5655

5756
import javax.swing.Box;
5857
import javax.swing.Icon;
@@ -398,7 +397,7 @@ private Runner notifyChange() {
398397
if (text==null) return null; // If this was called prior to the "text" being fully initialized
399398
OurSyntaxWidget t = text.get();
400399
if (Util.onMac()) frame.getRootPane().putClientProperty("windowModified", Boolean.valueOf(t.modified()));
401-
if (t.isFile()) frame.setTitle(t.getFilename()); else frame.setTitle("Alloy Analyzer (Electrum) "+Version.version());
400+
if (t.isFile()) frame.setTitle(t.getFilename()); else frame.setTitle("Alloy Analyzer "+Version.version() + " (Electrum Analyzer"+Version.eleVersion()+")");
402401
toolbar.setBorder(new OurBorder(false, false, text.count()<=1, false));
403402
int c = t.getCaret();
404403
int y = t.getLineOfOffset(c)+1;
@@ -514,7 +513,7 @@ private void copyFromJAR() {
514513
// Record the locations
515514
System.setProperty("alloy.theme0", alloyHome() + fs + "models");
516515
System.setProperty("alloy.home", alloyHome());
517-
// System.setProperty("debug", "no"); // [HASLab]: this breaks iteration!
516+
// System.setProperty("debug", "yes"); // [HASLab]: this breaks iteration!
518517
}
519518

520519
/** Called when this window is resized. */
@@ -1454,7 +1453,7 @@ private Runner doOptSyntaxHighlighting() {
14541453
/** This method displays the about box. */
14551454
private Runner doAbout() {
14561455
if (wrap) return wrapMe();
1457-
OurDialog.showmsg("About Alloy Analyzer " + Version.version(),
1456+
OurDialog.showmsg("About Alloy Analyzer " + Version.version() + " (Electrum Analyzer "+Version.eleVersion()+")",
14581457
OurUtil.loadIcon("images/logo.gif"),
14591458
"Alloy Analyzer " + Version.version(),
14601459
"Build date: " + Version.buildDate(),
@@ -1468,7 +1467,13 @@ private Runner doAbout() {
14681467
" ",
14691468
"Thanks to: Ilya Shlyakhter, Manu Sridharan, Derek Rayside, Jonathan Edwards, Gregory Dennis,",
14701469
"Robert Seater, Edmond Lau, Vincent Yeung, Sam Daitch, Andrew Yip, Jongmin Baek, Ning Song,",
1471-
"Arturo Arizpe, Li-kuo (Brian) Lin, Joseph Cohen, Jesse Pavel, Ian Schechter, and Uriel Schafer."
1470+
"Arturo Arizpe, Li-kuo (Brian) Lin, Joseph Cohen, Jesse Pavel, Ian Schechter, and Uriel Schafer.",
1471+
" ",
1472+
"Electrum Analyzer " + Version.eleVersion(),
1473+
" ",
1474+
"Lead developer: Nuno Macedo",
1475+
"Project lead: Alcino Cunha",
1476+
"Thanks to: David Chemouil, Julien Brunel, Denis Kuperberg, Eduardo Pessoa, Tiago Guimarães."
14721477
);
14731478
return null;
14741479
}
@@ -1785,7 +1790,7 @@ private SimpleGUI (final String[] args) {
17851790

17861791
// Enable better look-and-feel
17871792
if (Util.onMac() || Util.onWindows()) {
1788-
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Alloy Analyzer (Electrum) "+Version.version());
1793+
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Alloy Analyzer "+Version.version() + " (Electrum Analyzer"+Version.eleVersion()+")");
17891794
System.setProperty("com.apple.mrj.application.growbox.intrudes","true");
17901795
System.setProperty("com.apple.mrj.application.live-resize","true");
17911796
System.setProperty("com.apple.macos.useScreenMenuBar","true");
@@ -1962,7 +1967,7 @@ private void finishInit(String[] args, List<Integer> initialAllowedMemorySizes,
19621967
all.add(status, BorderLayout.SOUTH);
19631968

19641969
// Generate some informative log messages
1965-
log.logBold("Alloy Analyzer (Electrum) "+Version.version()+" (build date: "+Version.buildDate()+")\n\n");
1970+
log.logBold("Alloy Analyzer "+Version.version()+" (Electrum Analyzer "+Version.eleVersion()+") (build date: "+Version.buildDate()+")\n\n");
19661971

19671972
// If on Mac, then register an application listener
19681973
try {

pardinus

0 commit comments

Comments
 (0)