Posts Tagged ‘eclipse tricks’

How to get Eclipse current workspace path

How to get Eclipse current workspace path
Eclipse does not show current workspace path easily. In order to know current eclipse workspace path, follow these simple steps.

Eclipse: Convert String Concat to StringBuilder

Eclipse: Convert String Concat to StringBuilder
Here is a simple yet effective trick for all Eclipse users. In Java we do lot of String concatenation using plain old "" + "". It is easy but not too effective. StringBuilder is always preferred if you have too many strings to concate.In below screencast, I convert concatenated strings to StringBuilder using eclipse Ctrl + 1 option....

Eclipse: Ignore “not declare static final serialVersionUID” warning

Eclipse: Ignore
Whenever you write a Java class in Eclipse which implements java.io.Serializable interface, you'll get this warning:The serializable class XXXX does not declare a static final serialVersionUID field of type longWhy do we need serialVersionUID? Whenever we implement java.io.Serializable interface, we explicitly tell JVM that this class can be serialized. Meaning, we might convert object of this ...

Eclipse: This project needs to migrate WTP metadata

Eclipse: This project needs to migrate WTP metadata
Sometimes Eclipse gives weird errors that you have no clue why is coming. For example, recently I got this strange error in eclipse's Problems view.This project needs to migrate WTP metadataTo remove this error, all you have to do is to re-validate the project.Select the project that you want to validate. Right-click the project and then ...

Eclipse resolve “resource is out of sync with the filesystem” permanently

Eclipse resolve
If you are a regular Eclipse user than you might have got this error many times. The error simply says, "you've made changes in files in your workspace from outside eclipse". The simplest solution would be to select the project and press F5 (Right click -> Refresh). This will re-sync any external changes to the file system and eclipse would now know what exactly is ...

Eclipse Tip: Add your own Code Template in Eclipse

Eclipse Tip: Add your own Code Template in Eclipse
If you are using Eclipse as your primary development IDE, then you may want to know about Code templates in Eclipse. Code templates are certain user defined (some are available by default) templates which can assist in rapid code writing. Not only code templates increase your code writing speed, but it also add consistency across the code.To add a code template, all you need to ...

Eclipse Tip: Hide Closed Projects in Eclipse Project Explorer View

Eclipse Tip: Hide Closed Projects in Eclipse Project Explorer View
Ever wanted to hide all those closed projects in eclipse? Well, here is a simple trick that you may not know already.Imagine your Eclipse workspace is filled with many projects that you created in past just to test some small functionality. Now you are done with these projects and hence you have closed it. Eclipse by default show all the closed projects in Project ...