Handler (final EditorWindow window, final VirtualFile selectedFile) { return new Handler(window.isFilePinned(selectedFile), selectedFile.equals(window.getSelectedFile())) { @Override void setPinned(boolean value) { window.setFilePinned(selectedFile, value); } }; }