当前位置: 首页>>代码示例>>Java>>正文


Java LocalTimeCounter.currentTime方法代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:TemplateDataElementType.java

示例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() {
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:CharArrayTest.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:TemplateDataElementType.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:VFileContentChangeEvent.java

示例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));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:MockVirtualFile.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:TemplateDataElementType.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:VFileContentChangeEvent.java

示例8: BinaryLightVirtualFile

import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public BinaryLightVirtualFile(@NonNls String name, byte[] content) {
  this(name, null, content, LocalTimeCounter.currentTime());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:BinaryLightVirtualFile.java

示例9: LightVirtualFile

import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public LightVirtualFile(@NonNls @NotNull String name, @NotNull CharSequence content) {
  this(name, null, content, LocalTimeCounter.currentTime());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:LightVirtualFile.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MockDocument.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:TempFileSystem.java

示例12: DummyHolderViewProvider

import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public DummyHolderViewProvider(@NotNull PsiManager manager) {
  myManager = manager;
  myModificationStamp = LocalTimeCounter.currentTime();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DummyHolderViewProvider.java

示例13: LightDocument

import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public LightDocument(@NotNull String text) {
  assertValidSeparators(text);
  setCyclicBufferSize(0);
  myModificationStamp = LocalTimeCounter.currentTime();
  myText = ImmutableText.valueOf(text);
}
 
开发者ID:eddysystems,项目名称:eddy,代码行数:7,代码来源:LightDocument.java

示例14: LightVirtualFile

import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public LightVirtualFile(@NonNls String name, CharSequence content) {
  this(name, null, content, LocalTimeCounter.currentTime());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:LightVirtualFile.java

示例15: setContent

import com.intellij.util.LocalTimeCounter; //导入方法依赖的package包/类
public void setContent(Object requestor, CharSequence content, boolean fireEvent) {
  setContent(content);
  myModStamp = LocalTimeCounter.currentTime();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:LightVirtualFile.java


注:本文中的com.intellij.util.LocalTimeCounter.currentTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。