Beispiel #1
0
  public void actionPerformed(AnActionEvent event) {
    Project project = event.getData(PlatformDataKeys.PROJECT);
    Icon i = getQuestionIcon();

    //Prompt the user for their choice of dimension filters (only one-at-a-time atm)
    String dimension = showInputDialog(project, "What dimesion would you like to filter by?", "Dimension name",i);
    String value = showInputDialog(project, "What choice would you like to make in dimension " + dimension + "?", "Chocie", i);

    //Grab the file and store it's current state before making any modifications
    //TODO: this will have to account for if a partial selection has already been made on the file
    VirtualFile f = event.getData(DataKeys.VIRTUAL_FILE);
    String name = f.getName();


    //Perform the modification to the file, store it's new state, and display to the user
    Choice c = new Choice(dimension, value);

    //TODO: rather than passing in names, pass in some representation of the original file and the modified file
    FileVariation fv = new FileVariation(name, name, c);
    variedFiles.add(fv);
  }