3

today I finally got IBM Rational Rhapsody on my PC and I was going to create my first Rhapsody plug-in in Java.

I started documenting on the subject, but the IBM sites are mentioning a .jar file, rhapsody.jar, as a must-have library in your project.

Now, I checked these sites Java API basic concepts and Adding Rational Rhapsody library to project build path but both are mentioning a path I do not have:

Rational Rhapsody installation path\Share\JavaAPI.

My question is this: Is someone here who developed a Rhapsody plug-in that can help me out?

Thanks, Daniel.

Daniel
  • 91
  • 1
  • 14

3 Answers3

3

If you leave the default installation options, you will find the file under your user directory.

If you selected "install for all users", it will be under the ProgramData directory.

If you selected "install all files in one location", it will be in the Rhapsody installation directory (as stated in the help topic).

Shlomo
  • 151
  • 3
0

The path they are giving is incorrect; the rhapsody.jar file is actually in the IBM folder located in your home directory. For me this is: c:\Users\tbarton\IBM\Rational\Rhapsody\8.3.1x64\

Update
The .hep file is not generated automatically; at-least I did not create them that way (that doesn't mean that feature doesn't exist somewhere).

Hep files for plugins consist of 2 parts, the plugin definition and the menu entry definitions. Here is an example: enter image description here

And here is an example with more detail on what each line is: enter image description here

Once you have created your .hep file you need to add it in rhapsody. This can be done by selecting the File -> Project Propities menu and then going to the Properties tab; set the filter to "helper" and add your helper file to the "HelpersFile" property. Then reload the model and see if it works.

If this still does not work, follow up with more details, and we can see what you might be missing. The whole process is very in-elegant and confusing, so it can be a real hassle the first time you make a plugin.

Randall Hudson
  • 196
  • 1
  • 7
  • Ok, so I found the library, I created the Java project and I've made this so far: `public class MakeDiff extends RPUserPlugin{ }`. I inherited all the methods, I even wrote some code, but I can't figure it out how to generate the `.hep` file. I read that it is necessary. Could you help me out? – Daniel Jul 12 '18 at 08:57
  • @Flint I updated my answer, let me know if you encounter any more issues. – Randall Hudson Jul 12 '18 at 10:45
  • Hey, thanks a lot for the help. I managed to make my plugin appear in the Tools tab in Rhapsody, but I tried to print something in the Log and nothing happens. I will make a new topic, since it's a different question – Daniel Jul 23 '18 at 09:27
0

@Troa Barton, I searched there, in Users\\, but there was no folder named IBM, so I made hidden folders visible and I found that C:\ProgramData\IBM\Rational\Rhapsody\8.1.5\Share\JavaAPI is where you can find rhapsody.jar.

So note that the ProgramData is a hidden folder.

Daniel
  • 91
  • 1
  • 14