On Fri, Mar 22, 2013 at 11:53 PM, Fran Boon <francisboon@gmail.com> wrote:
On 23 March 2013 02:20, Fabio Zadrozny <fabioz@esss.com.br> wrote:
> Not sure how hard, but it's definitely not trivial. As it's one of the
> things that slows down the editor startup, I was considering taking a look
> at it as a part of the funding at http://igg.me/at/liclipse, but it'll
> depend if the funding succeeds.

ok, I'm now a PyDev Knight ;)

Thank you :)
 

Is the only way to launch scripts the OfflineAction, or can we create
menu entries/toolbar buttons?

I must say I've always created it in the plugin, so I'm not sure... googling a bit for "eclipse create menu programatically" brought me: http://www.wickedshell.net/blog/?p=48 may be what you want...
 

Is there a wiki page to share snippets?

Not really... usually I get patches for those, but if you have something that can't be added to the core I can put something up to point to a github with the code.
 
What are people doing with scripting?

Well, most of the patches related to scripting I receive are usually for doing some special text manipulation (such as the ctrl+2, w which word-wraps a paragraph)
 

I just created a script to stop the active debugger, then clean my app
(database, sessions, etc) & then restart the debugger.

Generic part:
from org.eclipse.debug.core import DebugPlugin, ILaunchManager
singleton = DebugPlugin.getDefault()
launchManager = singleton.getLaunchManager()
launches = launchManager.getLaunches()
if len(launches):
    launchConfig = launches[0].getLaunchConfiguration()
    print "Stopping Debug"
    launchManager.removeLaunches(launches)
else:
    launchConfig = None

# (clean app happens in here, but not included)

if launchConfig:
    print "Starting Debug"
    launch = launchConfig.launch(ILaunchManager.DEBUG_MODE, None)
    launchManager.addLaunch(launch)


Changes to the script only seem to take effect when I restart Eclipse
(4.2.2) - the docs suggested that no restart was required?

Hummm... if you're dealing with multiple files, the restart may be required (as it'll only reload the main script), but if you're dealing with a single script, it really should be reloaded... (I'd have to see the whole script as it may be something in the way it's structured).
 

Cheers,

Fabio



Thanks,
Fran.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code