List of usage examples for com.intellij.openapi.fileEditor TransferableFileEditorState setTransferableOptions
void setTransferableOptions(Map<String, String> options);
From source file:com.intellij.ide.diff.VirtualFileDiffElement.java
License:Apache License
private static void setCustomState(FileEditor editor) { final FileEditorState state = editor.getState(FileEditorStateLevel.FULL); if (state instanceof TransferableFileEditorState) { final TransferableFileEditorState editorState = (TransferableFileEditorState) state; final String id = editorState.getEditorId(); final HashMap<String, String> options = new HashMap<String, String>(); final PropertiesComponent properties = PropertiesComponent.getInstance(); for (String key : editorState.getTransferableOptions().keySet()) { final String value = properties.getValue(getKey(id, key)); if (value != null) { options.put(key, value); }/*from ww w . j a v a 2s . c o m*/ } editorState.setTransferableOptions(options); editor.setState(editorState); } }