public PlainFile(Project.Project project, string path) {
- aconstruct( project, path);
+ base( project, path);
this.xtype = "PlainFile";
+ this.content_type = "text/plain";
// if the file does not exist...
if (GLib.FileUtils.test(path, GLib.FileTest.EXISTS)) {
var f = File.new_for_path (path) ;
- var info = f.query_info ("standard::*", 0);
- var ct = info.get_content_type();
- this.content_type = ct;
+ try {
+ var info = f.query_info ("standard::*", 0);
+ var ct = info.get_content_type();
+ this.content_type = ct;
+ } catch (GLib.Error e) {}
+
} else {
this.content_type = "text/plain"; // hopefully..
// var ar = path.split(".");
*/
- string getHelpUrl(string cls)
- {
- return "";
- }
+
public override void findTransStrings(Node? node )
{
// not yet..
{
return "Roo files do not convert to glade";
}
-
+ public override string targetName()
+ {
+ return this.path;
+ }
+
+ public override string language_id()
+ {
+ switch(this.file_ext) {
+ case "js": return "javascript";
+ case "vala": return "vala";
+ case "php": return "php";
+ case "css": return "css";
+ case "sql": return "sql";
+ default: return "???";
+ }
+ }
}