Davor's PHP Constructor - User Documentation

Code Editor

Code editor is a window where you edit files. Davor's PHP Constructor's editor is fast Syntax-Highlighting editor with features like undo, search, completion-proposal, function parameter hints, autocomplete and PHP-variable and Code Templates insertion.

Editor supports both Windows and UNIX file formats. File format is automaticaly recognized when a file is loaded. To change file format manually, select "File/Format" in main menu and set appropriate format. File format is displayed in editor's status bar.

You can open unlimited number of editor windows and every editor window supports editing of unlimited number of files. Windows get marks "ew0-nnn". Each file is edited in separate editor page. To switch between files, click on file's tab, or a page-selection button. You can also siwtch through pages by right-clicking tabs and selectiong "Pages" menu. Page menu shows all filenames with paths and helps selecting files with same names but on different locations.

If not disabled in System Options, editor contains a toolbar with buttons that accomplish most of possible actions. All actions are also invokable from a context popup-menu which you access by right-clicking in editor. To access page operations, right click any of editor tabs.

Status bar displays information about cursor location; it also shows whether a file has been modified (file's tab title also gets RED colour), its format and full file name including path.

When you close editor window, you will be asked to save any changed files in that window.

For more information on code editor, see:

Special Keyboard Shortcuts

Davor's PHP Constructor supports all standard Windows editing keystrokes.
Here is a list of some special keystrokes:

OperationKey Combination
SearchCtrl+F
Search Current Word UpShift+Ctrl+Up
Search Current Word DownShift+Ctrl+Down
Search As You TypeShift+F3
ReplaceCtrl+R
Search/Replace AgainF3
Set Marker 0-9Ctrl+0-9
GoTo Marker 0-9Shift+Ctrl+0-9
UndoAlt+BackSpace
RedoShift+Alt+BackSpace
CopyCtrl+C
CutCtrl+X
PasteCtrl+V
Delete Last WordCtrl+BackSpace
Select AllCtrl+A
Block IndentShift+Ctrl+I
Block UnindentShift+Ctrl+U
Delete WordCtrl+T
Delete LineCtrl+Y
Delete to End of LineShift+Ctrl+Y
Match BracketShift+Ctrl+B
Go to Line NumberCtrl+G
Normal SelectShift+Ctrl+N
Line SelectShift+Ctrl+L
Column SelectShift+Ctrl+C
Change Word to UpperCaseCtrl+Alt+U
Change Word to LowerCaseCtrl+Alt+L
Toggle CaseCtrl+Alt+T
Save FileCtrl+S
Invoke Code ExplorerCtrl+E
Invoke Completion ProposalCtrl+Space
Invoke Parameter Hints in FunctionsCtrl+Shift+Space
Invoke AutocompleteShift+Space
Invoke Code Template InsertAlt+C
Find Function DeclarationCtrl+Click
Preview Active FileCtrl+F9
Run ProjectF9
Check PHP SyntaxCtrl+F5
Interpret PHP ScriptF5



Choosing Syntax Highlighting Method

Although appropriate syntax highlighting method is chosen for currently edited file according to it's type, you can change it manually from drop-down list in editor toolbar.

For more information on syntax highlihting options, see System Options.

Handling PHP Variables

This functionality is valid only for PHP scripts.

When specific option is set in System Options, if you press '$' key while editing PHP file, a "PHP Variables" dialogue will appear displaying all variables found in edited file. In this dialogue you can type in variable name (without '$') or select it in a list and press "Insert" to insert it into edited file.

This option is useful to save time needed for writing long variable names. It also treats class properties and methods properly.

Locating Functions and Classes

To locate a function or class definition while editing PHP script, click the editor with right mouse button (or editor toolbar "Functions" or "Classes" buttons), select "Functions" or "Classes"; in a list, double-click function or class to locate in source code.

The same action you can invoke using appropriate buttons on editor toolbar (if visible).

Special action is invokable if you hold down CTRL key, and click function in the editor (you can also select "Find Declaration" from a popup menu); the editor will search current file and all included files trying to find where the function is declared. If successful, IDE will display the file with declaration and position at the beginning of function declaration.

If you do not need (or are not able) to include files (possibly containing referenced functions declarations) in the script (eq. the file is already included in upper level script), you can add commented include statement to tell the editor where function definitions can be found. Example:
// include "xyz.php"

Do not forget to add extra space between comment (//) mark and "include" keyword! This will force the editor to search for function defintions in file "xyz" although it will not be actually included in the script. Such fake inclusion will also help with dynamic file names, like
include $path."/somefile.php"; // include "./somefile.php"

Thanks to added comment, the editor will know where to search for included file during edit session and read eventual function definitions from it.

Using Code Explorer

To explore current file with Code Explorer, click a button on the toolbar, or press Ctrl+E. Also accessible via editor popup-menu (right mouse button). For more information about Code Explorer, see Code Explorer.

Using WYSIWYG HTML Editor

To edit active file in visual HTML editor, click a button on editor's toolbar, or select "Edit HTML in Page Editor" from editor's pop-up menu. If you select only a part of file, that part will be copied into Page Editor, and after editor closes, saved back to a file. When no selection is active, complete file will be sent to Page Editor.

Warning: although Page Editor tries to keep scripts and other non-HTML parts of file unchanged, some special scripts and/or file portions unrecognizable to basic HTML standards could be improperly handled by Page Editor. It is recomended to use Page Editor to edit only clean HTML files.

For more information about WYSIWYG HTML Editor, see Page Editor.

Previewing Files

To preview a single file, while opened, choose "Run/Preview Current File" in main menu, or press Ctrl+F9. The file will be saved before preview. Preview happens in browser which is specified in System Options. See System Options for details on setting up single file preview options.