Monday, July 6, 2009

Smart Tags


Provide “…choices for enhancing content and layout…”

Feature of Win XP.

Identified by “purple dashed underlining”.

Similar to hyperlinks but more complex and interactive.

When the cursor hovers over a Smart Tagged word, a drop down list appears with a selection of links related to the word.

A button on the toolbar turns the Smart Tag option on and off.

Callout 11 Smart Tag Actions buttonCallout 22 Smart tag indicator

Each smart tag recognizer identifies a type of data, such as names, dates, or telephone numbers, and contains the logic needed to provide one or more actions for each data type.

When you type text into a new document or open an existing document, the logic in the smart tag looks for words that match the data types in the list. When the smart tag finds a match, it places a smart tag indicator— a dotted purple line— under the term and enables the appropriate actions.

The actions you can take depend on the type of data that Word recognizes and labels with a smart tag.

For example, "Nate Sun" in the previous example is recognized as a "person name" smart tag with actions you can take, such as Open Contact, Schedule a Meeting, Add to Contacts, or Insert Address.

Smart Tags recognize patterns (e.g. a part number) and associate actions within Microsoft Office (Word, Excel, PowerPoint, and Outlook). These actions provide a quick way to get information about the part recognized from SAP and AeroPDM.

Smart Tags are indicated by a small purple triangle in Excel or a purple underline in Word/Outlook/PowerPoint

source: Microsoft.

Improving Code Quality with PMD and Eclipse | installation & usage

PMD is a static code analyzer for Java. It scans Java source code and looks for potential problems like:
  • Possible bugs - empty try/catch/finally/switch statements
  • Dead code - unused local variables, parameters and private methods
  • Suboptimal code - wasteful String/StringBuffer usage
  • Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
  • Duplicate code - copied/pasted code means copied/pasted bugs

Follow the below steps to integrate the plugin in Eclipse:

If you are behind a corporate firewall, set the proxy in Eclipse.

Window -> Preferences -> General -> Network Conncetions.

Select Manual proxy configuration.

HTTP Proxy :xxx.yyy.mmm.nnn

Port: 8080

  1. Navigate to Help | Software Updates | Find and Install...
  2. Select "Search for new features to install" and click Next
  3. Click New Remote Site...
  4. Enter a name (PMD) and the URL http://pmd.sourceforge.net/eclipse


  1. In Sites to include in search check PMD and click Finish
  2. In the Search Results dialog check PMD for Eclipse 3 3.1.0 and click Next
  1. Accept the terms of the license agreements and click Next
  2. Click Finish.
  3. Wait for Eclipse to download the required jar files, then click Install
  4. Restart the workbench. This will load the PMD plugin.
  5. Navigate to Window | Show View | Other...
  6. Select PMD | PMD Violations
  7. PMD Violations view should appear at the bottom pane

Set up Preferences

  1. Download the XMl ruleset file to your workspace directory.
  2. Windows ->Preferences -> PMD -> Rules Configuration
  3. Clear All
  4. Confirm by clicking OK
  5. Import rule set...
  6. Browse
  7. Select the file you downloaded above
  8. Click OK to complete import
  9. Click OK to close Windows -> Preferences
  10. When prompted to perform a full rebuild, select yes.

How to use it?

Before launching Eclipse make sure you have enough memory for PMD. This is particularly important when analyzing large projects. In these situations PMD tends to be memory-hungry. Hence, make sure to start with as much memory as you can afford, for example 512M (eclipse.exe -vmargs -Xmx512M)

If PMD Violations view is not open navigate to Window | Show View | Other... and select PMD | PMD Violations

More -> http://pmd.sourceforge.net/


Followers