Re: How to best implement action for a large number of different context types?

2018-09-03 Thread Boris Heithecker
See the ret.setEnabled(uri != null); line in may above suggestion. It should disable the action dynamically (assuming that uri == null if none is found). What you feel is a pity (not being able to declare constructors for different context object) may be deliberate for performance reasons. The acti

Re: How to best implement action for a large number of different context types?

2018-09-03 Thread Andreas Sewe
Boris Heithecker wrote: > In your ContextAwareAction, you could use a delegate to your > ActionListener. Something like:  > >        //Create an instance of your ActionListener, pass the URI >         MyActionListenerImpl al = new MyActionListenerImpl(uri); >        //Return a simple delegate >  

Re: How to best implement action for a large number of different context types?

2018-09-03 Thread Boris Heithecker
In your ContextAwareAction, you could use a delegate to your ActionListener. Something like: //Create an instance of your ActionListener, pass the URI MyActionListenerImpl al = new MyActionListenerImpl(uri); //Return a simple delegate AbstractAction ret = new Abstrac

Re: How to best implement action for a large number of different context types?

2018-09-03 Thread Andreas Sewe
Hi Boris. Andreas Sewe wrote: > Boris Heithecker wrote: >> I think you'll have to implement an action (extending Action or >> AbstractAction, not ActionListener) that implements >> "org.openide.util.ContextAwareAction".  >> Its business method is expected to create a proxy action for the context >

netbeans.org transition at Apache NetBeans Virtual Meetup

2018-09-03 Thread Geertjan Wielenga
Hi all, According to our poll... https://doodle.com/poll/xueimbynzam7sri7 ...we have a Apache NetBeans Virtual Meetup coming up tomorrow, i.e., Tuesday 12:00 CEST. That time is quite difficult for our US friends -- and also the main topic to be discussed right now is the transition of netbeans.