1. Trang chủ
  2. » Luận Văn - Báo Cáo

DVT e Language IDE User Guide

396 217 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề DVT e Language IDE User Guide
Trường học AMIQ EDA s.r.l.
Thể loại Hướng dẫn sử dụng
Năm xuất bản 2014
Định dạng
Số trang 396
Dung lượng 10,46 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Opening a Predefined Project To open a predefined project use the Predefined Project Wizard by selecting File > New > DVT Predefined Project.. You can also open the wizard from the DVT P

Trang 1

DVT e Language IDE User Guide

Rev 3.5.14

24 June 2014

Technical Support: support@amiq.com

Trang 2

Copyright (C) 2005-2014 AMIQ EDA s.r.l (AMIQ) All rights reserved.

License: This product is licensed under the AMIQ's End User License Agreement

(EULA)

Trademarks: The trademarks, logos and service marks contained in this document are

the property of AMIQ or other third parties DVT™, eDT™, VlogDT™, VhdlDT™Verissimo™ are trademarks of AMIQ Eclipse™ and Eclipse Ready™ are trademarks

of Eclipse Foundation, Inc All other trademarks are the property of their respectiveholders

Restricted Permission: This publication is protected by copyright law AMIQ grants

permission to print hard copy of this publication subject to the following conditions:1.The publication may not be modified in any way

2 Any authorized copy of the publication or portion thereof must include all originalcopyright, trademark, and other proprietary notices and this permission statement

Disclaimer: This publication is for information and instruction purposes AMIQ

reserves the right to make changes in specifications and other information contained inthis publication without prior notice The information in this publication is provided as

is and does not represent a commitment on the part of AMIQ AMIQ does not make,and expressly disclaims, any representations or warranties as to the completeness,accuracy, or usefulness of the information contained in this document The terms andconditions governing the sale and licensing of AMIQ products are set forth in writtenagreements between AMIQ and its customers No representation or other affirmation

or fact contained in this publication shall be deemed to be a warranty or give rise to anyliability of AMIQ whatsoever

Trang 3

DVT e Language IDE www.dvteclipse.com

Table of Contents

1 Installation Checklist 1

2 Predefined Projects 5

3 Getting Started 9

3.1 What is a Workspace 9

3.2 What is a Project 9

3.3 Project Natures 10

3.4 Workspace and Workbench 11

3.5 Refresh 12

3.6 Linked Resources 13

3.7 Backup and Local History 14

3.8 Basic Tutorial 15

3.8.1 Switch to the DVT Perspective 15

3.8.2 Open a Project 17

3.8.3 Configure the Build 18

3.8.4 Build the Project 19

3.8.5 Inspect the Compilation Errors 19

3.8.6 See Comments in Tooltips 21

3.8.7 Use Hyperlinks to Move Around in the Code 22

3.8.8 Quickly Open a Type (Struct, Unit) 22

3.8.9 Quickly Open a File 23

3.8.10 Quickly Move Inside the Editor 25

3.8.11 Browse Through All the Available Types (Structs, Units, Enumerations) 27

3.8.12 Browse the AOP Extensions 28

3.8.13 Inspect the Struct Hierarchy and Struct Members 29

3.8.14 Inspect the Verification Hierarchy 31

3.8.15 Search for Entities 31

3.8.16 Use Content Assist (Autocomplete) 32

3.8.17 Use Code Templates 34

3.8.18 Track Tasks using TODO Markers 35

3.8.19 Format the Source Code 36

3.8.20 Check Naming Conventions 36

3.8.21 Quickly See the Current Scope in the Status Bar 38

3.8.22 Locate the Matching Bracket 38

3.8.23 Fold Code Regions in Order to Improve Readability 39

3.8.24 Load in Specman 39

4 Build Configurations 41

4.1 default.build 41

4.2 Multiple build Files 42

4.3 Compatibility Modes 43

4.3.1 Default DVT Compatibility Mode 45

4.3.2 vcs.vlogan Compatibility Mode 47

4.3.3 vcs.vhdlan Compatibility Mode 48

4.3.4 ius.irun Compatibility Mode 48

4.4 Paths 52

4.5 Strings 52

Trang 4

DVT e Language IDE www.dvteclipse.com

4.6 Comments 52

4.7 Environment Variables 53

4.8 Including Other Argument Files 54

4.9 Build Persistence 54

