Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide is intended as an internal reference for RAMCloud Students working with Netbeans over the rcXX cluster. 

...

Setting rcmaster as the BuildHost

  1. Open Netbeans
  2. Open the Remote Tool bar for NetBeans by going to View->Toolbars->Remote
  3. Near the top left of the IDE, there should be an icon of a computer and the words "localhost" to the right of it. Click on "localhost" and drop down to "Manage Hosts"
            ...        
  4. A new window should pop-up, click "Add..."
  5. In the next window, type our host name (rcmaster.scs.stanford.edu) into the hostname and click Next
  6. The next page should be self explanatory, type in your username and select "SSH Key File." and press Press "Next". If it prompts with a password, enter your password for the SSH file (NOT the one for rcmaster).
  7. On the last page, you will need to change the "Access project files via" depending on how you wish to access your files.
    1. SFTP: Select this option if you wish to store the sources locally
    2. SSHFS: Select "System level file sharing"

...

  1. Checkout the sources and initialize according to the instructions on General Information for Developers
    1. SSHFS: SSH into rcmaster and checkout the sources there
    2. SFTP: Checkout the sources in a local directory.
  2. Open Netbeans and click File->New Project
  3. Select "C/C++ Project with Existing Sources" and click Next
  4. In the next window, "Browse" to where you checked out the sources and select rcmaster as the build host
    1. SFTP: Browse to where the RAMCloud folder is are on the local machine
    2. SSHFS: Make sure rcmaster is mounted (see Installation) and browse to the RAMCloud folder
  5. Click "Finish"
  6. Windows Users: For some reason, not everything gets copied over correctly. Please follow the instructions in Troubleshooting - "I'm on Windows and I get a build error!"
  7. SFTP Only: To make life a little easier, you should make a symlink from the copied files to your home directory. 
    1. Notice that when you build, it says that it's copying your files to a location
    2. cd to that location and go down until you reach what looks like the RAMCloud directory
    3. symlink that over to wherever you want.
  8. SSHFS Only: If you are mounted over sshfs, the IDE will ask for your local to remote mappings. Simply click right below "Local Path" and browse to where RAMCloud is locally and then click right below "Remote Path" and browse to where RAMCloud is on rcmaster.

...

A: You can manually specify which files Netbeans should parse. Right click on the file, click "properties," and check the "Add to Parse"

      

 

Q: I'm on Windows and I get a build error!

Image Added

A: For some reason, on Windows, not all the executables (like bindings/java/gradew) copy over, so you should clone the RAMCloud again on rcmaster and then copy it over manually. This only needs to be done once.

  1. ssh into rcmaster and follow the instructions here General Information for Developers
  2. Look at the build error and find where Netbeans is copying the files (see screenshot).
  3. On rcmaster, copy over your new checkout from step 1 to location found in step 2.
    1. For example, the command for syang on PC is " cp -R RAMCloud/* /home/syang0/.netbeans/remote/rcmaster.scs.stanford.edu/desktop-2tfo897-Windows-x86_64/C/Users/Stephen/Desktop/RAMCloud"
  4. Now press the Hammer (build) and it should work!

 

Legacy Netbeans Tips

Anti-aliasing: http://thomashunter.name/blog/enabling-anti-aliasing-in-the-netbeans-editor/

...

  • Right click on the ram cloud project and select properties.
  • Under "Code Assistance -> C++ Compiler -> Include Directories" add the following line.
    • src;obj.master;gtest/include

 

Parsing C++11 Foo<Bar<Baz>> is broken in 7.2. Apparently this is fixed in the dailies: http://netbeans.org/bugzilla/show_bug.cgi?id=179939#c15 . Diego tried this with mixed results. The daily (8/30) seems stable, but it doesn't always parse the >> properly.

...