Exemplo n.º 1
0
 private String[] getPreviousExtensionsOldStyle() {
   List<String> extensions = new ArrayList<String>(fPreviousSearchPatterns.size());
   int size = fPreviousSearchPatterns.size();
   for (int i = 0; i < size; i++) {
     SearchPatternData data = fPreviousSearchPatterns.get(i);
     String text = FileTypeEditor.typesToString(data.fileNamePatterns);
     if (!extensions.contains(text)) {
       extensions.add(text);
     }
   }
   return extensions.toArray(new String[extensions.size()]);
 }
Exemplo n.º 2
0
  private void handleWidgetSelected() {
    int selectionIndex = fPattern.getSelectionIndex();
    if (selectionIndex < 0 || selectionIndex >= fPreviousSearchPatterns.size()) {
      return;
    }

    SearchPatternData patternData = fPreviousSearchPatterns.get(selectionIndex);
    if (!fPattern.getText().equals(patternData.textPattern)) {
      return;
    }
    fIsCaseSensitiveCheckbox.setSelection(patternData.isCaseSensitive);
    fIsRegExSearch = patternData.isRegExSearch;
    fIsRegExCheckbox.setSelection(fIsRegExSearch);
    fPattern.setText(patternData.textPattern);
    fPatterFieldContentAssist.setEnabled(fIsRegExSearch);
    fFileTypeEditor.setFileTypes(patternData.fileNamePatterns);
    if (patternData.workingSets != null) {
      getContainer().setSelectedWorkingSets(patternData.workingSets);
    } else {
      getContainer().setSelectedScope(patternData.scope);
    }
  }
Exemplo n.º 3
0
 private String[] getExtensions() {
   return fFileTypeEditor.getFileTypes();
 }