How to get value dropdown in XML Edit Tag Dialog
Submitted by
dhschulten on
Thursday, 14 February, 2008 - 07:11
Hi,
I am using XML Schema for validation and there are situations where there are only a limited number of allowed attribute values. I have seen that jEdit sometimes creates dropdown lists with allowed attribute values (e.g. when editing a schema), but I could not find out how this is done. At least, xsd:enumeration in the following schema expression does not lead to such a value dropdown:
A similar situation are key references. It seems desirable to propose a list of existing keys for key reference attributes. But I can understand that it is not trivial to get this list and in very large documents it might not be so desirable after all.
Anyhow, is there a way to get a dropdown for attribute enumerations as shown above?
Cheers,
Dietrich
Menu congestion under 'Plugins'
Submitted by
McSwell on
Friday, 15 February, 2008 - 17:28
Having installed several plugins, the 'Plugins' menu is getting rather congested. Doing anything requires drilling down several levels--AFAICT, as an end user (as opposed to a plugin provider) I can't assign any menu items to frequently used actions in plugins, nor apparently can the plugin writers put their menu items anywhere except under the Plugins menu. (I can assign shortcut keys to plugin actions, but I'm running out of them, too; and I'm allergic to toolbars.) Also, letter accelerators (like
FC for File | Close) don't work with plugins, either.
Is there any way for an end user (who is not a Java programmer) to modify the main menu structure? (I know that the Utilities | Global dlg allows me to modify the right-click menu, but I want to be able to modify the main menu bar.)
I'm using 4.2 at the office, and don't have any control over that. (I suppose we'll move to 4.3 when it's finalized; maybe that solves my problem?)
Mike Maxwell
CASL/ U MD
(Apologies for the ugly posting; I know how to use whitespace, but my newlines don't show up when I Preview, and presumably won't show up when I submit)
Set of my jEdit Macros (taat_jedit_macros.zip v1.0 by Tomek Pęszor)
Submitted by
takeshin on
Saturday, 16 February, 2008 - 23:22
A set of my jEdit macros.
See description at:
http://taat.pl/jedit/
Note: This is zipped file. Extract it before placing in settings directory.
All macros as a separate files can be downloaded from http://taat.pl/en/jedit/
User-defined menus
Submitted by
McSwell on
Sunday, 17 February, 2008 - 18:15
I would like the ability to define my own menu. Then I could put some of my more frequently used commands (particularly the ones for the plugins) there. It should allow the use of "accelerator keys", that is a specified letter that you type once you're in this user-defined menu that chooses one of the actions (like when you're in the File menu, typing 'o' or 'O' will get you the File Open dialog). (The accelerator key feature is absent from the Plugins menu--adding that capability to the Plugins menu would make the user-defined menus less important, although still nice to have.)
I know that I can add actions to the pop-up menu, but I'm asking for the ability to add actions to a main menu item (probably a main menu item of my own choosing). Without Java programming

.
Mike Maxwell
CASL/ U MD
Action Bar commands
Submitted by
prk59 on
Sunday, 17 February, 2008 - 21:06
Hi everybody,
Like a lot of you I suppose, I fell in love with jedit. But I still do not know how to use it very well. Yesterday I discovered the action bar. In the manual it says that I can open the Global Options by typing l-o in the action bar. I tried it and it worked. However I was not able to find other commands (for example for the plugin options). When I'm in the action bar and I press up I get a list of commands, but they are of the type plugin-options; what I want is short commands. Where can I find a list of all the commands that I can type in the action bar please?
I also have a small question that is off topic: is jedit still (actively) developped? Because almost everywhere on the site I see old dates (2001, 2003) and on the botton of the page it says (c) 2003. In addition to that, I think there haven't been a release for some time now. Please excuse me if I am wrong (actually I hope I am wrong...)
can jedit do this
Submitted by
tsr on
Sunday, 17 February, 2008 - 21:33
Hi,
I'm thinking about adapting an editor to handle the creation of UMC (user made content) for Battle for Wesnoth (BfW) - located at: http://www.wesnoth.org.
BfW uses a mark-up language called WML (wesnoth markup language) that has some similarities with xml (the main differences are: preprocessor directives and [ ] instead of < >). WML is fairly strict in what you are allowed to write where.
I've been looking (really fast and not in-depth) into jEdit, and it seems that it meets my requirements. But before I dive into the specifics of jEdit and java I'd like to know if what I want is possible.
What I want to be able to do is something like:
- hide unwanted features (from the editor) easily (as to not confuse people that are new to the concept of programming)
- indentation and syntax-highlightning
- code snippets
- wizards (that is, some kind of forms/dialogs that when completed insert a modified code snippet), both the ability to create them but also the ability to define where (in the UI) they will be shown.
- create a wml-reference
- plugin in a few wml-tools (that are currently written in python) that can be launched and generate reports back to jedit
- launch the main application (that is BfW), to easily test changes
- when the cursor waits a list of possible strings to write at the current location are displayed.
I think that's it. So is this possible to accomplish with jedit as a foundation and an unspecified amount of hours? (I mean without forking the projekt, 'just' writing a plugin)
/tsr
SQL BeanShell Preprocessor: how to use?
Submitted by
Wavis on
Friday, 22 February, 2008 - 00:51
I write a lot of SQL at my job. It's one of my primary responsibilities. The SQL plugin has been extremely useful. It would be even more useful if I could get it to replace @variable with a value, but I can't get the preprocessor to work. There is no indication how to use it. It doesn't prompt for a buffer to execute, there is no documentation as to variables the beanshell script would be passed, there are no settings for it in the project properties, or plugin options, or under the SQL plugin menu. Does anyone know?
AutoIt Full Version 3 Support Mode (au3.xml v1.0 by M. Bayley)
Submitted by
MikeB55 on
Thursday, 28 February, 2008 - 05:21
This is a full implementation of a mode file for the AutoIt scripting language. Full syntax support for code folding, user defined variables, user defined functions, etc.
SIMATIC S7 Edit-Mode (German Version) (S7_jEdit.zip v0.1 by Thorsten Willert)
A simple SIMATIC S7 Edit-Mode for S7 source-codes. German version only.
Includes a S7-library for XInsert.
Make XML plugin play better with Beauty plugin
Submitted by
xhq on
Friday, 29 February, 2008 - 14:25
Hi,
I installed XML plugin and it automatically installed Beauty plugin. I tried to use beauty to use XML:XMLIntender to format an XML file but just found they can not work well together. Here is the mail I sent the other day. I post it here in hope some one can notice it.
The problem:
When invoked from Beauty plugin, incorrect IndentAmount could be used. For example, in the buffer optios, I set "Tab width" to 8 and "Indent width" to 8 and uncheck "Soft (emulated with spaces) tabs", the result IndentAmount would be 8 tabs!
I checked the code of both Beaty and XML. It seems the XML code needs to be improved. Here is the details:
In XML/xml//indent/XmlBeautifier.java, the main line reads:
return XmlIndenterPlugin.indent(text, getIndentWidth(), !getUseSoftTabs());
But the same indent() api is used in the following way, in XML/xml/indent/XmlIndenterPlugin.java, public static void indentXml( View view ):
String resultString = XmlIndenterPlugin.indent( inputString, indentAmount, indentWithTabs );
where indentAmount is calculated using:
private static int getIndentAmount( boolean indentWithTabs, Buffer buffer ) {
if ( indentWithTabs ) {
return buffer.getIndentSize() / buffer.getTabSize();
}
else {
return buffer.getIndentSize();
}
}
So, I think the same logic used in getIndentAmount() should be applied in XmlBeautifier. It might be worth adding a new static method to XmlIndenterPlugin:
public static int getIndentAmount(int indentSize, int tabSize, boolean indentWithTabs) {
if ( indentWithTabs ) {
return indentSize/ tabSize;
}
else {
return indentSize;
}
}
and refactor the original one as:
private static int getIndentAmount( boolean indentWithTabs, Buffer buffer ) {
return getIndentAmount(buffer.getIndentSize(), buffer.getTabSize(), indentWithTabs);
}
Then the line in XmlBeautifier will be:
int indentAmount = XmlIndenterPlugin.getIndentAmount(getIndentWidth(), getTabWidth(), !getUseSoftTabs());
return XmlIndenterPlugin.indent(text, indentAmount , !getUseSoftTabs());
I think this will work, but have not test it though.
^1 ^2 ^3 stopped working
Submitted by
McSwell on
Sunday, 2 March, 2008 - 03:55
Sometime recently (in the past week or so?), Control-1, control-2, control-3 etc. stopped working in jEdit. Before I report this as a bug, I thought I would run it by here in case anyone had any ideas.
^1, ^2 etc. are the default keys for splitting the window. I checked and they are still assigned to those functions in the Utilities | Global Options under the Shortcuts; but when I try to assign them to some other function, they don't register at all. That is, if I click on a cell, jEdit pops up a little dialog box allowing me to "Specify Shortcut". If I type most any key, it shows up in the text box; but ^1, ^2 etc. don't appear. It's as if they aren't getting pressed. Oddly enough, ^6 still works, as does control-minus; but none of the other combinations of the control key with the top row work.
Control-. control-, and control-/ have also stopped working, and several others. I believe all the control-alpha keys work.
I thought maybe some other program was interfering. But I fired up my Other Editor, Visual Slickedit, and all these keys work fine there.
I would suspect a bug in some late version of jEdit or in Java, but if so it is odd that no one else has reported this. I did install a new Java just yesterday: 1.6.0_04, but I've also tried this with Java 1.6.0_03 and 1.5.0_02. And I'm using jEdit 4.3pre12; I have not yet tried reverting to an earlier version, although I suppose I'll try that and report back. I am running on Windows XP, all service packs. I tried both left and right control keys, and also the CapsLock key (which I've mapped back to a control key, as God intended it).
Any suggestions?
Mike Maxwell
CASL/ U MD
ssh_exchange_identification: Connection closed by remote host
Submitted by
jfmxl on
Sunday, 2 March, 2008 - 23:41
Working on a remote file eventually exhausts the number of allowed processes at my ISP provided server.
The problem seems to be that the FTP module for jEdit does not close any of the many ssh connections it makes to my server to send and retrieve files.
My present workaround is to keep a terminal window open to the server and kill off by hand the two ssh processes opened by jEdit every time I save changes to a file I'm editing.
The alternative is to be locked out of the server for hours when my the number of allowed processes is exceeded.
Are you all aware of this problem? Is there a solution forthcoming?
ssh_exchange_identification: Connection closed by remote host
Submitted by
jfmxl on
Sunday, 2 March, 2008 - 23:43
Working on a remote file eventually exhausts the number of allowed processes at my ISP provided server.
The problem seems to be that the FTP module for jEdit does not close any of the many ssh connections it makes to my server to send and retrieve files.
My present workaround is to keep a terminal window open to the server and kill off by hand the two ssh processes opened by jEdit every time I save changes to a file I'm editing.
The alternative is to be locked out of the server for hours when my the number of allowed processes is exceeded.
Are you all aware of this problem? Is there a solution forthcoming?
I must add : thanks for a very wonderful editor!
Configurable Fold Guids' indentation
Submitted by
cibulka on
Monday, 3 March, 2008 - 07:39
I'm trying JEdit with WhiteSpace plugin.
In my oponion it would be nice and useful feature, if the Fold Guids' indentation was configurable .
Anybody using jEdit on the Mac?
Submitted by
rovf on
Wednesday, 5 March, 2008 - 17:34
I found that my jEdit on Mac OSX 10.4 does not recognize ALT+RIGHT for indenting a selection". When I choose it from the menu (Edit/Indent/ShiftIndentRight), it works fine. When I use the keyboard shortcut (shift+right cursor key), nothing happens.
I haven't seen this problem under Windoze or Linux, and I would like to know if this is a general problem on OSX10.4, or particular to my setup. If anybody out there is using a Mac, could you please try it out and let me know whether it works for you?
Ronald
Highlighting tags in TXT files
Submitted by
srikrishnan on
Saturday, 8 March, 2008 - 05:47
Hi All,
I want to distinguish entities (for e.g. α,etc) and tags (
, etc) from normal text in my txt files. Is it possible to create such a thing as like in htm and xml formats?
Please help me to achieve this?
Regards,
Srikrishnan
Database access in macros
Submitted by
phade on
Wednesday, 12 March, 2008 - 08:45
Hello,
Knowing how powerful BeanShell really is I wanted to see if it can access databases (oracle). So I wrote quick and small script (real servers replaced of course
):
import java.sql.*;
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@my.oracle.server:1521:MYBASE", "user", "pass");
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
print (rset.getString(1)); // Print col 1
stmt.close();
I ran it and got:
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@my.oracle.server:1521:MYBASE
First idea was that it is a classpath problem (BeanShell can not access jdbc oracle driver) so I wrote another quickie to see what classpath BeanShell actually sees.
import java.net.URL;
import java.net.URLClassLoader;
ClassLoader = sysClassLoader = ClassLoader.getSystemClassLoader();
URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();
for(int i=0; i
And yes sure enough it could not see my oracle jdbc in classpath. So I did some testing and discovered that when running jEdit instead of
java -cp oracle.jar -jar jedit.jar
like this
java -cp oracle.jar:jedit.jar org.gjt.sp.jedit.jEdit
then BeanShell finds my oracle jdbc and classpath macro shows also oracle and database macro can connect to oracle server.
So I want to know if it somehow possible to specify classpath when running jEdit like it is usually ran (java -jar jedit.jar) or use some other methods (other than running jedit with org.gjt.sp.jedit.jEdit) to let BeanShell know my new classpath?
Keep up the good work,
Phade
Duplicate and Increment (Duplicate_and_Increment.bsh v0.1 by Gael Ecorchard (galou))
Submitted by
galou on
Wednesday, 12 March, 2008 - 14:43
Duplicate the line at the caret incrementing the numbers
Example:
variable1 = tmpvar1 ;
will become
var1 = tmpvar1 ;
var2 = tmpvar2 ;
A list a characters after which no implementation should occur can be given
Suggested shortcut CS+L
bakup JEdit
Submitted by
srikrishnan on
Thursday, 13 March, 2008 - 10:10
Hi All,
I am going to format my system. Before that I want to take bakup of my current plugins and customized interface options and I want to reuse that in my new formatted Windows environment.
Is it possible to make a bakup of my current JEdit and reuse it?
Please help me to solve this problem, because I have downloaded most probably all the plugins and macros and customised many shortcuts and JEdit Interface for my work.
Regards,
Srikrishnan
BufferTabs Plugin stopped working in 4.3pre13
Submitted by
scaRFhogg on
Friday, 14 March, 2008 - 00:32
When I try to enable it in the Plugins menu it gives me this BeanShell Error:
java.lang.NoClassDefFoundError: gnu/regexp/REException
at buffertabs.BufferTabs.propertiesChanged(Unknown Source)
at buffertabs.BufferTabs.start(Unknown Source)
at buffertabs.BufferTabsPlugin.addBufferTabsToEditPane(Unknown Source)
at buffertabs.BufferTabsPlugin.toggleBufferTabsForEditPane(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gjt.sp.jedit.bsh.Reflect.invokeMethod(Reflect.java:134)
at org.gjt.sp.jedit.bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:871)
at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:224)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:443)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:383)
at org.gjt.sp.jedit.jEdit$3.invokeAction(jEdit.java:3000)
at org.gjt.sp.jedit.jEdit$3.invokeAction(jEdit.java:2984)
at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:220)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)