@@ -44,31 +44,32 @@ public void configure() throws CoreException {
44
44
public void deconfigure () throws CoreException {
45
45
}
46
46
47
- IProject p ;
47
+ private IProject project ;
48
48
49
49
@ Override
50
- public IProject getProject ( ) {
51
- return p ;
50
+ public void setProject ( final IProject project ) {
51
+ this . project = project ;
52
52
}
53
53
54
54
@ Override
55
- public void setProject ( IProject project ) {
56
- this . p = project ;
55
+ public IProject getProject ( ) {
56
+ return project ;
57
57
}
58
58
59
59
@ Override
60
- public GroovyOutlinePage getGroovyOutlinePageForEditor (String contextMenuID , GroovyEditor editor ) {
60
+ public GroovyOutlinePage getGroovyOutlinePageForEditor (final String contextMenuID , final GroovyEditor editor ) {
61
61
TCompilationUnit ounit = new TCompilationUnit (this , editor .getGroovyCompilationUnit ());
62
62
return new TGroovyOutlinePage (null , editor , ounit );
63
63
}
64
64
65
65
@ Override
66
- public boolean appliesTo (GroovyCompilationUnit unit ) {
66
+ public boolean appliesTo (final GroovyCompilationUnit unit ) {
67
67
return CharOperation .contains ('X' , unit .getFileName ());
68
68
}
69
69
70
70
public static class TGroovyOutlinePage extends GroovyOutlinePage {
71
- public TGroovyOutlinePage (String contextMenuID , GroovyEditor editor , OCompilationUnit unit ) {
71
+
72
+ public TGroovyOutlinePage (final String contextMenuID , final GroovyEditor editor , final OCompilationUnit unit ) {
72
73
super (contextMenuID , editor , unit );
73
74
}
74
75
@@ -82,26 +83,26 @@ public static class TCompilationUnit extends OCompilationUnit {
82
83
public OutlineExtender1 outlineExtender ;
83
84
public TType type ;
84
85
85
- public TCompilationUnit (OutlineExtender1 outlineExtender , GroovyCompilationUnit unit ) {
86
+ public TCompilationUnit (final OutlineExtender1 extender , final GroovyCompilationUnit unit ) {
86
87
super (unit );
87
- this .outlineExtender = outlineExtender ;
88
+ this .outlineExtender = extender ;
88
89
}
89
90
90
91
@ Override
91
- public IMember [] refreshChildren () {
92
- type = new TType (this , getElementName ());
93
- return new IMember [] { type };
92
+ public IMember getOutlineElementAt (final int caretOffset ) {
93
+ return type ;
94
94
}
95
95
96
96
@ Override
97
- public IMember getOutlineElementAt (int caretOffset ) {
98
- return type ;
97
+ public IMember [] refreshChildren () {
98
+ type = new TType (this , getElementName ());
99
+ return new IMember [] {type };
99
100
}
100
101
}
101
102
102
103
public static class TType extends OType {
103
104
104
- public TType (IOJavaElement parent , String name ) {
105
+ public TType (final IOJavaElement parent , final String name ) {
105
106
super (parent , new ConstantExpression (name ), name );
106
107
this .name = name ;
107
108
}
@@ -111,30 +112,30 @@ public ASTNode getElementNameNode() {
111
112
return getNode ();
112
113
}
113
114
114
- public TType addTestType (String name ) {
115
+ public TType addTestType (final String name ) {
115
116
TType t = new TType (this , name );
116
117
addChild (t );
117
118
return t ;
118
119
}
119
120
120
- public TMethod addTestMethod (String name , String returnType ) {
121
+ public TField addTestField (final String name , final String type ) {
122
+ TField f = new TField (this , name , type );
123
+ addChild (f );
124
+ return f ;
125
+ }
126
+
127
+ public TMethod addTestMethod (final String name , final String returnType ) {
121
128
TMethod m = new TMethod (this , name , returnType );
122
129
addChild (m );
123
130
return m ;
124
131
}
125
-
126
- public TField addTestField (String name , String typeSignature ) {
127
- TField f = new TField (this , name , typeSignature );
128
- addChild (f );
129
- return f ;
130
- }
131
132
}
132
133
133
134
public static class TMethod extends OMethod {
134
135
135
136
private String returnType ;
136
137
137
- public TMethod (OType parent , String name , String returnType ) {
138
+ public TMethod (final OType parent , final String name , final String returnType ) {
138
139
super (parent , new ConstantExpression (name ), name );
139
140
this .name = name ;
140
141
this .returnType = returnType ;
@@ -155,7 +156,7 @@ public static class TField extends OField {
155
156
156
157
private String typeSignature ;
157
158
158
- public TField (OType parent , String name , String typeSignature ) {
159
+ public TField (final OType parent , final String name , final String typeSignature ) {
159
160
super (parent , new ConstantExpression (name ), name );
160
161
this .name = name ;
161
162
this .typeSignature = typeSignature ;
0 commit comments