{"action":"created","issue":{"url":"https://api.github.com/repos/fabric8io/fabric8/issues/5355","labels_url":"https://api.github.com/repos/fabric8io/fabric8/issues/5355/labels{/name}","comments_url":"https://api.github.com/repos/fabric8io/fabric8/issues/5355/comments","events_url":"https://api.github.com/repos/fabric8io/fabric8/issues/5355/events","html_url":"https://github.com/fabric8io/fabric8/issues/5355","id":119305182,"number":5355,"title":"Camel forge - Updating java source code should not reformat the code","user":{"login":"davsclaus","id":477100,"avatar_url":"https://avatars.githubusercontent.com/u/477100?v=3","gravatar_id":"","url":"https://api.github.com/users/davsclaus","html_url":"https://github.com/davsclaus","followers_url":"https://api.github.com/users/davsclaus/followers","following_url":"https://api.github.com/users/davsclaus/following{/other_user}","gists_url":"https://api.github.com/users/davsclaus/gists{/gist_id}","starred_url":"https://api.github.com/users/davsclaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davsclaus/subscriptions","organizations_url":"https://api.github.com/users/davsclaus/orgs","repos_url":"https://api.github.com/users/davsclaus/repos","events_url":"https://api.github.com/users/davsclaus/events{/privacy}","received_events_url":"https://api.github.com/users/davsclaus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fabric8io/fabric8/labels/forge","name":"forge","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-28T16:29:03Z","updated_at":"2015-12-10T17:46:58Z","closed_at":null,"body":"For example when editing camel endpoints in the java route builder classes.\r\n\r\nIts using the eclipse formatter style, which is not the same as in IDEA or what the user uses. And it does a full reformat of the entire source file, even if you just edit a single method.\r\n\r\nAlso the save seems to prevent undo operation in IDEA."},"comment":{"url":"https://api.github.com/repos/fabric8io/fabric8/issues/comments/163700211","html_url":"https://github.com/fabric8io/fabric8/issues/5355#issuecomment-163700211","issue_url":"https://api.github.com/repos/fabric8io/fabric8/issues/5355","id":163700211,"user":{"login":"davsclaus","id":477100,"avatar_url":"https://avatars.githubusercontent.com/u/477100?v=3","gravatar_id":"","url":"https://api.github.com/users/davsclaus","html_url":"https://github.com/davsclaus","followers_url":"https://api.github.com/users/davsclaus/followers","following_url":"https://api.github.com/users/davsclaus/following{/other_user}","gists_url":"https://api.github.com/users/davsclaus/gists{/gist_id}","starred_url":"https://api.github.com/users/davsclaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davsclaus/subscriptions","organizations_url":"https://api.github.com/users/davsclaus/orgs","repos_url":"https://api.github.com/users/davsclaus/repos","events_url":"https://api.github.com/users/davsclaus/events{/privacy}","received_events_url":"https://api.github.com/users/davsclaus/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T17:46:58Z","updated_at":"2015-12-10T17:46:58Z","body":"Last code I tried\r\n\r\n```\r\n                existing.setContents(new ByteArrayInputStream(clazz.toUnformattedString().getBytes()), null);\r\n                //existing.setContents(clazz.toUnformattedString());\r\n\r\n                // TODO: avoid formatting source code\r\n\r\n                //facet.saveJavaSource(clazz);\r\n```\r\n\r\nAs you can run the commands from cli, its easier to run run forge cli in debug mode, and then load the camel project, and run the edit command. Then you can set breakpoints and remote debug."}}