benfortuna / figurate Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/figurate
License: GNU General Public License v3.0
Automatically exported from code.google.com/p/figurate
License: GNU General Public License v3.0
Some actions need to know the current editor. We can identify the focused text
component for that:
action id: 'openBrowserAction', name: rs('Open in Browser'), closure: {
// def url = new File(currentEditor.sp.textArea.fileFullPath).toURL()
def url = new File(JTextComponent.focusedComponent.fileFullPath).toURL()
Desktop.getDesktop().browse(url.toURI())
}
Original issue reported on code.google.com by benfortuna
on 22 Sep 2010 at 8:22
See:
http://jazzy.sourceforge.net/
Original issue reported on code.google.com by benfortuna
on 30 Aug 2010 at 4:32
See here:
http://forums.sun.com/thread.jspa?threadID=5423096
Original issue reported on code.google.com by benfortuna
on 30 Aug 2010 at 12:16
Add support for opening a file from a URL.
File menu item 'Open URL..'
Show a dialog with an auto-complete combo box with history of opened URLs
Original issue reported on code.google.com by benfortuna
on 30 Aug 2010 at 12:07
See:
http://mercurial.selenic.com/wiki/ConvertExtension
Original issue reported on code.google.com by benfortuna
on 7 Sep 2010 at 6:55
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND,
SubstanceConstants.TabContentPaneBorderKind.SINGLE_FULL)
Original issue reported on code.google.com by benfortuna
on 6 Sep 2010 at 2:38
See:
http://en.wikipedia.org/wiki/Comparison_of_text_editors
Original issue reported on code.google.com by benfortuna
on 6 Sep 2010 at 4:25
When using comment/uncomment functionality an extra slash is also added in the
editor.
Original issue reported on code.google.com by benfortuna
on 29 Aug 2011 at 2:16
eg:
action id: 'saveFileAction', name: rs('Save'), accelerator: shortcut('S'), closure: {
if (new File(currentEditor.sp.textArea.fileFullPath).exists()) {
currentEditor.sp.textArea.save()
}
else if (chooser.showSaveDialog() == JFileChooser.APPROVE_OPTION) {
currentEditor.sp.textArea.saveAs(FileLocation.create(chooser.selectedFile))
editor.putClientProperty 'figurate.id', currentEditor.sp.textArea.fileName
}
}
Original issue reported on code.google.com by benfortuna
on 21 Sep 2010 at 12:49
Support a file mode that detects changes to a file and reads the end of the
input.
Also support filtering using regex.
See:
http://www.jibble.org/jlogtailer.php
http://forums.sun.com/thread.jspa?forumID=535&threadID=5344199
Original issue reported on code.google.com by benfortuna
on 30 Aug 2010 at 1:21
Fix null pointer exception when editor not modified:
toolWindowManager(id: 'windowManager') {
windowManager.contentManager.contentManagerUI.addContentManagerUIListener(
["contentUIRemoving": { e ->
if (e.contentUI.content.component.sp.textArea.isDirty()) {
def filename = e.contentUI.content.component.sp.textArea.fileName
def selection = JOptionPane.showConfirmDialog(windowManager, "Save changes to ${filename}?")
if (selection == JOptionPane.YES_OPTION) {
// file.text =
tabComponent.getClientProperty('figurate.textArea').text
}
else if (selection == JOptionPane.CANCEL_OPTION) {
return false
}
}
return true
},
"contentUIDetached": {}
] as ContentManagerUIListener)
}
Original issue reported on code.google.com by benfortuna
on 20 Sep 2010 at 12:10
ie:
def icon = FileSystemView.fileSystemView.getSystemIcon(chooser.selectedFile)
Original issue reported on code.google.com by benfortuna
on 6 Sep 2010 at 12:52
See example:
http://www.pushing-pixels.org/wp-content/uploads/2007/07/filetreepanel.txt
Original issue reported on code.google.com by benfortuna
on 7 Sep 2010 at 1:00
Allow filtering of filenames
Original issue reported on code.google.com by benfortuna
on 8 Sep 2010 at 1:34
From MyDoggySet.java:
contentManagerUI.addContentManagerUIListener(new ContentManagerUIListener() {
public boolean contentUIRemoving(ContentManagerUIEvent event) {
return JOptionPane.showConfirmDialog(frame, "Are you sure?") == JOptionPane.OK_OPTION;
}
public void contentUIDetached(ContentManagerUIEvent event) {
}
});
Original issue reported on code.google.com by benfortuna
on 16 Sep 2010 at 3:54
ie:
action id: 'openBrowserAction', name: rs('Open in Browser'), closure: {
def url = new File(currentEditor.sp.textArea.fileFullPath).toURL()
Desktop.getDesktop().browse(url.toURI())
}
Original issue reported on code.google.com by benfortuna
on 21 Sep 2010 at 3:51
See:
http://launch4j.sourceforge.net/
Original issue reported on code.google.com by benfortuna
on 15 Sep 2010 at 4:14
See:
http://mydoggy.sourceforge.net/
Discussion here:
http://stackoverflow.com/questions/304874/what-are-good-docking-frameworks-for-j
ava-swing
Original issue reported on code.google.com by benfortuna
on 1 Sep 2010 at 3:55
Navigate files using the keyboard:
ctrl+G (or ctrl+L?) - go to line
Also, double click on cursor pos should activate go to line.
Original issue reported on code.google.com by benfortuna
on 8 Sep 2010 at 6:32
Eg:
try {
s = new Socket('localhost', 4444)
if (this.args) {
s.withStreams { input, output ->
output << this.args[0]
}
}
System.exit(0)
}
catch (Exception e) {
e.printStackTrace()
}
Listen socket:
Thread.start {
def server = new ServerSocket(4444)
while(true) {
server.accept { socket ->
println 'opening file..'
socket.withStreams { input, output ->
def reader = input.newReader()
def buffer = reader.readLine()
println "server received: $buffer"
}
}
}
}
Original issue reported on code.google.com by benfortuna
on 10 Sep 2010 at 6:21
See:
http://javadoc.fifesoft.com/rsyntaxtextarea/org/fife/ui/rsyntaxtextarea/template
s/StaticCodeTemplate.html
Original issue reported on code.google.com by benfortuna
on 9 Sep 2010 at 12:33
Provide a toolbar containing controls that should be highly visible (i.e. often
changing values).
May include:
- navigation (forward/back) to jump between edit points
- refresh (reload document) enabled when change detected on filesystem
- syntax style (combo) display the current editing syntax style
- macro controls (record/stop/playback) enabled accordingly
Original issue reported on code.google.com by benfortuna
on 22 Sep 2010 at 4:15
Implement diff/patch features.
See:
http://code.google.com/p/java-diff-utils/
Original issue reported on code.google.com by benfortuna
on 2 Sep 2010 at 5:45
Use the figurate concepts to create a flexible system for managing artifacts,
configuration and other documents.
Original issue reported on code.google.com by benfortuna
on 13 Apr 2012 at 1:39
Attachments:
eg:
FloatingTypeDescriptor desc = (FloatingTypeDescriptor)
debugTool.getTypeDescriptor(ToolWindowType.SLIDING);
desc.setTransparentMode(true); // false to disable
Original issue reported on code.google.com by benfortuna
on 14 Sep 2010 at 3:56
Adjust status bar widths:
label(text: '1:0', id: 'caretPositionStatus', horizontalAlignment:
SwingConstants.CENTER, toolTipText: 'Cursor position (line:column)',
constraints: new JXStatusBar.Constraint(75))
label(text: 'text/plain', id: 'syntaxStatus', horizontalAlignment:
SwingConstants.CENTER, toolTipText: 'Syntax Highlighting', constraints: new
JXStatusBar.Constraint(100))
Update syntax status:
focusGained = {
frame.title = "${fileFullPath} - ${rs('Figurate')}"
syntaxStatus.text = syntaxEditingStyle
}
Original issue reported on code.google.com by benfortuna
on 8 Sep 2010 at 2:39
Menu:
menu('Sidebar') {
checkBoxMenuItem(text: rs("Filesystem Explorer"), id: 'viewFilesystemExplorer')
}
Explorer:
def explorerToolWindow = windowManager.registerToolWindow("Explorer",
"Filesystem", null, explorer, ToolWindowAnchor.LEFT)
bind(source: viewFilesystemExplorer, sourceProperty:'selected',
target:explorerToolWindow, targetProperty:'available')
Original issue reported on code.google.com by benfortuna
on 8 Sep 2010 at 12:41
Currently opening files from My Recent Documents on Windows will open the
shortcut file.
Add support for opening the file referenced by a Windows shortcut. See here for
jshortcut utility:
http://kac-repo.xt.pl/cgi-bin/gitweb.cgi?p=jshortcut.git;a=tree
Original issue reported on code.google.com by benfortuna
on 22 Sep 2010 at 3:51
Add a mouse listener that fires text zoom as follows:
- CTRL + Mousewheel up = zoom in
- CTRL + Mousewheel down = zoom out
Original issue reported on code.google.com by benfortuna
on 29 Aug 2010 at 11:53
ie:
table(gridColor: Color.LIGHT_GRAY) {
def systemProps = []
for (propName in System.properties.keySet()) {
systemProps.add([property: propName, value: System.properties.getProperty(propName)])
}
tableModel(list: systemProps) {
propertyColumn(header: rs('Property'), propertyName:'property')
propertyColumn(header: rs('Value'), propertyName:'value')
}
}
Original issue reported on code.google.com by benfortuna
on 6 Sep 2010 at 2:05
Investigate available libraries for detecting file changes:
http://jpathwatch.wordpress.com/
http://download.oracle.com/javase/tutorial/essential/io/notification.html
Original issue reported on code.google.com by benfortuna
on 30 Aug 2010 at 1:01
eg:
def screenEnv = GraphicsEnvironment.localGraphicsEnvironment.defaultScreenDevice
action id: 'fullScreenAction', name: rs('Fullscreen'), accelerator: 'F11', enabled: screenEnv.fullScreenSupported, closure: {
// frame.undecorated = true
screenEnv.fullScreenWindow = window(id: 'fullScreenWindow') {
windowManager
}
}
action id: 'exitFullScreenAction', name: rs('Exit Fullscreen'), accelerator: 'ESC', closure: {
if (screenEnv.fullScreenWindow != null) {
// frame.undecorated = false
screenEnv.fullScreenWindow = null
}
}
...
toolWindowManager(id: 'windowManager') {
windowManager.inputMap.put KeyStroke.getKeyStroke('ESCAPE'), 'exitFullScreenAction'
windowManager.actionMap.put 'exitFullScreenAction', exitFullScreenAction
}
Original issue reported on code.google.com by benfortuna
on 9 Sep 2010 at 7:06
A console used to evaluate Groovy expressions.
ctrl+enter - activate/show
esc - hide
Original issue reported on code.google.com by benfortuna
on 8 Sep 2010 at 7:41
eg:
def editor = new Editor(file)
// clear undo history..
editor.sp.textArea.discardAllEdits()
editor.sp.textArea.caretUpdate = { updateCaretStatus(editor.sp.textArea) }
editor.sp.textArea.focusGained = {
currentEditor = editor
ousia.build {
frame.title = "${editor.getClientProperty('figurate.id')} - ${rs('Figurate')}"
syntaxStatus.text = editor.sp.textArea.syntaxEditingStyle
updateCaretStatus(editor.sp.textArea)
}
}
Original issue reported on code.google.com by benfortuna
on 21 Sep 2010 at 1:14
Provide HTML/XML markup formatting using JTidy:
http://jtidy.sourceforge.net/
Original issue reported on code.google.com by benfortuna
on 10 Sep 2010 at 2:16
Easiest, but perhaps not ideal solution:
action id: 'printAction', name: rs('Print..'), closure: {
if (new File(currentEditor.sp.textArea.fileFullPath).exists()) {
Desktop.desktop.print new File(currentEditor.sp.textArea.fileFullPath)
}
}
Original issue reported on code.google.com by benfortuna
on 21 Sep 2010 at 4:35
Install RSTA language support:
http://svn.fifesoft.com/viewvc-1.0.5/bin/cgi/viewvc.cgi/RSTALanguageSupport/trun
k/?root=RSyntaxTextArea
Original issue reported on code.google.com by benfortuna
on 10 Sep 2010 at 4:35
Update icon padding:
def icon =
paddedIcon(FileSystemView.fileSystemView.getSystemIcon(chooser.selectedFile),
size: [width: 16, height: 22])
Update frame title on focus change:
focusGained = {
frame.title = "${fileFullPath} - ${rs('Figurate')}"
}
Original issue reported on code.google.com by benfortuna
on 7 Sep 2010 at 6:40
Add a console view type that supports SSH to remote servers.
See:
http://code.google.com/p/gritty/
Original issue reported on code.google.com by benfortuna
on 1 Sep 2010 at 12:50
Add an optional sidebar with possible functions:
- filesystem explorer
- open documents (recently opened?)
- saved bookmarks
Original issue reported on code.google.com by benfortuna
on 30 Aug 2010 at 3:04
A typical usage for file editors is to manage multiple files related to a
specific task. Adding a task grouping (similar to tab grouping in firefox) will
help to keep track of multiple open files.
Original issue reported on code.google.com by benfortuna
on 8 Jun 2011 at 2:25
Check for content, and select if already opened, ie:
def content = windowManager.contentManager.getContent(chooser.selectedFile.name)
if (!content) {
def editor = newEditor(chooser.selectedFile)
id = editor.getClientProperty('figurate.id')
def icon = paddedIcon(FileSystemView.fileSystemView.getSystemIcon(chooser.selectedFile), size: [width: 16, height: 22])
content = windowManager.contentManager.addContent(id, chooser.selectedFile.name, icon, editor, chooser.selectedFile.absolutePath)
content.selected = true
// windowManager.registerToolWindow id, id, null, editor,
ToolWindowAnchor.BOTTOM
// windowManager.getToolWindow(id).available = true
}
else {
content.selected = true
}
Original issue reported on code.google.com by benfortuna
on 8 Sep 2010 at 7:54
Investiate options for mult-document interface:
1. Sidebar - list of open/recent documents
2. Tabs - each open document has it's own tab
3. Docking Framework - allows documents to be minimised, tiled, maximised, etc.
Original issue reported on code.google.com by benfortuna
on 2 Sep 2010 at 3:28
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.