Java 类com.intellij.psi.templateLanguages.TemplateDataLanguagePatterns 实例源码

项目:intellij-ce-playground    文件:FileTypeConfigurable.java   
@Override
public void apply() {
  Set<UserFileType> modifiedUserTypes = myOriginalToEditedMap.keySet();
  for (UserFileType oldType : modifiedUserTypes) {
    oldType.copyFrom(myOriginalToEditedMap.get(oldType));
  }
  myOriginalToEditedMap.clear();

  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    @Override
    public void run() {
      if (!myManager.isIgnoredFilesListEqualToCurrent(myFileTypePanel.myIgnoreFilesField.getText())) {
        myManager.setIgnoredFilesList(myFileTypePanel.myIgnoreFilesField.getText());
      }
      myManager.setPatternsTable(myTempFileTypes, myTempPatternsTable);
      for (FileNameMatcher matcher : myReassigned.keySet()) {
        myManager.getRemovedMappings().put(matcher, Pair.create(myReassigned.get(matcher), true));
      }

      TemplateDataLanguagePatterns.getInstance().setAssocTable(myTempTemplateDataLanguages);
    }
  });
}
项目:tools-idea    文件:FileTypeConfigurable.java   
@Override
public void apply() throws ConfigurationException {
  Set<UserFileType> modifiedUserTypes = myOriginalToEditedMap.keySet();
  for (UserFileType oldType : modifiedUserTypes) {
    UserFileType newType = myOriginalToEditedMap.get(oldType);
    oldType.copyFrom(newType);
  }
  myOriginalToEditedMap.clear();

  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    @Override
    public void run() {
      if (!myManager.isIgnoredFilesListEqualToCurrent(myFileTypePanel.myIgnoreFilesField.getText())) {
        myManager.setIgnoredFilesList(myFileTypePanel.myIgnoreFilesField.getText());
      }
      myManager.setPatternsTable(myTempFileTypes, myTempPatternsTable);
      for (FileNameMatcher matcher : myReassigned.keySet()) {
        myManager.getRemovedMappings().put(matcher, Pair.create(myReassigned.get(matcher), true));
      }

      TemplateDataLanguagePatterns.getInstance().setAssocTable(myTempTemplateDataLanguages);
    }
  });
}
项目:consulo    文件:FileTypeConfigurable.java   
@RequiredDispatchThread
@Override
public void apply() throws ConfigurationException {
  Set<UserFileType> modifiedUserTypes = myOriginalToEditedMap.keySet();
  for (UserFileType oldType : modifiedUserTypes) {
    UserFileType newType = myOriginalToEditedMap.get(oldType);
    oldType.copyFrom(newType);
  }
  myOriginalToEditedMap.clear();

  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    @Override
    public void run() {
      if (!myManager.isIgnoredFilesListEqualToCurrent(myFileTypePanel.myIgnoreFilesField.getText())) {
        myManager.setIgnoredFilesList(myFileTypePanel.myIgnoreFilesField.getText());
      }
      myManager.setPatternsTable(myTempFileTypes, myTempPatternsTable);
      for (FileNameMatcher matcher : myReassigned.keySet()) {
        myManager.getRemovedMappings().put(matcher, Pair.create(myReassigned.get(matcher), true));
      }

      TemplateDataLanguagePatterns.getInstance().setAssocTable(myTempTemplateDataLanguages);
    }
  });
}
项目:intellij-ce-playground    文件:FileTypeConfigurable.java   
@Override
public void reset() {
  myTempPatternsTable = myManager.getExtensionMap().copy();
  myTempTemplateDataLanguages = TemplateDataLanguagePatterns.getInstance().getAssocTable();

  myTempFileTypes = new HashSet<FileType>(Arrays.asList(getModifiableFileTypes()));
  myOriginalToEditedMap.clear();

  updateFileTypeList();
  updateExtensionList();

  myFileTypePanel.myIgnoreFilesField.setText(myManager.getIgnoredFilesList());
}
项目:intellij-ce-playground    文件:FileTypeConfigurable.java   
@Override
public boolean isModified() {
  if (!myManager.isIgnoredFilesListEqualToCurrent(myFileTypePanel.myIgnoreFilesField.getText())) return true;
  HashSet<FileType> types = new HashSet<FileType>(Arrays.asList(getModifiableFileTypes()));
  return !myTempPatternsTable.equals(myManager.getExtensionMap()) || !myTempFileTypes.equals(types) ||
         !myOriginalToEditedMap.isEmpty() ||
         !myTempTemplateDataLanguages.equals(TemplateDataLanguagePatterns.getInstance().getAssocTable());
}
项目:tools-idea    文件:FileTypeConfigurable.java   
@Override
public void reset() {
  myTempPatternsTable = myManager.getExtensionMap().copy();
  myTempTemplateDataLanguages = TemplateDataLanguagePatterns.getInstance().getAssocTable();

  myTempFileTypes = new HashSet<FileType>(Arrays.asList(getModifiableFileTypes()));
  myOriginalToEditedMap.clear();

  updateFileTypeList();
  updateExtensionList();

  myFileTypePanel.myIgnoreFilesField.setText(myManager.getIgnoredFilesList());
}
项目:tools-idea    文件:FileTypeConfigurable.java   
@Override
public boolean isModified() {
  if (!myManager.isIgnoredFilesListEqualToCurrent(myFileTypePanel.myIgnoreFilesField.getText())) return true;
  HashSet types = new HashSet(Arrays.asList(getModifiableFileTypes()));
  return !myTempPatternsTable.equals(myManager.getExtensionMap()) || !myTempFileTypes.equals(types) ||
         !myOriginalToEditedMap.isEmpty() ||
         !myTempTemplateDataLanguages.equals(TemplateDataLanguagePatterns.getInstance().getAssocTable());
}
项目:consulo    文件:FileTypeConfigurable.java   
@RequiredDispatchThread
@Override
public void reset() {
  myTempPatternsTable = myManager.getExtensionMap().copy();
  myTempTemplateDataLanguages = TemplateDataLanguagePatterns.getInstance().getAssocTable();

  myTempFileTypes = new HashSet<FileType>(Arrays.asList(getModifiableFileTypes()));
  myOriginalToEditedMap.clear();

  updateFileTypeList();
  updateExtensionList();

  myFileTypePanel.myIgnoreFilesField.setText(myManager.getIgnoredFilesList());
}
项目:consulo    文件:FileTypeConfigurable.java   
@RequiredDispatchThread
@Override
public boolean isModified() {
  if (!myManager.isIgnoredFilesListEqualToCurrent(myFileTypePanel.myIgnoreFilesField.getText())) return true;
  HashSet types = new HashSet(Arrays.asList(getModifiableFileTypes()));
  return !myTempPatternsTable.equals(myManager.getExtensionMap()) || !myTempFileTypes.equals(types) ||
         !myOriginalToEditedMap.isEmpty() ||
         !myTempTemplateDataLanguages.equals(TemplateDataLanguagePatterns.getInstance().getAssocTable());
}