X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Fbrowser%2FSCLDefinitionSelectionDialog.java;fp=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Fbrowser%2FSCLDefinitionSelectionDialog.java;h=8b8896d24e6870dd85cdf67bad2869491d02b0df;hp=843b88fe203b999a6fe3f7ac21b946bfac8ae5da;hb=9712014e959584157b02e594be8719c151b8f5b0;hpb=d14bfb83fddf30539f401de54ce9f61bd0aff25c diff --git a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/SCLDefinitionSelectionDialog.java b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/SCLDefinitionSelectionDialog.java index 843b88fe2..8b8896d24 100644 --- a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/SCLDefinitionSelectionDialog.java +++ b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/SCLDefinitionSelectionDialog.java @@ -22,11 +22,11 @@ import org.simantics.scl.osgi.SCLOsgi; import org.simantics.scl.ui.Activator; public class SCLDefinitionSelectionDialog extends FilteredItemsSelectionDialog { - private static final String DIALOG_SETTINGS = "SCLDefinitionSelectionDialogSettings"; + private static final String DIALOG_SETTINGS = "SCLDefinitionSelectionDialogSettings"; //$NON-NLS-1$ public SCLDefinitionSelectionDialog(Shell shell) { super(shell, false); - setTitle("Choose an SCL definition"); + setTitle(Messages.SCLDefinitionSelectionDialog_ChooseSCLDefinition); setSelectionHistory(new DefinitionSelectionHistory()); setListLabelProvider(new LabelProvider() { @Override @@ -35,9 +35,9 @@ public class SCLDefinitionSelectionDialog extends FilteredItemsSelectionDialog { return (String)element; SCLValue value = (SCLValue)element; if(element == null) - return ""; + return ""; //$NON-NLS-1$ Name name = value.getName(); - return name.name + " (" + name.module + ") :: " + value.getType(); + return name.name + " (" + name.module + ") :: " + value.getType(); //$NON-NLS-1$ //$NON-NLS-2$ } }); } @@ -78,13 +78,13 @@ public class SCLDefinitionSelectionDialog extends FilteredItemsSelectionDialog { if(patternText != null && patternText.length() > 0) patternMatcher.setPattern(patternText); else - patternMatcher.setPattern("*"); + patternMatcher.setPattern("*"); //$NON-NLS-1$ } @Override public boolean matchItem(Object item) { String text = item.toString(); - if(getPattern().contains("/")) + if(getPattern().contains("/")) //$NON-NLS-1$ return matches(text); else { int p = text.lastIndexOf('/'); @@ -132,8 +132,8 @@ public class SCLDefinitionSelectionDialog extends FilteredItemsSelectionDialog { } private boolean isTupleValue(Name name) { - return name.module.equals(Types.BUILTIN) && name.name.startsWith("(") && - (name.name.equals("()") || name.name.charAt(1) == ','); + return name.module.equals(Types.BUILTIN) && name.name.startsWith("(") && //$NON-NLS-1$ + (name.name.equals("()") || name.name.charAt(1) == ','); //$NON-NLS-1$ } @Override