Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Edit code on JazzHub

Hi everybody,

I´m just starting with JazzHub and I have a few questions, but the most important is how can I edit code directly on the browser?, Here is what I did:

1.- Create a project on my RTC Eclipse client.
2.- Push the project to JazzHub.

I can see the project on JazzHub, and I can open a java class I created there, but it is read-only, if I click the EDIT CODE button on the upper right corner it redirects me to the repository root (where is located the readme file).

Any one knows how to do this?
thanks guys.

0 votes

Comments

 Did you try finding your file from the root repository, opening it and then clicking inside the file to modify it?

Yes, I opened the file but as I mention is read-only


Accepted answer

Permanent link
The source code you see on the project's home page *is* read-only. It is simply a direct view into the contents of the repository.  If you want to edit the source, you should click the "EDIT CODE" button. This button takes you to an online work area (like an Eclipse workspace) where you can work with your code. 

It is important to note that the contents of this workspace will be the same as it was the last time you were there, which may _not_match_what's_in_the_repository_.

Because you may have clicked through to that area before, you should check whether the contents you have there are the latest (it may even look empty). Just select the icon that looks like a repository (if you hover over it you get the menu you described above). Clicking on it, will do the same thing as clicking the first item in that menu (i.e. it should be "Git Status"). When you are the Git Status page, click the button labeled "FETCH" and then click "MERGE". Assuming there are no conflicts, this will make your workspace match what was in the repository.
Cesar Ivan Orozco Cervantes selected this answer as the correct answer

0 votes

Comments

Thanks! this is exactly what I missed, the repository was updated but not the workspace, now I can edit the code.

Thanks again!


2 other answers

Permanent link
Hi Cesar - thank you for reaching out! I wanted to make sure I understand your situation. You created the project via JazzHub (@ hub.jazz.net), loaded it through Rational Team Concert, created a few Java files, and now you'd like to be able to edit those files on JazzHub web through the "Edit Code" function. Is this correct?

Assuming so, here is what I did to make that work. I imported the JazzHub project through RTC, loaded up the workspace as a project and created a few files within that project. I then checked in and delivered those files.

On JazzHub, I navigated to the project and hit "Edit Code." When the workspace loaded, I hovered over the cylinder icon (on the left-hand menu) and clicked on "Jazz SCM Changes". Under "Workspace Changes," I hit the triangle icon for "Accept incoming change sets for the stream," and that loaded up the files. I was then able to modify those files by clicking on the pencil icon and clicking on the project name to expand the folder/file list.

Let me know if this doesn't work for you.


0 votes

Comments

Hi, thanks for your answer,

When I hover the cylinder icon only this options are shown:

Git Status
All Jazz SCM Repositories
Git Log
Git Repository
All Git Repositories

I can't find the options Jazz SCM Changes, sorry if it is a silly question, I'm completely new to JazzHub

Cesar,


Given the contents of that menu, I believe you created a git backed project. If that's true, then you will need to use the Git SCM system to load the source.


Permanent link
Hi Cesar - did you end up delivering the changed files through RTC? If you open the "Pending Changes" Eclipse view, you may notice that your files have not been delivered. They will show up in the "Unresolved" folder under your workspace. To deliver the changes, right-click on the Unresolved folder, and click "Check in and Deliver." After the delivery is complete, you should see the Jazz SCM Changes option in the browser (you may need to refresh the page).

0 votes

Comments

I'm using RTC client but also I'm testing EGit, from the Repositories view I selected Commit and then Push to Upstream, after that I can see the folder of my project on JazzHub and I can open the java class but still I can´t edit it.

Ah, I see. Are you viewing the file on the project page? If so, that file viewer is indeed read-only. From the project page, can you try to click on the "Edit Code" button to open the full JazzHub code editor? From that interface, you should be able to modify the file.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020
× 383
× 14
× 6

Question asked: Feb 24 '14, 1:35 p.m.

Question was seen: 5,646 times

Last updated: Feb 25 '14, 1:16 a.m.

Confirmation Cancel Confirm