Skip to main content

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
------------------------------

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
------------------------------
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
------------------------------
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
------------------------------

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
------------------------------

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
------------------------------
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
------------------------------
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
------------------------------

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
------------------------------

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
------------------------------
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
------------------------------
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
------------------------------

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
------------------------------