KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > antlr > works > plugin > intellij > PIFileType


1 package org.antlr.works.plugin.intellij;
2
3 import com.intellij.ide.structureView.StructureViewBuilder;
4 import com.intellij.openapi.fileTypes.FileType;
5 import com.intellij.openapi.fileTypes.SyntaxHighlighter;
6 import com.intellij.openapi.project.Project;
7 import com.intellij.openapi.vfs.VirtualFile;
8 import org.antlr.works.utils.IconManager;
9 import org.jetbrains.annotations.Nullable;
10
11 import javax.swing.*;
12 /*
13
14 [The "BSD licence"]
15 Copyright (c) 2005-2006 Jean Bovet
16 All rights reserved.
17
18 Redistribution and use in source and binary forms, with or without
19 modification, are permitted provided that the following conditions
20 are met:
21
22 1. Redistributions of source code must retain the above copyright
23 notice, this list of conditions and the following disclaimer.
24 2. Redistributions in binary form must reproduce the above copyright
25 notice, this list of conditions and the following disclaimer in the
26 documentation and/or other materials provided with the distribution.
27 3. The name of the author may not be used to endorse or promote products
28 derived from this software without specific prior written permission.
29
30 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
31 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
32 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
33 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
34 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
41 */

42
43 public class PIFileType implements FileType {
44
45     public String JavaDoc getName() {
46         return "ANTLR Grammar";
47     }
48
49     public String JavaDoc getDescription() {
50         return "ANTLR Grammar File";
51     }
52
53     public String JavaDoc getDefaultExtension() {
54         return "g";
55     }
56
57     public Icon getIcon() {
58         return IconManager.shared().getIconApplication16x16();
59     }
60
61     public boolean isBinary() {
62         return false;
63     }
64
65     public boolean isReadOnly() {
66         return false;
67     }
68
69     public String JavaDoc getCharset(VirtualFile file) {
70         return null;
71     }
72
73     public SyntaxHighlighter getHighlighter(Project project, VirtualFile virtualFile) {
74         return null;
75     }
76
77     public SyntaxHighlighter getHighlighter(Project project) {
78         return null;
79     }
80
81     public StructureViewBuilder getStructureViewBuilder(VirtualFile file, Project project) {
82         return null;
83     }
84 }
85
Popular Tags