本文整理匯總了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;
}