minor dynamic languages support fixes

This commit is contained in:
Gregory.Shrago
2013-02-01 17:29:34 +04:00
parent 8949c06994
commit 16a8fa455b
3 changed files with 10 additions and 5 deletions
@@ -31,6 +31,10 @@ public class IFileElementType extends ILazyParseableElementType {
super(debugName, language);
}
public IFileElementType(@NonNls @NotNull final String debugName, @Nullable final Language language, boolean register) {
super(debugName, language, register);
}
@Nullable
@Override
public ASTNode parseContents(final ASTNode chameleon) {
@@ -318,7 +318,8 @@ public class PsiVFSListener extends VirtualFileAdapter {
VirtualFile parent = vFile.getParent();
final PsiDirectory parentDir = getCachedDirectory(parent);
if (parentDir == null) {
// do not suppress reparse request for light files
if (parentDir == null && !FileContentUtil.FORCE_RELOAD_REQUESTOR.equals(event.getRequestor())) {
boolean fire = VirtualFile.PROP_NAME.equals(propertyName) && vFile.isDirectory();
if (fire) {
PsiDirectory psiDir = myFileManager.getCachedDirectory(vFile);
@@ -271,15 +271,15 @@ public abstract class ParsingTestCase extends PlatformLiteFixture {
doCheckResult(myFullDataPath, targetDataName, text);
}
private static void doCheckResult(String myFullDataPath, String targetDataName, String text) throws IOException {
public static void doCheckResult(String fullPath, String targetDataName, String text) throws IOException {
text = text.trim();
String expectedFileName = myFullDataPath + File.separatorChar + targetDataName;
String expectedFileName = fullPath + File.separatorChar + targetDataName;
if (OVERWRITE_TESTDATA) {
VfsTestUtil.overwriteTestData(expectedFileName, text);
System.out.println("File " + expectedFileName + " created.");
}
try {
String expectedText = doLoadFile(myFullDataPath, targetDataName);
String expectedText = doLoadFile(fullPath, targetDataName);
if (!Comparing.equal(expectedText, text)) {
throw new FileComparisonFailure(targetDataName, expectedText, text, expectedFileName);
}
@@ -304,7 +304,7 @@ public abstract class ParsingTestCase extends PlatformLiteFixture {
return text;
}
private static void ensureParsed(PsiFile file) {
public static void ensureParsed(PsiFile file) {
file.accept(new PsiElementVisitor() {
@Override
public void visitElement(PsiElement element) {