On Code Generation

hello software developers…

I have the following situation: I built a diagram of classes of design and Code Generation in PHP language. I begin to deploy as part of the product, I have to add a new function to a class X that this genre implemented and when the class X me rewrites the code and everything implemented. Does not perform an update of the code. I do not have a SDE for PHP as the proposed site of Visual Paradigm.

¿How can I update the code-free complete as it does with Java for example, without having SDE for Eclipse or Netbeans?

do not have this feature, which version you have and only then enter the tool and will have more exist

Hi Maikol,

Thanks for your post. I’m sorry that currently we do not support PHP round-trip engineering.
At the moment we support reverse existing PHP code to class diagram via Instant Reverse, and generate PHP code via Instant Generator. You can find details of Instant Reverse/Generator from the following links:
http://www.visual-paradigm.com/product/vpuml/demos/reversecode/instantreverse.jsp
http://www.visual-paradigm.com/product/vpuml/demos/generatecode/instantgenerate.jsp
*Please be reminded that Instant Reverse/Generator is one-off engineering that will overwrite all existing models/code every time you run it.

If there is any inquiry, please feel free to ask.

Best regards,
Lilian Wong

Hi,

Is there a way to do recursive call in the code generation or to create function?

I like to know if a derivated class inherite from a specific class. It is quite easy when the class is directly inheriting like in the code below:

  
## Var definition
#set ($sinheritence = 0)

#foreach( $clsImportClass in $class.generalizationArray())
	#set( $obj = $clsImportClass.getFromElement()  )		
	#if ($obj.getName() == "A")
	   #set ($inheritence = 1)			
	#end
#end

However, if the class is not directly inheriting, I could not point a a proper method to obtain my information.

For example
Class inheritence
E --> D --> C --> B --> A

Is there a way to know that E inherited from A?

Hi Happycujo,

Thanks for your post. I’ve forwarded the details to our engineers to follow-up. If there is any feedback, I’ll come back to you immediately.
By the mean time, please do not hesitate to contact me if you have any inquiry.

Best regards,
Lilian Wong

Thanks, I willl be waiting for the answers.

Additionally, while i am getting deeper in code generation, I have addtional quetions that I would like to submit to your engineer. (See Below)

  1. Is there any addtional documentation for the API? There is quite a bit a function used that a could not fund definition. I am thinking about the $utility object and the t_ prefixed function. Is the doucmentation available? It would be great to have a list of all the global object that we can use.

  2. I would need to know the list of all the class exported without regards of the package. Can this be done?

Thanks again!

Hi Happycujo,

Sorry for my late response. For your questions:

  1. Currently there is no documentation for API, I’m sorry about this.
    And “t_ prefixed” is not preferred to be used since operations will be added/modified/moved without any notification.

  2. I’m sorry I’s not sure about your meaning of “exported”, could you please tell me more details?

And I would like to let you know that we enhanced support recursive call in code generation (Instant Generator), you can find the latest patch, API and the sample code below.

Patch
http://files2.visual-paradigm.com/200812/Patch/20081209d/VP_Suite_Windows_3_4_20081209d.exe

API
Utilities.getAllLevelSuperClasses( Class , IncludeGeneralization, IncludeRealization ) : Class[]

Sample Code
$utilities.getAllLevelSuperClasses($class, true, false)

Hope these help. Look forward to your reply.

Best regards,
Lilian Wong

[quote=LilianWong]Hi Maikol,

Thanks for your post. I’m sorry that currently we do not support PHP round-trip engineering.
At the moment we support reverse existing PHP code to class diagram via Instant Reverse, and generate PHP code via Instant Generator. You can find details of Instant Reverse/Generator from the following links:
http://www.visual-paradigm.com/product/vpuml/demos/reversecode/instantreverse.jsp
http://www.visual-paradigm.com/product/vpuml/demos/generatecode/instantgenerate.jsp
*Please be reminded that Instant Reverse/Generator is one-off engineering that will overwrite all existing models/code every time you run it.

If there is any inquiry, please feel free to ask.

Best regards,
Lilian Wong[/quote]
Such a very amazing link!
Thanks you for the post.