DPS911 Special Thanks

August 19, 2009

Hi everyone,

I would like to take this time to thank Jordan and Peter for all their time and assistence in teaching me all I know about Open Source and Eclipse WTP. Without their guidence I would have never known how much I like helping others learn about Open Source and I guess that’s the most important thing. Being able to spark passion in others is a rare and vaulable gift they share. Thank you.

To help you in your teaching others about Open Source, I have put together some beta labs. Beta in the sense I will add screenshots followed by a screencast for each lab. Below is a link to the general page you can find the open source labs.

http://jdeport.wordpress.com/open-source-labs/open-source-seneca/

See you both in tomorrow meeting.

The following link is to a detailed screencast on reproducing Eclipse Web Tools Platform bug number 241429.

http://www.facebook.com/v/98871186771

For a higher resolution version visit:
http://www.facebook.com/group.php?gid=81509418497&ref=share

and select the “Eclipse WTP Bug # 241429″ in HD.

This screencast provides a visual representation of the bug in two scenarios. In the first case, the bug does not seem to appear. However, in the second case it does.

As Angel has suggested, I have inserted a break-point to depict how WTP would react if the cilent’s server adapter took a long time to initialize its state.

I hope this will help future developers quickly understand this bug and come to a working solution.

Below is a link to the Eclipse WTP Bug details:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=241429

If you have any question please leave a comment.

After countless hours of recording, editing, and trying to find a free video blog server to host this screencast, I am finally done. Find below a link to a detailed screencast about how to download, extract, and get Eclipse Web Tools Platform (WTP) working on your Windows OS.

http://www.facebook.com/v/83901541771

I have also created a Facebook group, Video Walk Through, where I will be posting other software development tutorials and bug reproduction videos. Join this group if you would like to keep updated on future videos. Below is a link to this Facebook group.

http://www.facebook.com/group.php?gid=81509418497

Angel Vera is an Eclipse WTP Project Team Committer who has been working for IBM since 2000. He started as a level 2 – 3 support staff where he closely worked with end users to understand the specifics of where bugs originate.  Later he transited into a developer position working with the DB2 environment and from there, he found his interest in server tools which lead him to become an Eclipse WTP Project Team Committer with advance knowledge in server tools.

I would like to take this moment to thank Angel Vera for taking time from his busy schedule to come to Seneca College and present his views on “How to effectively and efficiently find a bug“.

In summary there are five important parts to finding a bug:

  1. Identify a unique string in the GUI
  2. Search for the string in the .property files
  3. Identify the key associated to the string
  4. Search for the key in the .java files
  5. Identify the code that is causing the bug

Now lets walk through the example that Angel had presented to us. Bug 241429

First, read about the bug on Bugzilla then read it again, including the comments.

Buzilla Bug Info 241429

Once you finished reading about the bug, identify the Component and Version of the bug. As seen in the above image, the “Component” and “Version” information about the bug is circled in red. In this example, the component of the bug exist in the “wst.server” package identified in version 3.0 of the WTP plaftform.

Now launch your WTP platform, preferably version 3.0. I do not have version 3.0 and so I will use version 3.1M4 and we will see if this bug still exist.

To reproduce bug 241429 from this example, we will need to open a “Java EE” perspective.

Eclipse WTP - Java EE Prespective

Under the “Server” tab right click a server and click on “Properties”.

Eclipse WTP - Server Properties

The Properties window for the server will appear.

Eclipse WTP - Server Properties - Switch Location

The description from Buzilla states, if we click on the “Switch Location” button the UI hangs for a significant period of time.

Eclipse WTP - Server Properties - Switch Location 2

When we clicked on the “Switch Location” button, the “Location” changed to “[workspace metadata]” and the UI didn”t seem to hang at all. It appears this bug no longer exist in this version (3.1M4).

However, for the sake of continuing this article we will assume the bug exist. Now lets find the code!!

In your WTP platform, open a “CVS Repository Exploring” perspective to connect to the “dev.eclipse.org” “cvsroot/webtools” repository.

If you have not added this repository to your list of “CVS Repositories” then click on the add a CVS Repository button Eclipse WTP - Add CVS Repository Button to add a new CVS Repository. Once you click on this button the below window will appear. Fill in the “Host” and the “Repository path” as seen in the below image and select “anonymous” as the “User”. As for the password, fill in your email address then click on the “finish” button.

Eclipse WTP - Add CVS Repository

  • Host: dev.eclipse.org
  • Repository path: /cvsroot/webtools
  • User: anonymous
  • Password: <your email address>

Now its time to check out the packages we may need in order to find our bug.

Perviously from Bugzilla, we identified the “Component” for this bug (wst.server). Now, check out all packages within this package.

Eclipse WTP - wst.server

From the Server Properties window in our Java EE perspective, identify a unique string in the GUI. We will use the string from the button “Switch Location”.

Eclipse WTP - Server Properties - Switch Location 1

Now open a search window by clicking on “Search” from the menu bar and selecting “Search” or press “Ctrl + H”.

Eclipse WTP - Search

The Search window will appear. Enter “Switch Location” into the “Containing text:” field and enter “*.properties” into the “File name patterns:” field, then click on the “Search” button.

Eclipse WTP - Search Window 1

From the following search result, double click to open the file where the searched string, “Switch Location”, was found.

Eclipse WTP - Search Result 1

Find the line where the searched string, “Switch Location”, is located and identify the key associated to that string. In this example it is “actionSwitchServerLocation”.

Eclipse WTP - Messages.properties File

Now reopen the search window “Ctrl + H” and enter “actionSwitchServerLocation” into the “Containing text:” field and enter “*.java” into the “File name patterns:” field, then click on the “Search” button.

Eclipse WTP - Search Window 2

From the following search result, double click to open the files where the searched string “actionSwitchServerLocation” was found and analyze the files to see which code is causing the bug.

Eclipse WTP - Search Result 2

From this example, the Messages.java file contains the declaration of the static variable and the ServerPropertyPage.java contains code where the variable is set and used.

Eclipse WTP - Server Property Page

If there was a bug in the code the ServerPropertyPage.java would be the place to find the bug. However, in this case there was no bug.

Tutorial Link: Web Tools Platform (WTP) Tutorials

Wow, it’s pretty exciting to instantly see the modification you make to the Eclipse WTP code.

Web Tools Platform (WTP) Tutorials - Modifying Code

Happy Chinese New Years!!

January 26, 2009

Happy New Years Everyone!!

Wishing you all:

新年快樂, 恭喜發財, 年年有餘, 新年進, 學業進, 生意興隆, 精靈活潑, 龍馬精神 or 步步高星, 萬事如意, 心想事成, 願望體會, 牛年行大雲.

I hope this works…

Follow

Get every new post delivered to your Inbox.