/** Performs the paste action.
* @return <code>Transferable</code> which should be inserted into the clipboard after
* paste action. It can be null, which means that clipboard content
* should stay the same
*/
public Transferable paste() throws IOException {
PropertiesStructure ps = ((PropertiesFileEntry)getFileEntry()).getHandler().getStructure();
String value;
if (mode == MODE_PASTE_WITH_VALUE) {
value = item.getValue();
} else {
value = "";
}
if (ps != null) {
Element.ItemElem newItem = ps.getItem(item.getKey());
if (newItem == null) {
ps.addItem(item.getKey(), value, item.getComment());
}
else {
newItem.setValue(value);
newItem.setComment(item.getComment());
}
if (node != null) {
node.destroy();
}
}
return null;
}
PropertiesLocaleNode.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录