<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [mapguide-dev] Reverse engineering "prototype" from PHP extension?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2>Hi Jason,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2>VS intellisense works by looking at the generated .cs
files. It would be a fair bit of work to get VS intellisense working
because it would involve changes to both IMake and Swig. I assume Java
would be the same. PHP might actually be easier because we do
not generate language specific code for php - it's all in C. And from what
I have seen so far, most of the "intellisense" capability for PHP editors comes
from custom files. Custom file generation could be done directly from
IMake without Swig involvement.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2>It should be fairly straightforward to plug into IMake's
parsing code to generate a custom file for an editor.
processExternalApiSection in imake.cpp is called for all PUBLISHED_API and
EXTERNAL_API methods. The custom file hooks could be added to this
routine. So I suspect support for PHP editors would just be a few
days but support for .Net and Java would be longer due to Swig
interdependency.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2>Trevor</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=541153515-04122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Jason Birch
[mailto:Jason.Birch@nanaimo.ca] <BR><B>Sent:</B> Saturday, December 02, 2006
1:49 PM<BR><B>To:</B> dev@mapguide.osgeo.org<BR><B>Subject:</B> RE:
[mapguide-dev] Reverse engineering "prototype" from PHP
extension?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText72681 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Yes, a generic approach would
likely be best, so we could support things like the Java IDEs too, but I
have no idea what that would look like. As long as it was something that I
could convert to PHP with some regex search/replace I'd be happy. For VS,
do you need to add something specific to the .dlls for Intellisense to be picked
up? Inline documentation?</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Do you have any idea of what kind of effort
would be required to extend the current use of IMake to support this?
MapGuide is a pretty large API for most hackers, and it would be great if we
could make it easier to use.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Jason</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Trevor Wekel<BR><B>Sent:</B> Wed
2006-11-29 9:49 AM<BR><B>To:</B> dev@mapguide.osgeo.org<BR><B>Subject:</B> RE:
[mapguide-dev] Reverse engineering "prototype" from PHP
extension?<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hi Jason,<BR><BR>The IMake utility in BuildTools/WebTools/Imake
is the front end<BR>processor for generating our exported API. It reads
the C++ headers and<BR>generates Swig input files. With some extra coding,
it should be<BR>possible to generate the prototype file as part of the standard
build<BR>mechanism. Zend Studio also has "intellisense" capabilities and
it also<BR>requires some sort of input file. It might be worthwhile to
extend<BR>IMake in a more generic fashion so that other developers can add
support<BR>for their favourite
environment.<BR><BR>Thanks,<BR>Trevor<BR></FONT></P></DIV></BODY></HTML>