Hi Nick, > Where possible, talk in terms of emacs > interface objects (buffers, windows, frames, region, point, > etc.) but also express them in terms of what a Java interface > might look like. What are the logical groupings for > retrieving certain kinds of information? What would you name > an interface for fetching the current buffer, the current > buffer file, the current class, etc.?
I attached the module that implements the generic Java->Emacs interface in
the jde-transmogrify package. It was done to mirror the Transmogrify Hook
interface, which I believe was derived from the JBuilder plug-in interface.
We could use it as a starting point, as it is part of a working "plug-in"
(in the sense of a Java-based add-on to JDEE).
The relevant methods (that Java code can use to change the Emacs
environment) are:
42: public void showReferencesSourced(IDefinition definition) {
57: public void showReferencesNonsourced(IDefinition definition) {
67: public void openFile(String sourceFileName)
78: public File[] getFiles()
90: public String getCurrentFile()
102: public String getUserInput(String prompt, String title)
108: public void displayMessage(String title, String message)
113: public void displayException(Exception e, String description) {
135: public String getText()
146: public String getLine(int lineNumber)
159: public void selectText(int startLineNumber,
177: public void selectText(int startPos, int endPos)
188: public void deSelectText()
198: public String getSelectedText()
208: public Enumeration getSelectedLines()
219: public int getCaretLineNumber()
230: public int getCaretOffset()
242: public int getCaretPos()
248: public int getSelectionStart()
254: public int getSelectionEnd()
266: public void setCaretPos(int lineNumber, int offset)
279: public void setCaretPos(int pos)
Regards,
Nascif
EmacsHook.java
Description: Binary data
