import net.haspamelodica.swt.helper.zoomablecanvas.helper.ZoomableCanvasUserInput;
import net.mograsim.logic.model.editor.Editor;
import net.mograsim.logic.model.editor.SaveLoadManager;
-import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
+import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
public class EditorGUI
{
ToolItem file = new ToolItem(toolBar, SWT.DROP_DOWN);
// TODO
-// DropDownEntry newEntry = new DropDownEntry("New", e -> {
-// });
+ DropDownEntry newEntry = new DropDownEntry("New", e -> Editor.openNewEditor());
DropDownEntry loadEntry = new DropDownEntry("Load", e ->
{
try
DropDownEntry saveEntry = new DropDownEntry("Save", e -> editor.save());
DropDownEntry saveAsEntry = new DropDownEntry("Save as...", e -> editor.saveAs());
- DropDownEntry[] entries = new DropDownEntry[] { loadEntry, saveEntry, saveAsEntry };
+ DropDownEntry[] entries = new DropDownEntry[] { newEntry, loadEntry, saveEntry, saveAsEntry };
setupDrowpDownMenu(file, entries);
public void refreshAddList()
{
- addList.setItems(IndirectGUIComponentCreator.getStandardComponentIDs().toArray(String[]::new));
+ addList.setItems(IndirectModelComponentCreator.getStandardComponentIDs().keySet().stream().sorted().toArray(String[]::new));
addList.select(0);
}
if (!display.readAndDispatch())
display.sleep();
}
-
-}
+}
\ No newline at end of file