Skip to content

Commit

Permalink
manually cherry picking changes to get the mvn build to succeed in at…
Browse files Browse the repository at this point in the history
…tition to the java 10 fixes
  • Loading branch information
sgrieve committed Aug 2, 2018
1 parent e6f2e5d commit c157e54
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 7 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>uk.ac.ucl.rc.development.oracc</groupId>
<artifactId>nammu</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>

<name>nammu</name>
Expand Down Expand Up @@ -149,14 +149,16 @@
</execution>
</executions>
<configuration>
<libraries>
<param>requests&lt;2.12.0</param>
<param>pytest&lt;3.0</param>
<libraries>
<param>--index-url=https://pypi.python.org/simple/</param>
<param>requests&lt;2.12.0</param>
<!--param>pytest&lt;3.0</param-->
<param>pyyaml</param>
<param>mako</param>
<param>ply</param>
<param>jython-swingutils</param>
<param>https://github.com/ucl/pyoracc/archive/master.tar.gz</param>
<param>https://github.com/ucl/pyoracc/archive/80313c17744c8aea6196a854656e4aed2d1835b8.tar.gz</param>

</libraries>
</configuration>
</plugin>
Expand Down
8 changes: 5 additions & 3 deletions python/nammu/view/AtfAreaView.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from java.awt import BorderLayout, Dimension, Point, Font, Color
from java.awt.event import KeyListener, AdjustmentListener
from javax.swing import JScrollPane, JPanel, JSplitPane
from javax.swing import JScrollPane, JPanel, JSplitPane, UIManager
from javax.swing.text import StyleContext, StyleConstants
from javax.swing.text import SimpleAttributeSet
from javax.swing.undo import UndoManager, CompoundEdit
Expand Down Expand Up @@ -294,6 +294,8 @@ def __init__(self, undo_manager):
self.undo_manager = undo_manager
self.current_compound = CompoundEdit()
self.must_compound = False
self.deletion = UIManager.getString('AbstractDocument.deletionText')
self.addition = UIManager.getString('AbstractDocument.additionText')

def force_start_compound(self):
"""
Expand All @@ -316,11 +318,11 @@ def force_stop_compound(self):

def undoableEditHappened(self, event):
edit = event.getEdit()
edit_type = str(edit.getType())
edit_type = edit.getPresentationName()

# If significant INSERT/REMOVE event happen, end and add current
# edit compound to undo_manager and start a new one.
if ((edit_type == "INSERT" or edit_type == "REMOVE") and
if ((edit_type == self.addition or edit_type == self.deletion) and
not self.must_compound):
# Explicitly end compound edits so their inProgress flag goes
# to false. Note undo() only undoes compound edits when they
Expand Down

0 comments on commit c157e54

Please sign in to comment.