Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bonita
bonita-studio
Commits
0ec9e247
Commit
0ec9e247
authored
Jan 13, 2016
by
Romain Bioteau
Browse files
Fix groovy completion
parent
65d67aea
Changes
1
Hide whitespace changes
Inline
Side-by-side
bundles/plugins/org.bonitasoft.studio.groovy.ui/src/org/bonitasoft/studio/groovy/ui/contentassist/VariablesTypeCompletionProposal.java
View file @
0ec9e247
...
...
@@ -69,6 +69,7 @@ public class VariablesTypeCompletionProposal implements IJavaCompletionProposalC
@Override
public
List
<
ICompletionProposal
>
computeCompletionProposals
(
final
ContentAssistInvocationContext
context
,
final
IProgressMonitor
monitor
)
{
final
List
<
ICompletionProposal
>
list
=
new
ArrayList
<
ICompletionProposal
>();
boolean
extendContext
=
false
;
try
{
if
(
context
instanceof
JavaContentAssistInvocationContext
)
{
final
ITextViewer
viewer
=
context
.
getViewer
();
...
...
@@ -80,8 +81,7 @@ public class VariablesTypeCompletionProposal implements IJavaCompletionProposalC
if
(
coreContext
!=
null
&&
!
coreContext
.
isExtended
())
{
// must use reflection to set the fields
ReflectionUtils
.
setPrivateField
(
InternalCompletionContext
.
class
,
"isExtended"
,
coreContext
,
true
);
// ReflectionUtils.setPrivateField(InternalCompletionContext.class, "extendedContext", coreContext,
// new GroovyExtendedCompletionContext(getContext(), requestor.currentScope));
extendContext
=
true
;
}
final
ICompilationUnit
unit
=
((
JavaContentAssistInvocationContext
)
context
).
getCompilationUnit
();
if
(
unit
instanceof
GroovyCompilationUnit
)
{
...
...
@@ -167,7 +167,7 @@ public class VariablesTypeCompletionProposal implements IJavaCompletionProposalC
}
}
finally
{
final
CompletionContext
coreContext
=
((
JavaContentAssistInvocationContext
)
context
).
getCoreContext
();
if
(
coreContext
!=
null
&&
coreContext
.
isExtended
())
{
if
(
extendContext
&&
coreContext
!=
null
&&
coreContext
.
isExtended
())
{
// must use reflection to set the fields
ReflectionUtils
.
setPrivateField
(
InternalCompletionContext
.
class
,
"isExtended"
,
coreContext
,
false
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment