Tips and Tricks
The following tips and tricks give some helpful ideas for increasing your productivity.
Editing Source
Content assist |
Content assist provides you with a list of suggested completions for partially entered text. In the e Language editor press Ctrl+Space. |
---|---|
Content assist for enumerated types |
You can use content assist to speed up the access to enum items. Just press Ctrl+Space. |
Content assist for macros |
You can use content assist to speed up the access to macros. Just press Ctrl+Space. |
Code templates |
Code templates are presented in content assist if applicable. To create your own templates, go to the E Language > Editor > Code Templates preference page and press the New button to create a template. For example, a template for the full syntax of the sequence statement will look like: |
Matching brackets |
To find a matching bracket place the cursor after the bracket and press Ctrl+Shift+P or choose Source > Jump To Pair Bracket from the right click menu. You can also double click after the bracket - this selects the text between the two brackets. |
Toggle comment |
You can toggle comment on/off for the current line or the selected lines. Press Ctrl+/ or from the right click menu in editor Source > Toggle Comment. You can choose the Verilog or the VHDL comment style. Right click in the editor and use the switch comment style action. |
Expand/Restore Selection |
Press Shift+Alt+Up Arrow to incrementally expand the current selection. For example when the cursor is on a word, select the word. Press again to select the whole line. Then, each of the nested enclosing scopes is selected, for example the current action block, then the enclosing function, then the enclosing struct and so on. The same principle applies to nested enclosing parentheses, brackets and curly braces, as well as strings. Press Shift+Alt+Down Arrow to restore the previous selection step made with Shift+Alt+Up Arrow. |
Format source |
Use the Format Source action from the editor right click menu Source > Format Source. The whole file is formatted or the current selection, if any. |
One key indentation |
If you press Tab once at the beginning of a line, it is automatically aligned to the enclosing context. Press twice to insert a tab. |
Reminders (TODO markers) |
When you tag a comment in e source code with TODO, a corresponding task is automatically created as a reminder. From the Tasks View, double click on the task takes you to the TODO in the code.Same for for FIXME (higher priority) and XXX (lower priority) markers.You can also add your own tags, see the Reminders (TODO Markers) section of the documentation. |
Check Naming Conventions |
Naming convention violations are presented as warnings in the Problems View. You can show the Problems View from menu Window > Show View > Other > General > Problems. Double clicking on some warning will jump to the source location. |
Spell checking |
You can enable spell-checking support in the e Language editor on the Opens the spelling preference page General > Editors > Text Editors > Spelling preference page. Spelling errors are displayed in the e Language editor and corresponding Quick Fixes are available: There is currently no dictionary included in Eclipse. The required format is just a list of words separated by new lines. Quick Fixes allow you to add new words to the dictionary on-the-fly. |
Folding |
You can fold code sections to improve read-ability. This is how a folded file looks like: Folding actions (to expand or collapse) are available in the toolbar. You may also use the + or - signs on the left side of the editor.
|
Folding custom areas |
You can define custom folding areas using comments to indicate the start and the end of the area: |
Maximize editor |
Double-click on the editor tab to maximize editor to full window. Double-click again to restore. |
Show line numbers |
Check Show line numbers from the Opens the general text editor preference page General > Editors > Text Editors preference page |
Local history |
Whenever you edit a file, its previous contents are kept in the local history. Right click in the editor and choose Compare With/Replace With > Local History… |
Go to line |
Press Ctrl+L shortcut or double click in the status bar to jump to a specific line. |
Back/Forward navigation |
You can navigate between editors in a browser like way using the Back/Forward Navigation Back/Forward Buttons |
Go to last edit location |
Useful when you navigated around in the code, before proceeding with the source change. Click on Last Edit Location button in the toolbar to jump to the file where you were previously editing. |
Local history |
Whenever you edit a file, its previous contents are kept in the local history. Right click in the editor and choose Compare With/Replace With > Local History… |
Inactive code highlight |
The editor marks with a colored background the areas of code that are not compiled due to preprocessing. See the Inactive Code Highlight documentation section. |
Macro expansion |
You can apply preprocessing for a macro called in your code. Place the cursor on the macro, then right click > Macros > Expand All Levels to inspect the expanded macro in a new file. You can also expand/collapse macros inline using Ctrl+Shift+= respectively Ctrl+Shift+- |
Open file in more editors |
To open multiple editors for the same file you should first open the file then right click on the editor’s titlebar and select New Editor |
Split the editor view |
To open multiple editors side by side follow these steps:
|
Column selection |
You can switch to and from column (block) selection mode either by clicking on the Toggle Block Selection Mode button in the toolbar, or by using the Shift+Alt+A shortcut key. |
Searching
Search for method, field, event etc. |
To search for the declaration of a specific type, method, field etc.:
|
Search for references |
To search where a method (or field etc.) is used, hold Ctrl, hover over its name and select Show Usages or right click on its name > Show > Usages or right click on its name > References > Project. The results are presented in the Search View. You can also search for references from the Search Dialog (Ctrl+H). |
See macro instances |
To see where a macro is used click on it and press Shift+F3. The results are presented in the Layers View. |
Search for whole word |
To search for a whole word in all e files, in comments or not:
|
Miscellaneous
All shortcuts |
Press Ctrl+Shift+L to see all shortcuts. |
Project Properties |
Select the project in the Navigator View, right click and choose Properties. Or from menu Project > Properties. |
OVM Compliance Review |
To perform the OVM compliance review of your project click the lint button in the toolbar |
Project Templates |
A project template is a parameterized directory tree. Both in the file contents (.e, ,.sh - practically any file) and in the file or directory names you can use parameters. Combined with TODO markers, you can use a project template as a customized wizard. For more details see the Project Templates chapter in EDT User Guide. |
System Variables |
See: Build Configurations |
Generic launch (make, scripts etc.) |
See: Run Configurations |
Create dialogs for scripts & flows |
You can create Custom Dialogs for your own scripts: |
Open terminal |
You can open a fully working command-line terminal inside of DVT: In the Navigator View right-click on the desired location and select Open Terminal Here |
Load in Specman |
Right click on a file in Navigator (usually top or test) and from menu Run As choose Load in Specman. |
External Builders |
An external builder allows you to invoke any script/tool and back-annotate its output (errors, warnings etc.) to the source code. Practically it allows you to connect any 3d party tool (compiler, linter etc.) to DVT error signaling engines. For more details see External Builders. |
External Documentation |
You can browse and search through 3rd party documentation using the Eclipse help system. For more details see the External Tools > External Documentation chapter in EDT User Guide. |
Context Sensitive Help |
A focused set of help topics that is related to the current context can be shown to users on demand using context-sensitive help. This form of user assistance is delivered to users when a platform-specific trigger is activated (e.g. F1 key on Windows, Ctrl+F1 on GTK, Help key on Carbon). For more details see the Getting Started > Context Sensitive Help chapter in EDT User Guide. |
Mapping Linux to Windows (/proj/ to Z:proj) |
Linux directories can be mapped to Windows drives in order to access them from Windows. For example /home/simi is mapped to Z:. This has an impact on paths configured for a DVT project, for example INCDIRs etc. The paths are set using Linux conventions, however Eclipse runs in Windows and the DVT builder needs to know about the mapping in order to compile the files. To specify the mapping, set the system variable %DVT_CROSSPLATFORM_MAP% before invoking Eclipse. You can add multiple mappings separated by “;” e.g.: /projects/=p:;/home/lars/=Z:lars |
Recover from abnormal inconsistencies |
In the event of a disfunction (missing results in search, types in type browsing, hyperlinks, tooltips etc.), please manually trigger a rebuild . |
Add a new file extension to compile list extensions |
Go to Window > Preferences > General > Content Types, select a category from the list (for example e Source File) then click on Add and then on Ok. |
Share workspace settings |
Export all Workspace/ Eclipse customization:
Note You should restart Eclipse for the changes to be enforced (File > Restart). |
Using System Varibles in Linked Resources |
You can use System Variables in the path of linked resources. For example |
Waive problems reported by DVT |
You can use Compile Waivers to promote, demote or disable the problems reported by DVT. To quickly create a new waiver, in the Problems View right click on any problem reported by DVT and waive it. DVT proposes some default values for the waiver description, path and message. You can easily change them to fine-tune the waiver. To quickly start up a new waivers file click on the Edit waivers button in the Problems View. The .dvt/waivers.xml is created with a default content and opened. You can easily create your own waivers from the default generated ones. In the waivers editor you can use autocomplete for tags, attributes and attribute values. |
Open a file in DVT from the terminal |
You can use the Command Line Interface like this:
The command can be shortened by defining this alias in your ~/.cshrc:
or by defining this function in your ~/.bashrc:
Then the command gets much shorter:
|