Uniface User Forum

 View Only
  • 1.  Automatically refresh a component opened in the IDE after an $ude import

    Posted 07-25-2022 07:42

    Hello, 

    I would like to automate the import of xml from a project via a script.

    For that I use a "$ude('import', ...)" and this import works well.

    However, when a component is already open in the ide where I want to import it, the refresh is not done, so I have to click on the refresh button on the top left of the IDE.

    I would like to be able to launch this refresh automatically.

    Do you know what code is hidden behind this button?

    Have a nice day,

    Maxime



    ------------------------------
    Maxime CHAZALVIEL
    Rocket Forum Shared Account
    ------------------------------


  • 2.  RE: Automatically refresh a component opened in the IDE after an $ude import

    ROCKETEER
    Posted 07-25-2022 08:11
    You can refresh a single or all open editors using the corresponding IDE API Operation refreshEditor or refreshAllEditors.

    I hope this helps.


    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------



  • 3.  RE: Automatically refresh a component opened in the IDE after an $ude import

    Posted 07-26-2022 04:32

    Thanks Daniel, I think this is really the thing for me!

    However, I can't get it to work...

    The script returns a $status = -1, but an error = 0.

    Is there any special configuration to use this API?



    ------------------------------
    Maxime CHAZALVIEL
    Rocket Forum Shared Account
    ------------------------------



  • 4.  RE: Automatically refresh a component opened in the IDE after an $ude import

    ROCKETEER
    Posted 07-26-2022 05:37
    This API will only work when called from the IDE. I guess you are trying to call this outside the IDE? Also, this API will only influence the editors that are open in the current IDE (where the API is called).

    I hope this clarifies this matter.

    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------



  • 5.  RE: Automatically refresh a component opened in the IDE after an $ude import

    Posted 07-26-2022 05:52

    Indeed, 
    I call a .bat that points to the dev environment corresponding to my IDE to import and compile via $ude.

    Is it not possible, if it is open, to get the instance of my IDE in order to use this API to do the refresh?

     



    ------------------------------
    Maxime CHAZALVIEL
    Rocket Forum Shared Account
    ------------------------------



  • 6.  RE: Automatically refresh a component opened in the IDE after an $ude import

    ROCKETEER
    Posted 07-26-2022 09:42
    Is there any particular reason why you call the import from a batch? You also could do this directly in the IDE, I guess. For this you simply can create a user-defined menu option for the IDE that calls the component that does the import. For details see (e.g.):
    I hope this helps.

    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------



  • 7.  RE: Automatically refresh a component opened in the IDE after an $ude import

    Posted 07-27-2022 04:09

    Yes, 
    I use the WAS listener to export xmls from a project to git (for many reasons of tracking and code quality).

    When a developer updates his local version via Git, Git starts importing and automatically compiling the xmls into uniface by running a .bat which calls a component of the dev environment that his local IDE points to.

    And I'd like it if his local IDE is open that IDE can be refreshed automatically, to avoid code conflicts. 



    ------------------------------
    Maxime CHAZALVIEL
    Rocket Forum Shared Account
    ------------------------------