JQuery: How it worksIncrementally perform the exploration by extending each view with a sub-view 1.. JQuery: How it worksIncrementally perform the exploration by extending views with a
Trang 2Typical ways to explore scattered concerns:
Browse structural views
- package structures, inheritance hierarchy
Search for a specific pattern
Trang 4JQuery: How it works
Avoiding loss of context:
Problem: Too many browsers leads to loss of
context
Solution: Support many views within a single
Start with Package
Trang 5JQuery: How it works
Abstract Class Browser
Both views in same window
Package Browser
Bundled with many more browsers
Trang 6JQuery: How it works
Incrementally perform the exploration by
extending each view with a sub-view
1 Select extension point
Trang 7JQuery: How it works
Incrementally perform the exploration by
extending views with a new extensions
1 Select
extension point
2 Choose
sub-query
Trang 8JQuery: How it works
Incrementally perform the exploration by
extending views with a new extensions
Trang 9JQuery: How it works
Filtering by regular expression
Search for “Figure”:
• Open query dialog
• double-click
Trang 10JQuery: How it works
Filtering by regular expression
Search for “Figure”:
• Open query dialog
• Edit query
Trang 11JQuery: How it works
Filtering by regular expression
Search for “Figure”:
• Open query dialog
• Edit query
• Close dialogue
(query automatically re- executes)
Trang 12JQuery: How it works
Filtering by regular expression
Browser is now filtered by “Figure”
Can customize queries
in many other ways too.
Trang 13JQuery: An Example
Make a enhancement to the JHotDraw codebase
Non-trivial, but some details abstracted away.
Based on an actual task we performed with little prior
knowledge of the codebase.
Task:
Trang 14JQuery: The Plan
???
Frame No Frame
Menu Change
Pen Color
Trang 15JQuery: Executing the Plan
Menu Change
Pen Color
Frame No Frame
Change Attribute Command
Found by regex search for
Step 2: Find
relationship
to frames
Trang 16JQuery: Executing the Plan
Change Attribute Command
???
Frame No Frame
Determined that Pen
Color sets Menu
Trang 17Attribute Figure
setAttr
implemented by
JQuery: Executing the Plan
Change Attribute Command
Trang 18JQuery: Executing the Plan
Change Attribute Command
Rectangle Figure
Text Figure
change this
method
Figure
Attribute Figure getAttr
drawFrsetAttrsetAttr
implemented by calls
dataflow sidetrack to explore
FigureAttributes
Determined that Pen
Color sets
FrameColor Attribute
Trang 19JQuery: Versatile Code Navigator
1 Browsing structural views
2 Searching for a specific pattern
3 Following relationships
Current IDE’s:
“explosion” of disconnected views
loss of context disorientation
JQuery:
within a single navigation view
retain context reduce disorientation
Browse Scattered Code
Trang 20JQuery: Customization
JQuery can do more:
can create more powerful queries
can include data from other tools
has extendable menu items
virtual source files (in next release)
See our website!
Trang 21JQuery: De-tangling searching
Why use 4 browsers when you can use 1?
Trang 22Google:
Download JQuery (new release out soon):
Prevents tangled and scattered