public void setup(IDocument document)
  {
    IDocumentPartitioner partitioner = new FastPartitioner(ShadowPlugin.getDefault().getPartitionScanner(), ShadowPartitionScanner.SHADOW_PARTITION_TYPES);
    if ((document instanceof IDocumentExtension3)) {
      ((IDocumentExtension3)document).setDocumentPartitioner("__shadow_partioning", partitioner);
    }
    partitioner.connect(document);
  }