if ( path.toLowerCase().startsWith( "h" ) ) { preview( convertStringToURL( path ) ); } else { preview( path.substring(6) ); }
preview( path );
	public void widgetSelected( SelectionEvent e )	{		if ( e.widget.equals( btnOK ) )		{			applyMarkerIcon = true;					shell.dispose( );		}		else if ( e.widget.equals( btnCancel ) )		{			shell.dispose( );		}		else if ( e.widget.equals( btnURL ) )		{			switchTo( URI_TYPE );		}		else if ( e.widget.equals( btnLocal ) )		{			switchTo( LOCAL_TYPE );		}		else if ( e.widget.equals( btnAdd ) )		{			uriEditor.setText( uriEditor.getText( ).trim( ) );			String path = uriEditor.getText( );			iconList.add( path );			iconList.select( iconList.indexOf( path ) );			addIconToPalette( );			updateButton( );		}		else if ( e.widget.equals( btnPreview ) )		{			uriEditor.setText( uriEditor.getText( ).trim( ) );			String path = uriEditor.getText( );			preview( convertStringToURL( path ) );		}		else if ( e.widget.equals( iconList ) )		{			String path = iconList.getSelection( )[0];			if ( path.toLowerCase().startsWith( "h" ) ) //$NON-NLS-1$			{				preview( convertStringToURL( path ) );			}			else			{				preview( path.substring(6) );			}			updateButton( );		}		else if ( e.widget.equals( btnBrowse ) )		{			FileDialog fileChooser = new FileDialog( shell, SWT.OPEN );			fileChooser.setText( Messages.getString( "MarkerIconDialog.Chooser.Title" ) ); //$NON-NLS-1$			fileChooser.setFilterExtensions( new String[]{					"*.gif", "*.jpg", "*.png" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$			} );						try			{				String path = fileChooser.open( );				if ( path != null )				{					if ( iconList.indexOf( path ) != -1 )					{						return;					}					preview( path );					path = new StringBuffer("file:///").append(path).toString(); //$NON-NLS-1$					iconList.add( path );					iconList.select( iconList.indexOf( path ) );					addIconToPalette( );				}			}			catch ( Throwable ex )			{				ex.printStackTrace( );			}			updateButton( );		}		else if ( e.widget.equals( btnRemove ) )		{			if ( iconList.getSelectionCount( ) != 0 )			{				iconPalette.getEntries( )						.remove( iconList.getSelectionIndex( ) );				previewCanvas.clear( );				iconList.remove( iconList.getSelectionIndex( ) );			}			updateButton( );		}	}