本文整理匯總了Java中org.eclipse.jface.text.rules.DefaultDamagerRepairer類的典型用法代碼示例。如果您正苦於以下問題:Java DefaultDamagerRepairer類的具體用法?Java DefaultDamagerRepairer怎麽用?Java DefaultDamagerRepairer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DefaultDamagerRepairer類屬於org.eclipse.jface.text.rules包,在下文中一共展示了DefaultDamagerRepairer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer)
{
final PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer dr;
dr = new RuleBasedDamagerRepairer(this.getDMScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
dr = new RuleBasedDamagerRepairer(this.getDMStringScanner());
reconciler.setDamager(dr, DMPartitionScanner.DM_STRING);
reconciler.setRepairer(dr, DMPartitionScanner.DM_STRING);
NonRuleBasedDamagerRepairer ndr;
ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(this.colorManager.getColor(IDMColorConstants.DM_COMMENT)));
reconciler.setDamager(ndr, DMPartitionScanner.DM_COMMENT);
reconciler.setRepairer(ndr, DMPartitionScanner.DM_COMMENT);
return reconciler;
}
示例2: setupPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer) {
NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(getToken("#text")); //$NON-NLS-1$
reconciler.setDamager(ndr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(ndr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setDamager(ndr, DEFAULT);
reconciler.setRepairer(ndr, DEFAULT);
DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(getPIScanner());
reconciler.setDamager(dr, PI);
reconciler.setRepairer(dr, PI);
reconciler.setDamager(dr, PROLOG);
reconciler.setRepairer(dr, PROLOG);
dr = new ThemeingDamagerRepairer(getDTDTagScanner());
reconciler.setDamager(dr, TAG);
reconciler.setRepairer(dr, TAG);
reconciler.setDamager(dr, SECTION);
reconciler.setRepairer(dr, SECTION);
dr = new ThemeingDamagerRepairer(getCommentScanner());
reconciler.setDamager(dr, COMMENT);
reconciler.setRepairer(dr, COMMENT);
}
示例3: setupPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer)
{
DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(new CSSCodeScannerFlex());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setDamager(dr, DEFAULT);
reconciler.setRepairer(dr, DEFAULT);
dr = new ThemeingDamagerRepairer(getCommentScanner());
reconciler.setDamager(dr, MULTILINE_COMMENT);
reconciler.setRepairer(dr, MULTILINE_COMMENT);
dr = new ThemeingDamagerRepairer(getStringScanner());
reconciler.setDamager(dr, STRING_DOUBLE);
reconciler.setRepairer(dr, STRING_DOUBLE);
dr = new ThemeingDamagerRepairer(getStringScanner());
reconciler.setDamager(dr, STRING_SINGLE);
reconciler.setRepairer(dr, STRING_SINGLE);
}
示例4: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
final PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
final SyntaxHighlighter scanner = new SyntaxHighlighter(
com.abstratt.mdd.frontend.textuml.core.TextUMLConstants.KEYWORDS);
final DefaultDamagerRepairer dr = new DefaultDamagerRepairer(scanner);
reconciler.setDamager(dr, ContentTypes.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, ContentTypes.DEFAULT_CONTENT_TYPE);
// fix bug 2127735 --multiline comment is broken
final ITokenScanner commentScanner = scanner.getCommentScanner();
final DefaultDamagerRepairer commentDamagerRepairer = new DefaultDamagerRepairer(commentScanner);
reconciler.setDamager(commentDamagerRepairer, ContentTypes.COMMENT_CONTENT_TYPE);
reconciler.setRepairer(commentDamagerRepairer, ContentTypes.COMMENT_CONTENT_TYPE);
return reconciler;
}
示例5: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
public IPresentationReconciler getPresentationReconciler(
ISourceViewer sourceViewer )
{
PresentationReconciler reconciler = new PresentationReconciler( );
NonRuleBasedDamagerRepairer dr = new NonRuleBasedDamagerRepairer( quoteString );
reconciler.setDamager( dr, SQLPartitionScanner.QUOTE_STRING );
reconciler.setRepairer( dr, SQLPartitionScanner.QUOTE_STRING );
dr = new NonRuleBasedDamagerRepairer( comment );
reconciler.setDamager( dr, SQLPartitionScanner.COMMENT );
reconciler.setRepairer( dr, SQLPartitionScanner.COMMENT );
DefaultDamagerRepairer ddr = new DefaultDamagerRepairer( new SQLKeywordScanner( ) );
reconciler.setDamager( ddr, IDocument.DEFAULT_CONTENT_TYPE );
reconciler.setRepairer( ddr, IDocument.DEFAULT_CONTENT_TYPE );
return reconciler;
}
示例6: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
/**
* @see SourceViewerConfiguration#getPresentationReconciler(ISourceViewer)
*/
public IPresentationReconciler getPresentationReconciler(
ISourceViewer sourceViewer )
{
PresentationReconciler reconciler = new PresentationReconciler( );
DefaultDamagerRepairer dr = new DefaultDamagerRepairer( getDefaultScanner( ) );
reconciler.setDamager( dr, IDocument.DEFAULT_CONTENT_TYPE );
reconciler.setRepairer( dr, IDocument.DEFAULT_CONTENT_TYPE );
NonRuleBasedDamagerRepairer commentRepairer = new NonRuleBasedDamagerRepairer( UIUtil.getAttributeFor( ReportPlugin.EXPRESSION_COMMENT_COLOR_PREFERENCE ) );
reconciler.setDamager( commentRepairer, JSPartitionScanner.JS_COMMENT );
reconciler.setRepairer( commentRepairer, JSPartitionScanner.JS_COMMENT );
NonRuleBasedDamagerRepairer stringRepairer = new NonRuleBasedDamagerRepairer( UIUtil.getAttributeFor( ReportPlugin.EXPRESSION_STRING_COLOR_PREFERENCE ) );
reconciler.setDamager( stringRepairer, JSPartitionScanner.JS_STRING );
reconciler.setRepairer( stringRepairer, JSPartitionScanner.JS_STRING );
NonRuleBasedDamagerRepairer keywordRepairer = new NonRuleBasedDamagerRepairer( UIUtil.getAttributeFor( ReportPlugin.EXPRESSION_KEYWORD_COLOR_PREFERENCE ) );
reconciler.setDamager( keywordRepairer, JSPartitionScanner.JS_KEYWORD );
reconciler.setRepairer( keywordRepairer, JSPartitionScanner.JS_KEYWORD );
return reconciler;
}
示例7: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
DSLPresentationReconciler reconciler = new DSLPresentationReconciler(sourceViewer);
ITokenScanner scanner = new TokenScanner();
String contentType = IDocument.DEFAULT_CONTENT_TYPE;
// TODO preference store
long delay = 300;
DefaultDamagerRepairer dr = new DelayedDamagerRepairer(scanner, reconciler, delay);
reconciler.setDamager(dr, contentType);
reconciler.setRepairer(dr, contentType);
// IResource file = this.extractResource(this.editor);
return reconciler;
}
示例8: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) {
PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer repairer = new DefaultDamagerRepairer(new
EiffelCodeScanner(new EiffelColorProvider()));
reconciler.setDamager(repairer, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(repairer, IDocument.DEFAULT_CONTENT_TYPE);
// reconciler.setRepairer(repairer, EiffelPartitionScanner.SINGLELINE_COMMENT);
// reconciler.setRepairer(repairer, EiffelPartitionScanner.MULTILINE_COMMENT);
// reconciler.setRepairer(repairer, EiffelPartitionScanner.STRING);
return reconciler;
}
示例9: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer repairer = new DefaultDamagerRepairer(getScanner());
reconciler.setDamager(repairer, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(repairer, IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
示例10: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
Check.isTrue(sourceViewer instanceof FtcSourceViewer);
SyntaxColoring coloring = ((FtcSourceViewer) sourceViewer).getSyntaxColoring();
addDamagerRepairer(reconciler, new FtcDamagerRepairer(coloring, new ParsedSqlTokensScanner(coloring)), IDocument.DEFAULT_CONTENT_TYPE);
DefaultDamagerRepairer commentDr = new DefaultDamagerRepairer(new CommentTokenScanner(coloring));
addDamagerRepairer(reconciler, commentDr, SqlCommentPartitionScanner.SQL_COMMENT);
return reconciler;
}
示例11: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
/**
* This registers one damager repairer for all content in the source viewer.
* The damager-repairer scans the content for TLA keywords and sets them to the
* same color used in the tla editor.
*/
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
{
PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(TLAEditorActivator.getDefault().getTLACodeScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
示例12: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
if (preferenceStore.getBoolean(TypeScriptUIPreferenceConstants.USE_TEXMATE_FOR_SYNTAX_COLORING)) {
// Advanced Syntax coloration with TextMate
return new TMPresentationReconciler();
}
// Use classic Eclipse ITokenScaner.
PresentationReconciler reconciler = (PresentationReconciler) super.getPresentationReconciler(sourceViewer);
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getJSXScanner());
reconciler.setDamager(dr, IJSXPartitions.JSX);
reconciler.setRepairer(dr, IJSXPartitions.JSX);
return reconciler;
}
示例13: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getXMLScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
示例14: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(
ISourceViewer sourceViewer) {
PresentationReconciler reconciler = (PresentationReconciler) super.getPresentationReconciler(sourceViewer);
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(jsniScanner);
reconciler.setDamager(dr, GWTPartitions.JSNI_METHOD);
reconciler.setRepairer(dr, GWTPartitions.JSNI_METHOD);
return reconciler;
}
示例15: getPresentationReconciler
import org.eclipse.jface.text.rules.DefaultDamagerRepairer; //導入依賴的package包/類
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler pr = new PresentationReconciler();
ksl.attachDamagerRepairer(pr);
DefaultDamagerRepairer ddr = new DefaultDamagerRepairer(new KernelSyntaxRuleBasedScanner(ksl));
pr.setRepairer(ddr, IDocument.DEFAULT_CONTENT_TYPE);
pr.setDamager(ddr, IDocument.DEFAULT_CONTENT_TYPE);
return pr;
}