/** * Get the Java identifier terminated at the given offset * * @param document the document * @param template the template * @param offset the offset * @param length the length * @return the identifier part the Java identifier */ private String getIdentifierPart(IDocument document, Template template, int offset, int length) { return getContext(document, template, offset, length).getKey(); } }
/** * Get the Java identifier terminated at the given offset * * @param document the document * @param template the template * @param offset the offset * @param length the length * @return the identifier part the Java identifier */ private String getIdentifierPart(IDocument document, Template template, int offset, int length) { return getContext(document, template, offset, length).getKey(); } }
DocumentTemplateContext context= ((CompilationUnitContextType) type).createContext(document, position, compilationUnit); context.setVariable("selection", savedText); //$NON-NLS-1$ if (context.getKey().length() == 0) { try { document.replace(textSelection.getOffset(), 1, savedText);
DocumentTemplateContext context= ((CompilationUnitContextType) type).createContext(document, position, compilationUnit); context.setVariable("selection", savedText); //$NON-NLS-1$ if (context.getKey().length() == 0) { try { document.replace(textSelection.getOffset(), 1, savedText);