fix add-action in combination with tree-view node select
This commit is contained in:
parent
a34ae7e02f
commit
10b2698c06
@ -6,6 +6,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
|
||||
import de.marhali.easyi18n.service.WindowManager;
|
||||
import de.marhali.easyi18n.dialog.AddDialog;
|
||||
import de.marhali.easyi18n.util.PathUtil;
|
||||
import de.marhali.easyi18n.util.TreeUtil;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -42,7 +43,7 @@ public class AddAction extends AnAction {
|
||||
TreePath path = manager.getTreeView().getTree().getSelectionPath();
|
||||
|
||||
if(path != null) {
|
||||
return TreeUtil.getFullPath(path) + ".";
|
||||
return TreeUtil.getFullPath(path) + PathUtil.DELIMITER;
|
||||
}
|
||||
|
||||
} else { // Table View
|
||||
|
@ -25,12 +25,12 @@ public class TreeUtil {
|
||||
String section = value instanceof PresentationData ?
|
||||
((PresentationData) value).getPresentableText() : String.valueOf(value);
|
||||
|
||||
if(section == null) { // Skip empty sections
|
||||
if(value == null) { // Skip empty sections
|
||||
continue;
|
||||
}
|
||||
|
||||
if(builder.length() != 0) {
|
||||
builder.append(".");
|
||||
builder.append(PathUtil.DELIMITER);
|
||||
}
|
||||
|
||||
builder.append(section);
|
||||
|
Loading…
x
Reference in New Issue
Block a user