Red Hat Developer Day – 26 June 20121Eclipse for C/C++ Developers Using Red Hat Enterprise LinuxDeveloper ToolsRed Hat Developer DayJeff Johnston26 Ju
Red Hat Developer Day – 26 June 201210 Importing Code Into Eclipse Continued..
Red Hat Developer Day – 26 June 201211 Checkout From CVS
Red Hat Developer Day – 26 June 201212 Checkout From CVS Continued..
Red Hat Developer Day – 26 June 201213 Check Out As - Dialog
Red Hat Developer Day – 26 June 201214 Check Out As - Dialog Continued...●Get to this dialog by clicking Next button●Check out as a project in workspa
Red Hat Developer Day – 26 June 201215 Import Alternatives●Point to an existing check-out location●Eclipse projects can specify a location outside of
Red Hat Developer Day – 26 June 201216 Import Alternatives Continued..●Simply import code without using Project Wizard●Convert project afterwards to p
Red Hat Developer Day – 26 June 201217 Import Alternatives Continued...●Create an empty project first●Use Team Provider to check-out into project–In C
Red Hat Developer Day – 26 June 201218 C/C++ Project Types●Three major categories●Managed Make Project–Eclipse manages your Makefile automatically–Pro
Red Hat Developer Day – 26 June 201219 Managed Make Project●Useful for starting a project from scratch quickly●Can opt to output Makefile●If you check
Red Hat Developer Day – 26 June 20122 ●What is Eclipse?●Often thought of as an IDE●Actually a framework●Supports plug-in functionality●Plug-ins are gr
Red Hat Developer Day – 26 June 201220 Managed Make Project Continued..,●Can switch final target type●e.g. Can switch from creating an executable to a
Red Hat Developer Day – 26 June 201221 Standard Make Project●Use this for an existing run-of-the-mill Makefile project●Tool settings aren't used
Red Hat Developer Day – 26 June 201222 Autotools Project●Use this for projects using Autotools●e.g. GNU/FSF packages such as gcc, gdb, binutils, gimp,
Red Hat Developer Day – 26 June 201223 Autotools Project Continued..●Special build step occurs before invoking make●Looks for configure script or auto
Red Hat Developer Day – 26 June 201224 Build Configurations●Set of options, settings pertaining to the build●Each configuration will have separate bui
Red Hat Developer Day – 26 June 201225 Build Configurations Continued..
Red Hat Developer Day – 26 June 201226 Indexer●CDT has its own indexer●Indexer allows code traversal and searching●F3 - go to definition/declaration–I
Red Hat Developer Day – 26 June 201227 Indexer Continued..●Indexer used in conjunction with static code analysis●Warnings/errors will be marked in the
Red Hat Developer Day – 26 June 201228 Scanner Discovery●Special builder that discovers include paths and symbols for indexer to use●By default, disco
Red Hat Developer Day – 26 June 201229 Scanner Discovery Continued..●Automated discovery requires successful build●Also requires the output of the bui
INTERNAL ONLY | Mike Guerette3 SEE US AT SUMMITVisit us at Developer Zone!FOLLOW US ON TWITTERtwitter.com/#!/RHELdevelopPLAY US ON YOUTUBEbit.ly/RHEL
Red Hat Developer Day – 26 June 201230 Build Variables●Macros defined to be used during the build●Can be specified in build options●Can also be used t
Red Hat Developer Day – 26 June 201231 Environment●User can set environment variables during build●Variables are used to set environment when running
Red Hat Developer Day – 26 June 201232 Code Analysis●Static analysis●Configurable under Project -> Properties●C/C++ General -> Code Analysis●Num
Red Hat Developer Day – 26 June 201233 Code Analysis Settings
Red Hat Developer Day – 26 June 201234 C/C++ Editor●Colourization and outline view provided●Displays error/warning markers●Markers appear in margins●C
Red Hat Developer Day – 26 June 201235 C/C++ Editor Continued..●Ctrl + Shift + N (add include)●For glibc C functions, highlighting and using CTRL+Shif
Red Hat Developer Day – 26 June 201236 C/C++ Editor Settings●Window -> Preferences -> C/C++ -> Editor●Content Assist (can control what is of
Red Hat Developer Day – 26 June 201237 Library Hover●Libhover feature●Adds hover help for a library to the editor●Includes code completion and adding
Red Hat Developer Day – 26 June 201238 Outline View●Companion to editor view●Condenses into constructs●e.g. C/C++ editor shows functions, members, str
Red Hat Developer Day – 26 June 201239 Building●Build uses active configuration●Automatic builds occur when modified resource saved●Project -> Buil
Red Hat Developer Day – 26 June 20124 Eclipse IDE Terminology●Eclipse Workspace●Directory where Eclipse session is based●Workspace has “preferences”●C
Red Hat Developer Day – 26 June 201240 Building Continued..●Starting a manual build●Project -> Build Project●or... clicking the Hammer icon●or... u
Red Hat Developer Day – 26 June 201241 Build Console●Results of build appear in Console tab●C/C++ builds (make) go into C-Build console●Autotool confi
Red Hat Developer Day – 26 June 201242 Error parsers●Build output is parsed via various error parsers●Parsers look for errors in console output●There
Red Hat Developer Day – 26 June 201243 Binary Parsers●Output binaries are parsed as well●Binary parsers can be enabled/disabled/reordered●Project ->
Red Hat Developer Day – 26 June 201244 Running your executable●Right-click on executable in Project Explorer●Select Run as -> Local C/C++ Applicat
Red Hat Developer Day – 26 June 201245 Running Your Executable Continued...●For more complex cases●Right-click on executable and select Run as.. ->
Red Hat Developer Day – 26 June 201246 Debugging Your Executable●Right-click on executable in Project Explorer●Select Debug as -> Local C/C++ Appl
Red Hat Developer Day – 26 June 201247 Debugging Your Executable Continued..●For more complex cases●Right-click executable and select Debug as.. ->
Red Hat Developer Day – 26 June 201248 Debug Perspective●Editor showing current line and breakpoints●Debug View controls debug flow●Step Over Ste
Red Hat Developer Day – 26 June 201249 Debug Perspective Continued..
Red Hat Developer Day – 26 June 20125 Eclipse Terminology Continued●Eclipse View●Simply a window●Eclipse Perspective●Group of Views possibly with defa
Red Hat Developer Day – 26 June 201250 Profiling Your Executable●Right-click on executable and select Profile As...●Profile button profiles las
Red Hat Developer Day – 26 June 201251 Valgrind (Memory Allocation Profiling)●Valgrind View shows charts and errors●Can change type of tool used in Pr
Red Hat Developer Day – 26 June 201252 Oprofile●Requires root access to run (opcontrol binary)●Root password will be asked for●Set-up required before
Red Hat Developer Day – 26 June 201253 Callgraph (Function Call Tracking)●Profile As -> Function callgraph●Requires SystemTap under the covers to r
Red Hat Developer Day – 26 June 201254 Mylyn – Task Management●Shipped in RHEL eclipse-mylyn* packages●Task time●Can set deadlines for each task●Can t
Red Hat Developer Day – 26 June 201255 Mylyn – Continued..●Tasks are shown in Task List View●Window -> Show View -> Task List●Not to be confused
Red Hat Developer Day – 26 June 201256 Mylyn Continued..●Task Query
Red Hat Developer Day – 26 June 201257 RPM Spec Editor●RHEL eclipse-rpm-editor package●Default editor for .spec files●Colourization and outline view●H
Red Hat Developer Day – 26 June 201258 RPM Spec Editor Continued..●Can create rpm project●New -> Other... -> RPM -> RPM Project●Creates RPMS,
Red Hat Developer Day – 26 June 201259 Potential Future Enhancements●Upgrade Eclipse component base (Indigo/Juno)●Git support (egit/jgit upstream plug
Red Hat Developer Day – 26 June 20126 CDT (C/C++ Development Tooling)●Set of features/plug-ins to supply C/C++ IDE●Shipped as eclipse-cdt package in R
Red Hat Developer Day – 26 June 20127 JDT (Java Development Tools)●Set of features/plug-ins to support Java IDE●Shipped as eclipse-jdt package in RHEL
Red Hat Developer Day – 26 June 20128 PDE (Plug-in Development Environment)●Set of features/plug-ins to develop features/plug-ins●Shipped as eclipse-p
Red Hat Developer Day – 26 June 20129 Importing Code Into Eclipse●Eclipse has support for multiple Team Providers●CVS is installed with main eclipse-p
Komentarze do niniejszej Instrukcji