Eclipse

Manual Testing. http://download.boulder.ibm.com/ibmdl/pub/software/dw/demos/ManualTestingwEclipse/ManualTestingWithEclipseTPTP.htm?S_TACT=105AGX37&S_CMP=TAP2724T

Settings: General->Editors->Text Editors->Insert spaces for tabs General->Editors->Text Editors->Show line numbers General->Editors->Text Editors->Spelling->Encoding->Other=UTF-8

Automatically add license text in new file

  1. Go to Window->Preference->Java->Code Style->Code Templates.
  2. Paste your license in Code->New Java files
  3. In case you need to change ${user}, see Change ${user} variable.

Apache License

Reference: http://www.apache.org/licenses/LICENSE-2.0#apply

/**
 * Copyright ${year}  ${user} 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

GPL License

Reference: http://www.gnu.org/licenses/gpl-2.0.html#SEC4

/**
 * Copyright (C) ${year}  ${user}
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

Change ${user} variable

In eclipse.ini, add

-Duser.name=Xuan Ngo

Change the default text encoding in Eclipse to UTF-8

  1. In Eclipse, open Window->Preferences.
  2. Go to General->Workspace.
  3. Under the Text file encoding section, check Other and click on the drop down box to select UTF-8.

Compile your java code to different JRE

  1. Right-click on your project.
  2. Select Properties.
  3. Go to Java Compiler
  4. Check Enable project specific settings.
  5. Set the JRE that you like.

Disconnect project from SVN

To disconnect project from SVN, right-click on the project and select Team->Disconnect.

AttachmentSize
Image icon DisconnectSVN.png20.88 KB

Export/Import code style formater

It is located at Window->Preferences->Java->Code Style->Formater.

AttachmentSize
File EcFormatterSpacesOnly.xml28.06 KB

Show line number in Eclipse

  1. In Eclipse, open Window->Preferences.
  2. Go to General->Appearance->Editors->Text Editors, check Show line numbers.