 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Marco Leise Guest
|
Posted: Sun Feb 25, 2007 1:49 am Post subject: dialog based 'Live Template Editor', where to start? |
|
|
Hi, I am implementing my own editor for BDS 2006 templates that currently
resides in the help menu. The OTA might offer something more professional,
but I have no idea how far I can go.
What I would like to have is something like the form editor where I can
switch between the existing code view and my dialog by pressing F12.
Is IOTAModuleCreator the way to go? It seems to be more suited for forms,
frames and modules than for templates in XML format.
If you think this is entirely impossible, then what would be the next best
solution? An entry in the right-click-menu for XML files?
Thanks!
Marco
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/ |
|
| Back to top |
|
 |
Erik Berry Guest
|
Posted: Mon Feb 26, 2007 8:25 am Post subject: Re: dialog based 'Live Template Editor', where to start? |
|
|
Marco Leise wrote:
| Quote: | What I would like to have is something like the form editor where I can
switch between the existing code view and my dialog by pressing F12.
|
The ToolsAPI does not expose support to add new types of text file editors
or things like a form designer, or the history view. What you can do is
create a normal TForm, add your own components/editors to it, handle
keystrokes pressed on it, etc. This won't integrate into the main source
editor and designer window, but it gives you the same flexibility you'd have
if you implemented your tool as a standalone application.
| Quote: | Is IOTAModuleCreator the way to go? It seems to be more suited for
forms, frames and modules than for templates in XML format.
|
A module creator can only create new modules like those already editable in
the IDE, so it isn't really a way to add new features to the IDE (just new
files for a project, etc.).
Erik |
|
| Back to top |
|
 |
Marco Leise Guest
|
Posted: Mon Feb 26, 2007 4:27 pm Post subject: Re: dialog based 'Live Template Editor', where to start? |
|
|
Thank you Erik, that cleared up a lot. The OTA exists to enable others to
take influence on existing features, not to add something completely new.
I have now hacked a new menu item into the 'EditorLocalMenu', that becomes
visible when a code template is edited. I think I'll keep it like that.
(The editor popup-menu contains the item 'Live Template Editor...' that
shows a modal form with the editor content split up into several lists and
edit fields.)
Best regards,
Marco |
|
| Back to top |
|
 |
Michael Harris Guest
|
Posted: Tue Feb 27, 2007 2:44 am Post subject: Re: dialog based 'Live Template Editor', where to start? |
|
|
I would never argue with Erick.. However, I recall making some project
creators that made some additional files.
It takes a little expeiramenting. But if you create the interface class all
the way back to _di_IOTAFile as in NewImplSource NewIntfSource, the wizard
can supply about anything.
--
Michael
"Marco Leise" <Marco.Leise (AT) gmx (DOT) de> wrote in message
news:op.tocp0qpk9y6py2@marco-laptop...
| Quote: | Thank you Erik, that cleared up a lot. The OTA exists to enable others to
take influence on existing features, not to add something completely new.
I have now hacked a new menu item into the 'EditorLocalMenu', that becomes
visible when a code template is edited. I think I'll keep it like that.
(The editor popup-menu contains the item 'Live Template Editor...' that
shows a modal form with the editor content split up into several lists and
edit fields.)
Best regards,
Marco |
|
|
| Back to top |
|
 |
Michael Harris Guest
|
Posted: Tue Feb 27, 2007 6:50 am Post subject: Re: dialog based 'Live Template Editor', where to start? |
|
|
I misunderstood what is intended by 'live-templates'
--<g>
"Michael Harris" <techonos-NO-SPAM-@attbi.com> wrote in message
news:45e34681$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I would never argue with Erick.. However, I recall making some project
creators that made some additional files.
It takes a little expeiramenting. But if you create the interface class
all the way back to _di_IOTAFile as in NewImplSource NewIntfSource, the
wizard can supply about anything.
--
Michael
|
|
|
| Back to top |
|
 |
Erik Berry Guest
|
Posted: Tue Feb 27, 2007 7:22 am Post subject: Re: dialog based 'Live Template Editor', where to start? |
|
|
Marco Leise wrote:
| Quote: | Thank you Erik, that cleared up a lot. The OTA exists to enable others
to take influence on existing features, not to add something completely
new.
|
I think we're misunderstanding each other slightly. See my reply below for
some clarification on what the restrictions are. If you plan on publishing
your template editor, please post a note here once it is complete, or post a
screenshot to .attachments. I agree the built-in IDE UI for editing
templates is lacking (and is made worse by the fact that the official
documentation also has incorrect and missing details).
Michael Harris wrote:
| Quote: | I would never argue with Erick.. However, I recall making some project
creators that made some additional files.
It takes a little expeiramenting. But if you create the interface class all
the way back to _di_IOTAFile as in NewImplSource NewIntfSource, the wizard
can supply about anything.
|
You are right that you can create almost any type of text file using a
module creator and then allow editing that file using the built-in text
editor. The problem is that there isn't official OTA support for
integrating completely new sub-tabs into the main editor window like a new
form designer (or template designer), history view, etc. So, you can
instead either create either a new standard floating TForm/dialog, or create
a dockable form, similar to the object inspector, but not anything that
docks as an editor tab or editor sub-tab.
Marco's solution of adding an editor context menu item or a main menu item
to show the template editor based on the current editor's template text is a
reasonable one. You could also register for a shortcut with the IDE, and
show your form in response to that shortcut, if that is more comfortable
than using a menu item.
Erik |
|
| Back to top |
|
 |
TOndrej Guest
|
Posted: Fri Mar 09, 2007 2:07 am Post subject: Re: dialog based 'Live Template Editor', where to start? |
|
|
Erik Berry wrote:
[snip]
| Quote: | The problem is that there isn't official OTA support for
integrating completely new sub-tabs into the main editor window like a
new form designer (or template designer), history view, etc. So, you
can instead either create either a new standard floating TForm/dialog,
or create a dockable form, similar to the object inspector, but not
anything that docks as an editor tab or editor sub-tab.
|
Hi Eric,
I'm not sure if I understand you correctly. Do you mean this by subtabs?
http://tondrej.blogspot.com/2006/04/subversion-editor-view.html
In case you do I think you're right it's not officially exposed in the
OTA but in my experience it's usable.
The full source code is available on SourceForge:
http://sourceforge.net/projects/delphisvn/
TOndrej |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|