01: package Schmortopf.JavaSourceEditor.TextSearch;
02:
03: /**
04: * Simple final data container used by EditorTextSearch.
05: */
06:
07: import Schmortopf.FileStructure.Descriptions.*;
08: import Shared.Logging.Log;
09:
10: public final class SearchFieldFSDResult {
11:
12: public final String labelText;
13: public FileStructureDescriptionForField fsd;
14: public final FileStructureDescription basisFSD;
15:
16: // toplevel or inherited
17: private boolean isTopLevel = true;
18:
19: /**
20: * Constructor.
21: * isTopLevel is used the same ways as in CodeCompletionListEntry:
22: * If its true, fsd must be a field of the basisFSD,
23: * otherwise it must be a field in the parentchain.
24: */
25: public SearchFieldFSDResult(final String labelText,
26: final FileStructureDescriptionForField fsd,
27: final boolean isTopLevel,
28: final FileStructureDescription basisFSD) {
29: this .labelText = labelText;
30: this .fsd = fsd;
31: this .basisFSD = basisFSD;
32: this .isTopLevel = isTopLevel; // toplevel or inherited
33: }
34:
35: public SearchFieldFSDResult cloneInstance() {
36: return new SearchFieldFSDResult(this .labelText, this .fsd,
37: this .isTopLevel, this .basisFSD);
38: }
39:
40: /**
41: * It's either toplevel or inherited
42: */
43: public boolean getIsTopLevel() {
44: return this .isTopLevel;
45: }
46:
47: /**
48: * A Debug output information method
49: */
50: public void displayInformation() {
51: Log.Info("SearchFieldFSDResult for fieldName "
52: + this .fsd.objectNameWithPosition.content
53: + " at startline "
54: + this .fsd.objectNameWithPosition.startLine
55: + " endLine " + this .fsd.objectNameWithPosition.endLine
56: + " startCol "
57: + this .fsd.objectNameWithPosition.startColumn
58: + " endCol "
59: + this .fsd.objectNameWithPosition.endColumn);
60: Log.Info("with classname " + this .fsd.simpleClassName.content);
61: Log.Info("with scopeStartLine " + this .fsd.scopeStartLine
62: + " scopeEndLine " + this .fsd.scopeEndLine);
63: Log.Info("with in basis fsd "
64: + this .basisFSD.fullyQualifiedClassNameBuffer
65: .toString());
66: } // displayInformation
67:
68: } // SearchFieldFSDResult
|