本文整理汇总了Java中com.intellij.util.LocalTimeCounter.currentTime方法的典型用法代码示例。如果您正苦于以下问题:Java LocalTimeCounter.currentTime方法的具体用法?Java LocalTimeCounter.currentTime怎么用?Java LocalTimeCounter.currentTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.LocalTimeCounter
的用法示例。
在下文中一共展示了LocalTimeCounter.currentTime方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFromText
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
protected PsiFile createFromText(final Language language, CharSequence text, PsiManager manager) {
@NonNls
final LightVirtualFile virtualFile = new LightVirtualFile("foo", createTemplateFakeFileType(language), text, LocalTimeCounter.currentTime());
FileViewProvider viewProvider = new SingleRootFileViewProvider(manager, virtualFile, false) {
@Override
@NotNull
public Language getBaseLanguage() {
return language;
}
};
// Since we're already inside a template language PSI that was built regardless of the file size (for whatever reason),
// there should also be no file size checks for template data files.
SingleRootFileViewProvider.doNotCheckFileSizeLimit(virtualFile);
return viewProvider.getPsi(language);
}
示例2: init
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
private void init(int size) {
myArray = new CharArray(size, new char[0], 0) {
@NotNull
@Override
protected DocumentEvent beforeChangedUpdate(int offset, CharSequence oldString, CharSequence newString,
boolean wholeTextReplaced) {
return new DocumentEventImpl(myDocument, offset, oldString, newString, LocalTimeCounter.currentTime(), wholeTextReplaced);
}
@Override
protected void afterChangedUpdate(@NotNull DocumentEvent event, long newModificationStamp) {
}
@Override
protected void assertWriteAccess() {
}
@Override
protected void assertReadAccess() {
}
};
}
示例3: createPsiFileFromSource
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
protected PsiFile createPsiFileFromSource(final Language language, CharSequence sourceCode, PsiManager manager) {
@NonNls final LightVirtualFile virtualFile = new LightVirtualFile("foo", createTemplateFakeFileType(language), sourceCode, LocalTimeCounter.currentTime());
FileViewProvider viewProvider = new SingleRootFileViewProvider(manager, virtualFile, false) {
@Override
@Nonnull
public Language getBaseLanguage() {
return language;
}
};
// Since we're already inside a template language PSI that was built regardless of the file size (for whatever reason),
// there should also be no file size checks for template data files.
SingleRootFileViewProvider.doNotCheckFileSizeLimit(virtualFile);
return viewProvider.getPsi(language);
}
示例4: VFileContentChangeEvent
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public VFileContentChangeEvent(final Object requestor,
@NotNull final VirtualFile file,
final long oldModificationStamp,
final long newModificationStamp,
final boolean isFromRefresh) {
super(requestor, isFromRefresh);
myFile = file;
myOldModificationStamp = oldModificationStamp;
myNewModificationStamp = newModificationStamp == -1 ? LocalTimeCounter.currentTime() : newModificationStamp;
}
示例5: setContent
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public void setContent(@Nullable Object requestor, String content, boolean fireEvent) {
long oldStamp = myModStamp;
myText = content;
if (fireEvent) {
myModStamp = LocalTimeCounter.currentTime();
myListener.contentsChanged(new VirtualFileEvent(requestor, this, null, oldStamp, myModStamp));
}
}
示例6: createFromText
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
protected PsiFile createFromText(final Language language, CharSequence text, PsiManager manager) {
@NonNls
final LightVirtualFile virtualFile = new LightVirtualFile("foo", createTemplateFakeFileType(language), text, LocalTimeCounter.currentTime());
FileViewProvider viewProvider = new SingleRootFileViewProvider(manager, virtualFile, false) {
@Override
@NotNull
public Language getBaseLanguage() {
return language;
}
};
return viewProvider.getPsi(language);
}
示例7: VFileContentChangeEvent
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public VFileContentChangeEvent(final Object requestor,
@Nonnull final VirtualFile file,
final long oldModificationStamp,
final long newModificationStamp,
final boolean isFromRefresh) {
super(requestor, isFromRefresh);
myFile = file;
myOldModificationStamp = oldModificationStamp;
myNewModificationStamp = newModificationStamp == -1 ? LocalTimeCounter.currentTime() : newModificationStamp;
}
示例8: BinaryLightVirtualFile
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public BinaryLightVirtualFile(@NonNls String name, byte[] content) {
this(name, null, content, LocalTimeCounter.currentTime());
}
示例9: LightVirtualFile
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public LightVirtualFile(@NonNls @NotNull String name, @NotNull CharSequence content) {
this(name, null, content, LocalTimeCounter.currentTime());
}
示例10: replaceString
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
@Override
public void replaceString(int startOffset, int endOffset, @NotNull CharSequence s) {
myText.replace(startOffset, endOffset, s.toString());
myModStamp = LocalTimeCounter.currentTime();
}
示例11: FSItem
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
protected FSItem(final FSDir parent, final String name) {
myParent = parent;
myName = name;
myTimestamp = LocalTimeCounter.currentTime();
myWritable = true;
}
示例12: DummyHolderViewProvider
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public DummyHolderViewProvider(@NotNull PsiManager manager) {
myManager = manager;
myModificationStamp = LocalTimeCounter.currentTime();
}
示例13: LightDocument
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public LightDocument(@NotNull String text) {
assertValidSeparators(text);
setCyclicBufferSize(0);
myModificationStamp = LocalTimeCounter.currentTime();
myText = ImmutableText.valueOf(text);
}
示例14: LightVirtualFile
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public LightVirtualFile(@NonNls String name, CharSequence content) {
this(name, null, content, LocalTimeCounter.currentTime());
}
示例15: setContent
import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public void setContent(Object requestor, CharSequence content, boolean fireEvent) {
setContent(content);
myModStamp = LocalTimeCounter.currentTime();
}