Monday, July 1, 2013

Eclipse 4.3 new features

This release was more focused from the tools development and integration point of view, not much enhancements from the underlying platform architecture end.

Here you can find, top 10 Eclipse Kepler Features by Ian Bull 

Eclipse workbench internals

I have come across very good article on eclipse workbench internals. Please find the link below.
http://www.eclipse.org/articles/Article-UI-Workbench/workbench.html


Workbench Hierarchy:




Eclipse Workbench Representation:






Eclipse Nat Table - Advanced SWT Table widget

Nat Table is the implementation on top of SWT Table with a lot of additional features.

The list includes:
  • Multiple row spanning
  • Multiple column spanning
  • Better paining mechanism in table cells
  • Better way of hooking a model to the table.

 These are the features which I have used so far..but there are many more!!



Here is the link from Eclipse, where you can find everything about it.

Eclipse RCP Best Practices

Wednesday, June 26, 2013

Turning on debug tracing in Eclipse

 Create a file called ".options" at the root of your eclipse install (sibling of eclipse.exe). In this file put the following:

org.eclipse.core.resources/debug=true
org.eclipse.core.resources/build/invoking=true

Then start eclipse with the "-debug" command line argument. This will now print out information on when each builder is invoked, and how long it ran. This is the best way to get an accurate picture of what is happening - perhaps it is a particular project, or particular build, that is causing all the delays. Having this information will give us a better picture of what's going on.


sources:
http://wiki.eclipse.org/FAQ_How_do_I_use_the_platform_debug_tracing_facility%3F
http://www.eclipse.org/eclipse/platform-core/documents/3.1/debug.html

Friday, June 21, 2013

Eclipse spy plugin - ALT+SHIFT+F1


It's currently part of org.eclipse.pde.runtime plug-in.

While working on eclipse, at any point of time if you want to know which class is currently being called, you can just press "ALT+SHIFT+F1". It will show you the dialog like below with classes which are involved.


Wednesday, June 5, 2013

JavaScript Learning #8 - Object-Oriented JavaScript Tip: Creating Static Methods, Instance Methods


Custom JavaScript objects can have instance methods (function that are associated with a particular JavaScript object), but like other Object-Oriented languages, they can also have static methods, that is functions that are associated with the JavaScript class that created an object, as opposed to the object itself. This is useful in cases where a function (a.k.a. a method) will not be different in different object instances. Let’s look at an example…

Suppose you created a class to handle simple arithmetic calculations:

function Calculator()
{

}
To begin with, an instance method could be added to this class in one of two ways, either inside the constructor or through the class prototype. In this example, one method called multiply will be created, which returns the product of two values multiplied together. First, implemented in the constructor it looks like:

function Calculator()
{
this.multiply = function(val1 , val2)
{
return (val1*val2);
}
}
Via the class prototype, which is a more readable solution in my opinion, it would look like:

function Calculator()
{
}

Calculator.prototype.multiply = function(val1 , val2)
{
return (val1*val2);
}
Use of this method would then occur through instances of the Calculator class, like so:

var calc = new Calculator();
alert( calc.multiply(4,3) ); //pop-up alert with product of 4 times 3
However, it shouldn’t really be necessary to create an object to use the multiplymethod, since the method isn’t dependent on the state of the object for its execution. The method can be moved to the class to clean up this code a bit. First the class definition is created, which looks almost identical to the instance method declaration above, with the exception of the prototype keyword being removed:

function Calculator()
{
}

Calculator.multiply = function(val1 , val2)
{
return (val1*val2);
}
Now the multiply method can be called through the class itself, instead of an instance of the class, like so:

alert( Calculator.multiply(4,3) ); //pop-up alert with product of 4 times 3

source:
http://blog.anselmbradford.com/2009/04/09/object-oriented-javascript-tip-creating-static-methods-instance-methods/