4.10 DVT Auto-Linked 56

4.11 Run a Script Before Build 57

4.12 All Build Directives 58

4.13 e Language Test Files 67

4.14 e Language SPECMAN_PATH 67

4.15 SystemVerilog OVM or UVM Library Compilation 68

5 Compile Checks 70

5.1 Compile Waivers 70

5.2 Semantic Checks 72

6 Content Assist (Autocomplete) 75

6.1 Content assist for CamelCase and Underscore 76

6.2 Code Templates 77

7 Content Filters 78

7.1 Content Filters XML syntax 78

7.2 Content Filters Examples 81

7.3 Predefined Content Filters 82

8 Code Templates 91

8.1 Code Templates in Autocomplete 91

8.2 Global Code Templates 92

8.3 Project Level Code Templates 92

8.4 Code Templates View 93

9 File Templates 96

10 Project Templates 97

10.1 What is a project template? 97

10.2 How to generate code from a project template 98

10.2.1 Step 1 Specify Directories 98

10.2.2 Step 2 Specify Parameters 99

10.3 template.config 100

10.4 Add from Template 100

11 Code Formatting 103

11.1 Whitespace 103

11.2 Indentation 103

11.3 Vertical Alignment 103

11.4 Line Wrapping 104

11.5 External 104

12 Inspect Extensions (Layers) 105

13 Override Annotation 106

14 Extend Annotation 107

15 Semantic Search 108

16 Search for References (Usages) 110

17 Refactoring 111

17.1 Rename Refactoring 111

18 Diagrams 113

18.1 Class Diagrams 113

Trang 5

DVT e Language IDE www.dvteclipse.com

18.1.1 Class Diagrams - Select Structs 114

18.1.2 Class Diagrams - Preferences 115

18.1.3 Class Diagrams - Legend 116

18.2 Architecture UML Diagrams 118

18.3 Sequences UML Diagrams 118

18.4 Diagram Toolbar 118

18.5 Diagram Preferences 119

19 Export HTML Documentation 120

19.1 Export HTML Documentation Wizard 120

19.2 Comments Formatting 125

19.2.1 JavaDoc 126

19.2.2 NaturalDocs 130

20 External Tools Integration 132

20.1 Run Configurations 132

20.1.1 Run Configuration Session Type 136

20.1.2 Custom Shortcut and Button for a Run Configuration 138

20.1.3 Using environment variables in DVT Generic Run Configurations 139

20.1.4 Using an alias in a DVT Generic Run Configuration 139

20.1.5 DVT Generic Run Configuration Variables 140

20.2 External Builders 141

20.2.1 How to define a new external builder? 141

20.2.2 How to configure a filter? 145

20.2.3 How to invoke external builders? 145

20.2.4 External Builder Output 146

20.2.5 Source Code Markers - errors warnings 146

20.3 External Documentation 147

20.3.1 Configure External Documentation 148

20.3.2 Browse External Documentation 148

20.3.3 Search External Documentation 149

21 Specman Debugger Integration 151

21.1 The e Language Debug Perspective 151

21.2 Launching a Debug Session 151

21.2.1 The dvt_sn_debug Library 151

21.2.2 Launch a New Debug Simulation from DVT 152

21.2.3 Connect to an existing simulation 155

21.2.4 The dvt_debug Command 157

21.3 Breakpoints 157

21.4 Threads, Call Stack, Stepping 158

21.5 Variables 159

21.5.1 Inspect all the local variables using the Variables View 159

21.5.2 Variable Value in Tooltip 160

21.5.3 Change Variable Value 160

21.6 Watch Expressions 161

22 Custom Dialogs 162

22.1 Quick Steps 164

22.2 Customizing the Dialog Output 164

22.3 SWT/XML Reference 167

22.3.1 Layouts 167

Trang 6

DVT e Language IDE www.dvteclipse.com

22.3.2 Widgets 168

23 Command Line Interface 174

23.1 dvt_cli.sh 174

23.2 Syntax 174

23.3 Notes 175

23.4 Examples 175

23.5 Commands 176

23.5.1 Create a Project (Mixed-Language Capable) 176

23.5.2 Import an Existing Project 177

23.5.3 List Compiled Files 178

23.5.4 Launch a Run Configuration 178

23.5.5 Open a File 178

23.5.6 Open a Custom Dialog 178

23.5.7 Refresh a project 178

