Skip to content

Commit

Permalink
add css and js file types
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Apr 14, 2012
1 parent 07b1620 commit 2f69d35
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 1 deletion.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/cpp/desktop/resources/freedesktop/rstudio.desktop.in
Expand Up @@ -5,6 +5,6 @@ Type=Application
Terminal=false
Name=RStudio
Categories=Development
MimeType=text/x-r-source;text/x-r;text-x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;
MimeType=text/x-r-source;text/x-r;text-x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;text/x-r-html;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;


14 changes: 14 additions & 0 deletions src/cpp/desktop/resources/freedesktop/rstudio.xml
Expand Up @@ -22,6 +22,20 @@
<glob pattern="*.rnw"/>
</mime-type>

<mime-type type="text/x-r-markdown">
<sub-class-of type="text/plain"/>
<comment>R Markdown File</comment>
<glob pattern="*.Rmd"/>
<glob pattern="*.rmd"/>
</mime-type>

<mime-type type="text/x-r-html">
<sub-class-of type="text/plain"/>
<comment>R HTML File</comment>
<glob pattern="*.Rhtml"/>
<glob pattern="*.rhtml"/>
</mime-type>

<mime-type type="application/x-r-data">
<comment>R Data File</comment>
<glob pattern="*.RData"/>
Expand Down
Expand Up @@ -36,6 +36,8 @@ public interface FileIconResources extends ClientBundle
ImageResource iconText();
ImageResource iconMarkdown();
ImageResource iconHTML();
ImageResource iconCss();
ImageResource iconJavascript();
ImageResource iconRsweave();
ImageResource iconRd();
ImageResource iconRhtml();
Expand Down
Expand Up @@ -111,6 +111,8 @@ public TextFileType[] statusBarFileTypes()
types.add(FileTypeRegistry.TEX);
types.add(FileTypeRegistry.MARKDOWN);
types.add(FileTypeRegistry.HTML);
types.add(FileTypeRegistry.CSS);
types.add(FileTypeRegistry.JS);

return (TextFileType[])types.toArray(new TextFileType[0]);
}
Expand Down
Expand Up @@ -77,6 +77,19 @@ public class FileTypeRegistry
new WebContentFileType("html", "HTML", EditorLanguage.LANG_PLAIN,
".html", ICONS.iconHTML());

public static final TextFileType CSS =
new TextFileType("css", "CSS", EditorLanguage.LANG_PLAIN, ".css",
ICONS.iconCss(),
true,
false, false, false, false, false, false, false, false, true);

public static final TextFileType JS =
new TextFileType("js", "JavaScript", EditorLanguage.LANG_PLAIN, ".js",
ICONS.iconJavascript(),
true,
false, false, false, false, false, false, false, false, true);


public static final RDataType RDATA = new RDataType();
public static final RProjectType RPROJECT = new RProjectType();

Expand Down Expand Up @@ -119,6 +132,8 @@ public FileTypeRegistry(EventBus eventBus,
register("*.rhtml", RHTML, icons.iconRhtml());
register("*.htm", HTML, icons.iconHTML());
register("*.html", HTML, icons.iconHTML());
register("*.css", CSS, icons.iconCss());
register("*.js", JS, icons.iconJavascript());
register("*.rmd", RMARKDOWN, icons.iconRmarkdown());
register("*.md", MARKDOWN, icons.iconMarkdown());
register("*.mdtxt", MARKDOWN, icons.iconMarkdown());
Expand Down

0 comments on commit 2f69d35

Please sign in to comment.