Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 561243af657f7875e49aba66fb329b7f124f3049 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
--- RCPTT testcase ---
Format-Version: 1.0
Context-Type: org.eclipse.rcptt.ctx.ecl
Element-Name: TemplateProject
Element-Type: context
Element-Version: 2.0
Id: _clrEQFGbEeWk3rbvuPRQHg
Runtime-Version: 2.1.0.201606221726
Save-Time: 9/16/16 9:46 AM

------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998
Content-Type: text/ecl
Entry-Name: .ecl.context

proc createTemplateProject {
	get-menu "File/New/Other..." | click
	with [get-window New] {
		get-tree | select "eTrice" | 
		select [concat "eTrice/" $targetLanguage] |
		select [concat "eTrice/" $targetLanguage "/eTrice " $targetLanguage " Template Project"] |
		double-click
	}
	if [$targetLanguage | equals Java] {
		with [get-window "eTrice Java Template Project"] {
			with [get-editbox -after [get-label "Project name:"]] {
				set-text $projectName
			}
			get-button "Next >" | click
			get-button "use Eclipse JDT build" | click
			get-button Finish | click
		}
	}
	get-window "New Example" | get-button Finish | click
	if [$targetLanguage | matches "C.*"] {
		get-window "Open Associated Perspective?" | get-button Yes | click
	}
}

proc generateTemplateProject {
	//get-menu "Window/Show View/Project Explorer" | click
	get-view "Project Explorer" | get-tree | select [concat $projectName "/generate_Template.launch"] | get-menu
		"Run As/1 generate_Template" | click
	with [get-view Console] {
		get-button "Pin Console" | click
    	get-button "Display Selected Console" | click -arrow
		get-menu [concat "\d eTrice " $targetLanguage " Generator Console"] | click
		get-text-viewer | get-property text | contains "Info: -- finished code generation" | verify-true
		get-button "Pin Console" | click
	}
}

proc runTemplateProject {
	//get-menu "Window/Show View/Project Explorer" | click
	if [$targetLanguage | matches "C.*"] {
		get-view "Project Explorer" | get-tree | select [concat $projectName "/run_Template_" $targetOS ".*"]
			| get-menu [concat "Run As/1 run_Template_" $targetOS ".*"] | click
	} -else {
		get-view "Project Explorer" | get-tree | select [concat $projectName "/run_Template.launch"] | get-menu
			"Run As/1 run_Template" | click
	}
	with [get-view Console] {
		with [get-text-viewer] {
			set-caret-pos 2 1
			type-text quit
			key-type Enter
		}
	}
}

proc openMSCTemplateProject {
	//get-menu "Window/Show View/Project Explorer" | click
	with [get-view "Project Explorer" | get-tree] {
		select [concat $projectName "/log"] | get-menu Refresh | click
		if [$targetLanguage | equals C] {
			select [concat $projectName "/log/msc.seq"]
		} -else {
			select [concat $projectName "/log/subSystemRef_Async.seq"]
		} | get-menu "Open With/Text Editor" | click
	}
}
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998--

Back to the top