jEdit Community - Resources for users of the jEdit Text Editor
how to get a menupoint
Submitted by BennX on Saturday, 29 October, 2011 - 17:45
good evening community,
I am not sure if i am right in Plugin Development because i didnt write it as plugin!

i am acutally writing a small improvement for our University.(It already works but i want to make it better)

I just got a problem to get a menu entry.
okay here how it works.
I wrote a thread thats simply started in the mainmethod like every other thing.
At the momment it starts a JOptionPane where you need to put a int in to use the feature i wrote.

Now i just want a menu entry where i can klick to open my JOptionPane to use(to start the thread) the feature if i need it. It just dont look nice if it always pop up at the beginning. Maybe under Help or such.

I didnt find how to do it otherwise i wouldnt ask here in Forum.

Thanks alot for your help!

Best Regards
BennX
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
properties
by Robert Schwenn on Sun, 30/10/2011 - 10:40
Hi,
menus are defined in properties. Take a look into "jedit.jar:\org\gjt\sp\jedit\jedit_gui.props", at the whole fold "Menu bar". Property "view.mbar" defines the main menu bar. For each menu item You find a property with same name to define the sub menu. If You can't find a property for an item, then this is finally the name of an *action* or macro to perform.

You can change this menu definition property by overriding it in Your personal ~/properties file or in a separate *.props file which You place into the properties folder of jedit program directory. Of course You can change jedit_gui.props itself.

Actions are defined in "jedit.jar:\org\gjt\sp\jedit\actions.xml". I guess that additional actions can be defined only in this file. Every plugin comes with it's own actions.xml.

BTW, since You don't want to write a plugin, maybe a macro does the trick too.

Also, these parts of User's Guide may be helpful:
Part IV. Writing Plugins
Part III. Writing Macros

Robert
 
Thank you so much. I didnt fi
by BennX on Sun, 30/10/2011 - 11:43
Thank you so much. I didnt find it myself. But now it works great and really looks nice.

Best Regards
Benjamin
 
Thanks alot Robert, let me s
by BennX on Sun, 30/10/2011 - 11:14
Thanks alot Robert,
let me see if i can handle it like that.
If i need some more Help ill replay again.

Best Regards
Benjamin
User login
Browse archives
« September 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   97301
Context Free Art (*.cfdg)   0.31   46061
BBEdit scheme   1.0   18600
JBuilder scheme   .001   18501
ColdFusion scheme   1.0   18030
R Edit Mode - extensive version   0.1   17480
Advanced HTML edit mode   1.0   16212
Matlab Edit Mode   1.0   16074
jEdit XP icons   1.0   15235
XP icons for jEdit   1.1   14299