ITypedRegion partition= TextUtilities.getPartition(document, fPartitioning, command.offset);
ITypedRegion partition= TextUtilities.getPartition(document, fPartitioning, command.offset); if (partition == null) return;
	public void customizeDocumentCommand(IDocument document, DocumentCommand command) {				if (!isSmartMode())			return;		try {						if (command.text != null && command.length == 0) {				String[] lineDelimiters= document.getLegalLineDelimiters();				int index= TextUtilities.endsWith(lineDelimiters, command.text);				if (index > -1) {					// ends with line delimiter					if (lineDelimiters[index].equals(command.text))						// just the line delimiter						jdocIndentAfterNewLine(document, command);					return;				}			}						if (command.text != null && command.text.equals("/")) { //$NON-NLS-1$				jdocIndentForCommentEnd(document, command);				return;			}			ITypedRegion partition= TextUtilities.getPartition(document, fPartitioning, command.offset);						int partitionStart= partition.getOffset();			int partitionEnd= partition.getLength() + partitionStart;									String text= command.text;			int offset= command.offset;			int length= command.length;			// partition change			final int PREFIX_LENGTH= "/*".length(); //$NON-NLS-1$			final int POSTFIX_LENGTH= "*/".length(); //$NON-NLS-1$			if ((offset < partitionStart + PREFIX_LENGTH || offset + length > partitionEnd - POSTFIX_LENGTH) ||				text != null && text.length() >= 2 && ((text.indexOf("*/") != -1) || (document.getChar(offset) == '*' && text.startsWith("/")))) //$NON-NLS-1$ //$NON-NLS-2$				return;						if (command.text == null || command.text.length() == 0)				jdocHandleBackspaceDelete(document, command);					else if (command.text != null && command.length == 0 && command.text.length() > 0)				jdocWrapParagraphOnInsert(document, command);		} catch (BadLocationException e) {			JavaPlugin.log(e);		}	}