ProjectManager(Activator activator, IProject project) { this.activator = activator; this.Project = project; this.Properties = new ProjectProperties(); var propertiesFile = project.getFile(".stabproperties"); if (!this.Properties.load(propertiesFile)) { try { var libsFolder = project.getFolder("libs"); if (!libsFolder.exists()) { libsFolder.create(true, true, null); } var runtimeLib = Environment.getLibraryPath("stabrt.jar"); using (var stream = new FileInputStream(runtimeLib)) { var stabrtFile = libsFolder.getFile("stabrt.jar"); if (stabrtFile.exists()) { stabrtFile.setContents(stream, IResource.FORCE, null); } else { stabrtFile.create(stream, true, null); } this.Properties.Libraries = Query.singleton(new ProjectLibrary(stabrtFile.getProjectRelativePath().toPortableString())); this.Properties.OutputPath = "bin"; } } catch (Exception e) { Environment.logException(e); } this.Properties.save(propertiesFile); } }
// Called by Eclipse to initialize the plugin // public override void start(BundleContext context) { super.start(context); instance = this; Environment.trace(this, "Plug-in started"); workspaceListener = event => {