Install a cool dark theme for eclipse

screenshot-ubuntu_v0.8.2

This theme is called Moonrise UI Theme.

Installation:

  • Install the plugin;
  • Restart Eclipse and go to Window > Preferences > General > Appearance;
  • Select MoonRise (standalone) or, for a little better tabs decoration, install Eclipse 4 Chrome Theme from marketplace or from here and select MoonRise;

Take a backup of your preferences before importing a new one so you can safely restore them if you need (File > Export... then select General > Preferences);

sources_syntax_colors

https://marketplace.eclipse.org/content/eclipse-moonrise-ui-theme

http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=1403812

 

Debugging WordPress with Eclipse PHP Development Toolkit

Requirements

Firstly, you need to have insalled XAMPP, and Eclipse Luna (or and IDE with PDT support)

Configure PHP to Load Xdebug

Add these lines to your php.ini file (at c:\xampp\php\php.ini or somewhere else depending on your platform):

zend_extension = “C:\xampp\php\ext\php_xdebug.dll”
xdebug.remote_enable = 1

Verify XDebug

Create a page called test.php in your web root folder, and add a call to the phpinfo() function:

<?php phpinfo(); ?>

Configure PHP Debug in Eclipse

  1. Create a new project using the location of the current WordPress location.
  2. Click the Debug drop down arrow and select Debug Configurations.
  3. Enter the following information as shown in the picture:
    Name—Type a name for the server.
    Debugger—Select XDebug.
    Base URL—Type the URL for your local domain test.
    Local Web Root—Set the path of your web root.

Configure PHP Debug

Test the Debugger

Add the following code to the function.php fine in the active theme of the wordpress installation. Then add a break point and run the debug button.

[cc lang=”php”]
add_filter( ‘the_content’, ‘my_filter_content_func’ );
 
function my_filter_content_func( $content ) {
  $words_replace = array(‘wordpress’);
  $content = str_ireplace( $words_replace, ‘MyBlog’, $content );
  return $content;
}
[/cc]
Reference:
https://www.genuitec.com/debugging-php-with-eclipse-pdt/

https://eclipse.org/pdt/articles/debugger/os-php-eclipse-pdt-debug-pdf.pdf

How to Attach Java source files with Eclipse IDE

In Eclipse, go to Window -> Preferences -> Java -> Installed JREs -> Add and choose the JDK you have in your system.

Eclipse will now list the JARs found in the dialog box. There, select the rt.jar and choose Source Attachment. Select External location and click External File. Go to the folder were Java JDK is installed. There you’ll fine the src.zip file. Select it and click ok.

Source Code Analyzer

FindBugs™ – Find Bugs in Java Programs

This is the web page for FindBugs, a program which uses static analysis to look for bugs in Java code.

http://findbugs.sourceforge.net/

PMD

PMD is a source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth.

http://pmd.sourceforge.net/

PMD scans Java source code and looks for potential problems like:

  • Possible bugs – empty try/catch/finally/switch statements
  • Dead code – unused local variables, parameters and private methods
  • Suboptimal code – wasteful String/StringBuffer usage
  • Overcomplicated expressions – unnecessary if statements, for loops that could be while loops
  • Duplicate code – copied/pasted code means copied/pasted bugs

 

Swing Explorer UI

Swing Explorer is a Freeware tool for Swing application developers which is intended for visual exploring of a Swing-based application internals.

Find all top-level components (Windows, Frames, Dialogs)
Browse through component hierarchy
Monitor AWT/Swing events
Debug 2D graphics
Dig into source codeMonitor threading rule violations

http://www.swingexplorer.com/?page=download