Jump to content

Latest version of uniginescript.h (code completion support for uniginescript)


photo

Recommended Posts

Posted

attached is the latest version of this script.

It is a C++ header (a modified version of extern_info.h) that should give you code completion for any C++ editor that implements code completion. Obviously you don't want Unigines interpreter to parse this file. There are several ways of doing this

 

-- some editors allow you to load extra files as includes that need not explicitly be part of your project (I think Eclipse might do this).

-- some editors implement some defines internally, in KDevelop for example you can use #ifdef IN_IDE_PARSER ... #ifdef for code that the editor needs but doesn't run at runtime.

-- if your editor supports neither of these features you can parse extern defines to Unigine at startup by adding the following to your launcher script -extern_define ...

 

There are two files in the archive the plain one should work with any Editor but you need to add -extern_define NOBUILTIN to your unigine launcher script.

The KDevelop one will work for any editor that defines IN_IDE_PARSER. If your editor uses a different define it should be super simple to modify this script to work for you.

 

If you use this script could you write an explanation of how you got it to work with your Editor/IDE. This might be useful for other people

uniginescript.h.zip

  • Like 1
  • 3 years later...
Posted
Hi, 

 

I would like to create like you a file uniginescript.h for the code completion within eclipse. Your file is dated of 09/2011 and I know there is a newest version of 2012 in another post but I would like to have one with the current version of Unigine (2.0 RC).

 

I've already rebuilt Unigine in debug mode with -extern _define EXPORT_EXTERN, so I get a extern_info.h file but I'would like to modify this file to get another like yours, could you please describe the process to achieve this ? 

 

Thanks

Posted

Hi Philippe,

 

Probably, you are looking for something like that:

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted
Hi Silent, 

 

Thanks for the advice but I think it's not sufficient for me, I've followed the steps 1. and 2. :

 

I've generated extern_info.h succesfully and have modified it to get extern.h with the python script but I haven't the same result in IDE code completion like with the danny.coy uniginescript.h file : 

- I have style * pointer c++ style in the methods parameters, so I get "Invalid argument" syntax errors in eclipse IDE.

- I have not the engine.* methods in the code completion.

 

In the uniginescript.h file of danny.coy, the parameters are like in the unigine documentation (without const and *)  and I get all engine.* methods, that why I'm interested in this modifications particularly, it offers more comfort for the script editing.

 

For information, here is my current files :

extern.h

extern_info.h

×
×
  • Create New...