MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap
Revision 54 as of 2024-01-28 12:37:47
  • Java
  • Eclipse

Contents

  1. Eclipse
    1. Eclipse 3.8.2
    2. Import Eclipse project
    3. .project file sample for nodeclipse
    4. Web Tools Platform 3.3.2
    5. Java formatter
    6. Eclipse Kepler
    7. Subeclipse tigris
    8. m2e plugin
    9. Eclipse Juno SR2 for Java EE
    10. Workspace settings/metadata
    11. Eclipse external tools
    12. Shortcuts
    13. Eclipse Luna - Java 8 support
    14. Show white spaces

Eclipse

A project aiming to provide a universal toolset for development. Open Source IDE.

http://www.eclipse.org/

Eclipse 3.8.2

Eclipse 3.8 provides bugfixes for Indigo & adds Java 7 support, but is not a 'packaged distribution' release, and will not be maintained after 4.3 "Kepler" is released. Features and plugins equivalent to a packaged distribution may be added from within the IDE http://en.wikipedia.org/wiki/Eclipse_%28software%29.

Archive:

  • http://archive.eclipse.org/eclipse/downloads/drops/R-3.8.2-201301310800/

Slackware64 14 - 64 bit

Run commands:

su
cd /tmp
wget http://ftp.rnl.ist.utl.pt/pub/eclipse/eclipse/downloads/drops/R-3.8.2-201301310800/eclipse-SDK-3.8.2-linux-gtk-x86_64.tar.gz
wget [[http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.8.2-201301310800/eclipse-SDK-3.8.2-linux-gtk-x86_64.tar.gz]]
tar xvzf eclipse-SDK-3.8.2-linux-gtk-x86_64.tar.gz 
mv eclipse eclipse3.8.2
mkdir -p /opt/ide
mv eclipse3.8.2/ /opt/ide/
cd /opt/ide/eclipse3.8.2/
chgrp users * -R

Slackware 14 - 32 bit

Run commands:

