Skip to content
Snippets Groups Projects
Commit 87499f76 authored by Tobias Ask's avatar Tobias Ask
Browse files

Merge branch '15-delete-action-is-not-integrated' into 'master'

Resolve "Delete action is not integrated"

Closes #15

See merge request !10
parents 6dcd3cdf cc329ab8
No related branches found
No related tags found
1 merge request!10Resolve "Delete action is not integrated"
Pipeline #
...@@ -65,6 +65,7 @@ public class FXMLEditor extends EditorPart { ...@@ -65,6 +65,7 @@ public class FXMLEditor extends EditorPart {
private IAction copyHandler; private IAction copyHandler;
private IAction cutHandler; private IAction cutHandler;
private IAction pasteHandler; private IAction pasteHandler;
private IAction deleteHandler;
public IAction getUndoActionHandler() { public IAction getUndoActionHandler() {
return undoActionHandler; return undoActionHandler;
...@@ -86,6 +87,10 @@ public class FXMLEditor extends EditorPart { ...@@ -86,6 +87,10 @@ public class FXMLEditor extends EditorPart {
return pasteHandler; return pasteHandler;
} }
public IAction getDeleteHandler() {
return deleteHandler;
}
public EditorController getEditorController() { public EditorController getEditorController() {
return editorController; return editorController;
} }
...@@ -163,6 +168,7 @@ public class FXMLEditor extends EditorPart { ...@@ -163,6 +168,7 @@ public class FXMLEditor extends EditorPart {
copyHandler = new SceneBuilderControlActionHandler(editorController, ControlAction.COPY); copyHandler = new SceneBuilderControlActionHandler(editorController, ControlAction.COPY);
cutHandler = new SceneBuilderEditActionHandler(editorController, EditAction.CUT); cutHandler = new SceneBuilderEditActionHandler(editorController, EditAction.CUT);
pasteHandler = new SceneBuilderEditActionHandler(editorController, EditAction.PASTE); pasteHandler = new SceneBuilderEditActionHandler(editorController, EditAction.PASTE);
deleteHandler = new SceneBuilderEditActionHandler(editorController, EditAction.DELETE);
} }
private ChangeListener<Number> editorSelectionListener = (oV, oldNum, newNum) -> { private ChangeListener<Number> editorSelectionListener = (oV, oldNum, newNum) -> {
......
...@@ -20,6 +20,7 @@ public class FXMLEditorContributor extends EditorActionBarContributor { ...@@ -20,6 +20,7 @@ public class FXMLEditorContributor extends EditorActionBarContributor {
actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), editor.getCopyHandler()); actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), editor.getCopyHandler());
actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), editor.getCutHandler()); actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), editor.getCutHandler());
actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), editor.getPasteHandler()); actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), editor.getPasteHandler());
actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), editor.getDeleteHandler());
actionBars.updateActionBars(); actionBars.updateActionBars();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment