Merge lp:~yrke/tapaal/tapaal-removeObservableDataLayer into lp:tapaal

Proposed by Kenneth Yrke Jørgensen on 2018-08-03
Status: Merged
Approved by: Jiri Srba on 2018-08-13
Approved revision: 970
Merged at revision: 974
Proposed branch: lp:~yrke/tapaal/tapaal-removeObservableDataLayer
Merge into: lp:tapaal
Diff against target: 110 lines (+1/-26)
2 files modified
src/pipe/dataLayer/DataLayer.java (+1/-23)
src/pipe/gui/Animator.java (+0/-3)
To merge this branch: bzr merge lp:~yrke/tapaal/tapaal-removeObservableDataLayer
Reviewer Review Type Date Requested Status
Jiri Srba 2018-08-07 Approve on 2018-08-13
TAPAAL Reviewers 2018-08-03 Pending
Review via email: mp+352325@code.launchpad.net

Commit message

Datalyer no longer implements observable

To post a comment you must log in.
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pipe/dataLayer/DataLayer.java'
2--- src/pipe/dataLayer/DataLayer.java 2018-05-04 08:01:39 +0000
3+++ src/pipe/dataLayer/DataLayer.java 2018-08-03 18:05:12 +0000
4@@ -23,7 +23,7 @@
5 import dk.aau.cs.util.Require;
6
7
8-public class DataLayer extends Observable implements Cloneable {
9+public class DataLayer implements Cloneable {
10
11 /** PNML File Name */
12 public String pnmlName = null;
13@@ -96,8 +96,6 @@
14 Require.that(placeInput != null, "input place was null");
15
16 placesArray.add(placeInput);
17- setChanged();
18- notifyObservers(placeInput);
19 }
20
21 /**
22@@ -109,8 +107,6 @@
23 */
24 public void addAnnotation(AnnotationNote labelInput) {
25 labelsArray.add(labelInput);
26- setChanged();
27- notifyObservers(labelInput);
28 }
29
30 /**
31@@ -124,8 +120,6 @@
32 Require.that(transitionInput != null, "input transition was null");
33
34 transitionsArray.add(transitionInput);
35- setChanged();
36- notifyObservers(transitionInput);
37 }
38
39 /**
40@@ -236,18 +230,12 @@
41 arcsArray.add(arcInput);
42 addArcToArcsMap(arcInput);
43
44- setChanged();
45-
46- // notifyObservers(arcInput.getBounds());
47- notifyObservers(arcInput);
48 }
49 }
50
51 public void addTransportArc(TimedTransportArcComponent transportArc) {
52 arcsArray.add(transportArc);
53 addArcToArcsMap(transportArc);
54- setChanged();
55- notifyObservers();
56 }
57
58 public void addArc(TimedInhibitorArcComponent inhibitorArcInput) {
59@@ -292,10 +280,6 @@
60 arcsArray.add(inhibitorArcInput);
61 addInhibitorArcToInhibitorsMap(inhibitorArcInput);
62
63- setChanged();
64-
65- // notifyObservers(arcInput.getBounds());
66- notifyObservers(inhibitorArcInput);
67 }
68 }
69
70@@ -535,12 +519,6 @@
71 }
72 }
73
74- if (didSomething) {
75- setChanged();
76-
77- // notifyObservers(pnObject.getBounds());
78- notifyObservers(pnObject);
79- }
80 }
81 } catch (NullPointerException npe) {
82 System.out.println("NullPointerException [debug]\n"
83
84=== modified file 'src/pipe/gui/Animator.java'
85--- src/pipe/gui/Animator.java 2018-04-29 08:38:52 +0000
86+++ src/pipe/gui/Animator.java 2018-08-03 18:05:12 +0000
87@@ -146,7 +146,6 @@
88 while (transitionIterator.hasNext()) {
89 Transition tempTransition = transitionIterator.next();
90 if (tempTransition.isEnabled(true) || (tempTransition.isDelayEnabledTransition(true) && !isUrgentTransitionEnabled)) {
91- current.notifyObservers();
92 tempTransition.repaint();
93 }
94 }
95@@ -162,7 +161,6 @@
96 while (transitionIterator.hasNext()) {
97 Transition tempTransition = transitionIterator.next();
98 if (!(tempTransition.isEnabled(true)) || !tempTransition.isDelayEnabledTransition(true) || (tempTransition.isDelayEnabledTransition(true) && isUrgentTransitionEnabled)) {
99- current.notifyObservers();
100 tempTransition.repaint();
101 }
102 }
103@@ -209,7 +207,6 @@
104 Transition tempTransition = transitionIterator.next();
105 tempTransition.setEnabledFalse();
106 tempTransition.setDelayEnabledTransitionFalse();
107- activeGuiModel().notifyObservers();
108 tempTransition.repaint();
109 }
110 }

Subscribers

People subscribed via source and target branches