Hi,

I've been experimenting with some python/jython scripting the eclipse. I 
tried first the examples with the pyedit files.
My aim was to make mass changes a little easier in eclipse.
With a lot of trial and error I succeeded in implementing some features 
like mass rename of java classes with the refactoring framework and mass 
replaces in text files. I attached the python file, but it is uncommented.

For loading the actions the actions I take another approach than described 
in http://pydev.org/manual_articles_scripting.html :

I changed the startup console settings in the Preferences -> PyDev -> 
Interactive Console to

import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
sys.path.append('D:/workspaces/PluginDevelopment/PyDevTest/src/')
import test1

Then I started a PyDev Console "Jython using VM running Eclipse Console" 
and the script should be executed and you should have a menu "Python 
Scripts" with some entries with key bindings.
In this console I now could do some addtional experiments or just 
reloading the test1.py after changes.
To use the actions just select classes in the navigator view and press the 
key combination. Then you can enter a search replace pattern, eg 
Beer/Water makes all your "alcohohl classes" free of the stuff ;-)

As far as I understand the article mentioned above the scripts with the 
pyedit prefix are only loaded when the pydev editor starts up. 
Is there a possibilty to load a python script at eclipse startup? 
Because now I want to rollout the script to my colleagues and they don't 
have anything to do with jython just programming java.

Best Regards, 
Dirk






-------------------------------------------------------------------------
Deutsche Börse AG
Chairman of the Supervisory Board/
Vorsitzender des Aufsichtsrats:
Dr. Joachim Faber
Executive Board/Vorstand:
Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
Andreas Preuss (Deputy Chief Executive Officer/
stellv. Vorsitzender), Gregor Pottmeyer,
Hauke Stars, Jeffrey Tessler.
Aktiengesellschaft with registered seat in/mit Sitz in
Frankfurt am Main.
Commercial register/Handelsregister: HRB 32232
Local court/Amtsgericht Frankfurt am Main.
-----------------------------------------
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead

Attachment: test1.py
Description: Binary data

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to