Thursday 19 June 2014

Eclipse configuration

Install from eclipse site, not apt-get:

http://www.eclipse.org/downloads/

I decompressed it into /opt/eclipse, and installed a symlink in /usr/bin

$ sudo ln -s /opt/eclipse/eclipse /usr/bin

Increase heap memory available to eclipse (prevents crashing):

$ vim /opt/eclipse/eclipse.ini

-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=1G
-Xms1G
-Xmx2G

Add support for C++11 features for the code inspection

Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery (tab) -> CDT GCC Built-in Compiler Settings. There is "Command to get compiler specs", add "-std=c++11" in there.

Syntax Highlighting theme:

Add the eclipse-color-theme repo to Eclipse marketplace

Help -> Install New Software -> Add -> Location: http://eclipse-color-theme.github.com/update

Select color theme:

Window -> Preferences -> General -> Appereance -> Color Theme : select Monkai or Obsidian or RecognEyes

Editor line highlight colors, etc:

Window -> Preferences -> General -> Editors -> Text Editors

Annotations:

Window -> Preferences -> General -> Editors -> Text Editors -> Annotations

C/C++ Indexer Markers -> Uncheck all
C/C++ Occurrences -> Uncheck Text as Squiggly Line
Codan Errors -> Uncheck all
Codan Warnings -> Uncheck all

Change default Build Action:

Window -> Preferences -> General -> Keys

Filter on "Build"

Remove Ctrl-B from Build All, and add it to Build Project

C++ build console:

Window -> Preferences -> C++ -> Build -> Console

Increase the number of lines
Set colors

Source hover popup:

Window -> Preferences -> C++ -> Editor

Source Hover Background

Automatically close:

Window -> Preferences -> C++ -> Editor -> Typing

Uncheck all auto-close

Editor mark occurrences:

Window -> Preferences -> C++ -> Editor -> Mark Occurrences

Uncheck "Keep marks when the selection changes"

Now restart eclipse to make sure your settings are saved.

Change scalability settings

Window -> Preferences -> C++ -> Editor -> Scalability

Increase number of lines to something larger

Unused:

Color theme:

http://marketplace.eclipse.org/content/eclipse-moonrise-ui-theme

Window -> Preferences -> General -> Appearance : select Dark or MoonRise

Remote System Explorer:

Help -> Install New Software

Search for Remote, I

New connection -> SSH Only

Connect

Sftp files -> navigate to src directory -> Rt click -> Create Remote Project

Project indexer search paths 

Project -> Properties -> C++ General -> Paths & Symbols

Includes
Library Paths

eg:

Includes:
    ${QTDIR}/include
    ${QTDIR}/include/QtCore
    ${QTDIR}/include/QtWidgets
    ${QTDIR}/include/QtGui

Library paths
    ${QTDIR}/include
    ${QTDIR}/include/QtCore
    ${QTDIR}/include/QtWidgets
    ${QTDIR}/include/QtGui

No comments:

Post a Comment