Search in sources :

Example 11 with ExtendedConfigurationBuilder

use of org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder in project webtools.sourceediting by eclipse.

the class StructuredTextEditor method createCharacterPairMatcher.

protected ICharacterPairMatcher createCharacterPairMatcher() {
    ICharacterPairMatcher matcher = null;
    ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
    String[] ids = getConfigurationPoints();
    for (int i = 0; matcher == null && i < ids.length; i++) {
        matcher = (ICharacterPairMatcher) builder.getConfiguration(DocumentRegionEdgeMatcher.ID, ids[i]);
    }
    if (matcher == null) {
        matcher = new DefaultCharacterPairMatcher(new char[] { '(', ')', '{', '}', '[', ']', '<', '>', '"', '"', '\'', '\'' });
    }
    return matcher;
}
Also used : DefaultCharacterPairMatcher(org.eclipse.jface.text.source.DefaultCharacterPairMatcher) ICharacterPairMatcher(org.eclipse.jface.text.source.ICharacterPairMatcher) Point(org.eclipse.swt.graphics.Point) ExtendedConfigurationBuilder(org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder)

Example 12 with ExtendedConfigurationBuilder

use of org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder in project liferay-ide by liferay.

the class PortletJSPSourceViewerConfiguration method createDocumentationHovers.

@SuppressWarnings({ "rawtypes", "unchecked" })
protected ITextHover[] createDocumentationHovers(String partitionType) {
    ExtendedConfigurationBuilder instance = ExtendedConfigurationBuilder.getInstance();
    List extendedTextHover = instance.getConfigurations(ExtendedConfigurationBuilder.DOCUMENTATIONTEXTHOVER, partitionType);
    return (ITextHover[]) extendedTextHover.toArray(new ITextHover[extendedTextHover.size()]);
}
Also used : ITextHover(org.eclipse.jface.text.ITextHover) List(java.util.List) ExtendedConfigurationBuilder(org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder)

Aggregations

ExtendedConfigurationBuilder (org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder)12 Point (org.eclipse.swt.graphics.Point)9 List (java.util.List)4 ArrayList (java.util.ArrayList)3 IShowInTargetList (org.eclipse.ui.part.IShowInTargetList)3 ListenerList (org.eclipse.core.runtime.ListenerList)2 IOException (java.io.IOException)1 Method (java.lang.reflect.Method)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1 CoreException (org.eclipse.core.runtime.CoreException)1 IContentType (org.eclipse.core.runtime.content.IContentType)1 BadLocationException (org.eclipse.jface.text.BadLocationException)1 ITextHover (org.eclipse.jface.text.ITextHover)1 ITextViewer (org.eclipse.jface.text.ITextViewer)1 IInformationPresenter (org.eclipse.jface.text.information.IInformationPresenter)1 IInformationProvider (org.eclipse.jface.text.information.IInformationProvider)1 InformationPresenter (org.eclipse.jface.text.information.InformationPresenter)1 DefaultCharacterPairMatcher (org.eclipse.jface.text.source.DefaultCharacterPairMatcher)1 ICharacterPairMatcher (org.eclipse.jface.text.source.ICharacterPairMatcher)1 ProjectionViewer (org.eclipse.jface.text.source.projection.ProjectionViewer)1