private void openInEditor(Profile profile, String resource) throws Exception {
String id = profile.getId();
String version = profile.getVersion();
String location = id + " " + version + " " + resource;
//Call the editor
ConsoleEditor editor = editorFactory.create("simple",getTerminal(), System.in, System.out);
editor.setTitle("Profile");
editor.setOpenEnabled(false);
editor.setContentManager(new DatastoreContentManager(fabricService));
editor.open(location, id + " " + version);
editor.start();
}