EADS-3749 encountering issues with the displaying of code in Developer Studio when code folding is enabled
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
5 package org.netbeans.modules.plsql.fold;
7 import java.io.Serializable;
8 import org.netbeans.api.editor.fold.FoldType;
14 class FoldSearchObject implements Serializable {
16 private static final long serialVersionUID = 1L;
17 private final int startOffset;
18 private final int endOffset;
19 private FoldType foldType;
20 private FoldAdapter fold;
22 FoldSearchObject(int startOffset, int endOffset, FoldType foldType) {
23 this.startOffset = startOffset;
24 this.endOffset = endOffset;
25 this.foldType = foldType;
28 FoldSearchObject(FoldAdapter fold) {
33 public int getStartOffset() {
34 if (startOffset == -1) {
35 return fold.getStartOffset();
40 public int getEndOffset() {
41 if (endOffset == -1) {
42 return fold.getEndOffset();
47 public FoldType getFoldType(){
48 if (foldType == null) {
49 return fold.getFoldType();
55 public int hashCode() {
57 hash = 13 * hash + this.getStartOffset();
58 hash = 13 * hash + this.getEndOffset();
63 public boolean equals(Object obj) {
67 if (getClass() != obj.getClass()) {
70 final FoldSearchObject other = (FoldSearchObject) obj;
71 if (this.getStartOffset() != other.getStartOffset()) {
74 if (this.getEndOffset() != other.getEndOffset()) {
81 public String toString() {
82 return "FoldSearchObject{" + "startOffset=" + getStartOffset() + ", endOffset=" + getEndOffset() + '}';