Skip to content

Commit

Permalink
Fix #431
Browse files Browse the repository at this point in the history
  • Loading branch information
wisechengyi committed Nov 14, 2019
1 parent 2caf4ea commit 57ea16a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;

public class BUILDFileTypeDetector implements FileTypeRegistry.FileTypeDetector {
@Nullable
@Override
public FileType detect(@NotNull VirtualFile file, @NotNull ByteSequence firstBytes, @Nullable CharSequence firstCharsIfText) {
return PantsUtil.isBUILDFileName(file.getName()) ? PythonFileType.INSTANCE : null;
}

@Nullable
public Collection<? extends FileType> getDetectedFileTypes() {
return null;
}

@Override
public int getVersion() {
return 1;
Expand Down

0 comments on commit 57ea16a

Please sign in to comment.