markm 01/08/08 01:39:17
Modified: src Makefile
src/esrc/com/skyhunter/e/net vowToolsMaker.emaker
src/esrc/com/skyhunter/e/util timer.e
src/esrc/com/skyhunter/eBrowser/ebScripts countLines.emaker
indentTabs.emaker
src/esrc/com/skyhunter/eDeskPlus
progressWindowMakerAuthor.emaker
quickEditMakerAuthor.emaker
src/esrc/com/skyhunter/eDeskPlus/strings help.txt
src/esrc/com/skyhunter/ex/swing dialogPromiserAuthor.emaker
dialogtest.e standardWindowMakerAuthor.emaker
src/esrc/org/erights/e/elang/interp E.emaker
PerlMatchMakerMaker.emaker
src/esrc/scripts eBrowser.e eDeskPlus.e
src/jsrc/org/erights/e/elang/interp Interp.java
src/jsrc/org/erights/e/ui/jed JedMain.java
Log:
new syncing eBrowser. vatMakerAuthor
Revision Changes Path
1.102 +2 -2 e/src/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/src/Makefile,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- Makefile 2001/08/06 17:21:19 1.101
+++ Makefile 2001/08/08 05:39:16 1.102
@@ -7,8 +7,8 @@
# Prefix tagging this release's attributes
PREFIX=tl-E
-DOTVER=0.8.9x
-TAGVER=0_8_9x
+DOTVER=0.8.9y
+TAGVER=0_8_9y
RELEASE=working
TOP=..
1.5 +94 -94 e/src/esrc/com/skyhunter/e/net/vowToolsMaker.emaker
Index: vowToolsMaker.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/e/net/vowToolsMaker.emaker,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vowToolsMaker.emaker 2001/04/28 10:00:05 1.4
+++ vowToolsMaker.emaker 2001/08/08 05:39:16 1.5
@@ -1,97 +1,97 @@
class vowToolsMaker() :any {
- def vowTools {
- # Send a list of promises, this will return a
- # promise that will be fulfilled when all
- # the promises in the list have resolved one
- # way or the other. If any break, the allDone
- # promise is smashed, with a list of the error
- # messages, else it returns true.
- # Some day, this should return a list of all the
- # resolutions, with a smash if any of the promises
- # were broken on delivery.
- to promiseAllDone(thePromiseList) :any {
- # resolves after all in list resolved, returns true if all promises fulfilled
- def [resolutionPromise,resolver] := PromiseMaker()
- def promiseCount := thePromiseList size
- define breakMessages := ""
- if (promiseCount == 0) {resolver resolve(true)}
- for each in thePromiseList {
- Ref whenResolved(each, def obs(result) {
- if (E isBroken(result)) {breakMessages += " :" +result}
- promiseCount -= 1
- if (promiseCount == 0) {
- if (breakMessages size == 0) {
- resolver resolve(true)
- } else {
- resolver smash(breakMessages)
- }
- }
- })
- }
- resolutionPromise
- }
- # A vowsMonitor is an upscale promiseAllDone, collecting the
- # promise list, the promise of completion, and the finishing
- # process in a single object, making it convenient to pass
- # around to various objects that must add a promise to the
- # list and be informed when the list is finished.
- # Add the promises one at a time to the vowsMonitor,
- # get the promise of the finish when you want it
- # and initiate the monitoring for completion by requesting
- # a finishAll. Adding promises after the finishAll has been
- # requested is currently an undetected error.
- to makeVowsMonitor :any {
- def [bundlePromise,resolver] := PromiseMaker()
- def bundle := [] diverge
- def vowsMonitor {
- to add (thePromise) {bundle push(thePromise)}
- to finishAll {resolver resolve(netTools promiseAllDone(bundle))}
- to promiseFinish :any {bundlePromise}
- }
- }
- # Only More Recent Manager:
- # If you send out multiple requests over time,
- # resulting in receiving multiple promises also strewn over time,
- # and if you are only interested
- # in the answer if the answer is more recent
- # than the most recent of the already-fulfilled promises
- # (i.e., only if
- # the answer is newer than what you currently have),
- # and if you are not absolutely sure that all the
- # requests will move through a
- # guaranteed sequence on a single vat,
- # use an onlyMoreRecent object: add the promise
- # to the onlyMoreRecent when you receive it, and use the promise returned from that operation in
- # your when clause. If
- # a newer promise gets fulfilled before an older promise, the older promise is smashed with an "Obsolete Data"
- # error when it finally resolves.
- # If a newest promise returns smashed, the promise from onlyMostRecent also is returned smashed,
- # but with the error object it got from the
- # original promise.
- to makeOnlyMoreRecentAcceptor :any {
- def obsoleteError := "Obsolete Data"
- def mostRecentlyFulfilledIndex := 0
- def nextPromiseIndex := 1
- def onlyMoreRecent {
- to promiseMoreRecent(nextPromise) :any {
- def [onlyMoreRecentPromise,resolver] := PromiseMaker()
- def thisPromiseIndex := nextPromiseIndex
- nextPromiseIndex += 1
- when (nextPromise) -> done(resolution) {
- if (thisPromiseIndex > mostRecentlyFulfilledIndex) {
- resolver resolve(resolution)
- mostRecentlyFulfilledIndex := thisPromiseIndex
- } else { resolver smash(obsoleteError) }
- } catch e {
- if (thisPromiseIndex > mostRecentlyFulfilledIndex) {
- resolver smash(e)
- mostRecentlyFulfilledIndex := thisPromiseIndex
- } else { resolver smash(obsoleteError) }
- }
- onlyMoreRecentPromise
- }
- }
- }
- }
+ def vowTools {
+ # Send a list of promises, this will return a
+ # promise that will be fulfilled when all
+ # the promises in the list have resolved one
+ # way or the other. If any break, the allDone
+ # promise is smashed, with a list of the error
+ # messages, else it returns true.
+ # Some day, this should return a list of all the
+ # resolutions, with a smash if any of the promises
+ # were broken on delivery.
+ to promiseAllDone(thePromiseList) :any {
+ # resolves after all in list resolved, returns true if all promises fulfilled
+ def [resolutionPromise,resolver] := PromiseMaker()
+ def promiseCount := thePromiseList size
+ define breakMessages := ""
+ if (promiseCount == 0) {resolver resolve(true)}
+ for each in thePromiseList {
+ each <- whenResolved(def obs(result) {
+ if (E isBroken(result)) {breakMessages += " :" +result}
+ promiseCount -= 1
+ if (promiseCount == 0) {
+ if (breakMessages size == 0) {
+ resolver resolve(true)
+ } else {
+ resolver smash(breakMessages)
+ }
+ }
+ })
+ }
+ resolutionPromise
+ }
+ # A vowsMonitor is an upscale promiseAllDone, collecting the
+ # promise list, the promise of completion, and the finishing
+ # process in a single object, making it convenient to pass
+ # around to various objects that must add a promise to the
+ # list and be informed when the list is finished.
+ # Add the promises one at a time to the vowsMonitor,
+ # get the promise of the finish when you want it
+ # and initiate the monitoring for completion by requesting
+ # a finishAll. Adding promises after the finishAll has been
+ # requested is currently an undetected error.
+ to makeVowsMonitor :any {
+ def [bundlePromise,resolver] := PromiseMaker()
+ def bundle := [] diverge
+ def vowsMonitor {
+ to add (thePromise) {bundle push(thePromise)}
+ to finishAll {resolver resolve(netTools promiseAllDone(bundle))}
+ to promiseFinish :any {bundlePromise}
+ }
+ }
+ # Only More Recent Manager:
+ # If you send out multiple requests over time,
+ # resulting in receiving multiple promises also strewn over time,
+ # and if you are only interested
+ # in the answer if the answer is more recent
+ # than the most recent of the already-fulfilled promises
+ # (i.e., only if
+ # the answer is newer than what you currently have),
+ # and if you are not absolutely sure that all the
+ # requests will move through a
+ # guaranteed sequence on a single vat,
+ # use an onlyMoreRecent object: add the promise
+ # to the onlyMoreRecent when you receive it, and use the promise returned from that operation in
+ # your when clause. If
+ # a newer promise gets fulfilled before an older promise, the older promise is smashed with an "Obsolete Data"
+ # error when it finally resolves.
+ # If a newest promise returns smashed, the promise from onlyMostRecent also is returned smashed,
+ # but with the error object it got from the
+ # original promise.
+ to makeOnlyMoreRecentAcceptor :any {
+ def obsoleteError := "Obsolete Data"
+ def mostRecentlyFulfilledIndex := 0
+ def nextPromiseIndex := 1
+ def onlyMoreRecent {
+ to promiseMoreRecent(nextPromise) :any {
+ def [onlyMoreRecentPromise,resolver] := PromiseMaker()
+ def thisPromiseIndex := nextPromiseIndex
+ nextPromiseIndex += 1
+ when (nextPromise) -> done(resolution) {
+ if (thisPromiseIndex > mostRecentlyFulfilledIndex) {
+ resolver resolve(resolution)
+ mostRecentlyFulfilledIndex := thisPromiseIndex
+ } else { resolver smash(obsoleteError) }
+ } catch e {
+ if (thisPromiseIndex > mostRecentlyFulfilledIndex) {
+ resolver smash(e)
+ mostRecentlyFulfilledIndex := thisPromiseIndex
+ } else { resolver smash(obsoleteError) }
+ }
+ onlyMoreRecentPromise
+ }
+ }
+ }
+ }
}
1.5 +9 -9 e/src/esrc/com/skyhunter/e/util/timer.e
Index: timer.e
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/e/util/timer.e,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- timer.e 2001/07/31 13:09:13 1.4
+++ timer.e 2001/08/08 05:39:16 1.5
@@ -2,14 +2,14 @@
//The actionTrio must be a list [target,"verb",[args]]
def doAfter(seconds,actionTrio) :any {
- def actionWrapper {
- to run() {
- #traceln("stopwatch: performing action" + actionTrio)
- E call(actionTrio[0], actionTrio[1], actionTrio[2])
- #traceln("stopwatch: action performed")
- }
- }
- def timer := <import:org.erights.e.extern.timer.Timer> theTimer
- timer whenAlarm(timer now() + seconds * 1000, actionWrapper)
+ def actionWrapper {
+ to run() {
+ #traceln("stopwatch: performing action" + actionTrio)
+ E call(actionTrio[0], actionTrio[1], actionTrio[2])
+ #traceln("stopwatch: action performed")
+ }
+ }
+ def timer := <import:org.erights.e.extern.timer.Timer> theTimer
+ timer after(seconds * 1000, actionWrapper)
}
1.2 +5 -5 e/src/esrc/com/skyhunter/eBrowser/ebScripts/countLines.emaker
Index: countLines.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/eBrowser/ebScripts/countLines.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- countLines.emaker 2001/04/05 01:37:12 1.1
+++ countLines.emaker 2001/08/08 05:39:16 1.2
@@ -1,9 +1,9 @@
def countLines {
- to run(text) :pbc {
- def count := text split("\n") size() - 1
- "" + `The number of lines in the selection is: $count`
- }
- to requestsSubstitution() :pbc {false}
+ to run(text) :pbc {
+ def count := text split("\n") size() - 1
+ "" + `The number of lines in the selection is: $count`
+ }
+ to requestsSubstitution() :pbc {false}
}
#1
1.2 +1 -1 e/src/esrc/com/skyhunter/eBrowser/ebScripts/indentTabs.emaker
Index: indentTabs.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/eBrowser/ebScripts/indentTabs.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- indentTabs.emaker 2001/04/05 01:37:12 1.1
+++ indentTabs.emaker 2001/08/08 05:39:16 1.2
@@ -2,7 +2,7 @@
to run(text) :pbc {
var result := ""
var lines := (text split("\n")) diverge()
- if ((lines [lines size() - 1]) size() == 0) {lines pop()}
+ if ((lines [lines size() - 1]) size() == 0) {lines pop()}
for each in lines {
if (each trim() size() > 0) {
result := `$result${"\t"}$each${"\n"}`
1.2 +23 -23 e/src/esrc/com/skyhunter/eDeskPlus/progressWindowMakerAuthor.emaker
Index: progressWindowMakerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/eDeskPlus/progressWindowMakerAuthor.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- progressWindowMakerAuthor.emaker 2001/04/16 08:46:30 1.1
+++ progressWindowMakerAuthor.emaker 2001/08/08 05:39:16 1.2
@@ -1,25 +1,25 @@
def progressWindowMakerAuthor(swing__uriGetter, standardWindow) :near {
- class progressWindowMaker(title) :near {
- var fileSize := 1000000000
- def progressWindow
- def myFrame := standardWindow(title,progressWindow)
- def myProgressPane := <swing:JProgressBar> new()
- myProgressPane setStringPainted(true)
- myFrame getContentPane() add(myProgressPane)
- myFrame pack()
- myFrame setSize(150,50)
- myFrame show()
- def bind progressWindow {
- to setProgress(amountCopied) {
- def percent := (amountCopied *100) _/ fileSize
- myProgressPane setValue(percent)
- myProgressPane setString(`$percent%`)
- }
- to setFileSize(size) {
- fileSize := size
- }
- to windowClosing() {}
- to closeWindow() {myFrame dispose()}
- }
- }
+ class progressWindowMaker(title) :near {
+ var fileSize := 1000000000
+ def progressWindow
+ def myFrame := standardWindow(title,progressWindow)
+ def myProgressPane := <swing:JProgressBar> new()
+ myProgressPane setStringPainted(true)
+ myFrame getContentPane() add(myProgressPane)
+ myFrame pack()
+ myFrame setSize(150,50)
+ myFrame show()
+ def bind progressWindow {
+ to setProgress(amountCopied) {
+ def percent := (amountCopied *100) _/ fileSize
+ myProgressPane setValue(percent)
+ myProgressPane setString(`$percent%`)
+ }
+ to setFileSize(size) {
+ fileSize := size
+ }
+ to windowClosing() {}
+ to closeWindow() {myFrame dispose()}
+ }
+ }
}
1.2 +71 -71 e/src/esrc/com/skyhunter/eDeskPlus/quickEditMakerAuthor.emaker
Index: quickEditMakerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/eDeskPlus/quickEditMakerAuthor.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- quickEditMakerAuthor.emaker 2001/04/16 08:46:30 1.1
+++ quickEditMakerAuthor.emaker 2001/08/08 05:39:16 1.2
@@ -1,73 +1,73 @@
def quickEditMakerAuthor(traceln, awt__uriGetter,
- swing__uriGetter, connectionWarning,
- standardWindow, dialogPromiser) :near {
- //QuickEdit
- def uiTools := <import:com.skyhunter.ex.swing.uiToolsAuthor>(awt__uriGetter,swing__uriGetter)
- class quickEditMaker(myFilePromise) :near {
- def quickEdit
- var myText := myFilePromise <- getText()
- def canWrite := myFilePromise <- canWrite()
- def myFileName := myFilePromise <- getName()
- var closingInProcess := false
- def mainFrame := standardWindow("",quickEdit)
- def mainPane := mainFrame getContentPane()
- mainFrame setDefaultCloseOperation(<swing:WindowConstants> DO_NOTHING_ON_CLOSE())
- def border := <awt:BorderLayout> new()
- mainPane setLayout(border)
- def saveAction() {quickEdit save()}
- def saveButton := uiTools newButton ("Save",saveAction)
- def textPane := <swing:JTextArea> new()
- textPane setLineWrap(true)
- textPane setTabSize(4)
- def scrollingTextPane := <swing:JScrollPane> new(
- <swing:ScrollPaneConstants> VERTICAL_SCROLLBAR_ALWAYS(),
- <swing:ScrollPaneConstants> HORIZONTAL_SCROLLBAR_NEVER())
- scrollingTextPane getViewport() add(textPane)
- mainPane add(saveButton,"North")
- mainPane add(scrollingTextPane, "Center")
- when (myFileName) -> done(name) {
- mainFrame setTitle("Eedit - " + myFileName)
- saveButton setEnabled(canWrite)
- textPane setText(myText)
- mainFrame pack()
- mainFrame setSize(600,400)
- mainFrame show()
- } catch err {connectionWarning("couldn't get filename")}
- def bind quickEdit {
- to save() {
- myText := textPane getText()
- def setPromised := myFilePromise <- setText(myText)
- when (setPromised) -> done(textSet) {
- #do nothing
- } catch err {
- connectionWarning("Save may have failed for: " + myFileName + " because: " + err)
- }
- }
- to windowClosing() {
- if (!closingInProcess) {
- closingInProcess := true
- def finalText:= textPane getText()
- if (finalText == myText) {
- mainFrame dispose()
- } else {
- def saveDecision := dialogPromiser new("Modified File " + myFileName, "Save Before Exiting?", null, ["Save", "Exit", "Cancel"])
- when (saveDecision <- getClickedButton()) -> done(answer) {
- closingInProcess := false
- if (answer == null) {
- answer := "Cancel"
- }
- if (answer =="Save") {
- traceln("into save")
- quickEdit save()
- mainFrame dispose()
- } else if (answer == "Exit") {
- myText := finalText
- mainFrame dispose()
- }
- } catch err{}
- }
- }
- }
- }
- }
+ swing__uriGetter, connectionWarning,
+ standardWindow, dialogPromiser) :near {
+ //QuickEdit
+ def uiTools := <import:com.skyhunter.ex.swing.uiToolsAuthor>(awt__uriGetter,swing__uriGetter)
+ class quickEditMaker(myFilePromise) :near {
+ def quickEdit
+ var myText := myFilePromise <- getText()
+ def canWrite := myFilePromise <- canWrite()
+ def myFileName := myFilePromise <- getName()
+ var closingInProcess := false
+ def mainFrame := standardWindow("",quickEdit)
+ def mainPane := mainFrame getContentPane()
+ mainFrame setDefaultCloseOperation(<swing:WindowConstants> DO_NOTHING_ON_CLOSE())
+ def border := <awt:BorderLayout> new()
+ mainPane setLayout(border)
+ def saveAction() {quickEdit save()}
+ def saveButton := uiTools newButton ("Save",saveAction)
+ def textPane := <swing:JTextArea> new()
+ textPane setLineWrap(true)
+ textPane setTabSize(4)
+ def scrollingTextPane := <swing:JScrollPane> new(
+ <swing:ScrollPaneConstants> VERTICAL_SCROLLBAR_ALWAYS(),
+ <swing:ScrollPaneConstants> HORIZONTAL_SCROLLBAR_NEVER())
+ scrollingTextPane getViewport() add(textPane)
+ mainPane add(saveButton,"North")
+ mainPane add(scrollingTextPane, "Center")
+ when (myFileName) -> done(name) {
+ mainFrame setTitle("Eedit - " + name)
+ saveButton setEnabled(canWrite)
+ textPane setText(myText)
+ mainFrame pack()
+ mainFrame setSize(600,400)
+ mainFrame show()
+ } catch err {connectionWarning("couldn't get filename")}
+ def bind quickEdit {
+ to save() {
+ myText := textPane getText()
+ def setPromised := myFilePromise <- setText(myText)
+ when (setPromised) -> done(textSet) {
+ #do nothing
+ } catch err {
+ connectionWarning("Save may have failed for: " + myFileName + " because: " + err)
+ }
+ }
+ to windowClosing() {
+ if (!closingInProcess) {
+ closingInProcess := true
+ def finalText:= textPane getText()
+ if (finalText == myText) {
+ mainFrame dispose()
+ } else {
+ def saveDecision := dialogPromiser new("Modified File " + myFileName, "Save Before Exiting?", null, ["Save", "Exit", "Cancel"])
+ when (saveDecision <- getClickedButton()) -> done(answer) {
+ closingInProcess := false
+ if (answer == null) {
+ answer := "Cancel"
+ }
+ if (answer =="Save") {
+ traceln("into save")
+ quickEdit save()
+ mainFrame dispose()
+ } else if (answer == "Exit") {
+ myText := finalText
+ mainFrame dispose()
+ }
+ } catch err{}
+ }
+ }
+ }
+ }
+ }
}
1.2 +5 -5 e/src/esrc/com/skyhunter/eDeskPlus/strings/help.txt
Index: help.txt
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/eDeskPlus/strings/help.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- help.txt 2001/04/16 08:46:30 1.1
+++ help.txt 2001/08/08 05:39:16 1.2
@@ -1,9 +1,9 @@
eDesk Help
Window Layout
-The left pane contains the list of subfolders in the current folder;
-the right pane contains the list of files in the folder.
-Right-clicking in either pane pops up a menu of operations including
-New, Copy, and Paste.
+The left pane contains the list of subfolders in the current folder;
+the right pane contains the list of files in the current folder.
+Right-clicking in either pane pops up a menu of operations
+including New, Copy, and Paste.
-