import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.CellEditor.LayoutData;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
@Override
protected void createButtonsForButtonBar(Composite parent) {
String[] newButtonText = getNewWizardText();
-
+
if (newButtonText!= null){
this.newButton1 = createButton(parent, this.new_id, newButtonText[0], false);
newButton1.addSelectionListener(getNewWizardButtonSelectionListener());
-
-
+
+
if (newButtonText.length > 1){
newButton2 = createButton(parent, this.new_id2, newButtonText[1], false);
newButton2.addSelectionListener(getNewWizardButtonSelectionListener());
}
-
+
}
Button space = createButton(parent, this.space_id, " ", false);
space.setEnabled(false);
gridLayout.numColumns=2;
}
parent.setLayout(gridLayout);
-
+
super.createButtonsForButtonBar(parent);
}
import java.util.Comparator;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
pattern = author.getNomenclaturalTitle();
if (control!= null){
firstCall = false;
- ((Text)control).setText(pattern);
+ model = CdmStore.getService(IReferenceService.class).getUuidAndAbbrevTitleCacheForAuthor(limitOfInitialElements, pattern, null);
+
}
- }
+ }else{
if (isUseIdentifier()){
List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.EXACT, limitOfInitialElements);
model = CdmStore.getService(IReferenceService.class).getUuidAndAbbrevTitleCache(limitOfInitialElements, pattern);
}
-
+ }
}
+ @Override
+ protected void search() {
+ Control control =getSearchField();
+ String pattern = null;
+ if (control != null){
+ pattern = ((Text)control).getText();
+ if (pattern.equals("*") || pattern.equals("?")){
+ callService(null);
+ }else if (StringUtils.isNotBlank(pattern)){
+ callService(pattern);
+ } else if (firstCall){
+ callService(null);
+ }
+ fillContentProvider(null);
+ }
+ }
+