【发布时间】:2013-05-08 19:43:15
【问题描述】:
我正在浏览 Eclipse 插件的源代码(现在我正在探索 TextMergeView 类),我注意到很多变量都以 f 开头。
我知道我们经常给接口加上前缀I,以便第一眼就很容易将它们识别为接口。但是f 是什么意思?
这是一个片段:
......
private int fInheritedDirection; // inherited direction
private int fTextDirection; // requested direction for embedded SourceViewer
private ActionContributionItem fIgnoreAncestorItem;
private boolean fHighlightRanges;
private boolean fShowPseudoConflicts= false;
private boolean fUseSplines= true;
private boolean fUseSingleLine= true;
private boolean fUseResolveUI= true;
private boolean fHighlightTokenChanges = false;
private String fSymbolicFontName;
private ActionContributionItem fNextDiff; // goto next difference
private ActionContributionItem fPreviousDiff; // goto previous difference
private ActionContributionItem fCopyDiffLeftToRightItem;
private ActionContributionItem fCopyDiffRightToLeftItem;
private CompareHandlerService fHandlerService;
private boolean fSynchronizedScrolling= true;
...
为什么这些变量以f 开头? f 作为前缀是什么意思?
【问题讨论】:
标签: java eclipse syntax naming-conventions