import java.net.URI;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
/**
public URI getUri(){
try {
+ labelException.setFont(JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT));
+ labelException.setForeground(getPersistentBackground());
labelException.setText("");
return new URI(super.getText());
} catch (Exception e) {
- labelException.setText(e.getMessage());
+ labelException.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
+ labelException.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
+ labelException.setText("URL won't be saved! "+e.getMessage());
return null;
}
}