[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-users
Subject:    [ jEdit-users ] Jalopy Plugin.
From:       Anthony Roy <home () ant-roy ! co ! uk>
Date:       2003-06-24 11:15:30
[Download RAW message or body]

I have finally gotten around to looking at the code to the Jalopy 
plugin, as I have found it has not worked for me for the last couple 
of releases. The offending code I have hacked to make work as follows 
(de.hunsicker.jalopy.plugin.jedit.JEditPlugin.java in the inner class: 
PluginImpl):

  public void formatActive() {

       // only perform the action if the format menu item is enabled
       // XXX maybe this check will become obsolete one day, if JEdit
       // makes better use of the Java Action framework
//            if (_formatItem.isEnabled())
//            {
       performAction(ACTION_ACTIVE);

//            }
     }

For some reason _formatItem is returning null. Of course this hack is 
just a temporary measure, as it will try to format non-Java files.

Haven't the time to investigate fully at the moment, but it seems that 
the enabled status of the first menu item is being used to decide 
whether the action can be performed. It would make sense for a boolean 
variable to be set for this purpose within the JEditPlugin class 
rather than relying on the GUI status, and the enabled status set from 
that. Either that or build the menu from individual menu entries that 
could later be referred to explicitly rather than from the assumed 
position in the menu.

Cheers,

-- 
Anthony.

e: home@ant-roy.co.uk
w: http://www.ant-roy.co.uk




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
-- 
-----------------------------------------------
jEdit Users' List
jEdit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic