Hi: I'm writing a Ruby IDE. It opens a directory as a "project" and displays all the .rb files so you can edit them. I want to save all the settings for my IDE in a yaml file. It would be called MyProjectName.vr_settings. This yaml file will hold all the info for this project: path to project main program to run etc. I want to make it so when the user clicks on the MyProjectName.vr_settings file, my IDE opens and loads that project. How do you do this? I would like to make a unique extension like ".vr_settings" so I can be sure that I'm not interfering with other file types. Also, I want the program to edit the operating systems files when the IDE runs for the first time. Many programs establish a file association when they install. I want to create that same set-up. I would also welcome opinions on the best way to handle projects. Right now my IDE has one big settings file with all the projects in it. I think opening a single project is a better solution because Ubuntu has its own tabbing system: When you open a second project, a second instance of my IDE would appear in Ubuntu's tabs. For example, I'm writing my IDE and a supporting library right now. Its a big hassle to switch back and forth between the projects because it swaps the whole project each time. Thanks!
on 2012-01-22 22:16
on 2012-01-23 11:19
Eric C. wrote in post #1042074: > Hi: > I want to make it so when the user clicks on the > MyProjectName.vr_settings file, my IDE opens and loads that project. > How do you do this? That's totally unrelated to ruby. However, take a look at fdo specification : http://www.freedesktop.org/wiki/Specifications/sha... http://www.freedesktop.org/wiki/Specifications/des... Under windows, I have no idea. > I would also welcome opinions on the best way to handle projects. Right > now my IDE has one big settings file with all the projects in it. I > think opening a single project is a better solution because Ubuntu has > its own tabbing system: When you open a second project, a second > instance of my IDE would appear in Ubuntu's tabs. AFAIK, it's not ubuntu, but Unity which does this. And I have no idea how Unity manages programs tabs. Simon
on 2012-01-24 06:16
Thnaks Simon! You led to to the right place. The solution I found was that you don't need to create a mime type to make a file "double-clickable" I settled on the solution of creating launchers from my ruby script, and putting them on the desktop. My most current scheme: My IDE uses a top folder as the name of the project, so to run my IDE, you use the command line with the path to the root folder as the parameter: $vr /home/eric/myproject This would be annoying to type each time, so I'm going to make my program export "launchers" to the desktop. So when the user clicks on the launcher, the above statement would execute. As the user opens multiple projects, tabs appear at the bottom of ubuntu's desktop. So to switch between projects, the user would click on a tab. This will save me a lot of work integrating multiple projects into my IDE. Thanks.