On Saturday 12 September 2015 11:16:19 Graeme Geldenhuys wrote:
> Hi Martin,
>
> Is there a set of IDE Interfaces to retrieve information? I would like
> to extend the IDE with the ability to create a unittest units based on
> the current file in the editor. Something like what Delphi IDE allows.
>
> Things I might need (high overview):
>   * Access to the current file being edited
>     - Can I get access to the TStream of the edit buffer
>     - or can I only get the file name, and thus read the
>       file from disk (in this case, what about unsaved changes).

"sourcefo.activepage" returns the currently active "tsourcepage". The 
editbuffer is located in a "trichstringdatalist" and can be accessed 
by "tsourcepage.source".

Suggestion: In order to find a specific function click on mainfo.mainmenu1 and 
check in objectinspector the according "action" or "onexecute" properties of 
the "submenu"s. Doubleclick into "onexecute" jumps to the handler in source 
editor.

>   * Ability to open a newly created file in the editor window.

sourcefo.openfile().

>   * Ability to query Project Options
>     - I would need things like the location of the project file.

Project options are in unit projectoptionsform in variable "projectoptions".

>   * Access to the Main Menu
>     - So I can add new menu items

mainfo.mainmenu1.menu.submenu.[...].insert(). There is also 
tmemuitem.itembynames() in order to find a sub item by name path.

>   * MSEide doesn't use registered File Types or Project Types.
>     - So I assume I simply need to add new files to the template
>       directory

Correct.

>     - Where does "File -> New" get it's items from? From the
>       "Project Options -> Template" entries? If so, this is going
>       to be a tricky one.
>
It is defined in 'Project'-'Options'-'Templates'-'New File'.

> I know, very briefly, about the apps/myide/ example, and that it uses
> the msedesignintf.pas unit. I'll study this in more detail.
>
msedesignintf originally was a replacement for the Kylix 3 design API in order 
to use some components in Kylix and MSEide. It is mostly used by form 
designer and component editors.

Matin

------------------------------------------------------------------------------
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to