23.5.8 Quit 179

23.5.9 Query the running status 179

23.5.10 Print version 179

24 Macros Support 180

24.1 Inactive Code Highlight 180

24.1.1 Overview 180

24.1.2 Settings 180

24.2 Macro Expansion 181

24.2.1 Overview 181

24.2.2 Triggering 181

24.2.3 Tips 181

24.2.4 IMPORTANT NOTE 182

24.3 Macros and Quick Macros Views 182

24.4 Trace Macro Errors 182

25 Reminders (TODO Markers) 184

26 OVM UVM Compliance Review 185

26.1 OVM UVM Compliance Review - Architecture Tab 186

26.2 OVM UVM Compliance Review - Checks Tab 187

26.3 OVM UVM Compliance Review - Statistics Tab 188

26.4 OVM UVM Compliance Review - HTML Report 189

27 Settings Management 190

27.1 Managed Settings 190

27.2 Unmanaged Settings 194

27.3 User and Common Settings Location 194

27.4 Use Cases 195

27.4.1 Memory Allocation Thresholds 195

27.4.2 Workspace Preferences 196

27.4.3 Run Configurations 196

27.4.4 Compile Waivers 196

27.4.5 Content Filters 196

27.4.6 External Builders 196

27.4.7 Export HTML Documentation 197

27.5 Examples 197

27.6 Deprecated Settings Management (before DVT 3.5) 198

Trang 7

DVT e Language IDE www.dvteclipse.com

27.6.1 Workspace Settings 198

27.6.2 Project Settings 198

27.6.3 Other Settings 199

27.6.4 Importing Preferences From a Different Workspace 199

27.6.5 Customizing Default Settings Using dvt.ini 200

28 Reference 203

28.1 Common Shortcuts 203

28.2 Editor Right Click Menu 204

28.2.1 Folding 204

28.2.2 Macros 204

28.2.3 Source 204

28.2.4 Show 204

28.2.5 References 205

28.2.6 Refactor 205

28.3 Icons and Decorations 205

28.3.1 Icons 205

28.3.2 Decorations 207

28.4 Quick Search 208

28.4.1 CamelCase 208

28.4.2 Simple Regex 209

28.4.3 Hierarchical Search 209

28.4.4 Hierarchical Search For Ports 211

28.5 Scripts 211

28.5.1 dvt.sh 211

28.5.2 dvt_cli.sh 213

28.5.3 dvt_kit_installer.sh 213

28.5.4 dvt_updater.sh 215

28.5.5 evip2dvt.sh 216

28.6 Toolbar Actions 216

28.7 Views 217

28.7.1 Checks View 217

28.7.2 Code Templates View 218

28.7.3 Compile Order View 218

28.7.4 Console View 220

28.7.5 Coverage View 220

28.7.6 Layers View 222

28.7.7 Macros View 223

28.7.8 Outline View 225

28.7.9 Problems View 229

28.7.10 Tasks View 231

28.7.11 Types View 232

28.7.12 Type Hierarchy View 234

28.7.13 Verification Hierarchy View 237

29 Application Notes 241

29.1 Encrypted VIP Support 241

30 Tips and Tricks 243

31 Q & A 271

31.1 I am new to Eclipse, where should I start from? 271

Trang 8

DVT e Language IDE www.dvteclipse.com

31.2 Where can I find DVT Help? 271

31.3 How do I see and configure the key shortcuts? 271

31.4 Are there any backup files in Eclipse? 272

31.5 Workspace in use, cannot launch eclipse 272

31.6 Locking is not possible in the directory 272

31.7 How to start DVT Eclipse with a different eclipse.ini 272

31.8 Save could not be completed 273

31.9 IBM Clearcase Plugin 273

31.10 libxul.so undefined symbol 273

31.11 How do I Access Files Outside Project Dir - Working with Linked Resources 274

31.12 Handling UNRECOGNIZED Macros 275

31.13 Mapping Linux to Windows (/proj/ to Z:\proj\) 276

31.14 How to use Working Sets for filtering Problems/Task/Search views? 276

31.15 How can I do an incremental textual search in any view? 279

31.16 Diagram error - image has not been created 279

31.17 Whitespace in macro definition 280

31.18 Subversive vs Subclipse 281

31.19 How do I associate a project with both DVT and CDT? 281

31.20 Can I use vi/vim along with DVT? 281

