Java 类org.eclipse.jface.text.presentation.IPresentationDamager 实例源码

项目:eclipsensis    文件:NSISSourceViewer.java   
public void processPropertyQueue()
{
    HashSet<String> contentTypes = new HashSet<String>();
    for(Iterator<String> iter = mPropertyQueue.iterator(); iter.hasNext(); ) {
        String property = iter.next();
        for(int i=0; i<mConfiguredContentTypes.length; i++) {
            IPresentationDamager damager = fPresentationReconciler.getDamager(mConfiguredContentTypes[i]);
            if(damager instanceof IPropertyAdaptable) {
                IPropertyAdaptable adaptable = (IPropertyAdaptable)damager;
                if(adaptable.canAdaptToProperty(mPreferenceStore, property)) {
                    contentTypes.add(mConfiguredContentTypes[i]);
                    adaptable.adaptToProperty(mPreferenceStore, property);
                }
            }
        }
    }

    updatePresentation(contentTypes);
}
项目:eclipsensis    文件:NSISSourceViewer.java   
public void keywordsChanged()
{
    if(fPresentationReconciler != null) {
        final HashSet<String> contentTypes = new HashSet<String>();
        for(int i=0; i<mConfiguredContentTypes.length; i++) {
            IPresentationDamager damager = fPresentationReconciler.getDamager(mConfiguredContentTypes[i]);
            if(damager instanceof NSISDamagerRepairer) {
                ((NSISDamagerRepairer)damager).reset();
                contentTypes.add(mConfiguredContentTypes[i]);
            }
        }

        if(Display.getCurrent() == null) {
            Display.getDefault().asyncExec(new Runnable() {
                public void run()
                {
                    updatePresentation(contentTypes);
                }
            });
        }
        else {
            updatePresentation(contentTypes);
        }
    }
}
项目:bts    文件:XtextSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    XtextPresentationReconciler reconciler = getPresentationReconcilerProvider().get();
    reconciler.setDocumentPartitioning(getDocumentPartitioning(sourceViewer));
    IPresentationRepairer repairer = repairerProvider.get();
    IPresentationDamager damager = damagerProvider.get();
    String[] types = partitionTypesMapper.getSupportedPartitionTypes();
    for (String partitionType : types) {
        reconciler.setRepairer(repairer, partitionType);
        reconciler.setDamager(damager, partitionType);
    }
    return reconciler;
}
项目:eclipsensis    文件:NSISSourceViewer.java   
public void propertyChange(PropertyChangeEvent event)
{
    String property = event.getProperty();
    if(property.equals(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH)||
       property.equals(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS)) {
        for(Iterator<?> iter=fIndentChars.keySet().iterator(); iter.hasNext(); ) {
            setIndentPrefixes(calculatePrefixes(),(String)iter.next());
        }

        for(Iterator<?> iter=fAutoIndentStrategies.keySet().iterator(); iter.hasNext(); ) {
            String contentType = (String)iter.next();
            List<?> list = (List<?>)fAutoIndentStrategies.get(contentType);
            if(!Common.isEmptyCollection(list)) {
                for (Iterator<?> iter2 = list.iterator(); iter2.hasNext();) {
                    IAutoEditStrategy autoEditStrategy = (IAutoEditStrategy)iter2.next();
                    if(autoEditStrategy instanceof NSISAutoEditStrategy) {
                        ((NSISAutoEditStrategy)autoEditStrategy).updateFromPreferences();
                    }
                }
            }
        }
    }
    else {
        for(int i=0; i<mConfiguredContentTypes.length; i++) {
            IPresentationDamager damager = fPresentationReconciler.getDamager(mConfiguredContentTypes[i]);
            if(damager instanceof IPropertyAdaptable) {
                IPropertyAdaptable adaptable = (IPropertyAdaptable)damager;
                if(adaptable.canAdaptToProperty(mPreferenceStore, property)) {
                    mPropertyQueue.add(property);
                }
            }
        }
    }
}
项目:tm4e    文件:TMPresentationReconciler.java   
@Override
public IPresentationDamager getDamager(String contentType) {
    return null;
}
项目:bts    文件:DefaultUiModule.java   
public Class<? extends IPresentationDamager> bindIPresentationDamager() {
    return PresentationDamager.class;
}