/**
 * 
 */
package authoring;

import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;

import authoring.canvas.LevelEditor;
import authoring.panel.Panel;
import authoring.utils.Factory;
import authoring.views.View;
import discussion.Discussion;
import engine.game.Level;
import javafx.geometry.Insets;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.SplitPane;

/**
 * @author Elliott Bolzan
 * Modified by Mina Mungekar
 *
 */
public class Workspace extends View
{

	private ResourceBundle resources;
	private LevelEditor levelEditor;
	private Panel panel;
	private SplitPane pane;

	/**
	 * 
	 */
	public Workspace(ResourceBundle resources)
	{
		super("Workspace");
		this.resources = resources;
		setup();
	}

	/**
	 * Initializes the Workspace's components.
	 */
	private void setup()
	{
		pane = new SplitPane();
		panel = new Panel(this, 0);
		canvas = new Canvas(this);
		pane.getItems().addAll(panel,canvas);
		pane.setDividerPositions(Double.parseDouble(resources.getString("DividerPositionX")),
				Double.parseDouble(resources.getString("DividerPositionY")));
		setPadding(new Insets(Integer.parseInt(resources.getString("WorkSpaceInsets"))));
		setCenter(pane);
	}

	public ResourceBundle getResources()
	{
		return resources;
	}

	public SplitPane getPane()
	{
		return pane;
	}

	public void showMessage(String message)
	{
		Factory factory = new Factory(resources);
		factory.makeAlert(AlertType.ERROR, "ErrorTitle", "ErrorHeader", message).showAndWait();
	}
	
	public List getEntities(){
		//return canvas's entities (i.e. canvas.getLevel())
		return new ArrayList<>();
	}

}
@@ -242,64 +242,8 @@
 ew;%0A
-import discussion.Discussion;%0Aimport engine.game.Level;%0A
 impo
@@ -269,16 +269,16 @@
 Insets;%0A
+
 import j
@@ -383,19 +383,16 @@
 t Bolzan
-%0A *
  Modifie
@@ -409,16 +409,33 @@
 Mungekar
+, Jimmy Shackford
 %0A *%0A */%0A
@@ -860,27 +860,37 @@
 ;%0A%09%09
-canvas = new Canvas
+levelEditor = new LevelEditor
 (thi
@@ -924,22 +924,28 @@
 l(panel,
-canvas
+ levelEditor
 );%0A%09%09pan
@@ -1496,17 +1496,16 @@
 t();%0A%09%7D%0A
-%09
 %0A%09public
@@ -1527,14 +1527,17 @@
 es()
+%0A%09
 %7B%0A%09%09//
+ 
 retu

Edit Workspace.java to display a LevelEditor instead of a Canvas. This allows for multiple tabs. Contributes to #13.