su
cd /tmp
wget [[http://eclipse.dcc.fc.up.pt/eclipse/downloads/drops/R-3.8.2-201301310800/eclipse-SDK-3.8.2-linux-gtk.tar.gz]]
tar xvzf eclipse-SDK-3.8.2-linux-gtk.tar.gz
# eclipse3.8.2
mkdir -p /opt/ide
mv eclipse3.8.2/ /opt/ide/
cd /opt/ide/eclipse3.8.2/
chgrp users * -R

On error

If error Job found still running after platform shutdown. appears in .log file, delete al plugins below .metadata/.plugins in workspace.

MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.ide.IDEWorkbenchActivityHelper$4

Import Eclipse project

On the folder project must exist the .project file.

Steps:

  • File
  • Import
  • Existing projects into workspace
  • Select root directory
  • browse
  • select project folder (inside must have the .project file)
  • Finish

.project file sample for nodeclipse

   1 <?xml version="1.0" encoding="UTF-8"?>
   2 <projectDescription>
   3         <name>nodeclipse-project</name>
   4         <comment></comment>
   5         <projects>
   6         </projects>
   7         <buildSpec>
   8                 <buildCommand>
   9                         <name>com.eclipsesource.jshint.ui.builder</name>
  10                         <arguments>
  11                         </arguments>
  12                 </buildCommand>
  13         </buildSpec>
  14         <natures>
  15                 <nature>org.nodeclipse.ui.NodeNature</nature>
  16                 <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
  17         </natures>
  18 </projectDescription>

Web Tools Platform 3.3.2

  • Help
  • Install new software
  • Add, Indigo repository: http://download.eclipse.org/webtools/repository/indigo/

  • Eclipse Web Developer Tools, including HTML, CSS, XHTML, etc.
  • XML, DTD and XML Schema Editors, validators, and XML Catalog support
  • Web Page Editor

Java formatter

  • Window
  • Preferences
  • Java
  • Code style
  • Formatter
  • Create new profile
  • Edit
  • Line wrapping tab, set maximum line width: 200
  • Line wrapping tab, line width for preview window: 80
  • Comments tab, set maximum line width for comments: 200

Eclipse Kepler

cd /tmp
wget http://eclipse.dcc.fc.up.pt/technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz
tar xvzf eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz 
 mv eclipse eclipse4.3.2
mkdir -p /opt/ide
mv eclipse4.3.2/ /opt/ide/
cd /opt/ide/eclipse4.3.2/
chgrp users * -R

Subeclipse tigris

  • Eclipse 3.8.2 and Help. Install new software
  • Add site http://subclipse.tigris.org/update_1.10.x , Subeclipse and SVNKit

m2e plugin

  • Eclipse 3.8.2 and Help. Install new software
  • Add site http://download.eclipse.org/technology/m2e/releases

  • Select version 1.4.1 disabling show only newer versions.

Eclipse Juno SR2 for Java EE

   1 wget http://eclipse.dcc.fc.up.pt/technology/epp/downloads/release/juno/SR2/eclipse-jee-juno-SR2-linux-gtk-x86_64.tar.gz
   2 cp /home/vitor/Downloads/eclipse-jee-juno-SR2-linux-gtk-x86_64.tar.gz /opt//ide/
   3 tar xvzf eclipse-jee-juno-SR2-linux-gtk-x86_64.tar.gz 
   4 ls -lah
   5 mv eclipse/ eclipseJunoSR2
   6 exit # as normal user
   7 cd /opt/ide/eclipseJunoSR2
   8 ./eclipse
   9 # install m2e and pdt from Install new software, Juno repository
  10 # wget http://www.svnkit.com/org.tmatesoft.svn_1.8.6.eclipse.zip # http://svnkit.com/download.php Eclipse update site archive
  11 wget http://subclipse.tigris.org/files/documents/906/49382/site-1.10.5.zip #subeclipse zipped archived site,  http://subclipse.tigris.org/archive/ 
  12 

Workspace settings/metadata

Usually workspace settings are stored in the folder <Workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings .

Eclipse global settings: <EclipseHome>/configuration/.settings/org.eclipse.ui.ide.prefs

Preferences are applied in following order: global preferences, then local (workspace) preferences

sample org.eclipse.ui.editors.prefs

AbstractTextEditor.Color.Background=64,64,64
AbstractTextEditor.Color.Background.SystemDefault=false
AbstractTextEditor.Color.FindScope=188,173,173
AbstractTextEditor.Color.Foreground=246,243,232
AbstractTextEditor.Color.Foreground.SystemDefault=false
AbstractTextEditor.Color.SelectionBackground=137,137,65
AbstractTextEditor.Color.SelectionBackground.SystemDefault=false
AbstractTextEditor.Color.SelectionForeground=0,0,0
AbstractTextEditor.Color.SelectionForeground.SystemDefault=false
PHPReadOccurrenceIndicationColor=97,97,97
PHPWriteOccurrenceIndicationColor=148,133,103
currentLineColor=80,80,80
eclipse.preferences.version=1
filteredSearchResultIndicationColor=63,63,106
javaScriptOccurrenceIndicationColor=97,97,97
lineNumberColor=192,192,192
lineNumberRuler=true
occurrenceIndicationColor=97,97,97
overviewRuler_migration=migrated_3.1
printMarginColor=192,192,192
pydevOccurrenceIndicationColor=156,156,92
searchResultIndicationColor=70,68,103
writeOccurrenceIndicationColor=148,133,103

sample org.eclipse.jdt.ui.prefs

content_assist_lru_history=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><history maxLHS\="100" maxRHS\="10"/>
content_assist_number_of_computers=17
content_assist_proposals_background=255,255,255
content_assist_proposals_foreground=0,0,0
eclipse.preferences.version=1
fontPropagated=true
java_bracket=255,255,255
java_comment_task_tag=172,193,172
java_default=246,243,232
java_doc_default=179,181,175
java_doc_keyword=204,147,147
java_doc_link=168,147,204
java_doc_tag=147,147,204
java_keyword=239,239,175
java_keyword_return=239,239,175
java_multi_line_comment=127,159,127
java_operator=240,239,208
java_single_line_comment=127,159,127
java_string=204,147,147
org.eclipse.jdt.internal.ui.navigator.layout=2
org.eclipse.jdt.ui.editor.tab.width=
org.eclipse.jdt.ui.formatterprofiles.version=12
org.eclipse.jdt.ui.javadoclocations.migrated=true
org.eclipse.jdt.ui.text.code_templates_migrated=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
org.eclipse.jdt.ui.text.custom_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
org.eclipse.jdt.ui.text.templates_migrated=true
org.eclipse.jface.textfont=1|Monospace|10.0|0|GTK|1|;
pf_coloring_argument=239,239,175
pf_coloring_assignment=246,243,232
pf_coloring_comment=127,159,127
pf_coloring_key=246,243,232
pf_coloring_value=204,147,147
proposalOrderMigrated=true
semanticHighlighting.annotation.color=128,128,128
semanticHighlighting.annotation.enabled=true
semanticHighlighting.class.color=202,230,130
semanticHighlighting.class.enabled=true
semanticHighlighting.deprecatedMember.bold=false
semanticHighlighting.deprecatedMember.color=255,255,255
semanticHighlighting.deprecatedMember.enabled=true
semanticHighlighting.field.bold=false
semanticHighlighting.field.color=179,183,132
semanticHighlighting.field.enabled=true
semanticHighlighting.interface.color=202,230,130
semanticHighlighting.interface.enabled=true
semanticHighlighting.localVariable.color=212,196,169
semanticHighlighting.localVariable.enabled=true
semanticHighlighting.localVariableDeclaration.bold=false
semanticHighlighting.localVariableDeclaration.color=212,196,169
semanticHighlighting.localVariableDeclaration.enabled=true
semanticHighlighting.method.color=223,190,149
semanticHighlighting.method.enabled=true
semanticHighlighting.methodDeclarationName.color=223,190,149
semanticHighlighting.methodDeclarationName.enabled=true
semanticHighlighting.number.color=138,204,207
semanticHighlighting.number.enabled=true
semanticHighlighting.staticField.bold=false
semanticHighlighting.staticField.color=147,162,204
semanticHighlighting.staticField.enabled=true
semanticHighlighting.staticFinalField.bold=false
semanticHighlighting.staticFinalField.color=83,220,205
semanticHighlighting.staticFinalField.enabled=true
semanticHighlighting.staticMethodInvocation.color=196,196,183
semanticHighlighting.staticMethodInvocation.enabled=true
sourceHoverBackgroundColor=161,152,121
spelling_locale_initialized=true
tabWidthPropagated=true
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true

Eclipse external tools

  • Window, Preferences, run/debug, string substitution
  • Run, External tools, External tools configuration
  • Link with default string substitutions https://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fconcepts-exttools.htm

Pylint example

  • Location: /home/user/.local/bin/pylint

  • Working dir: ${project_loc}

  • Arguments:--rcfile=${pylint_file} ${resource_loc}

The ${pylint_file} comes from a string substitution. Windows, Preferences, Run/Debug, String substitution.

The PYTHONPATH is the one setted in the current project (PyDev-PYTHONPATH).

Shortcuts

  • https://shortcutworld.com/Eclipse/win/Eclipse-Helios_Shortcuts

Ctrl+S           Save current file
Alt+Enter        Show and access file properties
Ctrl+Shift+R     Open Resource (file, folder or project)
Ctrl+F10, then n Show or hide line numbers
Ctrl+Shift+ +    Zoom text in
Ctrl+Shift+ -    Zoom text out
Ctrl+H           Search Workspace (Java Search, Task Search, and File Search)
Ctrl+Shift+F     Autoformat all code in Editor using code formatter
Ctrl+Shift+7     Comment / uncomment line or selection ( adds '//' )
Ctrl+/           Comment / uncomment line or selection ( adds '//' )
Ctrl+Space       Opens Content Assist (e.g. show available methods or field names)
Ctrl+1           Open Quick Fix and Quick Assist
Ctrl+O           Show code outline / structure
F3               Open Declaration: Jump to Declaration of selected class, method, or parameter
Ctrl+Shift+T     Open Type in Hierarchy
Alt+Shift+R      Rename selected element and all references
Alt+Shift+M      Extract selection to method
F6               Next step (line by line)

Ctrl+Shift+A     Code analysis #define in preferences, general, keys

Eclipse Luna - Java 8 support

   1 wget https://archive.eclipse.org/technology/epp/downloads/release/luna/SR2/eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz
   2 # Java 8 support
   3 cp eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz /opt
   4 cd /opt
   5 tar xvzf eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz 
   6 mv eclipse eclipse-luna-sr2
   7 cd eclipse-luna-sr2/
   8 chgrp users * -R

Show white spaces

  • Preferences > General > Editors > Text Editors -- Look for 'Show whitespace characters' and click on the link 'whitespace characters

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01