当前位置: 首页>>代码示例>>Java>>正文


Java MarkProvider类代码示例

本文整理汇总了Java中org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider的典型用法代码示例。如果您正苦于以下问题:Java MarkProvider类的具体用法?Java MarkProvider怎么用?Java MarkProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MarkProvider类属于org.netbeans.modules.editor.errorstripe.privatespi包,在下文中一共展示了MarkProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createMarkProviders

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
private static void createMarkProviders(Collection<? extends MarkProviderCreator> creators, List<MarkProvider> providers, JTextComponent pane) {
    for (MarkProviderCreator creator : creators) {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("creator = " + creator);
        }

        MarkProvider provider = creator.createMarkProvider(pane);
        if (provider != null) {
            providers.add(provider);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:AnnotationViewDataImpl.java

示例2: addListenersToMarkProviders

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
private void addListenersToMarkProviders() {
    for (Iterator p = markProviders.iterator(); p.hasNext(); ) {
        MarkProvider provider = (MarkProvider) p.next();
        
        PropertyChangeListener weakL = WeakListeners.propertyChange(this, provider);
        provider.addPropertyChangeListener(weakL);
        statusProvidersWeakLs.add(weakL);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AnnotationViewDataImpl.java

示例3: removeListenersFromMarkProviders

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
private void removeListenersFromMarkProviders() {
    if (markProvidersWeakLs.size() == markProviders.size()) { // Check if the listeners were not removed already
        int lIndex = 0;
        for (MarkProvider markProvider : markProviders) {
            markProvider.removePropertyChangeListener(markProvidersWeakLs.get(lIndex));
        }
    }
    markProvidersWeakLs.clear();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AnnotationViewDataImpl.java

示例4: createMergedMarks

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
static Collection<Mark> createMergedMarks(List<MarkProvider> providers) {
    Collection<Mark> result = new LinkedHashSet<Mark>();
    
    for(MarkProvider provider : providers) {
        result.addAll(provider.getMarks());
    }
    
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AnnotationViewDataImpl.java

示例5: gatherProviders

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
private void gatherProviders(JTextComponent pane) {
    long start = System.currentTimeMillis();

    // Collect legacy mark providers
    List<MarkProvider> newMarkProviders = new ArrayList<MarkProvider>();
    if (legacyCrap != null) {
        createMarkProviders(legacyCrap.getMarkProviderCreators(), newMarkProviders, pane);
    }
    
    // Collect mark providers
    String mimeType = DocumentUtilities.getMimeType(pane);

    if (mimeType == null) {
        mimeType = pane.getUI().getEditorKit(pane).getContentType();
    }
    
    Collection<? extends MarkProviderCreator> creators = 
        mime2Creators.get(mimeType);

    if (creators == null) { //nothing for current mimeType, probably wrong init
        lookupProviders(mimeType);
        creators = mime2Creators.get(mimeType);
    }

    createMarkProviders(creators, newMarkProviders, pane);

    removeListenersFromMarkProviders();
    this.markProviders = newMarkProviders;
    addListenersToMarkProviders();

    
    // Collect legacy status providers
    List<UpToDateStatusProvider> newStatusProviders = new ArrayList<UpToDateStatusProvider>();
    if (legacyCrap != null) {
        createStatusProviders(legacyCrap.getUpToDateStatusProviderFactories(), newStatusProviders, pane);
    }
    
    // Collect status providers
    Collection<? extends UpToDateStatusProviderFactory> factories = 
        mime2StatusProviders.get(mimeType);
    if (factories != null) {
        createStatusProviders(factories, newStatusProviders, pane);
    } else {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Factories set to null in mimeType " + mimeType); //NOI18N
        }
    }

    removeListenersFromStatusProviders();
    this.statusProviders = newStatusProviders;
    addListenersToStatusProviders();
    
    
    long end = System.currentTimeMillis();
    if (AnnotationView.TIMING_ERR.isLoggable(ErrorManager.INFORMATIONAL)) {
        AnnotationView.TIMING_ERR.log(ErrorManager.INFORMATIONAL, "gather providers took: " + (end - start));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:59,代码来源:AnnotationViewDataImpl.java

示例6: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent document) {
    if (ENABLE && !switchOff)
        return new CaretMarkProvider(document);
    else
        return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:CaretMarkProviderCreator.java

示例7: setProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public void setProvider(MarkProvider provider) {
    this.provider = provider;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:TestMarkProviderCreator.java

示例8: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent document) {
    return provider;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:TestMarkProviderCreator.java

示例9: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
@Override
public MarkProvider createMarkProvider (JTextComponent pane) {
    AnnotationMarkProvider amp = new AnnotationMarkProvider();
    pane.putClientProperty(PROVIDER_KEY, amp);
    return amp;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:AnnotationMarkInstaller.java

示例10: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent pane) {
    return OccurrencesMarkProvider.get(pane.getDocument());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:OccurrencesMarkProviderCreator.java

示例11: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent pane) {
    AnnotationMarkProvider amp = new AnnotationMarkProvider();
    pane.putClientProperty(PROVIDER_KEY, amp);
    return amp;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:AnnotationMarkInstaller.java

示例12: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent pane) {
    AnnotationMarkProvider amp = new AnnotationMarkProvider();
    pane.putClientProperty(AnnotationMarkInstaller.PROVIDER_KEY, amp);
    return amp;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:AnnotationMarkInstaller.java

示例13: setMarks

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public void setMarks(List<AnnotationMark> marks) {
    List old = this.marks;
    this.marks = marks;
    firePropertyChange(MarkProvider.PROP_MARKS, old, marks);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:AnnotationMarkProvider.java

示例14: createMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
MarkProvider createMarkProvider(JTextComponent target) {
    DiffSidebar sideBar = getSideBar(target);
    return (sideBar != null) ? sideBar.getMarkProvider() : null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:DiffSidebarManager.java

示例15: getMarkProvider

import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
MarkProvider getMarkProvider() {
    return markProvider;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:DiffSidebar.java


注:本文中的org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。