Community
Participate
Working Groups
closing = "\"%>"; //$NON-NLS-1$
}
return delim + opening + getImportDeclaration() + closing;
return opening + getImportDeclaration() + closing + delim;
public String getImportDeclaration() {
if(proposal.getKind() == CompletionProposal.TYPE_REF) {
String signature = String.valueOf(proposal.getDeclarationSignature());
String completion = String.valueOf(proposal.getCompletion());
if(completion.indexOf(signature) != -1) {
if(completion.indexOf(signature + ".") != -1) {
jspProposal = createAutoImportProposal(proposal);
// it's fully qualified so we should
// add an import statement
// create an autoimport proposal
String newCompletion = completion.replaceAll(signature + ".", ""); //$NON-NLS-1$ //$NON-NLS-2$
String newCompletion = completion.replaceAll(signature + "\\.", ""); //$NON-NLS-1$ //$NON-NLS-2$
// java offset
int offset = proposal.getReplaceStart();