Skip to content

Commit

Permalink
IDEX-3362: Allow java file renaming(without refactoring)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrienkoAleksandr committed Nov 3, 2015
1 parent f76a920 commit 504b90b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.che.ide.api.project.node.resource.RenameProcessor;
import org.eclipse.che.ide.ext.java.client.project.settings.JavaNodeSettings;
import org.eclipse.che.ide.project.node.FileReferenceNode;
import org.eclipse.che.ide.project.node.resource.ItemReferenceProcessor;
import org.eclipse.che.ide.ui.smartTree.presentation.NodePresentation;

import javax.validation.constraints.NotNull;
Expand Down Expand Up @@ -59,7 +60,7 @@ public boolean isLeaf() {
@Nullable
@Override
public RenameProcessor<ItemReference> getRenameProcessor() {
return null;
return resourceProcessor;
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public Promise<ItemReference> delete(@NotNull HasDataObject<ItemReference> node)
@Override
public Promise<ItemReference> rename(@Nullable HasStorablePath parent, @NotNull HasDataObject<ItemReference> node,
@NotNull String newName) {
dialogFactory.createMessageDialog("Unsupported operation",
"At this moment we don't support to rename java files",
null).show();

return Promises.resolve(node.getData());
return super.rename(parent, node, newName);
}
}

0 comments on commit 504b90b

Please sign in to comment.