本文整理匯總了Java中com.intellij.psi.PsiFile.getModificationStamp方法的典型用法代碼示例。如果您正苦於以下問題:Java PsiFile.getModificationStamp方法的具體用法?Java PsiFile.getModificationStamp怎麽用?Java PsiFile.getModificationStamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.psi.PsiFile
的用法示例。
在下文中一共展示了PsiFile.getModificationStamp方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getViewVariables
import com.intellij.psi.PsiFile; //導入方法依賴的package包/類
@NotNull
public static ArrayList<String> getViewVariables(PsiFile psiFile) {
ArrayList<String> result = null;
Long viewModified = psiFile.getUserData(VIEW_FILE_MODIFIED);
if (viewModified != null && psiFile.getModificationStamp() == viewModified) {
result = psiFile.getUserData(VIEW_VARIABLES);
}
if (result == null) {
if (psiFile instanceof PhpFile) {
result = getPhpViewVariables(psiFile);
}
if (result == null) {
result = new ArrayList<>();
}
psiFile.putUserData(VIEW_VARIABLES, result);
psiFile.putUserData(VIEW_FILE_MODIFIED, psiFile.getModificationStamp());
}
return new ArrayList<>(result);
}
示例2: getRootDirectory
import com.intellij.psi.PsiFile; //導入方法依賴的package包/類
public static PsiDirectory getRootDirectory(PsiElement element) {
final PsiFile file = element.getContainingFile();
if (file.getUserData(VIEWS_DIRECTORY) != null) {
Long modified = file.getUserData(VIEWS_DIRECTORY_MODIFIED);
if (modified != null && modified == file.getModificationStamp()) {
return file.getUserData(VIEWS_DIRECTORY);
}
}
return findDirectory(element);
}
示例3: getContextDirectory
import com.intellij.psi.PsiFile; //導入方法依賴的package包/類
public static PsiDirectory getContextDirectory(PsiElement element) {
final PsiFile file = element.getContainingFile();
if (file.getUserData(VIEWS_CONTEXT_DIRECTORY) != null) {
Long modified = file.getUserData(VIEWS_DIRECTORY_MODIFIED);
if (modified != null && modified == file.getModificationStamp()) {
return file.getUserData(VIEWS_CONTEXT_DIRECTORY);
}
}
findDirectory(element);
return file.getUserData(VIEWS_CONTEXT_DIRECTORY);
}