/** * Returns the double-click strategy ready to be used in this viewer when double clicking * onto text of the given content type. This implementation always returns a new instance of * <code>DefaultTextDoubleClickStrategy</code>. * * @param sourceViewer the source viewer to be configured by this configuration * @param contentType the content type for which the strategy is applicable * @return a double-click strategy or <code>null</code> if double clicking should not be supported */ public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) { return new DefaultTextDoubleClickStrategy(); }
/** * Returns the double-click strategy ready to be used in this viewer when double clicking * onto text of the given content type. This implementation always returns a new instance of * <code>DefaultTextDoubleClickStrategy</code>. * * @param sourceViewer the source viewer to be configured by this configuration * @param contentType the content type for which the strategy is applicable * @return a double-click strategy or <code>null</code> if double clicking should not be supported */ public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) { return new DefaultTextDoubleClickStrategy(); }
public LdifDoubleClickStrategy() { this.delegateDoubleClickStrategy = new DefaultTextDoubleClickStrategy(); }
public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) { if (IJavaPartitions.JAVA_DOC.equals(contentType)) return new JavadocDoubleClickStrategy(); if (IJavaPartitions.JAVA_MULTI_LINE_COMMENT.equals(contentType) || IJavaPartitions.JAVA_SINGLE_LINE_COMMENT.equals(contentType)) return new DefaultTextDoubleClickStrategy(); else if (IJavaPartitions.JAVA_STRING.equals(contentType) || IJavaPartitions.JAVA_CHARACTER.equals(contentType)) return new JavaStringDoubleClickSelector(getConfiguredDocumentPartitioning(sourceViewer)); if (fJavaDoubleClickSelector == null) { fJavaDoubleClickSelector= new JavaDoubleClickSelector(); fJavaDoubleClickSelector.setSourceVersion(fPreferenceStore.getString(JavaCore.COMPILER_SOURCE)); } return fJavaDoubleClickSelector; }
setTextDoubleClickStrategy(new DefaultTextDoubleClickStrategy(), IDocument.DEFAULT_CONTENT_TYPE); activatePlugins();