-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHow to checkout MetroBike from scratch.txt
91 lines (56 loc) · 2.47 KB
/
How to checkout MetroBike from scratch.txt
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
82
83
84
85
86
87
88
89
90
91
----------------------------------------
To checkout our repository from scratch:
----------------------------------------
(new clone, new Eclipse workspace)
1) Create a directory to hold the repo
2) On command line, inside the directory:
git clone [email protected]:alaurenz/metrobike.git
(assumes you have ssh keys set up with GitHub)
3) Open Eclipse/ADT to a new workspace
4) File->Import->Android->Existing Android Code Into Workspace
5) Select your metrobike folder and all projects except
HelloMetroBike and HelloMetroBike's google-play-services_libs projects.
(Uncheck HelloMetroBike and HelloMetroBike's google-play-services_libs to avoid naming conflicts)
6) Leave 'Copy projects into workspace' *unchecked*
7) Refactor->rename MainActivity to MetroBike
8) Refactor->rename test to MetroBikeTest
9) MetroBikeTest->Properties->Java Build Path, Projects tab. Add MetroBike
10) Close Eclipse, Open Eclipse
11) Select all, right click -> refresh
12) Project -> Clean, clean all (with auto-rebuild)
------------------------------------------------
Add + configure checkstyle tools to Eclipse/ADT:
------------------------------------------------
(modified from email instructions)
1) Eclipse top menu bar->Help->Install New Software
2) Work with: http://eclipse-cs.sf.net/update/
This is the repo where the checkstyle plugin lives
The site: http://eclipse-cs.sourceforge.net/
3) Name the site something like 'Checkstyle'
4) Select the topmost software option 'Checkstyle'
5) Next, next, read+accept, Finish
6) Ok, Yes to restart Eclipse/ADT
7) Window-> Preferences, select 'Checkstyle'
8) New...
Type: External Configuration
Name: MetroBikeCheckStyle
Location: (your metrobike folder)/MetroBike/MetroBikeCheckStyle.xml
9) Select the new configuration and click 'Set as Default'
10) Ok to save/close
+ To run Checkstyle on a file:
Right click -> Checkstyle -> Check Code with Checkstyle
+ To clear/reset Checkstyle warnings on a file:
Right click -> Checkstyle -> Clear Checkstyle violations
----------------------------
Configure Eclipse Formatter:
----------------------------
1) Eclipse to bar -> Window -> Preferences
2) In left bar, expand Java -> Code Style -> Formatter
3) Import... (your metrobike folder)/MetroBikeEclipseFormatter.xml
4) Be sure 'MetroBike' is selected as the active profile
5) Apply
6) Ok
+ To run the formatter on a file:
Open the file, click into the editor and hit Ctrl+Shift+F
-or-
Right-click->Source->Format