Skip to content

Commit

Permalink
bz-1007781: Editors should not contain file extension of assets
Browse files Browse the repository at this point in the history
  • Loading branch information
jervisliu committed Sep 20, 2013
1 parent 3123a4f commit 71aa13b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -8,6 +8,7 @@
import org.uberfire.client.annotations.WorkbenchPartView;
import org.uberfire.client.editors.texteditor.TextResourceType;
import org.uberfire.lifecycle.OnOpen;
import org.uberfire.util.FileNameUtil;

@Dependent
@WorkbenchEditor(identifier = "GuvnorTextEditor", supportedTypes = {TextResourceType.class}, priority = -1)
Expand All @@ -21,7 +22,7 @@ public void onOpen() {

@WorkbenchPartTitle
public String getTitle() {
return "Text Editor [" + path.getFileNameWithoutExtension() + "]";
return "Text Editor [" + FileNameUtil.removeExtension(path.getFileName()) + "]";
}

@WorkbenchPartView
Expand Down
Expand Up @@ -35,6 +35,7 @@
import org.uberfire.client.editors.texteditor.TextEditorPresenter;
import org.uberfire.lifecycle.OnClose;
import org.uberfire.lifecycle.OnStartup;
import org.uberfire.util.FileNameUtil;

import static org.kie.commons.validation.PortablePreconditions.*;

Expand Down Expand Up @@ -85,7 +86,7 @@ public void onLostFocus() {

@WorkbenchPartTitle
public String getTitle() {
return "Java Editor [" + path.getFileNameWithoutExtension() + "]";
return "Java Editor [" + FileNameUtil.removeExtension(path.getFileName()) + "]";
}

@WorkbenchPartView
Expand Down

0 comments on commit 71aa13b

Please sign in to comment.