31.21 Can I perform dos2unix or unix2dos from DVT? 282

31.22 How can I configure Eclipse to use a local CVS repository? 282

31.23 I am using the Common Desktop Environment via Citrix and experiencing crashes What can I do? 283

31.24 How do I change the background color of the Editor? 283

31.25 How do I change the color of the interface? 283

31.26 How to apply the dark color theme or other themes? 284

31.27 How do I change the tooltip colors? 284

31.28 How do I change Internet Proxy Settings? 284

31.29 Eclipse does not start, there is no Workspace, metadata or log file created 285

31.30 Workspace permissions 286

31.31 How to install our server as a service in Windows? 287

31.32 How do I link mylyn with Bugzilla? 287

31.33 How do I print source code? 287

31.34 How do I disable Eclipse Software Sites? 289

31.35 How do I revert to a previous version? 289

31.36 What are the most common shortcuts in DVT? 290

31.37 How do I run Specman using IntelliGen? 290

31.38 How does DVT integrate with emacs? 290

31.39 How does DVT integrate with CVS? 290

31.40 How to set an environment variable within a Run Configuration? 291

31.41 How to run a remote Unix command from DVT Eclipse for Windows? 291

31.42 How do I tell DVT to skip some files from compilation? 291

31.43 Rebuild shortcut (Ctrl + Alt + R) does not work 292

31.44 Sometimes I experience DVT GUI hangs, what should I do? 292

31.45 Sometimes I experience DVT GUI hangs when switching from another X application to DVT 293

Trang 9

DVT e Language IDE www.dvteclipse.com

31.46 I want to use an alias in a DVT Generic Run Configuration, but it's not

recognized 294

31.47 Some files are missing from the VIPs transformed with evip2dvt.sh 294

31.48 How to set multiple paths as sources of predefined projects ? 294

31.49 Lines are suddenly changing indentation when I edit text or move the cursor through the editor 295

31.50 How to change the directory where the build log file is saved ? 295

31.51 How to find the DVT logs on Linux/Unix ? 295

31.52 How to create resource filters ? 296

31.53 How to create custom shortcut and button for a Run Configuration? 296

31.54 I know that file.foo is present in the project location, but I can't see it in the Navigator View 297

31.55 How to copy the full path to the file in the current editor? 297

31.56 How to adjust the console logs filters matching parameters? 297

31.57 When I switch to Block (Column) Selection mode the font changes 298

31.58 In Block (Column) Selection mode I see strange editng artifacts 298

31.59 How to modify the font size in the code editors? 298

31.60 How to automatically checkout/lock files from the revision control system ? 300

31.61 How can I see if a file is read-only? 300

31.62 How can I open a file in DVT from the terminal? 301

31.63 How do I change the name of the xterm opened by a DVT Generic Run Configuration? 301

32 What is New? 303

33 How to Report an Issue? 385

34 Legal Notices 386

35 Third Party Licenses 387

Trang 10

DVT e Language IDE www.dvteclipse.com

Chapter 1 Installation Checklist

Eclipse Version

You must use Eclipse 3.6 or newer.

To check the Eclipse version use menu Help > About Eclipse Platform In the snapshot the

Eclipse version is 3.6

Java Version

You must use Java 1.6 or newer.

To check the Java version use menu Help > About Eclipse Platform, then click on

Configuration Details and select Configuration tab In the snapshot the Java version is 1.6.

Trang 11

DVT e Language IDE Chapter 1 Installation

Checklist

www.dvteclipse.com

DVT Plug-in

To check the DVT plugin is installed use menu Help > About Eclipse Platform You should

see the DVT button

Trang 12

DVT e Language IDE Chapter 1 Installation

Checklist

www.dvteclipse.com

To see more details, for example the version, click the button

DVT License

To check the DVT license go to menu Window > Preferences and inspect the DVT > License.

The DVT license is pointed to by $DVT_LICENSE_FILE system variable or in case

of a FlexLM license by' $DVTLMD_LICENSE_FILE' and $LM_LICENSE FILE system

variables

Trang 13

DVT e Language IDE Chapter 1 Installation

Checklist

www.dvteclipse.com

DVT is activated lazily In other words it doesn't look for a license until you try to use itsfunctionality Before checking the license status, it is recommended to open a predefinedproject

Trang 14

DVT e Language IDE www.dvteclipse.com

