Merge lp:~tapaal-contributor/tapaal/ltl-icon-selection-1997234 into lp:tapaal

Proposed by Lena Ernstsen
Status: Superseded
Proposed branch: lp:~tapaal-contributor/tapaal/ltl-icon-selection-1997234
Merge into: lp:tapaal
Diff against target: 493 lines (+145/-47) (has conflicts)
15 files modified
src/dk/aau/cs/model/tapn/TAPNQuery.java (+8/-8)
src/dk/aau/cs/verification/QueryResult.java (+2/-0)
src/dk/aau/cs/verification/QueryType.java (+3/-1)
src/dk/aau/cs/verification/Stats.java (+3/-3)
src/dk/aau/cs/verification/VerificationResult.java (+16/-0)
src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java (+0/-1)
src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNExporter.java (+22/-20)
src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNIconSelector.java (+28/-8)
src/net/tapaal/Preferences.java (+17/-0)
src/net/tapaal/TAPAAL.java (+1/-1)
src/pipe/gui/GuiFrameController.java (+4/-4)
src/pipe/gui/Pipe.java (+1/-1)
src/pipe/gui/RunVerification.java (+10/-0)
src/pipe/gui/widgets/filebrowser/NativeFileBrowser.java (+10/-0)
src/pipe/gui/widgets/filebrowser/NativeFileBrowserFallback.java (+20/-0)
Text conflict in src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNExporter.java
Text conflict in src/net/tapaal/Preferences.java
Text conflict in src/pipe/gui/widgets/filebrowser/NativeFileBrowser.java
Text conflict in src/pipe/gui/widgets/filebrowser/NativeFileBrowserFallback.java
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/ltl-icon-selection-1997234
Reviewer Review Type Date Requested Status
TAPAAL Reviewers Pending
Review via email: mp+435359@code.launchpad.net

This proposal has been superseded by a proposal from 2023-01-09.

Commit message

Considers LTL nodes when selecting icons for verification

To post a comment you must log in.
1177. By Lena Ernstsen

Reverted change to avoid NPE

1178. By Lena Ernstsen

Added 'show raw query results' button for state equation results

1179. By Lena Ernstsen

Fixed wrong statistics for CTL queries

Unmerged revisions

1179. By Lena Ernstsen

Fixed wrong statistics for CTL queries

1178. By Lena Ernstsen

Added 'show raw query results' button for state equation results

1177. By Lena Ernstsen

Reverted change to avoid NPE

1176. By Lena Ernstsen

Icon selection now considers LTL nodes

1175. By <email address hidden>

increased version to 3.9.3 and min version of verifypn to 4.2.2

1174. By <email address hidden>

merged in lp:~tapaal-contributor/tapaal/update-ltl-support-3.9 fixing bug #1983371

1173. By <email address hidden>

merged in lp:~tapaal-contributor/tapaal/save-file-browser-location-3.9 fixing the remembering of a location when opening a file

1172. By Jiri Srba

merged in a fix for resting LTL queries

1171. By Jiri Srba

merged in a bug fix for LTL manual edit of queries ( E .. and .. and ...) did not allow manual edit and removing the last conjunct

1170. By Jiri Srba

