code_junkie

Hidden features of Eclipse [closed]

Nov 10th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Display display = new |
  2.  
  3. new Display()|
  4.  
  5. Display display = new Display()|
  6.  
  7. if (${arg:localVar} == null)
  8. throw new ${exception:link(NullPointerException,IllegalArgumentException)}("${arg:localVar} is null");
  9.  
  10. public class MyClass {
  11. public MyClass(int something|) {
  12. }
  13. }
  14.  
  15. public class MyClass {
  16. private final Object something;
  17. public MyClass(Object something) {
  18. this.something = something;
  19. }
  20. }
  21.  
  22. public class MyClass {
  23. private final Object something;
  24. public MyClass(Object something) {
  25. npe|
  26. this.something = something;
  27. }
  28. }
  29.  
  30. public class MyClass {
  31. private final Object something;
  32. public MyClass(Object something) {
  33. if (something == null)
  34. throw new NullPointerException("something is null");
  35. this.something = something;
  36. }
  37. }
  38.  
  39. 1: public void foo()
  40. 2: {
  41. 3: somecode();
  42. 4: if ( blah ) return;
  43. 5:
  44. 6: bar();
  45. 7: }
  46.  
  47. if(i==0|)
  48.  
  49. if(i==0) {|
  50.  
  51. void someQuery() {
  52. createJdbcTemplate()
  53. }
  54.  
  55. void someQuery() {
  56. JdbcTemplate myTemplate = createJdbcTemplate();
  57. }
  58.  
  59. import X;
  60.  
  61. ...
  62. X.callSomething();
  63.  
  64. import static X.callSomething;
  65.  
  66. ...
  67. callSomething();
Add Comment
Please, Sign In to add comment