Chapter 2 Predefined Projects

The predefined projects capability allows you to quickly access pre-configured projectrepositories For example training labs or golden reference projects or projects that youcommonly use

DVT looks for predefined projects in the directory indicated by the

$DVT_PREDEFINED_PROJECTS system variable In order to support directories spread

on the disk, DVT also scans all directories indicated by any other system variable whose name

starts with $DVT_PREDEFINED_PROJECTS_EXT_.

For example, if you installed DVT from a distribution, by default

$DVT_PREDEFINED_PROJECTS points to $DVT_HOME/predefined_projects This is

a project repository that you can use to explore the DVT features without the initial effort ofconfiguring a project

At any time, if you wish to change the default location,you just need to point $DVT_PREDEFINED_PROJECTS to anotherlocation Or add another pre-configured projects repository by pointing

$DVT_PREDEFINED_PROJECTS_EXT_MY_NEW_REPOSITORY to it.

For example if you installed DVT as a plug-in on top of an existing Eclipse installation,

$DVT_PREDEFINED_PROJECTS is unset But you can download the predefined projects

separately, and point the system variable to the folder where you extracted the predefinedprojects

Opening a Predefined Project

To open a predefined project use the Predefined Project Wizard by selecting File > New >

DVT Predefined Project.

You can also open the wizard from the DVT Project Wizard by clicking on the Predefined

Projects link:

Trang 15

DVT e Language IDE Chapter 2 Predefined Projects www.dvteclipse.com

Preferences

In the wizard's main window you can select the predefined project and the target directory.

A copy of the selected project will be placed in the target directory Keep in mind that:

1 The target directory must not be a parent of or inside of the eclipse workspace path

2 The target directory must be writable

3 The selected project must not exist in the current workspace

Trang 16

DVT e Language IDE Chapter 2 Predefined Projects www.dvteclipse.com

1 Quick filter - by project name;

2 Available predefined projects;

3 A short description of the selected project;

4 If you want to change the default target directory (by default is the $HOME/

dvt_predefined_projects_target );

5 Override target directory (if it already exists)

Trang 17

DVT e Language IDE Chapter 2 Predefined Projects www.dvteclipse.com

6 A message dialog will pop up, with info about all $DVT_PREDEFINED_PROJECTS

& $DVT_PREDEFINED_PROJECTS_EXT_* environment variables (indicates the

directories where DVT scans for predefined projects); See the picture below:

If all the settings are correct, click Finish.

Trang 18

DVT e Language IDE www.dvteclipse.com

Chapter 3 Getting Started

3.1 What is a Workspace

When you start Eclipse you are asked to indicate a workspace directory.

• The workspace is a directory on the disk where the Eclipse platform and all the installed

plug-ins store preferences, configurations and temporary information Subsequent

Eclipse invocations will use this storage to restore the previous state

• As the name suggests, it is your "space of work" It defines your area of interest during

an Eclipse session.

• In a workspace you define projects that reference your disk resources You don't have tomove source files into the workspace And projects don't import or copy source files into theworkspace Instead projects point to any folder or files on your disk

• We don't recommend keeping source code files in the workspace

Each time you start Eclipse you can create a new workspace directory or indicate an existing

one You can create many workspaces, each one dedicated to some activity You may

use one workspace for developing your current project and another for maintaining theprevious one If the two activities are unrelated, in doing so you minimize clutter and improveperformance by using two workspaces

You can launch several Eclipse applications in parallel, but one workspace can be used only

by one Eclipse instance that locks it (<workspace_dir>/.metadata/.lock) If you try to use

an workspace already in use by an existing Eclipse instance, you'll be signaled "Workspace

in use or cannot be created, choose a different one" You can switch at anytime to another

workspace from menu File > Switch Workspace , but launching different Eclipse for different

workspaces is common practice

Workspace and Workbench

Refresh

3.2 What is a Project

In order to see the contents of a specific directory on the disk, you need to define a projectusing various wizards

Create a New Project

Menu File > New > DVT Project

Trang 19

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

The first time when you create a project, the Eclipse platform creates a project file in the

directory you specified, right before it presents the directory contents This is the only operationthe platform performs It will not move or copy any files to your workspace from the directory

you specified It will just create the project file.

Some plug-ins might create other information holders in the project directory For example

DVT creates a dvt directory to store project level configurations specific to DVT.

