PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/bundles/plugins-trunk/SideKick/sidekick/Asset.java

#
Java | 98 lines | 35 code | 11 blank | 52 comment | 0 complexity | 2a3a53d3806c702568a87c0edf371fc8 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /*
  2. * Asset.java
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 2000, 2005 Slava Pestov
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. package sidekick;
  23. import javax.swing.text.Position;
  24. /**
  25. * A block of code within a file. Assets correspond to nodes in the
  26. * Structure Browser and folds in the SideKick folding mode.
  27. */
  28. public abstract class Asset implements IAsset
  29. {
  30. //{{{ Instance variables
  31. protected String name;
  32. protected Position start, end;
  33. //}}}
  34. //{{{ Asset constructor
  35. public Asset(String name)
  36. {
  37. this.name = name;
  38. } //}}}
  39. //{{{ getName() method
  40. /**
  41. * Returns the name of the Asset.
  42. */
  43. public String getName()
  44. {
  45. return name;
  46. } //}}}
  47. //{{{ getStart() method
  48. /**
  49. * Returns the starting position.
  50. */
  51. public Position getStart()
  52. {
  53. return start;
  54. } //}}}
  55. //{{{ getEnd() method
  56. /**
  57. * Returns the end position.
  58. */
  59. public Position getEnd()
  60. {
  61. return end;
  62. } //}}}
  63. //{{{ setName() method
  64. /**
  65. * Set the name of the asset
  66. */
  67. public void setName(String name)
  68. {
  69. this.name = name;
  70. } //}}}
  71. //{{{ setStart() method
  72. /**
  73. * Set the start position
  74. */
  75. public void setStart(Position start)
  76. {
  77. this.start = start;
  78. } //}}}
  79. //{{{ setEnd() method
  80. /**
  81. * Set the end position
  82. */
  83. public void setEnd(Position end)
  84. {
  85. this.end = end;
  86. } //}}}
  87. }