|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raelity.jvi.ViManager
public class ViManager
This class coordinates things. The platform (main application) notifies jVi about new editors that are opened and switches between open editors.
Here are several static methods used to inform jVi of major changes. The appHandle is opaque to jVi; it means something to the platform. It may be a logical container which tracks the editor. There is one of these for each open editor, if the same document is editted in two windows, then there are two of these. appHandle may be nulll; this signifies that the editor is a "nomad" and is not associated directly with top level file data, for example if the editor is in a dialog and is used to edit some app configuration data. When appHandle is null, the editor is not added to the MRU list, and so it does not show up in the ":ls" command.
| Nested Class Summary | |
|---|---|
static class |
ViManager.jViVersion
version is of the form #.#.# or #.#.#.[x|alpha|beta|rc]#, examples 0.9.1, 0.9.1.beta1 also, 0.9.1.beta1.3 for tweaking between exposed releases |
static class |
ViManager.OsVersion
|
| Field Summary | |
|---|---|
static Map |
HackMap
|
static String |
PREFS_KEYS
|
static String |
PREFS_ROOT
|
static ViManager.jViVersion |
version
|
static String |
VIM_CLIPBOARD
|
static String |
VIM_CLIPBOARD_RAW
|
static String |
VIM_CLIPBOARD2
|
static DataFlavor |
VimClipboard2
|
| Constructor Summary | |
|---|---|
ViManager()
|
|
| Method Summary | |
|---|---|
static void |
activateFile(JEditorPane ep,
Object fileObject,
String tag)
The application invokes this whenever a file becomes selected in the specified container. |
static boolean |
addStartupListener(ActionListener l)
Add listener to invoke when editor is starting up. |
static void |
caretUpdate(ViTextView tv,
int lastDot,
int dot,
int mark)
|
static void |
closeFile(JEditorPane ep,
Object fileObject)
The applications invokes this method when a file is completely removed from a container or should be forgotten by jVi. |
static void |
copyPreferences(Preferences dst,
Preferences src,
boolean clearDst)
Copy preferences tree. |
static ViOutputStream |
createOutputStream(ViTextView tv,
Object type,
Object info)
|
static ViOutputStream |
createOutputStream(ViTextView tv,
Object type,
Object info,
int priority)
|
static void |
deactivateCurrentFile(Object parent)
|
static void |
detached(JEditorPane ep)
The arg JEditorPane is detached from its text view, forget about it. |
static void |
dump(PrintStream ps)
|
static void |
dumpStack()
|
static void |
dumpStack(String msg)
|
static void |
exitInputMode()
|
static ViTextView |
getAlternateTextView(ViTextView tv,
Buffer buf)
get any text view, other than tv, which has buf KLUDGE HACK |
static Buffer |
getBuffer(JEditorPane editorPane)
|
static JEditorPane |
getCurrentEditorPaneXXX()
|
static ViTextView |
getCurrentTextView()
|
static ViFS |
getFS()
|
static Keymap |
getInsertModeKeymap()
|
static Object |
getMruBuffer(int i)
Fetch the Nth buffer, 0 to N-1, from the Mru list. |
static Keymap |
getNormalModeKeymap()
|
static ViManager.OsVersion |
getOsVersion()
|
static boolean |
getPlatformFindMatch()
|
static String |
getReleaseString()
|
static Object |
getTextBuffer(int i)
Fetch the text buffer indicated by the argument. |
static ViFactory |
getViFactory()
|
static ViTextView |
getViTextView(JEditorPane editorPane)
|
static void |
ignoreActivation(Object fileObject)
Request that the next activation does not re-order the mru list if the activated object is the argment. |
static void |
installKeymap(JEditorPane editorPane)
|
static boolean |
isBuffer(Object fileObject)
|
static boolean |
isJdk15()
|
static boolean |
isJdk16()
|
static boolean |
jViBusy()
|
static void |
keyStroke(JEditorPane target,
char key,
int modifier)
A key was typed. |
static void |
log(Object... a)
|
static int |
mouseMoveDot(int pos,
JTextComponent c,
MouseEvent mev)
|
static void |
mouseRelease(MouseEvent mev)
|
static int |
mouseSetDot(int pos,
JTextComponent c,
MouseEvent mev)
A mouse click; switch to the activated editor. |
static void |
registerEditorPane(JEditorPane editorPane)
Deprecated. use activateFile |
static Object |
relativeMruBuffer(int i)
|
static Object |
relativeMruBuffer(Object fileObject,
int i)
Return the Ith next/previous fileObject relative to the argument fileObject. |
static void |
removeStartupListener(ActionListener l)
|
static void |
requestSwitch(JEditorPane ep)
requestSwitch can be used from IDE code for situation where an editor is activated. |
static int |
setDot(int pos,
JTextComponent c)
not mouse involved, keep caret off of new line; see window.mouseClickedPosition(pos) |
static void |
setInsertModeKeymap(Keymap newInsertModeKeymap)
|
static void |
setNormalModeKeymap(Keymap newNormalModeKeymap)
|
static void |
setPlatformFindMatch(boolean f)
Specify if the platform can be used for brace matching. |
static void |
setViFactory(ViFactory factory)
|
static void |
startCommandEntry(ViCmdEntry commandEntry,
String mode,
ViTextView tv,
StringBuffer initialString)
Pass control to indicated ViCmdEntry widget. |
static void |
stopCommandEntry()
|
static void |
unexpectedCaretChange(int dot)
A mouse click may have moved the caret. |
static void |
updateHighlightSearchState()
update visible textviews |
static void |
viewMoveChange(ViTextView textView)
The viewport has changed or scrolled, clear messages |
static void |
viewSizeChange(ViTextView textView)
The viewport has changed, so number of screen lines have changed |
static ActionListener |
xlateKeymapAction(ActionListener act)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PREFS_ROOT
public static final String PREFS_KEYS
public static final String VIM_CLIPBOARD
public static final String VIM_CLIPBOARD2
public static final String VIM_CLIPBOARD_RAW
public static Map HackMap
public static final ViManager.jViVersion version
public static final DataFlavor VimClipboard2
| Constructor Detail |
|---|
public ViManager()
| Method Detail |
|---|
public static void setViFactory(ViFactory factory)
public static boolean isJdk15()
public static boolean isJdk16()
public static boolean jViBusy()
public static ViManager.OsVersion getOsVersion()
public static String getReleaseString()
public static ViFactory getViFactory()
public static ViFS getFS()
public static JEditorPane getCurrentEditorPaneXXX()
public static ViTextView getViTextView(JEditorPane editorPane)
public static ViTextView getAlternateTextView(ViTextView tv,
Buffer buf)
public static Buffer getBuffer(JEditorPane editorPane)
public static ViOutputStream createOutputStream(ViTextView tv,
Object type,
Object info)
public static ViOutputStream createOutputStream(ViTextView tv,
Object type,
Object info,
int priority)
public static void installKeymap(JEditorPane editorPane)
public static void startCommandEntry(ViCmdEntry commandEntry,
String mode,
ViTextView tv,
StringBuffer initialString)
public static void stopCommandEntry()
public static void updateHighlightSearchState()
public static void setPlatformFindMatch(boolean f)
f - true if platform can perform all find match functions.public static boolean getPlatformFindMatch()
public static Object getTextBuffer(int i)
getMruBuffer(int).
public static Object getMruBuffer(int i)
public static Object relativeMruBuffer(Object fileObject,
int i)
public static Object relativeMruBuffer(int i)
public static void ignoreActivation(Object fileObject)
public static void activateFile(JEditorPane ep,
Object fileObject,
String tag)
ep - May be null, otherwise the associated editor paneparent - Usually, but not necessarily, a container that hold the
editor.public static void deactivateCurrentFile(Object parent)
public static boolean isBuffer(Object fileObject)
public static void closeFile(JEditorPane ep,
Object fileObject)
public static void registerEditorPane(JEditorPane editorPane)
public static void log(Object... a)
public static void keyStroke(JEditorPane target,
char key,
int modifier)
public static void requestSwitch(JEditorPane ep)
public static ViTextView getCurrentTextView()
public static boolean addStartupListener(ActionListener l)
public static void removeStartupListener(ActionListener l)
public static void detached(JEditorPane ep)
public static void exitInputMode()
public static int setDot(int pos,
JTextComponent c)
public static int mouseSetDot(int pos,
JTextComponent c,
MouseEvent mev)
public static void mouseRelease(MouseEvent mev)
public static int mouseMoveDot(int pos,
JTextComponent c,
MouseEvent mev)
public static void caretUpdate(ViTextView tv,
int lastDot,
int dot,
int mark)
public static void unexpectedCaretChange(int dot)
public static void viewSizeChange(ViTextView textView)
public static void viewMoveChange(ViTextView textView)
public static void dumpStack(String msg)
public static void dumpStack()
public static void setInsertModeKeymap(Keymap newInsertModeKeymap)
public static Keymap getInsertModeKeymap()
public static void setNormalModeKeymap(Keymap newNormalModeKeymap)
public static Keymap getNormalModeKeymap()
public static ActionListener xlateKeymapAction(ActionListener act)
public static void dump(PrintStream ps)
public static void copyPreferences(Preferences dst,
Preferences src,
boolean clearDst)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||