Changes between Version 13 and Version 14 of ConfiguringIDE


Ignore:
Timestamp:
07/20/2016 11:15:06 PM (7 years ago)
Author:
Rene Ranzinger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ConfiguringIDE

    v13 v14  
    77''' ''Please note'' ''': All settings on this page are recommendations and show my personal preferences. If something does not work for you or you disagree with it please feel free to ignore the corresponding chapters. After all your settings are as right and wrong as mine are.
    88
    9 == Settings for Text Editors ==
     9== Preference based configurations ==
     10
     11=== Settings for Text Editors ===
    1012The following settings apply to all text editors include Java and XML editors. To change these settings open the IDE preferences and go to ''General'' > ''Editors'' > ''Text Editors'':
    1113
     
    1618[[Image(configuration_texteditor.png)]]
    1719
    18 == Typing in Java ==
     20=== Typing in Java ===
    1921The following settings can be found in the preferences in ''Java'' > ''Editor'' > ''Typing''.
    2022
     
    2426[[Image(configuration_typing.png)]]
    2527
    26 == Highlighting of brackets ==
     28=== Highlighting of brackets ===
    2729It is useful to see where the current code block starts and ends. In the Eclipse preference under ''Java'' > ''Editor'' you can change the '''Bracket highlighting''' to '''Eclosing brackets'''. Now the enclosing () or {} will be highlighted when placing the cursor.
    2830
    2931[[Image(configuration_javaeditor.png)]]
    3032
    31 == Link the editors with the Package Explorer view ==
    32 Sometimes it is hard to find out where the file you have opened in an editor is physically located (e.g. which project, which package, which folder). Linking editors and ''Package Explorer'' make sure that the file from the current active editor is always selected in the ''Package Explorer''. To enable or disable this feature click the link button in the ''Package Explorer'':
     33== Code formatter ==
     34By default Eclipse follows the Java code style. But some people find the arrangement of brackets, new lines and so on not easy to read. In that case you can create your own code formatter using the preference page ''Java'' > ''Code Style'' > ''Formatter''
    3335
    34 [[Image(configuration_link.png)]]
     36[[Image(configuration_formatter.png)]]
    3537
    36 == Save Actions ==
     38* '''New ...''' create a new named code formatter
     39* '''Edit ...''' make changes to the selected formatter, as part of the following dialog you have the option to save the settings to a file by using the '''Export...''' button.
     40* '''Import...''' import the formatter settings from a file that has been exported before. This is very convenient if a new workspace is create
     41
     42The options to customize an own formatter are very diverse and will not be described here. The system is self-explanatory. However an example formatter is attached to this article (attachment:formatter.zip).
     43
     44=== Save Actions ===
    3745Eclipse IDE has the option to cleanup your Java code when saving a file. The settings can be found in the preferences on the page ''Java'' > ''Editor'' > ''Save Actions''.
    3846
     
    4755[[Image(configuration_save.png)]]
    4856
    49 == Type filter ==
     57=== Type filter ===
    5058When using SWT or JFace controls it often happens that Eclipse can not automatically fix the imports since it does not know if java.awt.Button or org.eclipse.swt.widgets.Button is the right import. If you are not working with AWT or SWING in the workspace it is a good idea to filter their classes out, so that only SWT imports are left. This can be configured in the preferences on the page ''Java'' > ''Appearance'' > ''Type Filters'':
    5159
     
    5563[[Image(configuration_filter.png)]]
    5664
    57 == Autocompletion configuration ==
     65=== Autocompletion configuration ===
    5866When writing a method in Java autocompletion can be used to complete the method. But sometimes the start is not right and instead of ''x.something'' you write ''x.anything''. When you go back to the dot and trigger the autocompletion (''CTRL+Space'' in Windows) you can now select the right method but will end up with ''x.somethinganything'' or ''x.something()anything'' because Eclipse inserted the method rather than overwrite. When using autocompletion Java will by default add the names of the method arguments as placeholders to be replaced with the right variables. However it is also possible to let Eclipse guess the best option and autofill the arguments with the corresponding variables. If that happens often you want to change this behavior in preferences on page ''Java'' > ''Editor'' > ''Content Assist'':
    5967* '''Completion overwrites''' will fix the mentioned behavior.
     
    6472''' ''Please Note'' ''': The guessing of the parameters does not free you from careful checking that the arguments are correct. Even if Eclipse gets it right in 90+ % of all cases.
    6573
    66 == Hungarian notation and this. ==
     74=== Hungarian notation and this. ===
    6775If you prefer a certain prefix or suffix scheme for naming your variable you can configure this in the preferences on page ''Java'' > ''Code Style''. You can also configure Eclipse to use the ''this.'' qualifier when generating code involving member variables:
    6876* '''Conventions for variable names''' tables allows to customize prefix and suffix for variables
     
    7179[[Image(configuration_stype.png)]]
    7280
    73 == Show Breadcrumb ==
     81== Other configurations ==
     82
     83=== Show Breadcrumb ===
    7484Another way to keep track of the location of the current file is to enable the breadcrumb feature on top of the Java editor. To enable right click in the Java editor (any file) and select '''Show in Breadcrumb'''. Any Java editor will have this feature now. To disable it right click on a breadcrumb and choose '''Hide Breadcrumb'''.
    7585
    7686[[Image(breadcrumb.png)]]
    7787
    78 == Package presentation ==
     88=== Package presentation ===
    7989By default Eclipse will present each Java package in the ''Package Explorer'' as an entry under ''src'' with its full package name. If the package hierarchy is very deep this can become confusing and space consuming. In this case it may be helpful to present the packages as a tree rather than a list. The following image illustrate the difference:
    8090
     
    8595[[Image(compare_package_menu.png)]]
    8696
    87 == Working sets ==
     97=== Working sets ===
    8898If an application consists of multiple projects that are present in the workspace it is easily overwhelming and hard to keep track of the current working environment. Eclipse working sets allow to hide certain elements from the ''Package Explorer'' reducing the visible elements to a desired set of projects. This is useful if you are working on a single or a few projects right now. Since the other projects are not deleted but just hidden they can still be used for compiling and deploying but will not crowd up the ''Package Explorer''.
    8999
    90 === Creating a Working set ===
     100==== Creating a Working set ====
    91101* To create a working set select the menu of the ''Package Explorer'' (represented as a little triangle left of the minimize button) and choose '''Select Working Set...'''
    92102
     
    105115[[Image(workingset4.png)]]
    106116
    107 === Changing the working set ===
     117==== Changing the working set ====
    108118* To switch between the working sets open the menu of the ''Package Explorer'' (represented as a little triangle left of the minimize button) and choose '''Select Working Set...'''
    109119
     
    120130[[Image(workingset6.png)]]
    121131
    122 == Code formatter ==
    123 By default Eclipse follows the Java code style. But some people find the arrangement of brackets, new lines and so on not easy to read. In that case you can create your own code formatter using the preference page ''Java'' > ''Code Style'' > ''Formatter''
     132=== Link the editors with the Package Explorer view ===
     133Sometimes it is hard to find out where the file you have opened in an editor is physically located (e.g. which project, which package, which folder). Linking editors and ''Package Explorer'' make sure that the file from the current active editor is always selected in the ''Package Explorer''. To enable or disable this feature click the link button in the ''Package Explorer'':
    124134
    125 [[Image(configuration_formatter.png)]]
     135[[Image(configuration_link.png)]]
    126136
    127 * '''New ...''' create a new named code formatter
    128 * '''Edit ...''' make changes to the selected formatter, as part of the following dialog you have the option to save the settings to a file by using the '''Export...''' button.
    129 * '''Import...''' import the formatter settings from a file that has been exported before. This is very convenient if a new workspace is create
    130 
    131 The options to customize an own formatter are very diverse and will not be described here. The system is self-explanatory. However an example formatter is attached to this article (attachment:formatter.zip).