NOTE: There are ways to create projects directly from a revision control system, for example

from a CVS repository As expected, in this case files will be brought into your workspace

Import an Existing Project

Menu File > Import (> General > Existing Projects into Workspace)

If a project was created for a directory on the disk (a project file is already there), you cannot

create another project in that directory

Instead you import an existing project into your workspace

Automatic Create or Import

The DVT plug-in merges the create and import wizards It automatically detects that a projectalready exists at the specified location and imports it Otherwise it guides you through theproject creation

Build Configurations

3.3 Project Natures

In Eclipse a project can have zero to many project natures Various plug-ins provide

functionality for a project if it is tagged with a specific nature For example DVT builds a project

only if it has one of the natures it knows about, for example Verilog, VHDL or e Language.

Project natures are stored in the project definition, that is in the project file

To turn on/off a specific nature for a project, select the project in Navigator and choose

Change DVT Nature from the right click menu.

Trang 20

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.4 Workspace and Workbench

Work

Workspace and workbench are different terms for different concepts, however they sound

quite similar to be mistakenly interchanged The "work" prefix has a tendency to make us losethe interest, so I guess we don't get to hear clearly the "space" or "bench" that follow, henceboth workspace and workbench collapse under the annoying "something about work"

Workspace

One of the first things you specify when you start Eclipse is the workspace location The

workspace is a directory that holds information about the projects you work on, as well as

the Eclipse preferences (from layout to behavior) We can say that the workspace "holds" the

Integrated Development Environment: the data you work on (organized in projects) and howyou work with it (preferences) It is your "space of work" or "working space" or "workinguniverse"

Depending on your style, you can do all your work in a single workspace, no matter howdifferent projects in your life, for example a Web project to publish your photos, a Verification

Trang 21

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

project and a Java project where you learn how to program Or you can chose to have severalworkspaces, each one dedicated to a specific state of mind or universe of thinking

Workbench

The workbench is practically the Eclipse main window It is the bench where you organize your

instruments, except that now you don't have power supplies, signal generators or oscilloscopes,

but different views and editors Views and editors are your instruments to manipulate sources

and data You arrange them at hand for a specific task (exploring, debugging, coding etc.)

What instruments you use and how you lay them out on your bench ( workbench) is known

as a perspective: with what and from what angles you look at your data Eclipse allows you

quickly to reorganize your workbench, by choosing a different perspective Don't have to spendtime moving the signal generator away, just switch to another perspective

Workspace Again

The projects (your data) are not necessarily physically located in the workspace directory Theycan be simple pointers to other locations on the disk However the workspace aggregates allyour "relevant" projects for a specific development universe

When you create a new empty project in the workspace, it is located in the actual workspacedirectory When you create a project from existing source, the workspace keeps a pointer tothe project folder When you import a project in your workspace, again the workspace keeps apointer to the project folder (Importing is an interesting concept, documented separately).You can switch at any time from one workspace to another (menu File > Switch workspace ).You can start several Eclipse instances looking at various workspaces (chose when prompted

at start or in batch mode "eclipse -d <workspace location>") However, you cannot have twoEclipse instances looking at the same workspace at once Eclipse locks the workspace, asindicated by the metadata/.lock file in the workspace directory

What is a Workspace

3.5 Refresh

Once you start Eclipse, the workspace is usually read from the disk (not necessarily, caches arealso kept from the previous invocation) From this point on, usually, what ever changes you dooutside of Eclipse on resources in the workspace are not reflected immediately You need torequest for a refresh (right click on a project and chose Refresh from the drop down menu)

"Usually" above because it can be customized To customize the way refresh behaves and

eventually switch it to fully detect each change whenever it occurs, use menu Window >Preferences > General > Workspace From here you can customize if refresh is done on startup,how often etc

Refresh is a basic and primitive support of concurrency and also has to do with performance.

Maybe I don't want to be notified of every change on resources in my projects if somebody

Trang 22

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

is also processing part of the data outside Eclipse It may take a while, even not be relevantand stop me from working until the external processing is complete For example compilation.Hence maybe I want to trigger it when I know for sure I am interested in some external changes.This does not imply that conflicts (for example editing a file that changed on the disk) are notpromptly signaled by Eclipse

It happens often that you don't find some files in your workspace (of course inside a project)

although from explorer or console it seems they are there Maybe you forgot to refresh?

