fix sonarlint messages
This commit is contained in:
@ -109,10 +109,7 @@ public class AboutDialog extends Dialog {
|
||||
styleRange.fontStyle = SWT.BOLD;
|
||||
styledText.setStyleRange(styleRange);
|
||||
///^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
|
||||
Pattern pattern = Pattern.compile("https?:\\/\\/([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w\\.-]*)*\\/?"); //$NON-NLS-1$
|
||||
// in case you would like to ignore case sensitivity,
|
||||
// you could use this statement:
|
||||
// Pattern pattern = Pattern.compile("\\s+", Pattern.CASE_INSENSITIVE);
|
||||
Pattern pattern = Pattern.compile("https?:\\/\\/([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w\\.-]*)*\\/?"/*, Pattern.CASE_INSENSITIVE*/); //$NON-NLS-1$
|
||||
Matcher matcher = pattern.matcher(productTitle+copyrightText);
|
||||
// check all occurance
|
||||
while (matcher.find()) {
|
||||
|
@ -46,6 +46,7 @@ import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.swt.widgets.ToolBar;
|
||||
import org.eclipse.swt.widgets.ToolItem;
|
||||
import org.eclipse.wb.swt.ResourceManager;
|
||||
import org.eclipse.wb.swt.SWTResourceManager;
|
||||
|
||||
import com.minres.scviewer.e4.application.Constants;
|
||||
|
||||
@ -249,7 +250,7 @@ public class FileBrowserDialog extends TrayDialog {
|
||||
|
||||
fileNameEntry = new Text(bottomBar, SWT.BORDER);
|
||||
fileNameEntry.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
|
||||
fileNameEntry.setEditable(false); //TODO: temporary disabled
|
||||
fileNameEntry.setEditable(false);
|
||||
fileNameEntry.setEnabled(false);
|
||||
|
||||
filterCombo = new Combo(bottomBar, SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
|
||||
@ -457,7 +458,7 @@ public class FileBrowserDialog extends TrayDialog {
|
||||
|
||||
@Override
|
||||
public Color getForeground(Object element) {
|
||||
return globber.matches(element) || ((File)element).isDirectory()? null: ResourceManager.getColor(SWT.COLOR_GRAY);
|
||||
return globber.matches(element) || ((File)element).isDirectory()? null: SWTResourceManager.getColor(SWT.COLOR_GRAY);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user