private IPartitionTokenScanner createKspPartitionScanner() { RuleBasedPartitionScanner scanner = new RuleBasedPartitionScanner(); scanner.setPredicateRules(new IPredicateRule[] { /* String entre double quote. */ new PatternRule("\"", "\"", new Token(KspRegionType.STRING.getContentType()), '\\', false), /* Commentaire multi-lignes */ new PatternRule("/*", "*/", new Token(KspRegionType.COMMENT.getContentType()), '\\', false), /* Commentaire fin de ligne */ new EndOfLineRule("//", new Token(KspRegionType.COMMENT.getContentType())) }); return scanner; }
/** * @return */ public IPartitionTokenScanner getTLAPartitionScanner() { if (partitionTokenScanner == null) { partitionTokenScanner = new TLAPartitionScanner(); } return partitionTokenScanner; }
private IDocumentPartitioner createPartitioner() { IPartitionTokenScanner scanner = new GlslPartitionScanner(); IDocumentPartitioner partioner = new GlslDebugPartitioner( scanner, GlslPartitionScanner.CONTENT_TYPES ); return partioner; }
/** * @param scanner * @param legalContentTypes */ public ExtendedFastPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); this.legalContentTypes = new HashSet<String>(legalContentTypes.length); for (String contentType : legalContentTypes) { this.legalContentTypes.add(contentType); } }
public String setupDocument(Document document) { IPartitionTokenScanner scanner = new RuleBasedPartitionScanner(); FastPartitioner partitioner = new FastPartitioner(scanner, new String[] { IDocument.DEFAULT_CONTENT_TYPE }); String[] managingPositionCategories = partitioner.getManagingPositionCategories(); String category = managingPositionCategories[0]; document.setDocumentPartitioner(partitioner); document.addPositionCategory(category); return category; }
@Override public Class<? extends IPartitionTokenScanner> bindIPartitionTokenScanner() { return TemplateAwarePartitionTokenScanner.class; }
public JenkinsPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
public BatchPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
public BashPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
public GradlePartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
public XMLPartitioner( IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
public XMLPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
/** Factory method for creating an dsl editor specific document partitioner */ public IDocumentPartitioner createDocumentPartitioner() { IPartitionTokenScanner scanner = createPartitionScanner(); if (scanner == null) return null; return new FastPartitioner(scanner, legalContentTypes); }
public IPartitionTokenScanner createPartitionScanner() { if (partitionScanner == null) { partitionScanner = new PartitionScanner(); } return partitionScanner; }
@Override public IPartitionTokenScanner getPartitionScanner() { return new FastTypeScriptPartitionScanner(); }
public Class<? extends IPartitionTokenScanner> bindIPartitionTokenScanner() { return PartitionTokenScanner.class; }
@Inject public DocumentPartitioner(IPartitionTokenScanner scanner, ITokenTypeToPartitionTypeMapper mapper) { this(scanner, mapper.getSupportedPartitionTypes()); }
public IPartitionTokenScanner getPartitionScanner() { return partitionScanner; }
public CompositePartitionScanner(IPartitionTokenScanner javaScanner, IPartitionTokenScanner jsniScanner) { this.javaScanner = javaScanner; this.jsniScanner = jsniScanner; }
public GlslDebugPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { super(scanner, legalContentTypes); }
@Override public IPartitionTokenScanner createPartitionScanner() { return new JSSourcePartitionScannerJFlex(); }
@Override public IPartitionTokenScanner createPartitionScanner() { return new DTDPartitionScanner(); }
@Override public IPartitionTokenScanner createPartitionScanner() { return new CSSSourcePartitionScannerJFlex(); }
public IPartitionTokenScanner rustPartitionScanner() { return new RustPartitionScanner(); }
@Override public IPartitionTokenScanner createPartitionScanner() { return partitionScanner; }
public IPartitionTokenScanner getScanner() { return fScanner; }
public static FastPartitioner setupPartitioner(Document document, IPartitionTokenScanner partitionScanner, String partitioning, String[] legalContentTypes) { FastPartitioner fp = new FastPartitioner(partitionScanner, legalContentTypes); EclipseUtils.setupDocumentPartitioner(document, partitioning, fp); return fp; }
public FastPartitioner createDocumentPartitioner() { IPartitionTokenScanner scanner = LangUIPlugin_Actual.createPartitionScanner(); return new FastPartitioner(scanner, LEGAL_CONTENT_TYPES); }
public static IPartitionTokenScanner createPartitionScanner() { return new GoPartitionScanner(); }
/** * Creates a new partitioner that uses the given scanner and may return * partitions of the given legal content types. * * @param scanner the scanner this partitioner is supposed to use * @param legalContentTypes the legal content types of this partitioner */ public TLAFastPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { fScanner= (TLAPartitionScanner) scanner; fLegalContentTypes= TextUtilities.copy(legalContentTypes); fPositionCategory= CONTENT_TYPES_CATEGORY + hashCode(); fPositionUpdater= new DefaultPositionUpdater(fPositionCategory); }
/** * Creates a new partitioner that uses the given scanner and may return partitions of the given legal content types. * * @param scanner * the scanner this partitioner is supposed to use * @param legalContentTypes * the legal content types of this partitioner * @since 2.2 */ public DocumentPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) { fScanner = scanner; fLegalContentTypes = TextUtilities.copy(legalContentTypes); fPositionCategory = CONTENT_TYPES_CATEGORY + hashCode(); fPositionUpdater = new DefaultPositionUpdater(fPositionCategory); }
/** * Create a partition scanner for this editor's top-level language * * @return */ public abstract IPartitionTokenScanner createPartitionScanner();
/** * Returns a scanner which is configured to scan * Java-specific partitions, which are multi-line comments, * Javadoc comments, and regular Java source code. * * @return a Java partition scanner */ public IPartitionTokenScanner getPartitionScanner() { return new FastJavaPartitionScanner(); }