Compile ui files from within Eclipse

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chuck

    Compile ui files from within Eclipse

    Hello,

    I am new to the Eclipse IDE.

    I am using pydev plug-in to create python projects.

    Is there a way to create custom builders to build certain types of
    files?

    I have done this with other IDE's but can't seem to figure it out
    with Eclipse.

    I am trying to build *.ui files of a pydev project to create the
    corresponding py files.

    For example to do this the manual way I would:

    pyuic.exe c:\source.ui > c:\dest.py


    Thanks.

  • Fabio Zadrozny

    #2
    Re: Compile ui files from within Eclipse

    Chuck wrote:
    [color=blue]
    >Hello,
    >
    >I am new to the Eclipse IDE.
    >
    >I am using pydev plug-in to create python projects.
    >
    >Is there a way to create custom builders to build certain types of
    >files?
    >
    >I have done this with other IDE's but can't seem to figure it out
    >with Eclipse.
    >
    >I am trying to build *.ui files of a pydev project to create the
    >correspondin g py files.
    >
    >For example to do this the manual way I would:
    >
    >pyuic.exe c:\source.ui > c:\dest.py
    >
    >
    >Thanks.
    >
    >
    >[/color]
    You can, just create an external tool. (menu: run > external tools >
    external tools). You can also add a keybinding to the last external tool
    launched.

    Cheers,

    Fabio

    --
    Fabio Zadrozny
    ------------------------------------------------------
    Software Developer

    ESSS - Engineering Simulation and Scientific Software
    ESSS: soluções de simulação computacional e suporte especializado para resolver desafios críticos de engenharia das mais diversas indústrias.


    Pydev Extensions


    PyDev - Python Development Enviroment for Eclipse
    pydev.sf.net
    pydev.blogspot. com


    Comment

    • Chuck

      #3
      Re: Compile ui files from within Eclipse

      Well, I tried that but there isnt a way to get the filename without the
      extension.

      For example,
      pyuic -o MyClass.py MyClass.ui

      Using the variables in the external tool config I dont see a way to get
      just the filename in order to create an output filename and pass it
      into the pyoic.

      Comment

      • Chuck

        #4
        Re: Compile ui files from within Eclipse

        I guess I could prompt for input but was hoping to find a better way.

        Comment

        • Fabio Zadrozny

          #5
          Re: Compile ui files from within Eclipse

          Chuck wrote:
          [color=blue]
          >I guess I could prompt for input but was hoping to find a better way.
          >
          >
          >[/color]
          Well, what we usually do here is creating a simple python script (in our
          case build_ui) which receives something that Eclipse can give you (we
          use a folder, so that it builds all the .ui files below that folder --
          recursively), and then we pass that script in the external tool
          (actually as a parameter, as the tool will be python itself). It is not
          only easier within Eclipse, but in the command line too.

          Cheers,

          Fabio

          --
          Fabio Zadrozny
          ------------------------------------------------------
          Software Developer

          ESSS - Engineering Simulation and Scientific Software
          ESSS: soluções de simulação computacional e suporte especializado para resolver desafios críticos de engenharia das mais diversas indústrias.


          Pydev Extensions


          PyDev - Python Development Enviroment for Eclipse
          pydev.sf.net
          pydev.blogspot. com


          Comment

          Working...