Warning: session_start(): open(/var/lib/php/sessions/sess_7fhq8gcpc6u8pts6lsjsk3mpbm, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
srecord noeq G22ProjectStoryEditor(G22Utils g22utils) {
JSyntaxTextFileEditor editor;
File textFile() { ret g22utils.projectStoryTextFile(); }
IVarWithNotify varText() { ret textFileAsVarWithNotify(textFile()); }
cachedVisualize {
editor = new JSyntaxTextFileEditor(textFile()).autoSave(true);
// debug modelToToken
editor.makeSyntaxTextAreaWithSearch = ->
new RSyntaxTextAreaWithSearch(new RSyntaxTextArea(1, 10) {
public org.fife.ui.rsyntaxtextarea.Token modelToToken(int ofs) {
var token = super.modelToToken(ofs);
printVars("modelToToken", +ofs, +token);
ret token;
}
});
// react to HyperlinkEvent
// problems:
// -RSyntaxTextArea only fires these events when ctrl is pressed
// -RSyntaxTextArea expects the token to be a url with protocol
// So we'll have to make our own hyperlink mechanism...
editor.adaptSyntaxTextArea = textArea -> {
((RSyntaxDocument) textArea.getDocument()).setSyntaxStyle(new HashRefTokenMaker);
textArea.addHyperlinkListener(evt -> {
print("Hyperlink event");
if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
infoBox("Link URL: " + evt.getURL());
}
});
};
ret withTopAndBottomMargin(jRaisedCenteredSection("Project Story",
editor.visualize()
));
}
}