Hi,
I develop an eclipse environment for workflow engine:
http://systemincloud.com/. I am integrating python into it, now.
I force a dependency of PyDev for my plugin to reuse as much as possible
what gives already PyDev.

I would like to know if in PyDev there is a code that I can reuse to
analyse a python class.
I already able to find module:

IProject p =
ResourcesPlugin.getWorkspace().getRoot().getProject(EclipseUtil.getProjectNameFromDiagram(getDiagram()));
AdditionalInfoAndIInfo pinfo = FindPythonTask.INSTANCE.find(p, className);

FindPythonTask is based on based on GlobalsTwoPanelElementSelector2. Python
Module looks like this:

from sicpythontask.PythonTaskInfo import PythonTaskInfo
from sicpythontask.PythonTask import PythonTask
from sicpythontask.InputPort import InputPort
from sicpythontask.OutputPort import OutputPort
from sicpythontask.data.Bool import Bool

@PythonTaskInfo
class MyPythonTask(PythonTask):

    def __init_ports__(self):
        self.ttt = InputPort(name="ttt", data_type=Bool)
        self.yyy = OutputPort(name="yyy", data_type=Bool)

    def execute(self, grp):
        """ this will run when all synchronous ports
            from group receive data """

I would like now:
 1. check if there is decorator @PythonTaskInfo and read eventual
attributes.
 2. from method __init_ports__ list all InputPort and OutputPort with their
attributes

Is it possible with PyDev api  to do what I need? Do you do such an analyse
in PyDev? Where can I find any example of code analyse?

To note. For Java analyseI use org.eclipse.jdt.internal.core.NamedMember.

Thanks for any help and hint,

Marek Jagielski
------------------------------------------------------------------------------
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to