merged in lp:~yrke/tapaal/fix1976494 fixing a problem with copying components that contain environmental transitions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dk/aau/cs/model/tapn/TAPNQuery.java'
2--- src/dk/aau/cs/model/tapn/TAPNQuery.java 2016-04-14 20:09:47 +0000
3+++ src/dk/aau/cs/model/tapn/TAPNQuery.java 2023-01-09 11:13:50 +0000
4@@ -1,9 +1,6 @@
5 package dk.aau.cs.model.tapn;
6
7-import dk.aau.cs.TCTL.TCTLAFNode;
8-import dk.aau.cs.TCTL.TCTLAbstractProperty;
9-import dk.aau.cs.TCTL.TCTLEFNode;
10-import dk.aau.cs.TCTL.TCTLEGNode;
11+import dk.aau.cs.TCTL.*;
12 import dk.aau.cs.TCTL.visitors.HasDeadlockVisitor;
13 import dk.aau.cs.verification.QueryType;
14 import pipe.dataLayer.TAPNQuery.QueryCategory;
15@@ -27,10 +24,13 @@
16 }
17
18 public QueryType queryType(){
19- if(property instanceof TCTLEFNode) return QueryType.EF;
20- else if(property instanceof TCTLEGNode) return QueryType.EG;
21- else if(property instanceof TCTLAFNode) return QueryType.AF;
22- else return QueryType.AG;
23+ if (property instanceof TCTLEFNode) return QueryType.EF;
24+ else if (property instanceof TCTLEGNode) return QueryType.EG;
25+ else if (property instanceof TCTLAFNode) return QueryType.AF;
26+ else if (property instanceof TCTLAGNode) return QueryType.AG;
27+ else if (property instanceof LTLANode) return QueryType.A;
28+ else if (property instanceof LTLENode) return QueryType.E;
29+ else return null;
30 }
31
32 public boolean hasDeadlock(){
33
34=== modified file 'src/dk/aau/cs/verification/QueryResult.java'
35--- src/dk/aau/cs/verification/QueryResult.java 2020-07-13 13:58:47 +0000
36+++ src/dk/aau/cs/verification/QueryResult.java 2023-01-09 11:13:50 +0000
37@@ -61,6 +61,8 @@
38 || (queryType().equals(QueryType.EG)) // && !isQuerySatisfied())
39 || (queryType().equals(QueryType.AF)) // && isQuerySatisfied())
40 || (queryType().equals(QueryType.AG) && isQuerySatisfied())
41+ || (queryType().equals(QueryType.A))
42+ || (queryType().equals(QueryType.E))
43 || (hasDeadlock() &&
44 (!isQuerySatisfied() && queryType().equals(QueryType.EF)) ||
45 (isQuerySatisfied() && queryType().equals(QueryType.AG))
46
47=== modified file 'src/dk/aau/cs/verification/QueryType.java'
48--- src/dk/aau/cs/verification/QueryType.java 2011-05-21 13:00:05 +0000
49+++ src/dk/aau/cs/verification/QueryType.java 2023-01-09 11:13:50 +0000
50@@ -4,5 +4,7 @@
51 EF,
52 EG,
53 AF,
54- AG
55+ AG,
56+ A,
57+ E
58 }
59
60=== modified file 'src/dk/aau/cs/verification/Stats.java'
61--- src/dk/aau/cs/verification/Stats.java 2020-07-13 13:58:47 +0000
62+++ src/dk/aau/cs/verification/Stats.java 2023-01-09 11:13:50 +0000
63@@ -137,15 +137,15 @@
64 @Override
65 public String toString() {
66 StringBuilder buffer = new StringBuilder();
67- buffer.append("Discovered markings: ");
68+ buffer.append("Discovered configurations: ");
69 buffer.append(discovered);
70 buffer.append(System.getProperty("line.separator"));
71
72- buffer.append("Explored markings: ");
73+ buffer.append("Explored configurations: ");
74 buffer.append(explored);
75 buffer.append(System.getProperty("line.separator"));
76
77- buffer.append("Stored markings: ");
78+ buffer.append("Stored configurations: ");
79 buffer.append(stored);
80 return buffer.toString();
81 }
82
83=== modified file 'src/dk/aau/cs/verification/VerificationResult.java'
84--- src/dk/aau/cs/verification/VerificationResult.java 2021-10-13 18:51:36 +0000
85+++ src/dk/aau/cs/verification/VerificationResult.java 2023-01-09 11:13:50 +0000
86@@ -4,6 +4,8 @@
87 import java.util.ArrayList;
88 import java.util.Comparator;
89 import java.util.List;
90+import java.util.regex.Matcher;
91+import java.util.regex.Pattern;
92
93 import dk.aau.cs.model.tapn.NetworkMarking;
94 import dk.aau.cs.model.tapn.TimedArcPetriNetNetwork;
95@@ -21,6 +23,7 @@
96 private NameMapping nameMapping;
97 private TTrace secondaryTrace;
98 private boolean isSolvedUsingStateEquation = false;
99+ private int bound;
100
101 public boolean isQuerySatisfied() {
102 return queryResult.isQuerySatisfied();
103@@ -32,6 +35,15 @@
104 this.verificationTime = verificationTime;
105 this.stats = stats;
106 this.rawOutput = rawOutput;
107+
108+ String[] lines = rawOutput.split(System.getProperty("line.separator"));
109+ for (String line : lines) {
110+ Matcher matcher = Pattern.compile("\\s*-k\\s*(\\d+)\\s*").matcher(line);
111+ if (matcher.find()) {
112+ this.bound = Integer.parseInt(matcher.group(1));
113+ break;
114+ }
115+ }
116 }
117
118 public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, Stats stats, boolean isSolvedUsingStateEquation){
119@@ -231,4 +243,8 @@
120 public String getRawOutput() {
121 return rawOutput;
122 }
123+
124+ public int getBound() {
125+ return bound;
126+ }
127 }
128
129=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java'
130--- src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2021-07-16 20:39:22 +0000
131+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2023-01-09 11:13:50 +0000
132@@ -340,7 +340,6 @@
133 tapnTrace = parseTrace(trace, options, model, exportedModel, query, queryResult.value1());
134 } else {
135 tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1());
136-
137 }
138 return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), approximationResult, standardOutput);
139 }
140
141=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNExporter.java'
142--- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNExporter.java 2021-12-27 08:26:55 +0000
143+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNExporter.java 2023-01-09 11:13:50 +0000
144@@ -1,33 +1,21 @@
145 package dk.aau.cs.verification.VerifyTAPN;
146
147-import java.io.File;
148-import java.io.FileNotFoundException;
149-import java.io.IOException;
150-import java.io.PrintStream;
151-import java.util.Collection;
152-import java.util.List;
153-
154+import dk.aau.cs.TCTL.visitors.CTLQueryVisitor;
155 import dk.aau.cs.TCTL.visitors.LTLQueryVisitor;
156 import dk.aau.cs.gui.TabContent;
157+import dk.aau.cs.model.tapn.*;
158 import dk.aau.cs.verification.NameMapping;
159 import pipe.dataLayer.DataLayer;
160 import pipe.dataLayer.TAPNQuery.QueryCategory;
161-
162-import dk.aau.cs.model.tapn.TAPNQuery;
163-import dk.aau.cs.model.tapn.TimedArcPetriNet;
164-import dk.aau.cs.model.tapn.TimedInhibitorArc;
165-import dk.aau.cs.model.tapn.TimedInputArc;
166-import dk.aau.cs.model.tapn.TimedOutputArc;
167-import dk.aau.cs.model.tapn.TimedPlace;
168-import dk.aau.cs.model.tapn.TimedTransition;
169-import dk.aau.cs.model.tapn.TransportArc;
170-
171-import dk.aau.cs.TCTL.visitors.CTLQueryVisitor;
172 import pipe.gui.CreateGui;
173 import pipe.gui.graphicElements.Place;
174 import pipe.gui.graphicElements.Transition;
175
176-import javax.xml.crypto.Data;
177+import java.io.File;
178+import java.io.FileNotFoundException;
179+import java.io.IOException;
180+import java.io.PrintStream;
181+import java.util.Collection;
182
183 public class VerifyTAPNExporter {
184 public ExportedVerifyTAPNModel export(TimedArcPetriNet model, TAPNQuery query, TabContent.TAPNLens lens, NameMapping mapping) {
185@@ -140,9 +128,15 @@
186
187 private void outputTransition(TimedTransition t, PrintStream modelStream, Collection<DataLayer> guiModels, NameMapping mapping) {
188 //remove the net prefix from the transition name
189+<<<<<<< TREE
190 var m = mapping.map(t.name());
191
192+=======
193+ var m = mapping.map(t.name());
194+ String transitionName;
195+>>>>>>> MERGE-SOURCE
196 Transition guiTransition = null;
197+<<<<<<< TREE
198 if (m != null) {
199 String transitionName = m.value2();
200 for(DataLayer guiModel : guiModels){
201@@ -150,11 +144,19 @@
202 if(guiTransition != null){
203 break;
204 }
205+=======
206+ if (m != null) {
207+ transitionName = m.value2();
208+ for (DataLayer guiModel : guiModels) {
209+ guiTransition = guiModel.getTransitionById(transitionName);
210+ if (guiTransition != null) {
211+ break;
212+ }
213+>>>>>>> MERGE-SOURCE
214 }
215 }
216
217 modelStream.append("<transition ");
218-
219 modelStream.append("player=\"" + (t.isUncontrollable() ? "1" : "0") + "\" ");
220 modelStream.append("id=\"" + t.name() + "\" ");
221 modelStream.append("name=\"" + t.name() + "\" ");
222
223=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNIconSelector.java'
224--- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNIconSelector.java 2019-03-22 10:13:18 +0000
225+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNIconSelector.java 2023-01-09 11:13:50 +0000
226@@ -15,27 +15,47 @@
227 switch(result.getQueryResult().queryType())
228 {
229 case EF:
230- if(result.isQuerySatisfied()){
231+ if (result.isQuerySatisfied()) {
232 return satisfiedIcon;
233- }else if(!result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)){
234+ } else if (!result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) {
235 return notSatisfiedIcon;
236 }
237 break;
238 case AG:
239- if(!result.isQuerySatisfied()) return notSatisfiedIcon;
240- else if(result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) return satisfiedIcon;
241+ if (!result.isQuerySatisfied() && result.getBound() >= result.getQueryResult().boundednessAnalysis().usedTokens()) {
242+ return notSatisfiedIcon;
243+ } else if (result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) {
244+ return satisfiedIcon;
245+ }
246 break;
247 case AF:
248- if(!result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)){
249+ if (!result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) {
250 return notSatisfiedIcon;
251- } else if(result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)){
252+ } else if (result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) {
253 return satisfiedIcon;
254 }
255 break;
256 case EG:
257- if(result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) return satisfiedIcon;
258- else if(!result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) return notSatisfiedIcon;
259+ if (result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) {
260+ return satisfiedIcon;
261+ } else if (!result.isQuerySatisfied() && result.getQueryResult().boundednessAnalysis().boundednessResult().equals(Boundedness.Bounded)) {
262+ return notSatisfiedIcon;
263+ }
264 break;
265+ case A:
266+ if (!result.isQuerySatisfied()) {
267+ return notSatisfiedIcon;
268+ } else if (result.isQuerySatisfied() && result.getBound() >= result.getQueryResult().boundednessAnalysis().usedTokens()) {
269+ return satisfiedIcon;
270+ }
271+ break;
272+ case E:
273+ if (!result.isQuerySatisfied() && result.getBound() >= result.getQueryResult().boundednessAnalysis().usedTokens()) {
274+ return notSatisfiedIcon;
275+ } else if (result.isQuerySatisfied()) {
276+ return satisfiedIcon;
277+ }
278+ break;
279 default:
280 return null;
281 }
282
283=== modified file 'src/net/tapaal/Preferences.java'
284--- src/net/tapaal/Preferences.java 2022-08-01 09:36:08 +0000
285+++ src/net/tapaal/Preferences.java 2023-01-09 11:13:50 +0000
286@@ -329,6 +329,7 @@
287
288 return object;
289 }
290+<<<<<<< TREE
291
292 public void setFileBrowserLocation(String location) {
293 final String key = "file.location";
294@@ -343,4 +344,20 @@
295 public String getFileBrowserLocation() {
296 return pref.get("file.location", null);
297 }
298+=======
299+
300+ public void setFileBrowserLocation(String location) {
301+ final String key = "file.location";
302+
303+ if (location == null || location.equals("")){
304+ pref.remove(key);
305+ } else {
306+ pref.put(key, location);
307+ }
308+ }
309+
310+ public String getFileBrowserLocation() {
311+ return pref.get("file.location", null);
312+ }
313+>>>>>>> MERGE-SOURCE
314 }
315
316=== modified file 'src/net/tapaal/TAPAAL.java'
317--- src/net/tapaal/TAPAAL.java 2021-11-23 22:09:14 +0000
318+++ src/net/tapaal/TAPAAL.java 2023-01-09 11:13:50 +0000
319@@ -39,7 +39,7 @@
320 public class TAPAAL {
321
322 public static final String TOOLNAME = "TAPAAL";
323- public static final String VERSION = "DEV";
324+ public static final String VERSION = "3.9.3";
325
326 public static String getProgramName(){
327 return "" + TAPAAL.TOOLNAME + " " + TAPAAL.VERSION;
328
329=== modified file 'src/pipe/gui/GuiFrameController.java'
330--- src/pipe/gui/GuiFrameController.java 2021-10-17 18:41:49 +0000
331+++ src/pipe/gui/GuiFrameController.java 2023-01-09 11:13:50 +0000
332@@ -248,16 +248,16 @@
333 buffer.append("Lasse Jacobsen, Morten Jacobsen,\nThomas S. Jacobsen, Jacob J. Jensen, Peter G. Jensen, ");
334 buffer.append("Mads Johannsen,\nKenneth Y. Joergensen, Mikael H. Moeller, Christoffer Moesgaard, Kristian Morsing Pedersen,\nThomas Pedersen, Lena Said, Niels N. Samuelsen, Jiri Srba, Mathias G. Soerensen,\nJakob H. Taankvist and Peter H. Taankvist\n");
335
336- buffer.append("Aalborg University 2008-2021\n\n");
337+ buffer.append("Aalborg University 2008-2022\n\n");
338
339 buffer.append("TAPAAL Continuous Engine (verifytapn):\n");
340 buffer.append("Alexandre David, Lasse Jacobsen, Morten Jacobsen and Jiri Srba\n");
341- buffer.append("Aalborg University 2011-2021\n\n");
342+ buffer.append("Aalborg University 2011-2022\n\n");
343
344 buffer.append("TAPAAL Discrete Engine (verifydtapn):\n");
345 buffer.append("Mathias Andersen, Peter G. Jensen, Heine G. Larsen, Jiri Srba,\n");
346 buffer.append("Mathias G. Soerensen and Jakob H. Taankvist\n");
347- buffer.append("Aalborg University 2012-2021\n\n");
348+ buffer.append("Aalborg University 2012-2022\n\n");
349
350 buffer.append("TAPAAL Untimed Engine (verifypn):\n");
351 buffer.append("Alexander Bilgram, Frederik M. Boenneland, Jakob Dyhr, Peter Fogh, ");
352@@ -265,7 +265,7 @@
353 buffer.append("Tobias S. Jepsen, Kenneth Y. Joergensen,\nMads Johannsen, Isabella Kaufmann, ");
354 buffer.append("Andreas H. Klostergaard, Soeren M. Nielsen,\nThomas S. Nielsen, Lars K. Oestergaard, ");
355 buffer.append("Samuel Pastva, Thomas Pedersen, Jiri Srba,\nPeter H. Taankvist, Nikolaj J. Ulrik and Simon M. Virenfeldt\n");
356- buffer.append("Aalborg University 2014-2021\n\n");
357+ buffer.append("Aalborg University 2014-2022\n\n");
358
359
360 buffer.append("\n");
361
362=== modified file 'src/pipe/gui/Pipe.java'
363--- src/pipe/gui/Pipe.java 2021-11-22 16:58:24 +0000
364+++ src/pipe/gui/Pipe.java 2023-01-09 11:13:50 +0000
365@@ -79,7 +79,7 @@
366 public static final String verifytaMinRev = "4.1.19";
367 public static final String verifytapnMinRev = "1.3.1";
368 public static final String verifydtapnMinRev = "3.5.0";
369- public static final String verifypnMinRev = "4.2.1";
370+ public static final String verifypnMinRev = "4.2.2";
371 public static final int AGE_DECIMAL_PRECISION = 5;
372 public static final int AGE_PRECISION = AGE_DECIMAL_PRECISION + 4;
373
374
375=== modified file 'src/pipe/gui/RunVerification.java'
376--- src/pipe/gui/RunVerification.java 2021-10-13 18:51:36 +0000
377+++ src/pipe/gui/RunVerification.java 2023-01-09 11:13:50 +0000
378@@ -298,6 +298,16 @@
379 gbc.anchor = GridBagConstraints.WEST;
380 panel.add(new JLabel(toHTML(result.getResultString())), gbc);
381
382+ if (result.getBound() < result.getQueryResult().boundednessAnalysis().usedTokens() &&
383+ !result.getQueryResult().toString().toLowerCase().contains("only markings with")) {
384+ gbc = new GridBagConstraints();
385+ gbc.gridx = 0;
386+ gbc.gridy = 0;
387+ gbc.gridwidth = 2;
388+ gbc.anchor = GridBagConstraints.WEST;
389+ panel.add(new JLabel("<html><br/><br/>Only markings with at most " + result.getBound() + " tokens were explored<br/><br/></html>"), gbc);
390+ }
391+
392 // TODO remove this when the engine outputs statistics
393 boolean isCTLQuery = result.getQueryResult().isCTL;
394
395
396=== modified file 'src/pipe/gui/widgets/filebrowser/NativeFileBrowser.java'
397--- src/pipe/gui/widgets/filebrowser/NativeFileBrowser.java 2022-08-01 09:36:08 +0000
398+++ src/pipe/gui/widgets/filebrowser/NativeFileBrowser.java 2023-01-09 11:13:50 +0000
399@@ -8,6 +8,8 @@
400 import java.util.regex.Pattern;
401
402 import javax.swing.*;
403+
404+import net.tapaal.Preferences;
405 import pipe.gui.CreateGui;
406 import net.tapaal.Preferences;
407
408@@ -73,7 +75,11 @@
409 }
410
411 public File[] openFiles() {
412+<<<<<<< TREE
413 if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();
414+=======
415+ if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();;
416+>>>>>>> MERGE-SOURCE
417 fc.setDirectory(specifiedPath);
418 //This is needed for Windows
419 if(optionalExt.equals("")) fc.setFile(ext.equals("")? "":("*."+ext));
420@@ -151,7 +157,11 @@
421 //So we make a JFileChooser in which we can control it
422 if(System.getProperty("os.name").startsWith("Windows")) {
423 File selectedDir = null;
424+<<<<<<< TREE
425 if (specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();
426+=======
427+ if (specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();;
428+>>>>>>> MERGE-SOURCE
429 JFileChooser c = new JFileChooser(specifiedPath);
430 c.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
431 c.setDialogTitle("Choose target directory for export");
432
433=== modified file 'src/pipe/gui/widgets/filebrowser/NativeFileBrowserFallback.java'
434--- src/pipe/gui/widgets/filebrowser/NativeFileBrowserFallback.java 2022-08-01 09:36:08 +0000
435+++ src/pipe/gui/widgets/filebrowser/NativeFileBrowserFallback.java 2023-01-09 11:13:50 +0000
436@@ -77,7 +77,11 @@
437 }
438
439 public File openFile() {
440+<<<<<<< TREE
441 if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();
442+=======
443+ if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();;
444+>>>>>>> MERGE-SOURCE
445 fc.setDirectory(specifiedPath);
446 //This is needed for windows
447 if(optionalExt.equals("")) fc.setFile(ext.equals("")? "":("*."+ext));
448@@ -86,13 +90,21 @@
449 fc.setVisible(true);
450 String selectedFile = fc.getFile();
451 String selectedDir = fc.getDirectory();
452+<<<<<<< TREE
453 Preferences.getInstance().setFileBrowserLocation(selectedDir);
454+=======
455+ Preferences.getInstance().setFileBrowserLocation(selectedDir);
456+>>>>>>> MERGE-SOURCE
457 File file = selectedFile == null? null:new File(selectedDir + selectedFile);
458 return file;
459 }
460
461 public File[] openFiles() {
462+<<<<<<< TREE
463 if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();
464+=======
465+ if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();;
466+>>>>>>> MERGE-SOURCE
467 if(new File(specifiedPath).exists()) fileChooser.setCurrentDirectory(new File(specifiedPath));
468 /*if (lastPath != null) {
469 File path = new File(lastPath);
470@@ -112,7 +124,11 @@
471
472
473 public String saveFile(String suggestedName) {
474+<<<<<<< TREE
475 if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();
476+=======
477+ if(specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();;
478+>>>>>>> MERGE-SOURCE
479 fc.setDirectory(specifiedPath);
480 fc.setFile(suggestedName + (suggestedName.endsWith("."+ext)? "":"."+ext));
481 fc.setMode(FileDialog.SAVE);
482@@ -165,7 +181,11 @@
483 //So we make a JFileChooser in which we can control it
484 if(System.getProperty("os.name").startsWith("Windows")) {
485 File selectedDir = null;
486+<<<<<<< TREE
487 if (specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();
488+=======
489+ if (specifiedPath == null) specifiedPath = Preferences.getInstance().getFileBrowserLocation();;
490+>>>>>>> MERGE-SOURCE
491 JFileChooser c = new JFileChooser(specifiedPath);
492 c.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
493 c.setDialogTitle("Choose target directory for export");

Subscribers

People subscribed via source and target branches