Showing posts with label Java IDE. Show all posts
Showing posts with label Java IDE. Show all posts

Thursday, January 17, 2013

hotkey directly to File Search tab in eclipse

Go to

preferences\general\keys\

type “file Search”, then Type “ctrl+H” in Binding. Now “Ctrl+H” brings you to the file search directly



keybinding

Tuesday, August 7, 2012

Eclipse ResourceBundle Editor

It is good for editing resource bundles. Let you manage all localized properties files in one screen. Easy to handle Unicode. I agree it should be a standard plugin of eclipse. :)

http://sourceforge.net/projects/eclipse-rbe/

Wednesday, September 22, 2010

Alternative way to do remote debug in eclipse

The normal way to do the remote debug is to add the JVM argument which opens a port on the machine where the java code is running and the client eclipse is going to hook up that port on that machine.

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044


But in some cases, the server does not allow you open and connect on a new port because of the security issue, blar blar balr... There is an alternative way to do the remote debug which is open a port on the machine where eclipse is running, and let the server connect to that machine.



The JVM argument on server is



-Xdebug -Xrunjdwp:transport=dt_socket,address=142.174.39.161:6767


This tells the JVM that all debug information should be sent to 142.174.39.161:6767. The ip address is the ip of the machine where eclipse is running. In eclipse, you only need setup it listen on port 6767.



eclipseRemoteDebug

Wednesday, June 16, 2010

Skip Over Dynamic Proxy Classes when Debugging in Eclipse

Setup the step filter for java debug to skip the proxy class.

avoidProxyDebug

$Proxy* will ignore the proxy class.

Thursday, September 10, 2009

M2clipse and Eclipse 3.5 WTP

I want maven to manage the dependency and WTP to enable the tomcat inside eclipse. M2clipse and WTP are separated projects and they are not friendly to each other.

Before start, make sure M2clipse already installed. 

New Dynamic Web Project in eclipse.

In the wizard, change the src path, output folder and the webContent dir to be the one used by maven.

src
src/main/java
src/main/resource

output folder
target/classes

webContent
src/main/webapp

wizard1

wizard2

 

When the project is created, you can setup a tomcat server. The project created is able to be added to the tomcat server.

Maven –> Enable Dependency Management

Right click the project, Maven –> Enable Dependency Management

It will popup the window to let you input groupid, artifactid…..

Once it is done, it will generate the pom.xml and related files for m2clipse. The project is still able to be added to the tomcat server.

You may have the error “Java compiler level does not match the version of the installed Java project facet.” Change the compiler version in org.eclipse.jdt.core.prefs in the .settings. dir.

Right click the web project –> Properties –> Java EE Module Dependencies

select Maven Dependencies and the project in the same workspace. In the example below, my web project depends on the quartzspring project in the workspace.

dependencies

Publish the tomcat, look into the directory where it is deployed, check if all files are there. It works for me.

Tuesday, August 25, 2009

Eclipse dropins dir

可以直接将 plugin 放到 dropins 目录下,即可自动完成安装。
dropins 目录支持下列形式的结构。
1、

eclipse/
--dropins/
--org.eclipse.core.tools_1.4.0.200710121455.jar
--org.eclipse.releng.tools_3.3.0.v20070412/
--plugin.xml


2、



eclipse/
--dropins/
--eclipse/
--features/
--plugins/


3、



eclipse/
--dropins/
--emf/
--eclipse/
--features/
--plugins/
--gef/
--eclipse/
--features/
--plugins/
... etc ...


4、



eclipse/
--dropins/
--emf.link
最后一种就相当原来的 links 目录,只要写
path = ... 就可以了。

Thursday, January 15, 2009

Useful Eclipse Hotkeys

Moving around
  • Ctrl+J — Incremental Search
  • Ctrl+F6 — Switch between last used files
  • Alt+arrow — keys to move to previous/next used files
  • Ctrl+E - open editor list
  • F3 — Open declaration
  • Ctrl+Alt+H — Open Call Hierarchy
  • Ctrl+K - Next occurrence (Previous occurrence : Ctrl+Shift+K)
  • Ctrl+Shift+G - search in the workspace

Editing
  • Ctrl+1 — Quick Fix: press while cursor is positioned at member variable, parameter, selection, warnings, errors, ...
  • Ctrl+2 - Quick Assistance
  • Alt+Shift+T — Show Refactor Quick Menu
  • Alt+Shift+S - show the Source menu
  • Alt+Shift+R - Rename
  • Alt + Shift + I - Inline
Running and Debug
  • Ctrl + R - Run to the cursor
  • Ctrl + F11 - Run last time execution
  • Alt + Shift + X, T - Running JUnit
Other
  • Ctrl + O - Quick Outline, it is very useful when you maximum the editor and cannot see the view of outline.
  • Ctrl + T - Hierarchy layout
  • Alt+Shift+Up - Expand Selection to enclosing element (Brother: Alt+Shift+Down)
  • Alt+Shift+ Arrow Up - Select the outside element. If the cursor is a word, it will select the whole word, just like double click mouse on a word.
  • Ctrl+Shift+L - List all hot keys
  • Ctrl+M - Maximum/restore the current view

Wednesday, December 3, 2008

Access Restriction on JAI libraries in Eclipse

In .classpath file, replace

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

with

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

Wednesday, September 3, 2008

Eclipse RCP

http://www.vogella.de/articles/RichClientPlatform/article.html