Skip to content

Commit

Permalink
[98] Variable modifications
Browse files Browse the repository at this point in the history
Remove possibility to create variables using unicode caracters (greek
alphabet, sum, prod and sqrt).
Generated code and LaTeX view are unchanged or equivalent.

Bug: cea-hpc#98
Signed-off-by: Vincent BLAIN <[email protected]>
  • Loading branch information
vblainobeo committed Aug 8, 2022
1 parent 3fb974e commit 52f5d9c
Show file tree
Hide file tree
Showing 204 changed files with 9,454 additions and 9,552 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
package fr.cea.nabla.ide.contentassist

import com.google.inject.Inject
import fr.cea.nabla.ir.transformers.ReplaceUtf8Chars
import fr.cea.nabla.services.NablaGrammarAccess
import org.eclipse.xtext.RuleCall
import org.eclipse.xtext.ide.editor.contentassist.ContentAssistContext
import org.eclipse.xtext.ide.editor.contentassist.ContentAssistEntry
import org.eclipse.xtext.ide.editor.contentassist.IIdeContentProposalAcceptor
import org.eclipse.xtext.ide.editor.contentassist.IdeContentProposalProvider

Expand All @@ -30,23 +28,10 @@ class NablaIdeContentProposalProvider extends IdeContentProposalProvider
case simpleVarRule,
case connectivityVarRule:
{
buildGrecLetterProposals(context, acceptor)
}
default:
super._createProposals(ruleCall, context, acceptor)
}
}

private def void buildGrecLetterProposals(ContentAssistContext context, IIdeContentProposalAcceptor acceptor)
{
for (p : ReplaceUtf8Chars.UTF8Chars.keySet)
{
val trueEntry = new ContentAssistEntry => [
prefix = context.prefix
proposal = p
]
acceptor.accept(trueEntry, proposalPriorities.getDefaultPriority(trueEntry))
}
}

}
Loading

0 comments on commit 52f5d9c

Please sign in to comment.