To create a linked resource, right click on the project in the Navigator and select from the

pop-up menu New > Linked Resource In the wizard you must specify the path the link will point

to (for example /apps) and the linked directory name (for example apps):

1 Target: the file system path the link will point to;

2 Name: the linked directory's name;

3 Location: location (inside the selected project) where the link directory will be created.

Tip: You can also use system variables in the path, for instance:

${DVT_ENV-SYSTEM_VARIABLE_NAME}/work

Trang 23

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.comequivalent to

$SYSTEM_VARIABLE_NAME/work

in a terminal This way you can share the project with your team and the linked folders willwork seamlessly

Note: When you press Finish, if the directory the link points to is too big (for example it has

more than 3000 children), a Resource Filter dialog will pop-up You can use it to exclude those

children that you don't need and that may slow down the platform (you can find out more about

it here)

Linked resources will appear in the Navigator with a small "link" icon:

Tip: You can also use drag & drop from a filesystem navigator (like Nautilus in Gnome,

Dolphin in KDE or Explorer in Windows): drag the external folder and drop it on the desiredtarget location (Project or Folder) in the Navigator View In the dialog that pops-up specify thatyou want to "Link to files and folders" A linked resource will be automatically created

What is a Workspace

What is a Project

3.7 Backup and Local History

The Eclipse platform provides a similar to autosaved backup files functionality (<name>.bak inwin, <name>~ in emacs etc.) It is more elaborated, quite similar with revision control systems

in capabilities (compare, multiple versions across time etc.)

To quote from the platform manual: "A local edit history of a file is maintained when you create

or modify a file Each time you edit and save the file, a copy is saved so that you can replacethe current file with a previous edit or even restore a deleted file You can also compare thecontents of all the local edits Each edit in the local history is uniquely represented by the dateand time the file was saved Only files have local history; projects and folders do not."

Some quick access hints:

Trang 24

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

1 Right click on a file > Compare With > Local History and compare with various file

snapshots taken over time

2 From menu Window > Preferences > General > Workspace > Local History you can

configure how often snapshots are taken and for how long preserved

Right click in the editor and chose Compare With/Replace With > Local History

3.8 Basic Tutorial

This tutorial provides a step by step walk-through of the e Language development environment

3.8.1 Switch to the DVT Perspective

The DVT Perspective provides a workbench layout with many useful views and shortcuts athand for developing e code, for example the type browser, extensions browser etc

Trang 25

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

From menu Window > Open Perspective > Other choose DVT

You can customize and save a perspective In order to further speed-up the development, atany time you can switch between various perspectives with different tool (views) layouts.For example you can use one perspective for writing e code (the editor will take most of thereal estate) and another perspective for code navigation (type browser will be a significantcomponent)

The default DVT perspective looks like this:

Trang 26

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.8.2 Open a Project

A project corresponds to a specific directory on the disk The project is presented in the

Navigator View - a file browser component that helps you browse the project directory

contents

For more details see What is a Project

Create a New Project

Invoke the New Project Wizard: Chose menu File > New > DVT Project.

Trang 27

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

1 Specify the Project Directory It can be a directory that already contains sources or a new

directory that will be created

2 Specify the Project Name By default, the project's name is the last segment of the project's directory path (e.g /tmp/path1/path2/p_name > p_name) You can change this name by selecting Custom NOTE: If Project Directory points to an existing project, you cannot

change its name

3 Open a Predefined Project You may open one of the predefined projects that DVT ships

with and continue to explore the DVT features For more details see Predefined Projects

4 Specify the Project Nature If the poject does not exist or it does not contain any nature,

you must select at least one nature This way DVT will compile the respective sources

3.8.3 Configure the Build

As soon as you create a project, you'll be notified there is nothing to build

To configure the build follow the link in the build notification dialog or open the dvt/

default.build file.

Trang 28

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

In order to provide advanced functionality (like hyperlinks, autocomplete, design and classhierarchy, error signaling, etc.) DVT analyzes the source code files in your project This analysisprocess is called build

By default, DVT doesn't build anything In order to build, DVT uses the arguments that youspecify in one of the <name>.build files located in the dvt folder of your project

The default build configuration is dvt/default.build Here you list compilation directives in asimilar way you would pass arguments to any simulator

For more details see Build Configurations

3.8.4 Build the Project

Once you specified the files you want to compile, the specman path to be used and so on,you should rebuild the project In general, every time you change the build configuration, youshould rebuild

In order to rebuild you click the Rebuild button

While editing source files, a project is incrementally compiled as soon as you save, unless the

menu option Project > Build Automatically is un-checked.

The building progress is reported in the Progress View Depending on your configuration, you may also see detailed information in the Console View.

3.8.5 Inspect the Compilation Errors

Syntax errors are detected as you type

Trang 29

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

They are indicated in the vertical bars of the editor (left - for the visible code, right - for the full

file) If you keep the mouse over the marker on the left you'll see more details about the error.

Same tooltip will appear if you keep the mouse over the marker on the editor right bar You

can also click on the marker to jump to the error.

If a project contains errors, for example syntax errors, it will be indicated using decorators:

You can use the Problems View to inspect the errors You can show the Problems View from menu Window > Show View > Other > General > Problems Double clicking on some

error will jump to the source location

Trang 30

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.8.6 See Comments in Tooltips

When you position the mouse over a type, method, field etc., a tooltip will pop-up showinginformation on corresponding declaration

Some examples are presented below In a similar way you'll see information on fields, events,variables etc., predefined or not

Type Info

Method Info

The information presented in the tooltip is created using the comment on top of the declaration

Trang 31

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.comFor example, given the following declaration of an event:

the corresponding tooltip will look like this:

For predefined entities, the tooltip presents the description from the e language referencemanual

3.8.7 Use Hyperlinks to Move Around in the Code

If you place the mouse over a type, method, field etc and press the Ctrl key, a hyperlink will

be presented Click on the hyperlink to jump to definition.

You can also jump to a definition if you put the cursor on the relevant name and press F3.

You can hyperlink and jump to an imported file

3.8.8 Quickly Open a Type (Struct, Unit)

You can quickly open a specific type definition, just press Ctrl+Shift+T.

Trang 32

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

The Quick Types View will pop-up and you can enter any regular expression to locate a type

Select and press Enter or click to jump to its definition.

3.8.9 Quickly Open a File

You can quickly open a file imported via the top files Just press Ctrl+I.

The Quick Compile Order View will pop-up and you can enter any regular expression to locate

a file Select and press Enter or click to open the file.

Trang 33

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

You can also see the compile order of the files in your project in the Compile Order View Open

the view from menu Window > Show View > Other > DVT > Compile Order.

Trang 34

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.8.10 Quickly Move Inside the Editor

Press Ctrl+O to open the Quick Outline for an overview of your file You can enter any regular

expression to locate an entity to jump in the current file

Trang 35

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

You can also see the outline in the Outline View Open the view from menu Window > Show

View > Other > General > Outline.

Trang 36

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.8.11 Browse Through All the Available

Types (Structs, Units, Enumerations)

You can explore all the types (enums, structs, units) defined or extended in your project usingthe Types View

Go to menu Window > Show View > Other > DVT > Types to open the Types View.

Trang 37

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.8.12 Browse the AOP Extensions

You can view all the extensions (layers) of a specific type, method, event etc Position the

cursor on the relevant name and press Shift+F3 or right click and chose Show > Layers from

the menu

The Layers View will present information about all the extensions including:

• extension kind (when subtype, is first or is also etc.)

• source location (file, line)

• documentation (extracted from the comment lines above the layer definition)

Trang 38

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

You can also quickly jump to a specific extension Press Ctrl+Shift+O with the cursor

positioned on the name

3.8.13 Inspect the Struct Hierarchy and Struct Members

Position the cursor on the relevant name and press F4 or right click and chose Show >

Hierarchy from the menu.

The Type Hierarchy View will present information about a struct including:

• parents

• children

Trang 39

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

• members

You can also quickly jump to a specific parent or child Press Ctrl+T with the cursor positioned

on the name

Trang 40

DVT e Language IDE Chapter 3 Getting Started www.dvteclipse.com

3.8.14 Inspect the Verification Hierarchy

Position the cursor on a unit name and press Shift+F6 or right click and chose Show >

Verification Hierarchy from the menu.

The Verification Hierarchy View opens with the chosen unit set as the top of the hierarchy

3.8.15 Search for Entities

You can search for a specific type, method etc in the current project or whole workspace Press

Ctrl+H to pop-up the search dialog.

Ngày đăng: 02/07/2014, 13:29

TỪ KHÓA LIÊN QUAN