Skip to content

Commit

Permalink
Development Backup 16
Browse files Browse the repository at this point in the history
  • Loading branch information
barrowclift committed Sep 5, 2013
1 parent f87b363 commit 7c8d19e
Show file tree
Hide file tree
Showing 9 changed files with 290 additions and 128 deletions.
118 changes: 117 additions & 1 deletion jsan_resources/abbreviations.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,160 @@
Dr.
dr.
dR.
DR.
Mr.
mR.
mr.
MR.
Mrs.
MRs.
MRS.
MrS.
mrs.
mrS.
Ms.
ms.
mS.
MS.
St.
sT.
ST.
st.
vs.
VS.
Vs.
vS.
U.S.
u.s.
U.s.
u.S.
Sr.
sR.
SR.
sr.
Sgt.
SGT.
sGt.
sGT.
sgT.
SgT.
SGt.
R.N.
r.n.
r.N.
R.n.
pt.
Pt.
PT.
pT.
mt.
MT.
Mt.
mT.
mts.
MTS.
mTs.
mTS.
MtS.
mtS.
M.D.
m.d.
M.d.
m.D.
Ltd.
LTD.
ltd.
lTd.
lTD.
ltD.
LtD.
Jr.
jr.
JR.
jR.
Lt.
lT.
LT.
lt.
Hon.
hon.
i.e.
I.E.
i.E.
I.e.
e.x.
E.X.
e.X.
E.x.
e.g.
E.G.
e.G.
E.g.
inc.
Inc.
inC.
INc.
et al.
Et Al.
Al.
al.
est.
Est.
ed.
ED.
D.C.
d.c.
D.c.
B.C.
b.c.
B.c.
B.S.
B.s.
b.s.
Ph.D.
ph.d.
Ph.d.
ph.D.
B.A.
B.a.
b.a.
A.B.
A.b.
a.b.
A.D.
A.d.
a.d.
A.M.
a.m.
A.m.
P.M.
p.m.
P.m.
Ln.
ln.
LN.
fig.
Fig.
p.
P.
pp.
PP.
Pp.
ref.
Ref.
REF.
r.b.i.
R.B.I.
R.b.i
V.P.
v.p.
V.p.
yr.
Yr.
YR.
yrs.
etc.
YRS.
Yrs.
etc.
Etc.
ETC.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private void processDocuments() {
int size = sampleDocs.size();
ConsolidationStation.otherSampleTaggedDocs = new ArrayList<TaggedDocument>();
for (int i = 0; i < size; i++) {
ConsolidationStation.otherSampleTaggedDocs.add(new TaggedDocument(main, sampleDocs.get(i).stringify()));
ConsolidationStation.otherSampleTaggedDocs.add(new TaggedDocument(main, sampleDocs.get(i).stringify(), false));
}
} else
ConsolidationStation.toModifyTaggedDocs.get(0).makeAndTagSentences(main.documentPane.getText(), false);
Expand Down
12 changes: 11 additions & 1 deletion src/edu/drexel/psal/anonymouth/engine/VersionControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public VersionControl(GUIMain main) {
this.main = main;

ready = true;

curCharBackupBuffer = CHARS_TIL_BACKUP-1;

undo = new Stack<TaggedDocument>();
redo = new Stack<TaggedDocument>();
indicesUndo = new Stack<Integer>();
Expand All @@ -70,6 +71,15 @@ public VersionControl(GUIMain main) {
* yet have tagged documents ready when that happens, we have to wait.
*/
public void init() {
/*
undo.clear();
redo.clear();
indicesUndo.clear();
indicesRedo.clear();
main.enableRedo(false);
main.enableUndo(false);
*/

editor = main.editorDriver;
pastTaggedDoc = new TaggedDocument(editor.taggedDoc);
}
Expand Down
13 changes: 9 additions & 4 deletions src/edu/drexel/psal/anonymouth/gooie/EditorDriver.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package edu.drexel.psal.anonymouth.gooie;

import edu.drexel.psal.anonymouth.engine.HighlighterEngine;
import edu.drexel.psal.anonymouth.utils.SentenceMaker;
import edu.drexel.psal.anonymouth.utils.TaggedDocument;
import edu.drexel.psal.jstylo.generics.Logger;
import edu.drexel.psal.jstylo.generics.Logger.LogOut;
Expand Down Expand Up @@ -34,6 +35,7 @@ public class EditorDriver {
private final char TAB = '\t';
private final char SPACE = ' ';
private GUIMain main;
public SentenceMaker sentenceMaker;

//----------- Listeners -----------------------------------------------
private ActionListener reProcessListener;
Expand Down Expand Up @@ -151,6 +153,7 @@ public class EditorDriver {
public EditorDriver(GUIMain main) {
this.main = main;
highlighterEngine = new HighlighterEngine(main);
sentenceMaker = new SentenceMaker(main);

EOS = new HashSet<Character>();
EOS.add('.');
Expand Down Expand Up @@ -356,7 +359,7 @@ public void actionPerformed(ActionEvent e) {
prepareForReprocessing();
main.enableEverything(false);

taggedDoc = new TaggedDocument(main, main.documentPane.getText());
taggedDoc = new TaggedDocument(main, main.documentPane.getText(), false);
main.documentProcessor.process();
}
};
Expand Down Expand Up @@ -925,11 +928,13 @@ public void syncTextPaneWithTaggedDoc() {
}
main.documentPane.getCaret().setDot(newCaretPosition[0]);
main.documentPane.setCaretPosition(newCaretPosition[0]);

ignoreChanges = false;

charsInserted = 0;
charsRemoved = 0;
updateEditorVariables();
updateBarAndHighlight();
charsInserted = 0;
charsRemoved = 0;
}

/**
Expand All @@ -943,7 +948,7 @@ public void syncTextPaneWithTaggedDoc() {
* The updated sentence text
*/
public void updateSentence(int sentNumToUpdate, String updatedText) {
Logger.logln(NAME+"Updating sentence # = " + sentNumToUpdate + " with new string: " + updatedText);
Logger.logln(NAME+"UPDATING sentence # = " + sentNumToUpdate + " with new string: " + updatedText);
taggedDoc.removeAndReplace(sentNumToUpdate, updatedText);
}

Expand Down
2 changes: 0 additions & 2 deletions src/edu/drexel/psal/anonymouth/gooie/GUIMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,7 @@ public void run() {
fileSaveAsTestDocMenuItem.setEnabled(enable);
viewClustersMenuItem.setEnabled(enable);
elementsToAddPane.setEnabled(enable);
elementsToAddPane.setFocusable(enable);
elementsToRemoveTable.setEnabled(enable);
elementsToRemoveTable.setFocusable(enable);
documentPane.setEnabled(enable);
clipboard.setEnabled(enable);

Expand Down
Loading

0 comments on commit 7c8d19e

Please sign in to comment.