Skip to content
Snippets Groups Projects
Verified Commit 093682b3 authored by Anian Bühler's avatar Anian Bühler
Browse files

added the reference option to context menue

parent 641b7458
Branches master
No related tags found
No related merge requests found
......@@ -82,6 +82,11 @@ public class ContextMenu extends PopupMenu implements ActionListener {
cloneAllItem1.addActionListener(rndBlockMenu);
addCommentMenu.add(cloneAllItem1);
refrenceItem = new MenuItem(uiMessageBundle.getString("ardublock.ui.reference"));
refrenceItem.setActionCommand(OPEN_REFERENCE);
refrenceItem.addActionListener(rndBlockMenu);
addCommentMenu.add(refrenceItem);
addCommentMenuInit = true;
}
......@@ -109,6 +114,11 @@ public class ContextMenu extends PopupMenu implements ActionListener {
cloneAllItem2.setActionCommand(CLONE_BLOCKS);
cloneAllItem2.addActionListener(rndBlockMenu);
removeCommentMenu.add(cloneAllItem2);
refrenceItem = new MenuItem(uiMessageBundle.getString("ardublock.ui.reference"));
refrenceItem.setActionCommand(OPEN_REFERENCE);
refrenceItem.addActionListener(rndBlockMenu);
removeCommentMenu.add(refrenceItem);
removeCommentMenuInit = true;
}
......@@ -161,7 +171,6 @@ public class ContextMenu extends PopupMenu implements ActionListener {
return null;
}
<<<<<<< d9a986a828726b1e45728775df9d1d8a29dab891
/**
* opens reference-file (html) for active block
* in standard browser
......@@ -360,8 +369,6 @@ public class ContextMenu extends PopupMenu implements ActionListener {
}
return;
}
=======
>>>>>>> 96d591de06c7d786793f059145b4f9a934b0675e
public void actionPerformed(ActionEvent a) {
if (a.getActionCommand() == ARRANGE_ALL_BLOCKS) {
......@@ -391,5 +398,11 @@ public class ContextMenu extends PopupMenu implements ActionListener {
((RenderableBlock) activeComponent).cloneMe(false);
}
}
else if (a.getActionCommand() == OPEN_REFERENCE) {
//notify the renderableblock componenet that lauched the conetxt menu
if (activeComponent != null && activeComponent instanceof RenderableBlock) {
createReferenceWindow(((RenderableBlock) activeComponent).getBlock().getGenusName());
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment