Plugins for C/C++ development
Submitted by
shlomy on
Sunday, 15 October, 2006 - 13:49
I intend to add a few features to jEdit for C/C++ developers, such as a class hierarchy browser and a static function call tree. These features will be based on ctags and either cscope or GNU global.
I'd like to discuss here the plugin distribution methodology. We already have several plugins using ctags - Jump!, Tags, CodeBrowser, CtagsSideKick. Each of them parses the ctags output on its own and handles the storage of the data by itself. I think it's better to have a common library plugin to handle the interface with ctags - both invocation, parsing and storage. There are several advantages to this other than avoiding duplication of code:
- The data can be shared (when appropriate) between plugins that use ctags, so there is no need to run ctags a couple of times on the same file with the same flags.
- The configuration of ctags (e.g. per-mode configuration) can be done in a single place, the plugins that use it (usually) don't even need to be aware of it.
- It will also be easier to write new plugins using ctags.
While a library plugin for ctags seems reasonable, there's the other problem of what I call "plugin explotion": The list of installed plugins becomes long, with all consequences (including the one that's most annoying for me - the jEdit Plugins menu gets split, e.g A-G,H-Z...).
Do you think all ctags-related plugins should be combined into one? What about new features like those I mentioned above - should they be put into new plugins or inserted into existing plugins?
A good example can be taken from eclipse - which is normally installed with hundreds of plugins. Unlike jEdit, eclipse does not have a 'Plugins' menu. Rather, each plugin inserts itself in the desired places (e.g. toolbar, menu item, options). In contrast with jEdit, eclipse consists almost entirely of plugins. A pure eclipse with no plugins can't do much (if anything at all).
Please let me know what you think. Thanks!
What's jEdit Server and what does it do?
Submitted by
maddog39 on
Sunday, 15 October, 2006 - 15:08
The title says it all. What is jEdit Server and what does it do?
Default edit mode for specific file extensions
Submitted by
shlomy on
Sunday, 15 October, 2006 - 22:23
Today, edit modes declare the file extensions they handle. The same file extension may be specified for several edit modes, and it's okay. For example, '.h' files can be both C, C++, or Objective-C files. So far, this is natural and good.
When the user opens a buffer, jEdit selects the first edit mode that can handle the extension of the buffer and uses it. Sometimes, this is not the mode that the user wanted to use. For example, I opened a file "a.h", and it was opened in Objective-C mode, but I never program in Objective-C, only C++. So I have two options:
1. Use the "buffer options" to change the mode for the current file ("a.h"). This means that if I then open "b.h", it will again open in Objective-C mode and I will have to change it as well.
2. Use the "global options" to remove the association between Objective-C and ".h" files (and I might need to do this for other modes handling ".h" files as well except C++). This means that all ".h" files that I open from now on will be opened in C++ mode, but: a) I had to do some work (remove the associations from all other modes), and b) if at some point I'm going to use Objective-C, I will need to add the association again.
I suggest to add the following feature to jEdit: A "default modes" list, where the user can specify for specific extensions which modes he'd like to use. If an extension is not on the "default modes" list, jEdit will choose the mode just as it does now. However, if the extension is on the list, it will use the mode specified in the list. So if I see that my ".h" file was opened in Objective-C, I will simply add an association from ".h" to "C++" to that list, and all future buffers of ".h" files will use C++ mode.
Furthermode, I suggest a user-friendly GUI to support this list: In the status bar, the text string specifying the current edit mode will be replaced by a combo box. If the mode used for the buffer is not the desired one, the user will be able to select the desired one from the combo box and the mode selected will be set automatically as the default mode for this extension (i.e. automatically add to the "default modes" list or automatically update it).
Feedback will be most welcome...
Advice on setting up JEdit similar to IntelliJ IDEA
Submitted by
Keeler on
Sunday, 15 October, 2006 - 22:49
Hi All,
I did some searching around these forums and found only little bits and pieces of what I'm looking for, but nothing seemed all that conclusive to what I'm after so I figured I'd post a topic. If this has been answered elsewhere, I apologize for the repeat post and would hope you could point me in the right direction.
I currently work with Intellij IDEA (http://www.jetbrains.com/idea/) on a regular day-to-day basis. However I am interested in also writing Java on OSX platform and IntelliJ has the uncanny ability to suck up a LOT of memory, (and is of course, rather on the high dollar end).
Considering there are dozens and dozens of plug-ins out there, I find it very difficult to find features that suit my needs directly. Many have descriptions that seem like they might do what I want and then after installing them I find that they lack one thing or another and I'm forced to go fishing for an alternative.
I really like how IntelliJ has code completion, code highlighting, an expandable directory tree for the project I'm working in, and the ability to set up ant build and tomcat such that I can compile with the click of a button.
Does anyone use any of the aformentioned features who may be able to point me in the right direction?
Thanks in advance.
-keeler
XML plugin causing java process to go to 95%+ cpu
Submitted by
elsigh on
Monday, 16 October, 2006 - 04:36
Hey folks, I've isolated this issue to the XML plugin. I love the XML plugin, but when I have it on, after some amount of time, say 10 min., I notice my processor is chugging and I look at top - and there's java, at the top of the list, consuming like 95%+ cpu. I'm running Sun JDK 1.5 on linux.
PS - Did I mention I love jEdit?
HTML Strong tags (HTML_Strong.bsh v1.0 by grasshopper)
Submitted by
grasshopper on
Monday, 16 October, 2006 - 10:59
A simple macro to enclose a string in strong tags.
Short but frustrating black screen [4.3p7]
Submitted by
Baldurien on
Monday, 16 October, 2006 - 12:29
Hi,
Before I try to send a bug report, I'd like to know a solution to my problem, or perhaps user in the same condition than me.
I had run jEdit 4.3pre5 to 4.3pre6 on jdk1.5_06 to jdk1.5_08*, and now the latest jEdit - 4.3p7 - on jdk1.5_08, all on WinXP Pro SP2.
(* 4.3p5 with jdk1.5_06, 4.3p6 with jdk1.5_06, and 4.3p6 with jdk1.5_08)
In all of this use of jEdit, I had that black screen that appeared a short time (enough to be noticable), and it seems to be worse in 4.3p7. The black screen appear for example when I go to help, or when a new window spawn (like popup menu, etc).
I'm running it on a GeForge 7900GTO+512Ram, testing to disable direct draw in Java, but no : that black screen is still there.
I also installed the jdk1.5_09, and will test with it.
Is that a real problem?
[Note : I tested that with a lot of plug in installed, Have to try it with only a short set of them]
How to use several folding modes at the same time?
Submitted by
wildemar on
Monday, 16 October, 2006 - 15:16
When writing code I would very much like to use language-specific folding for language structures in addition to expclicit folding for logical groups of lines. Is that at all possible? If so, how?
thx alot
wildemar
XML plugin causing java process to use 95%+ cpu
Submitted by
elsigh on
Monday, 16 October, 2006 - 18:33
Hey folks, I've isolated this issue to the XML plugin. I love the XML plugin, but when I have it on, after some amount of time, say 10 min., I notice my processor is chugging and I look at top - and there's java, at the top of the list, consuming like 95%+ cpu. I'm running Sun JDK 1.5 on linux and jEdit pre7.
Maybe it's an option in the plugin manager? Any other linux jEdit users running with the XML plugin?
PS - Did I mention I love jEdit?
Cool macro to share
Submitted by
pieroxy on
Monday, 16 October, 2006 - 20:06
I have this macro I wrote a while ago that "indents" a piece of code (C, Java, Javascript). I like it over the various beautifiers plugins for the following reasons:
1. It keeps the lines as they are, it justs indents them, so that part of the coding style is preserved.
2. The macro will indent just the selection, not all the file, making the change an easy and visible one.
How shall I share the macro so as it is well exposed? It's around 500 lines and I doubt it is worth getting into the default install (how do one macro gets elected to get in the default install?). I'd also like some user feedback on it.
XRefactory and java 1.5
Submitted by
pieroxy on
Monday, 16 October, 2006 - 20:17
I have been happily using the XRefactory plugin for my java browsing for a while (completion of methods, going to definitions of methods, seeing all references to a method / variable) and am frustrated by the lack of Java 1.5 support. I'd like very much to start getting my hands dirty with 1.5's new syntax, but without these 3 features I am not willing to go very far.
Is there plugins doing all these three things that works with Java 1.5 ?
ruby snippets for jedit (ruby_rhtml_snippets.zip v1)
Submitted by
nicolias on
Tuesday, 17 October, 2006 - 00:07
These are the snippets that were at http://synthesis.sbecker.net/articles/2006/03/20/jedit-snippets-for-ruby-on-rails
How come I can't use Python interactively in the console (anymore)?
Submitted by
wildemar on
Tuesday, 17 October, 2006 - 16:46
WinXP SP2, Python 2.4 and 2.5, jEdit 4.3b7, Console 4.2.6.5
It used to be possible with some older version (a while back) but now it doesn't work anymore ...
thx
wildemar
Regular Expressions backreference feature
Submitted by
sjoaquim on
Thursday, 19 October, 2006 - 18:39
Hi,
I've tried to use the standard backreference for regular expressions (\1) in the "Replace with:" field of jEdit's Search and Replace with no success. I also tried to use variations of the common sintax for most regex-oriented languages like Perl or Ruby, which is something like this:
s/<span id=\"([^\"]*)\">/Value is equal to \1/g
But had no success.
Do you know if jEdit implement a different kind of backreference or if it really doesn't implement it at all? If so, wouldn't it be nice to have it?
Thanks!
Plugin install fails: An I/O error occurred (error in opening zip file)
Submitted by
cayhorstmann on
Friday, 20 October, 2006 - 05:08
I just installed 4.3pre7 and tried to install the XML plugin. The plugin files seem to get downloaded, and then I get a sequence of error dialogs "An I/O error occurred (error in opening zip file)". I use JDK6 (build 102) on Ubuntu 6.06 (Dapper).
I tried blowing away ~/.jedit, and the result is still the same.
I would appreciate any hints.
Thanks,
Cay
jedit ftp (sftp) plugin not working with openssh
Submitted by
eero on
Friday, 20 October, 2006 - 06:16
Problem appears with newer openssh version, is there working solution to this problem?
Updated Tcl Edit mode (tcl.xml v2006/10/20 by Jean-François Larvoire)
Submitted by
larvoire on
Friday, 20 October, 2006 - 14:56
Hello,
Here's a much improved Tcl language edit mode, based on the one in the latest source.
Changes:
- Fixed comments detection: Only # at the beginning of Tcl commands are comments!
- Quoted strings can span multiple lines.
- Added recursive in-string substituted command and variable analysis.
- Added numerous missing tcl keywords and variables up to version 8.4.14.
- Removed $ on global variable keywords, as they're often used with $::.
- Added Expect keywords, as KEYWORD2. ("send" was already in tk as KEYWORD2)
- Avoid colouring substituted variables that are homonyms of a keyword.
- Highlight hexadecimal numbers too.
Known limitations:
- Unbalanced quotes or brackets within braces, such as in regular expressions,
will confuse the analysis. Add behind the confusing instruction a ;# comment with
closing quotes and brackets, to trick it into thinking it's balanced again.
Known bugs (Were there before, and I failed to fix them):
- \c escape colouring does not work for escapes embedded in words.
I attemted numerous workarounds using spans and regexps, but they
all seem to fail to detect anything beginning with a \. And using
NO_ESCAPE="TRUE" does not help.
- {} within quoted strings should not affect indentation.
Any hint at how to fix the last two known bugs is welcome!
Trying to get code complete going on jedit 4.3pre7
Submitted by
Rom399 on
Saturday, 21 October, 2006 - 11:32
I've installed
JavaSide kick
Project Viewer
Ant Farm
running java 1.5
When i try and code complete in a class i get the following : error
java.lang.ArrayIndexOutOfBoundsException: -1:104
at org.gjt.sp.jedit.buffer.JEditBuffer.getText(JEditBuffer.java:520)
at sidekick.java.JavaCompletionFinder.getWordAtCursor(JavaCompletionFinder.java:90)
at sidekick.java.JavaCompletionFinder.complete(JavaCompletionFinder.java:51)
at sidekick.java.JavaParser.complete(JavaParser.java:637)
at sidekick.SideKickActions.complete(SideKickActions.java:101)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at bsh.Reflect.invokeMethod(Reflect.java:134)
at bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at bsh.Name.invokeMethod(Name.java:874)
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at bsh.BSHBlock.eval(BSHBlock.java:80)
at bsh.BshMethod.invokeImpl(BshMethod.java:362)
at bsh.BshMethod.invoke(BshMethod.java:258)
at bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:440)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:406)
at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEventKeyStrokeHandling(InputHandler.java:295)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:184)
at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4557)
at java.awt.Component.processEvent(Component.java:5265)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Trying to get code complete going on jedit 4.3pre7
Submitted by
Rom399 on
Saturday, 21 October, 2006 - 11:58
I've installed
JavaSide kick
Project Viewer
Ant Farm
running java 1.5
When i try and code complete in a class i get the following : error
java.lang.ArrayIndexOutOfBoundsException: -1:104
at org.gjt.sp.jedit.buffer.JEditBuffer.getText(JEditBuffer.java:520)
at sidekick.java.JavaCompletionFinder.getWordAtCursor(JavaCompletionFinder.java:90)
at sidekick.java.JavaCompletionFinder.complete(JavaCompletionFinder.java:51)
at sidekick.java.JavaParser.complete(JavaParser.java:637)
at sidekick.SideKickActions.complete(SideKickActions.java:101)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at bsh.Reflect.invokeMethod(Reflect.java:134)
at bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at bsh.Name.invokeMethod(Name.java:874)
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at bsh.BSHBlock.eval(BSHBlock.java:80)
at bsh.BshMethod.invokeImpl(BshMethod.java:362)
at bsh.BshMethod.invoke(BshMethod.java:258)
at bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:440)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:406)
at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEventKeyStrokeHandling(InputHandler.java:295)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:184)
at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4557)
at java.awt.Component.processEvent(Component.java:5265)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
javaIndent.bsh v1.0 by Pierre Grimaud
Submitted by
pieroxy on
Saturday, 21 October, 2006 - 13:53
This macro will ident the selected lines in the current buffer. The identation of the first line will serve as a reference.
Note that the code isn't changed, just some whitespaces added (or removed) at the beginning of each lines.
Line 38 and 67 to 81 you can configure your preferred indentation sizes.