Archive

Posts Tagged ‘eclipse’

Getting UML from java code in Eclipse 3.5

November 8, 2010 Comments off

This should be easier 😦

I had used omondo a couple of years back but trying to install again proved to be too painful. Had to download a complete new eclipse+plugin combo for evaluation purposes and then it wouldnt start – eclipse gave a helpful “error=-1”.

Tried MaintainJ – had looked at a while ago – but couldnt get the plugins to work because my AspectJ code used v7 and it wanted v6. Gave up.

MyEclipseIDE – looks like it has it all including an update url, but it depends on Mozilla XUL 1.9.07 which doesnt seem to be available. Installing 1.9.17 didnt help. Eventually downloaded the the v9 beta (full install of several hundred mB) and imported the projects I needed, right clicked to the MyEclipse menu in the UML2 perspective, and followed the prompts. Right click on diagram to export to JPG. Have not investigated round tripping or sequence diagrams yet – to follow, when I need. But then I restarted it, and it never stops starting. Still I got one diagram from it !

Advertisements

GIT (github) in Eclipse 3.5

November 3, 2010 Comments off

GIT is a distrubuted version control system. Github is a commercial cloud based GIT service, but has free accounts. Its somewhat different from CVS and Subversion and so on, because theres no central code repository…

On GitHub you

  1. get (branch/fork/copy) a complete copy of a source code repository you want to work with, then
  2. clone that locally so you make changes independently. Your changes are merged into your clone.
  3. Then you push the local merge back up to GitHub.
  4. others (perhaps the owner of the original repo you forked) can do a “pull request” into their repo and merge the changes in.

So in a bit more detail then :

  • Get eGit plugin
  • Create a github account
  • Fork the repository you want to work with (use the fork button on github when you login and navigate to your selected repo)
  • In eclipse Git Repositories view Clone the fork – create an eclipse project using it if you can
  • Create a second remote that points to the repository you forked from (a read only url) – you’ll push up to this when you merge your code into the read-write fork
  • Make your code changes – update the source files in the project that is based on the fork, or Copy/Paste from a project based on the fork
    • Team->Add the files you updated, then
    • Team->commit
  • Now, you need to push –
    • Create SSH keys and add to github in “Your Account” on github – generate in Eclipse-Window->Preferences->Network Connections->SSH2 (user a passphrase as well) then paste into the form on github.
    • I had to resart eclipse to pick up my keys
    • From your project or package choose Team>Push. Use ssh as the method on a custom url
      • ssh://git@github.com/username/RepositoryName.git
    • for the free github accounts leave the username as git and password field blank.
    • you’ll be prompted for your passphrase
    • you should then be able to pick your local branch and the remote you want to push to. Do this and add the “spec”. Then push !
  • Now, if you want others to have a chance to get your code – send a pull request
Categories: technology Tags: , , , , ,