本文整理汇总了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);
}
}
}
示例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);
}
}
示例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();
}
示例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;
}
示例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));
}
}
示例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;
}
示例7: setProvider
import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public void setProvider(MarkProvider provider) {
this.provider = provider;
}
示例8: createMarkProvider
import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent document) {
return provider;
}
示例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;
}
示例10: createMarkProvider
import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
public MarkProvider createMarkProvider(JTextComponent pane) {
return OccurrencesMarkProvider.get(pane.getDocument());
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例15: getMarkProvider
import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; //导入依赖的package包/类
MarkProvider getMarkProvider() {
return markProvider;
}