summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--logo/build.xml21
-rw-r--r--logo/log4j-api-2.1.jarbin0 -> 133531 bytes
-rw-r--r--logo/log4j-core-2.1.jarbin0 -> 824749 bytes
-rw-r--r--logo/manifest_start2
-rw-r--r--logo/manifest_xlogo3
-rw-r--r--logo/src/Lanceur.java65
-rw-r--r--logo/src/log4j2.xml22
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/USBDeviceDetectorManager.java127
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/USBStorageDevice.java130
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/detectors/AbstractStorageDeviceDetector.java92
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/detectors/LinuxStorageDeviceDetector.java111
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/detectors/OSXStorageDeviceDetector.java80
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/detectors/WindowsStorageDeviceDetector.java128
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/events/DeviceEventType.java27
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/events/IUSBDriveListener.java28
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/events/USBStorageEvent.java46
-rw-r--r--logo/src/net/samuelcampos/usbdrivedectector/process/CommandLineExecutor.java77
-rw-r--r--logo/src/xlogo/AppSettings.java6
-rw-r--r--logo/src/xlogo/Application.java14
-rw-r--r--logo/src/xlogo/Logo.java8
-rw-r--r--logo/src/xlogo/MemoryChecker.java8
-rw-r--r--logo/src/xlogo/MenuListener.java8
-rw-r--r--logo/src/xlogo/Popup.java8
-rw-r--r--logo/src/xlogo/Sound_Player.java8
-rw-r--r--logo/src/xlogo/StyledDocument/DocumentLogo.java8
-rw-r--r--logo/src/xlogo/StyledDocument/DocumentLogoCommande.java8
-rw-r--r--logo/src/xlogo/StyledDocument/DocumentLogoHistorique.java8
-rw-r--r--logo/src/xlogo/gpl/x4s_info.html15
-rw-r--r--logo/src/xlogo/gui/AImprimer.java8
-rw-r--r--logo/src/xlogo/gui/Editor.java8
-rw-r--r--logo/src/xlogo/gui/EditorTextArea.java8
-rw-r--r--logo/src/xlogo/gui/EditorTextPane.java8
-rw-r--r--logo/src/xlogo/gui/EditorTextZone.java8
-rw-r--r--logo/src/xlogo/gui/HistoryPanel.java10
-rw-r--r--logo/src/xlogo/gui/Lis.java8
-rw-r--r--logo/src/xlogo/gui/MyTextAreaDialog.java8
-rw-r--r--logo/src/xlogo/gui/MyToolBar.java8
-rw-r--r--logo/src/xlogo/gui/ReplaceFrame.java8
-rw-r--r--logo/src/xlogo/gui/SearchFrame.java8
-rw-r--r--logo/src/xlogo/gui/Searchable.java8
-rw-r--r--logo/src/xlogo/gui/Traduc.java8
-rw-r--r--logo/src/xlogo/gui/ZoneCommande.java8
-rw-r--r--logo/src/xlogo/gui/ZoneEdition.java8
-rw-r--r--logo/src/xlogo/gui/components/ColorStyleSelectionPanel.java8
-rw-r--r--logo/src/xlogo/gui/components/ProcedureSearch.java6
-rw-r--r--logo/src/xlogo/gui/components/TurtleComboBox.java6
-rw-r--r--logo/src/xlogo/gui/components/X4SComponent.java6
-rw-r--r--logo/src/xlogo/gui/components/X4SFrame.java6
-rw-r--r--logo/src/xlogo/gui/components/X4SGui.java6
-rw-r--r--logo/src/xlogo/gui/components/fileslist/FilesList.java6
-rw-r--r--logo/src/xlogo/gui/components/fileslist/FilesListItem.java6
-rw-r--r--logo/src/xlogo/gui/components/fileslist/IFilesListItem.java6
-rw-r--r--logo/src/xlogo/gui/preferences/AbstractPanelColor.java8
-rw-r--r--logo/src/xlogo/gui/preferences/PanelColor.java8
-rw-r--r--logo/src/xlogo/gui/translation/BottomPanel.java8
-rw-r--r--logo/src/xlogo/gui/translation/FirstPanel.java8
-rw-r--r--logo/src/xlogo/gui/translation/MyTable.java8
-rw-r--r--logo/src/xlogo/gui/translation/TopPanel.java8
-rw-r--r--logo/src/xlogo/gui/translation/TranslateXLogo.java10
-rw-r--r--logo/src/xlogo/gui/welcome/WelcomeScreen.java447
-rw-r--r--logo/src/xlogo/gui/welcome/WorkspaceSettings.java6
-rw-r--r--logo/src/xlogo/gui/welcome/settings/tabs/AbstractWorkspacePanel.java24
-rw-r--r--logo/src/xlogo/gui/welcome/settings/tabs/ContestTab.java6
-rw-r--r--logo/src/xlogo/gui/welcome/settings/tabs/GlobalTab.java6
-rw-r--r--logo/src/xlogo/gui/welcome/settings/tabs/SyntaxHighlightingTab.java6
-rw-r--r--logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceCreationPanel.java6
-rw-r--r--logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceTab.java22
-rw-r--r--logo/src/xlogo/interfaces/BasicFileContainer.java6
-rw-r--r--logo/src/xlogo/interfaces/BroadcasterErrorFileContainer.java6
-rw-r--r--logo/src/xlogo/interfaces/ErrorDetector.java6
-rw-r--r--logo/src/xlogo/interfaces/MessageBroadcaster.java6
-rw-r--r--logo/src/xlogo/interfaces/ProcedureMapper.java6
-rw-r--r--logo/src/xlogo/interfaces/X4SModeSwitcher.java6
-rw-r--r--logo/src/xlogo/kernel/Affichage.java8
-rw-r--r--logo/src/xlogo/kernel/DrawPanel.java8
-rw-r--r--logo/src/xlogo/kernel/InstructionBuffer.java8
-rw-r--r--logo/src/xlogo/kernel/Interprete.java8
-rw-r--r--logo/src/xlogo/kernel/Kernel.java8
-rw-r--r--logo/src/xlogo/kernel/LaunchPrimitive.java8
-rw-r--r--logo/src/xlogo/kernel/LogoError.java6
-rw-r--r--logo/src/xlogo/kernel/LoopFillPolygon.java8
-rw-r--r--logo/src/xlogo/kernel/LoopFor.java8
-rw-r--r--logo/src/xlogo/kernel/LoopForEach.java8
-rw-r--r--logo/src/xlogo/kernel/LoopProperties.java8
-rw-r--r--logo/src/xlogo/kernel/LoopRepeat.java8
-rw-r--r--logo/src/xlogo/kernel/LoopWhile.java8
-rw-r--r--logo/src/xlogo/kernel/MP3Player.java8
-rw-r--r--logo/src/xlogo/kernel/MyCalculator.java8
-rw-r--r--logo/src/xlogo/kernel/MyFlow.java8
-rw-r--r--logo/src/xlogo/kernel/MyFlowReader.java8
-rw-r--r--logo/src/xlogo/kernel/MyFlowWriter.java8
-rw-r--r--logo/src/xlogo/kernel/Primitive.java8
-rw-r--r--logo/src/xlogo/kernel/Turtle.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoException.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoList.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoNumber.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoParser.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoPrimitive.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoRightDelimiter.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoTree.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoType.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoTypeNull.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoVariable.java8
-rw-r--r--logo/src/xlogo/kernel/grammar/LogoWord.java8
-rw-r--r--logo/src/xlogo/kernel/gui/GuiButton.java8
-rw-r--r--logo/src/xlogo/kernel/gui/GuiComponent.java8
-rw-r--r--logo/src/xlogo/kernel/gui/GuiMap.java8
-rw-r--r--logo/src/xlogo/kernel/gui/GuiMenu.java8
-rw-r--r--logo/src/xlogo/kernel/network/ChatFrame.java8
-rw-r--r--logo/src/xlogo/kernel/network/NetworkClientChat.java8
-rw-r--r--logo/src/xlogo/kernel/network/NetworkClientExecute.java8
-rw-r--r--logo/src/xlogo/kernel/network/NetworkClientSend.java8
-rw-r--r--logo/src/xlogo/kernel/network/NetworkServer.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/Conic.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/Element3D.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/ElementLine.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/ElementPoint.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/ElementPolygon.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/FogDialog.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/LightDialog.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/MyFog.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/MyLight.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/Viewer3D.java8
-rw-r--r--logo/src/xlogo/kernel/perspective/World3D.java8
-rw-r--r--logo/src/xlogo/kernel/userspace/ErrorManager.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/GlobalVariableTable.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/ProcedureErrorMessage.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/PropertyListTable.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/UserSpace.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/context/ContextManager.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/context/ContextSwitcher.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/context/LogoContext.java10
-rw-r--r--logo/src/xlogo/kernel/userspace/context/NetworkContext.java8
-rw-r--r--logo/src/xlogo/kernel/userspace/context/RecordContext.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/context/UserContext.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/files/LogoFile.java26
-rw-r--r--logo/src/xlogo/kernel/userspace/files/LogoFileContainer.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/files/LogoFilesManager.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/files/RecordFile.java12
-rw-r--r--logo/src/xlogo/kernel/userspace/procedures/ExecutablesContainer.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/procedures/ExecutablesProvider.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/procedures/Procedure.java18
-rw-r--r--logo/src/xlogo/kernel/userspace/procedures/ProcedureErrorType.java6
-rw-r--r--logo/src/xlogo/kernel/userspace/procedures/ProceduresManager.java6
-rw-r--r--logo/src/xlogo/messages/Message.java6
-rw-r--r--logo/src/xlogo/messages/MessageKeys.java6
-rw-r--r--logo/src/xlogo/messages/Messenger.java6
-rw-r--r--logo/src/xlogo/messages/async/AbstractAsyncMessenger.java6
-rw-r--r--logo/src/xlogo/messages/async/AsyncMediumAdapter.java6
-rw-r--r--logo/src/xlogo/messages/async/AsyncMessage.java6
-rw-r--r--logo/src/xlogo/messages/async/AsyncMessenger.java6
-rw-r--r--logo/src/xlogo/messages/async/dialog/DialogMessage.java6
-rw-r--r--logo/src/xlogo/messages/async/dialog/DialogMessenger.java6
-rw-r--r--logo/src/xlogo/messages/async/history/HistoryMessage.java6
-rw-r--r--logo/src/xlogo/messages/async/history/HistoryMessenger.java6
-rw-r--r--logo/src/xlogo/messages/async/history/HistoryWriter.java6
-rw-r--r--logo/src/xlogo/storage/Storable.java158
-rw-r--r--logo/src/xlogo/storage/StorableDocument.java14
-rw-r--r--logo/src/xlogo/storage/StorableObject.java107
-rw-r--r--logo/src/xlogo/storage/WSManager.java6
-rw-r--r--logo/src/xlogo/storage/global/GlobalConfig.java658
-rw-r--r--logo/src/xlogo/storage/user/DrawQuality.java6
-rw-r--r--logo/src/xlogo/storage/user/LookAndFeel.java6
-rw-r--r--logo/src/xlogo/storage/user/PenShape.java6
-rw-r--r--logo/src/xlogo/storage/user/UserConfig.java8
-rw-r--r--logo/src/xlogo/storage/workspace/ContestConfig.java6
-rw-r--r--logo/src/xlogo/storage/workspace/Language.java6
-rw-r--r--logo/src/xlogo/storage/workspace/NumberOfBackups.java6
-rw-r--r--logo/src/xlogo/storage/workspace/SyntaxHighlightConfig.java6
-rw-r--r--logo/src/xlogo/storage/workspace/WorkspaceConfig.java519
-rw-r--r--logo/src/xlogo/utils/ExtensionFichier.java8
-rw-r--r--logo/src/xlogo/utils/Utils.java8
-rw-r--r--logo/src/xlogo/utils/WebPage.java8
-rw-r--r--logo/src/xlogo/utils/WriteImage.java8
174 files changed, 2684 insertions, 1355 deletions
diff --git a/logo/build.xml b/logo/build.xml
index 744b87a..81b1701 100644
--- a/logo/build.xml
+++ b/logo/build.xml
@@ -17,7 +17,7 @@
Does the Jar has to be signed ?
================================-->
- <property name="signJar" value="false" />
+ <property name="signJar" value="true" />
<!-- Property platform:
================================================
@@ -35,8 +35,7 @@
<!-- Version for this Build -->
- <property name="version" value="0.9.03beta-2014-11-03"/>
-
+ <property name="version" value="0.9.04beta-2014-12-16"/>
<!-- =================================
default target: deploy
@@ -74,6 +73,8 @@
<include name="vecmath.jar"/>
<include name="j3dutils.jar"/>
<include name="jl1.0.1.jar"/>
+ <include name="log4j-api-2.1.jar"/>
+ <include name="log4j-core-2.1.jar"/>
<include name="manifest_xlogo"/>
<include name="manifest_start"/>
<include name="build.xml"/>
@@ -96,7 +97,7 @@
<input
message="Password"
addproperty="pwd"/>
- <signjar keystore="keystore.ks" storepass="${pwd}" alias="myalias">
+ <signjar keystore=".keystore" storepass="${pwd}" alias="xlogo4schools">
<fileset dir="deploy">
<include name="XLogo4Schools.jar"/>
</fileset>
@@ -111,16 +112,20 @@
<jar destfile="deploy/tmp_xlogo.jar"
manifest="manifest_xlogo">
<fileset dir="deploy/">
+ <include name="net/**"/>
<include name="xlogo/**"/>
<include name="*.properties"/>
+ <include name="*.xml"/>
</fileset>
</jar>
<!-- Delete Used files -->
<delete includeemptydirs="true">
<fileset dir="deploy/">
+ <include name="net/**"/>
<include name="xlogo/**"/>
<include name="*.properties"/>
+ <include name="*.xml"/>
</fileset>
</delete>
@@ -149,13 +154,16 @@
<javac
source="1.5" encoding="utf8"
target="1.5"
- srcdir="src" destdir="deploy/">
+ srcdir="src" destdir="deploy/"
+ includeantruntime="false">
<classpath>
<pathelement location="vecmath.jar"/>
<pathelement location="j3dcore.jar"/>
<pathelement location="j3dutils.jar"/>
<pathelement location="jh.jar"/>
<pathelement location="jl1.0.1.jar"/>
+ <pathelement location="log4j-api-2.1.jar"/>
+ <pathelement location="log4j-core-2.1.jar"/>
</classpath>
</javac>
</target>
@@ -171,11 +179,14 @@
<include name="j3dutils.jar"/>
<include name="jl1.0.1.jar"/>
<include name="jh.jar"/>
+ <include name="log4j-api-2.1.jar"/>
+ <include name="log4j-core-2.1.jar"/>
</fileset>
<fileset dir="src/">
<include name="**.properties"/>
<include name="**/*.png"/>
<include name="**/*.html"/>
+ <include name="**/*.xml"/>
<include name="**/genericPrimitive"/>
</fileset>
</copy>
diff --git a/logo/log4j-api-2.1.jar b/logo/log4j-api-2.1.jar
new file mode 100644
index 0000000..d18d67c
--- /dev/null
+++ b/logo/log4j-api-2.1.jar
Binary files differ
diff --git a/logo/log4j-core-2.1.jar b/logo/log4j-core-2.1.jar
new file mode 100644
index 0000000..be2e917
--- /dev/null
+++ b/logo/log4j-core-2.1.jar
Binary files differ
diff --git a/logo/manifest_start b/logo/manifest_start
index 8c57194..975c025 100644
--- a/logo/manifest_start
+++ b/logo/manifest_start
@@ -1 +1 @@
-Main-Class: Lanceur
+Main-Class: Lanceur \ No newline at end of file
diff --git a/logo/manifest_xlogo b/logo/manifest_xlogo
index 3753e91..c54efab 100644
--- a/logo/manifest_xlogo
+++ b/logo/manifest_xlogo
@@ -1,3 +1,2 @@
Main-Class: xlogo.Logo
-Class-Path: jh.jar vecmath.jar j3dcore.jar j3dutils.jar jl1.0.1.jar
-
+Class-Path: jh.jar vecmath.jar j3dcore.jar j3dutils.jar jl1.0.1.jar log4j-api-2.1.jar log4j-core-2.1.jar \ No newline at end of file
diff --git a/logo/src/Lanceur.java b/logo/src/Lanceur.java
index ce65803..e45c397 100644
--- a/logo/src/Lanceur.java
+++ b/logo/src/Lanceur.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
@@ -68,7 +68,7 @@ public class Lanceur
* The temporary folder which contains all files to start XLogo
*/
private File tmpFolder = null;
- private File[] files = new File[10];
+ private File[] files = new File[12];
/**
* Main method
@@ -285,13 +285,24 @@ public class Lanceur
b = copier(src, files[4]);
System.out.println("Copying j3dutils.jar - success: " + b);
- // extract the file jl1.0.1 in this folder (JLayer library for mp3
- // playing)
+ // extract the file jl1.0.1 in this folder (JLayer library for mp3 playing)
src = Lanceur.class.getResourceAsStream("jl1.0.1.jar");
files[5] = new File(tmpFolder.getAbsolutePath() + File.separator + "jl1.0.1.jar");
b = copier(src, files[5]);
System.out.println("Copying jl1.0.1.jar - success: " + b);
+ // extract the file jl1.0.1 in this folder (JLayer library for mp3 playing)
+ src = Lanceur.class.getResourceAsStream("log4j-api-2.1.jar");
+ files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "log4j-api-2.1.jar");
+ b = copier(src, files[6]);
+ System.out.println("Copying log4j-api-2.1.jar - success: " + b);
+
+ // extract the file jl1.0.1 in this folder (JLayer library for mp3 playing)
+ src = Lanceur.class.getResourceAsStream("log4j-core-2.1.jar");
+ files[7] = new File(tmpFolder.getAbsolutePath() + File.separator + "log4j-core-2.1.jar");
+ b = copier(src, files[7]);
+ System.out.println("Copying log4j-core-2.1.jar - success: " + b);
+
// extract the native driver for java 3d in this folder
String os = System.getProperty("os.name").toLowerCase();
String arch = System.getProperty("os.arch");
@@ -304,17 +315,17 @@ public class Lanceur
if (arch.indexOf("86") != -1)
{
InputStream lib = Lanceur.class.getResourceAsStream("linux/x86/libj3dcore-ogl.so");
- files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
- copier(lib, files[6]);
+ files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
+ copier(lib, files[8]);
lib = Lanceur.class.getResourceAsStream("linux/x86/libj3dcore-ogl-cg.so");
- files[7] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl-cg.so");
- copier(lib, files[7]);
+ files[9] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl-cg.so");
+ copier(lib, files[9]);
}
else
{
InputStream lib = Lanceur.class.getResourceAsStream("linux/amd64/libj3dcore-ogl.so");
- files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
- copier(lib, files[6]);
+ files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
+ copier(lib, files[8]);
}
}
// windows
@@ -323,27 +334,27 @@ public class Lanceur
if (arch.indexOf("86") != -1)
{
InputStream lib = Lanceur.class.getResourceAsStream("windows/x86/j3dcore-d3d.dll");
- files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-d3d.dll");
- b = copier(lib, files[6]);
+ files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-d3d.dll");
+ b = copier(lib, files[8]);
System.out.println("Copying library 1 - success: " + b);
lib = Lanceur.class.getResourceAsStream("windows/x86/j3dcore-ogl.dll");
- files[7] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl.dll");
- b = copier(lib, files[7]);
+ files[9] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl.dll");
+ b = copier(lib, files[9]);
System.out.println("Copying library 2 - success: " + b);
lib = Lanceur.class.getResourceAsStream("windows/x86/j3dcore-ogl-cg.dll");
- files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl-cg.dll");
- b = copier(lib, files[8]);
+ files[10] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl-cg.dll");
+ b = copier(lib, files[10]);
System.out.println("Copying library 3 - success: " + b);
lib = Lanceur.class.getResourceAsStream("windows/x86/j3dcore-ogl-chk.dll");
- files[9] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl-chk.dll");
- b = copier(lib, files[9]);
+ files[11] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl-chk.dll");
+ b = copier(lib, files[11]);
System.out.println("Copying library 4 - success: " + b);
}
else
{
InputStream lib = Lanceur.class.getResourceAsStream("windows/amd64/j3dcore-ogl.dll");
- files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl.dll");
- b = copier(lib, files[6]);
+ files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "j3dcore-ogl.dll");
+ b = copier(lib, files[8]);
System.out.println("Copying library 1 - success: " + b);
}
}
@@ -358,15 +369,15 @@ public class Lanceur
if (arch.indexOf("86") != -1)
{
InputStream lib = Lanceur.class.getResourceAsStream("solaris/i386/libj3dcore-ogl.so");
- files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
- b = copier(lib, files[6]);
+ files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
+ b = copier(lib, files[8]);
System.out.println("Copying library 1 - success: " + b);
}
else if (arch.indexOf("amd64") != -1)
{
InputStream lib = Lanceur.class.getResourceAsStream("solaris/amd64/libj3dcore-ogl.so");
- files[6] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
- b = copier(lib, files[6]);
+ files[8] = new File(tmpFolder.getAbsolutePath() + File.separator + "libj3dcore-ogl.so");
+ b = copier(lib, files[8]);
System.out.println("Copying library 1 - success: " + b);
}
}
diff --git a/logo/src/log4j2.xml b/logo/src/log4j2.xml
new file mode 100644
index 0000000..f425253
--- /dev/null
+++ b/logo/src/log4j2.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Logger name="net.samuelcampos.usbdrivedectector.detectors.AbstractStorageDeviceDetector" level="error" additivity="false">
+ <AppenderRef ref="Console" />
+ </Logger>
+ <Logger name="net.samuelcampos.usbdrivedectector.USBDeviceDetectorManager" level="error" additivity="false">
+ <AppenderRef ref="Console" />
+ </Logger>
+ <Logger name="net.samuelcampos.usbdrivedectector.process.CommandLineExecutor" level="error" additivity="false">
+ <AppenderRef ref="Console" />
+ </Logger>
+ <Root level="error">
+ <AppenderRef ref="Console" />
+ </Root>
+ </Loggers>
+</Configuration> \ No newline at end of file
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/USBDeviceDetectorManager.java b/logo/src/net/samuelcampos/usbdrivedectector/USBDeviceDetectorManager.java
new file mode 100644
index 0000000..a0d3de1
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/USBDeviceDetectorManager.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package net.samuelcampos.usbdrivedectector;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import net.samuelcampos.usbdrivedectector.detectors.AbstractStorageDeviceDetector;
+import net.samuelcampos.usbdrivedectector.events.DeviceEventType;
+import net.samuelcampos.usbdrivedectector.events.IUSBDriveListener;
+import net.samuelcampos.usbdrivedectector.events.USBStorageEvent;
+
+/**
+ * @author samuelcampos
+ */
+public class USBDeviceDetectorManager {
+
+ private static final Logger logger = LogManager
+ .getLogger(USBDeviceDetectorManager.class);
+
+ private static final long defaultPoolingInterval = 10 * 1000;
+
+ private Set<USBStorageDevice> connectedDevices;
+ private List<IUSBDriveListener> listeners;
+ private Timer timer;
+
+ public USBDeviceDetectorManager() {
+ this(defaultPoolingInterval);
+ }
+
+ public USBDeviceDetectorManager(long poolingInterval) {
+ listeners = new ArrayList<IUSBDriveListener>();
+
+ connectedDevices = new HashSet<USBStorageDevice>();
+
+ timer = new Timer();
+ timer.scheduleAtFixedRate(new ListenerTask(), poolingInterval, poolingInterval);
+ }
+
+ public synchronized boolean addDriveListener(IUSBDriveListener listener) {
+ if (listeners.contains(listener)) {
+ return false;
+ }
+
+ listeners.add(listener);
+
+ return true;
+ }
+
+ public synchronized boolean removeDriveListener(IUSBDriveListener listener) {
+ return listeners.remove(listener);
+ }
+
+ public List<USBStorageDevice> getRemovableDevices() {
+ return AbstractStorageDeviceDetector.getInstance().getRemovableDevices();
+ }
+
+ private void updateState(List<USBStorageDevice> actualConnectedDevices) {
+ USBStorageEvent event;
+
+ synchronized(this) {
+ Iterator<USBStorageDevice> itConnectedDevices = connectedDevices.iterator();
+
+ while (itConnectedDevices.hasNext()) {
+ USBStorageDevice device = itConnectedDevices.next();
+
+ if (!actualConnectedDevices.contains(device)) {
+ event = new USBStorageEvent(device, DeviceEventType.REMOVED);
+ sendEventToListeners(event);
+
+ itConnectedDevices.remove();
+ } else {
+ actualConnectedDevices.remove(device);
+ }
+ }
+
+ connectedDevices.addAll(actualConnectedDevices);
+ }
+
+ for(USBStorageDevice dev : actualConnectedDevices) {
+ event = new USBStorageEvent(dev, DeviceEventType.CONNECTED);
+ sendEventToListeners(event);
+ }
+ }
+
+ private void sendEventToListeners(USBStorageEvent event) {
+ for (IUSBDriveListener listener : listeners) {
+ listener.usbDriveEvent(event);
+ }
+ }
+
+ private class ListenerTask extends TimerTask {
+
+ @Override
+ public void run() {
+ logger.trace("Pooling refresh task is running");
+
+ List<USBStorageDevice> actualConnectedDevices = AbstractStorageDeviceDetector.getInstance().getRemovableDevices();
+
+ updateState(actualConnectedDevices);
+ }
+
+ }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/USBStorageDevice.java b/logo/src/net/samuelcampos/usbdrivedectector/USBStorageDevice.java
new file mode 100644
index 0000000..1f3eb85
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/USBStorageDevice.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.samuelcampos.usbdrivedectector;
+
+import java.io.File;
+import javax.swing.filechooser.FileSystemView;
+
+/**
+ * Class to represent a USB Storage Device connected on the computer
+ *
+ * @author samuelcampos
+ */
+public class USBStorageDevice {
+ private File rootDirectory;
+ private String deviceName;
+ private String systemDisplayName; // Marko Zivkovic: added this field, so the name is available even after the device was removed
+
+ public USBStorageDevice(File rootDirectory, String deviceName){
+ if(rootDirectory == null || !rootDirectory.isDirectory()){
+ throw new IllegalArgumentException("Invalid root file!");
+ }
+
+ this.rootDirectory = rootDirectory;
+
+ if(deviceName == null || deviceName.isEmpty()) {
+ deviceName = rootDirectory.getName();
+ }
+
+ this.deviceName = deviceName;
+ this.systemDisplayName = FileSystemView.getFileSystemView().getSystemDisplayName(rootDirectory);
+ }
+
+ public USBStorageDevice(File rootDirectory){
+ this(rootDirectory, null);
+ }
+
+ public File getRootDirectory() {
+ return rootDirectory;
+ }
+
+ /**
+ *
+ * @return the name of the USB storage device
+ */
+ public String getDeviceName() {
+ return deviceName;
+ }
+
+ /**
+ * Check if it is possible to read in this device.
+ *
+ * @see File#canRead()
+ *
+ * @return <b>true</b> if it is possible to perform read operations in this device, <b>false</b> otherwise.
+ */
+ public boolean canRead() {
+ return rootDirectory.canRead();
+ }
+
+ /**
+ * Check if it is possible to write in this device.
+ *
+ * @see File#canWrite()
+ *
+ * @return <b>true</b> if it is possible to perform write operations in this device, <b>false</b> otherwise.
+ */
+ public boolean canWrite() {
+ return rootDirectory.canWrite();
+ }
+
+ /**
+ * Check if the actual user has execute permissions in this drive.
+ *
+ * @see File#canWrite()
+ *
+ * @return <b>true</b> if it is possible to perform execute operations in this device, <b>false</b> otherwise.
+ */
+ public boolean canExecute() {
+ return rootDirectory.canExecute();
+ }
+
+ /**
+ * @see FileSystemView#getSystemDisplayName(java.io.File)
+ *
+ * @return the name of the root of this device as it would be displayed in a system file browser.
+ */
+ public String getSystemDisplayName() {
+ return systemDisplayName;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 89 * hash + (this.rootDirectory != null ? this.rootDirectory.hashCode() : 0);
+ hash = 89 * hash + (this.deviceName != null ? this.deviceName.hashCode() : 0);
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final USBStorageDevice other = (USBStorageDevice) obj;
+ return this.rootDirectory == other.rootDirectory || (this.rootDirectory != null && this.rootDirectory.equals(other.rootDirectory));
+ }
+
+ @Override
+ public String toString() {
+ return "RemovableDevice [Root=" + rootDirectory + ", Device Name=" + deviceName
+ + "]";
+ }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/detectors/AbstractStorageDeviceDetector.java b/logo/src/net/samuelcampos/usbdrivedectector/detectors/AbstractStorageDeviceDetector.java
new file mode 100644
index 0000000..8d33e4f
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/detectors/AbstractStorageDeviceDetector.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.samuelcampos.usbdrivedectector.detectors;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+
+import net.samuelcampos.usbdrivedectector.USBStorageDevice;
+
+
+/**
+ * This class is prepared to:
+ * <ul>
+ * <li>Windows (XP or newer)</li>
+ * <li>Mac OS X (10.7 or newer)</li>
+ * </ul>
+ *
+ * @author samuelcampos
+ */
+public abstract class AbstractStorageDeviceDetector {
+
+ private static final Logger logger = LogManager.getLogger(AbstractStorageDeviceDetector.class);
+
+ private static final String OSName = System.getProperty("os.name")
+ .toLowerCase();
+
+ // private static final String OSVersion = System.getProperty("os.version");
+ // private static final String OSArch = System.getProperty("os.arch");
+ /**
+ * {@link AbstractStorageDeviceDetector} instance. <br/>
+ * This instance is created (Thread-Safe) when the JVM loads the class.
+ */
+ private static final AbstractStorageDeviceDetector instance;
+
+ static {
+ if (OSName.startsWith("win")) {
+ instance = new WindowsStorageDeviceDetector();
+ } else if (OSName.startsWith("linux")) {
+ instance = new LinuxStorageDeviceDetector();
+ } else if (OSName.startsWith("mac")) {
+ instance = new OSXStorageDeviceDetector();
+ } else {
+ instance = null;
+ }
+ }
+
+ public static AbstractStorageDeviceDetector getInstance() {
+ if (instance == null) {
+ throw new UnsupportedOperationException("Your Operative System (" + OSName + ") is not supported!");
+ }
+
+ return instance;
+ }
+
+ public AbstractStorageDeviceDetector() {
+ }
+
+ /**
+ * Returns the storage devices connected to the computer.
+ *
+ * @return the list of the USB storage devices
+ */
+ public abstract List<USBStorageDevice> getRemovableDevices();
+
+ protected static void addUSBDevice(List<USBStorageDevice> listDevices, String rootPath) {
+ File root = new File(rootPath);
+
+ if (logger.isTraceEnabled()) {
+ logger.trace("Device found: " + root.getPath());
+ }
+ if (root.isDirectory()) { // Marko Zivkovic: Added this check, because otherwise an exception is thrown
+ USBStorageDevice device = new USBStorageDevice(root);
+ listDevices.add(device);
+ }
+ }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/detectors/LinuxStorageDeviceDetector.java b/logo/src/net/samuelcampos/usbdrivedectector/detectors/LinuxStorageDeviceDetector.java
new file mode 100644
index 0000000..b1eb042
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/detectors/LinuxStorageDeviceDetector.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.samuelcampos.usbdrivedectector.detectors;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import net.samuelcampos.usbdrivedectector.USBStorageDevice;
+import net.samuelcampos.usbdrivedectector.process.CommandLineExecutor;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * Tested on Linux Ubuntu 13.10
+ *
+ * @author samuelcampos
+ */
+public class LinuxStorageDeviceDetector extends AbstractStorageDeviceDetector {
+
+ private static final Logger logger = LogManager.getLogger(LinuxStorageDeviceDetector.class);
+
+ private static final String linuxDetectUSBCommand1 = "df";
+ private static final Pattern command1Pattern = Pattern.compile("^(\\/[^ ]+)[^%]+%[ ]+(.+)$");
+ private static final String linuxDetectUSBCommand2 = "udevadm info -q property -n ";
+ private static final String strDeviceVerifier = "ID_USB_DRIVER=usb-storage";
+
+ private final CommandLineExecutor commandExecutor1, commandExecutor2;
+
+ public LinuxStorageDeviceDetector() {
+ super();
+
+ commandExecutor1 = new CommandLineExecutor();
+ commandExecutor2 = new CommandLineExecutor();
+ }
+
+ private boolean isUSBStorage(String device) {
+ String verifyCommand = linuxDetectUSBCommand2 + device;
+
+ try {
+ commandExecutor2.executeCommand(verifyCommand);
+
+ String outputLine;
+ while ((outputLine = commandExecutor2.readOutputLine()) != null) {
+ if (strDeviceVerifier.equals(outputLine)) {
+ return true;
+ }
+ }
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ } finally {
+ try {
+ commandExecutor2.close();
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public List<USBStorageDevice> getRemovableDevices() {
+ ArrayList<USBStorageDevice> listDevices = new ArrayList<USBStorageDevice>();
+
+ try {
+ commandExecutor1.executeCommand(linuxDetectUSBCommand1);
+
+ String outputLine;
+ while ((outputLine = commandExecutor1.readOutputLine()) != null) {
+ Matcher matcher = command1Pattern.matcher(outputLine);
+
+ if (matcher.matches()) {
+ String device = matcher.group(1);
+ String rootPath = matcher.group(2);
+
+ if (isUSBStorage(device)) {
+ addUSBDevice(listDevices, rootPath);
+ }
+ }
+ }
+
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ } finally {
+ try {
+ commandExecutor1.close();
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
+
+ return listDevices;
+ }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/detectors/OSXStorageDeviceDetector.java b/logo/src/net/samuelcampos/usbdrivedectector/detectors/OSXStorageDeviceDetector.java
new file mode 100644
index 0000000..c746a9f
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/detectors/OSXStorageDeviceDetector.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.samuelcampos.usbdrivedectector.detectors;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import net.samuelcampos.usbdrivedectector.USBStorageDevice;
+import net.samuelcampos.usbdrivedectector.process.CommandLineExecutor;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ *
+ * @author samuelcampos
+ */
+public class OSXStorageDeviceDetector extends AbstractStorageDeviceDetector {
+
+ private static final Logger logger = LogManager
+ .getLogger(OSXStorageDeviceDetector.class);
+
+ private static final String osXDetectUSBCommand = "system_profiler SPUSBDataType";
+ private static final Pattern macOSXPattern = Pattern.compile("^.*Mount Point: (.+)$");
+
+ private final CommandLineExecutor commandExecutor;
+
+ public OSXStorageDeviceDetector() {
+ super();
+
+ commandExecutor = new CommandLineExecutor();
+ }
+
+ @Override
+ public List<USBStorageDevice> getRemovableDevices() {
+ ArrayList<USBStorageDevice> listDevices = new ArrayList<USBStorageDevice>();
+
+ try {
+ /**
+ * system_profiler SPUSBDataType | grep "BSD Name:\|Mount Point:"
+ */
+ commandExecutor.executeCommand(osXDetectUSBCommand);
+
+ String outputLine;
+
+ while ((outputLine = commandExecutor.readOutputLine()) != null) {
+ Matcher matcher = macOSXPattern.matcher(outputLine);
+
+ if (matcher.matches()) {
+ addUSBDevice(listDevices, matcher.group(1));
+ }
+ }
+
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ } finally {
+ try {
+ commandExecutor.close();
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
+
+ return listDevices;
+ }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/detectors/WindowsStorageDeviceDetector.java b/logo/src/net/samuelcampos/usbdrivedectector/detectors/WindowsStorageDeviceDetector.java
new file mode 100644
index 0000000..e35246d
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/detectors/WindowsStorageDeviceDetector.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.samuelcampos.usbdrivedectector.detectors;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.samuelcampos.usbdrivedectector.USBStorageDevice;
+import net.samuelcampos.usbdrivedectector.process.CommandLineExecutor;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ *
+ * @author samuelcampos
+ */
+public class WindowsStorageDeviceDetector extends AbstractStorageDeviceDetector {
+
+ private static final Logger logger = LogManager
+ .getLogger(WindowsStorageDeviceDetector.class);
+
+ /**
+ * wmic logicaldisk where drivetype=2 get description,deviceid,volumename
+ */
+ private static final String windowsDetectUSBCommand = "wmic logicaldisk where drivetype=2 get deviceid";
+
+ private final CommandLineExecutor commandExecutor;
+
+ public WindowsStorageDeviceDetector() {
+ commandExecutor = new CommandLineExecutor();
+ }
+
+ @Override
+ public synchronized List<USBStorageDevice> getRemovableDevices() {
+ ArrayList<USBStorageDevice> listDevices = new ArrayList<USBStorageDevice>();
+
+ try {
+ commandExecutor.executeCommand(windowsDetectUSBCommand);
+
+ String outputLine;
+ while ((outputLine = commandExecutor.readOutputLine()) != null) {
+
+ if (!outputLine.isEmpty() && !"DeviceID".equals(outputLine)) {
+ addUSBDevice(listDevices, outputLine + File.separatorChar);
+ }
+ }
+
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ } finally {
+ try {
+ commandExecutor.close();
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
+
+ return listDevices;
+ }
+
+ /**
+ * Returns the list of the removable devices actually connected to the computer. <br/>
+ * This method was effectively tested on:
+ * <ul>
+ * <li>Windows 7 (English)</li>
+ * </ul>
+ *
+ * @deprecated replaced by {@link #getWindowsRemovableDevicesCommand()}
+ *
+ * @return the list of removable devices
+ */
+// @SuppressWarnings("unused")
+// private ArrayList<USBStorageDevice> getWindowsRemovableDevicesList() {
+//
+// /**
+// * TODO: How to put this working in all languages?
+// */
+// String fileSystemDesc = "Removable Disk";
+//
+// ArrayList<USBStorageDevice> listDevices = new ArrayList<USBStorageDevice>();
+//
+// File[] roots = File.listRoots();
+//
+// if (roots == null) {
+// // TODO: raise an error?
+// return listDevices;
+// }
+//
+// for (File root : roots) {
+// if (root.canRead() && root.canWrite() && fsView.isDrive(root)
+// && !fsView.isFloppyDrive(root)) {
+//
+// if (fileSystemDesc.equalsIgnoreCase(fsView
+// .getSystemTypeDescription(root))) {
+// USBStorageDevice device = new USBStorageDevice(root,
+// fsView.getSystemDisplayName(root));
+// listDevices.add(device);
+// }
+//
+// System.out.println(fsView.getSystemDisplayName(root) + " - "
+// + fsView.getSystemTypeDescription(root));
+//
+// /*
+// * FileSystemView.getSystemTypeDescription();
+// *
+// * Windows (8): Windows (7): "Removable Disk" Windows (XP):
+// * Linux (Ubuntu): OSX (10.7):
+// */
+// }
+// }
+//
+// return listDevices;
+// }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/events/DeviceEventType.java b/logo/src/net/samuelcampos/usbdrivedectector/events/DeviceEventType.java
new file mode 100644
index 0000000..e62b29c
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/events/DeviceEventType.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.samuelcampos.usbdrivedectector.events;
+
+/**
+ * Type of events that occur to USB Storage devices
+ *
+ * @author samuelcampos
+ */
+public enum DeviceEventType {
+ REMOVED,
+ CONNECTED
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/events/IUSBDriveListener.java b/logo/src/net/samuelcampos/usbdrivedectector/events/IUSBDriveListener.java
new file mode 100644
index 0000000..7150a2f
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/events/IUSBDriveListener.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.samuelcampos.usbdrivedectector.events;
+
+/**
+ * Interface to implement by the classes who want to receive notifications when
+ * there are devices Connected or Removed of the computer.
+ *
+ * @author samuelcampos
+ */
+public interface IUSBDriveListener {
+
+ public void usbDriveEvent(USBStorageEvent event);
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/events/USBStorageEvent.java b/logo/src/net/samuelcampos/usbdrivedectector/events/USBStorageEvent.java
new file mode 100644
index 0000000..780b65c
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/events/USBStorageEvent.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.samuelcampos.usbdrivedectector.events;
+
+import net.samuelcampos.usbdrivedectector.USBStorageDevice;
+
+/**
+ *
+ * @author samuelcampos
+ */
+public class USBStorageEvent {
+ private final USBStorageDevice storageDevice;
+ private final DeviceEventType eventType;
+
+ public USBStorageEvent(USBStorageDevice storageDevice, DeviceEventType eventType) {
+ this.storageDevice = storageDevice;
+ this.eventType = eventType;
+ }
+
+ public USBStorageDevice getStorageDevice() {
+ return storageDevice;
+ }
+
+ public DeviceEventType getEventType() {
+ return eventType;
+ }
+
+ @Override
+ public String toString() {
+ return "USBStorageEvent{" + "storageDevice=" + storageDevice + ", eventType=" + eventType + '}';
+ }
+}
diff --git a/logo/src/net/samuelcampos/usbdrivedectector/process/CommandLineExecutor.java b/logo/src/net/samuelcampos/usbdrivedectector/process/CommandLineExecutor.java
new file mode 100644
index 0000000..c6bfdcd
--- /dev/null
+++ b/logo/src/net/samuelcampos/usbdrivedectector/process/CommandLineExecutor.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2014 samuelcampos.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.samuelcampos.usbdrivedectector.process;
+
+import java.io.BufferedReader;
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ *
+ * @author samuelcampos
+ */
+public class CommandLineExecutor implements Closeable {
+
+ private static final Logger logger = LogManager.getLogger(CommandLineExecutor.class);
+
+ private Process process = null;
+ private BufferedReader input = null;
+
+ public void executeCommand(String command) throws IOException {
+ if (logger.isTraceEnabled()) {
+ logger.trace("Running command: " + command);
+ }
+
+ process = Runtime.getRuntime().exec(command);
+
+ input = new BufferedReader(new InputStreamReader(process.getInputStream()));
+ }
+
+ public String readOutputLine() throws IOException {
+ if(input == null)
+ throw new IllegalStateException("You need to call 'executeCommand' method first");
+
+ String outputLine = input.readLine();
+
+ if(outputLine != null)
+ return outputLine.trim();
+
+ return null;
+ }
+
+ @Override
+ public void close() throws IOException {
+ if (input != null) {
+ try {
+ input.close();
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
+
+ if (process != null) {
+ process.destroy();
+ }
+
+ input = null;
+ process = null;
+ }
+
+}
diff --git a/logo/src/xlogo/AppSettings.java b/logo/src/xlogo/AppSettings.java
index 60cc1e7..c746282 100644
--- a/logo/src/xlogo/AppSettings.java
+++ b/logo/src/xlogo/AppSettings.java
@@ -5,6 +5,9 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import xlogo.storage.workspace.Language;
import xlogo.storage.workspace.SyntaxHighlightConfig;
@@ -17,6 +20,8 @@ import xlogo.storage.workspace.SyntaxHighlightConfig;
*/
public class AppSettings
{
+ private static Logger logger = LogManager.getLogger(AppSettings.class.getSimpleName());
+
private static AppSettings instance;
public static AppSettings getInstance()
@@ -41,6 +46,7 @@ public class AppSettings
{
if (language == this.language)
return;
+ logger.trace("Change language from " + this.language + " to " + language);
this.language = language;
Logo.generateLanguage(language);
notifyLanguageChanged();
diff --git a/logo/src/xlogo/Application.java b/logo/src/xlogo/Application.java
index 8e4d2b9..cd82b43 100644
--- a/logo/src/xlogo/Application.java
+++ b/logo/src/xlogo/Application.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* a lot of modifications, extensions, refactorings might been applied by Marko Zivkovic
*/
@@ -86,7 +86,7 @@ import xlogo.messages.async.history.HistoryMessenger;
/**
* @author Marko
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
*/
public class Application extends X4SFrame
{
@@ -1397,7 +1397,7 @@ public class Application extends X4SFrame
// Ce qu'il se passe en validant dans la zone de texte
/**
* When the user types "Enter" in the Command Line
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
*/
public void commande_actionPerformed()
{
@@ -1498,7 +1498,7 @@ public class Application extends X4SFrame
*
* @param st
* List of instructions
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
* @author Marko Zivkovic - renamed (it was affichage_Start)
*/
public void startInterpretation(StringBuffer st)
diff --git a/logo/src/xlogo/Logo.java b/logo/src/xlogo/Logo.java
index 4e495df..0f7da76 100644
--- a/logo/src/xlogo/Logo.java
+++ b/logo/src/xlogo/Logo.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* a lot of modifications, extensions, refactorings have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/MemoryChecker.java b/logo/src/xlogo/MemoryChecker.java
index f35f73a..d9e1d0e 100644
--- a/logo/src/xlogo/MemoryChecker.java
+++ b/logo/src/xlogo/MemoryChecker.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* a lot of modifications, extensions, refactorings have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/MenuListener.java b/logo/src/xlogo/MenuListener.java
index a40fd99..aae8477 100644
--- a/logo/src/xlogo/MenuListener.java
+++ b/logo/src/xlogo/MenuListener.java
@@ -1,5 +1,5 @@
/**
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -17,13 +17,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/Popup.java b/logo/src/xlogo/Popup.java
index a2acc2d..8eda3d9 100644
--- a/logo/src/xlogo/Popup.java
+++ b/logo/src/xlogo/Popup.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/Sound_Player.java b/logo/src/xlogo/Sound_Player.java
index 9940f23..eaf086b 100644
--- a/logo/src/xlogo/Sound_Player.java
+++ b/logo/src/xlogo/Sound_Player.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/StyledDocument/DocumentLogo.java b/logo/src/xlogo/StyledDocument/DocumentLogo.java
index 4fc0cc7..2676817 100644
--- a/logo/src/xlogo/StyledDocument/DocumentLogo.java
+++ b/logo/src/xlogo/StyledDocument/DocumentLogo.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/package xlogo.StyledDocument;
diff --git a/logo/src/xlogo/StyledDocument/DocumentLogoCommande.java b/logo/src/xlogo/StyledDocument/DocumentLogoCommande.java
index f0a9efa..3349b11 100644
--- a/logo/src/xlogo/StyledDocument/DocumentLogoCommande.java
+++ b/logo/src/xlogo/StyledDocument/DocumentLogoCommande.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/package xlogo.StyledDocument;
import javax.swing.text.AttributeSet;
diff --git a/logo/src/xlogo/StyledDocument/DocumentLogoHistorique.java b/logo/src/xlogo/StyledDocument/DocumentLogoHistorique.java
index 7dc4e37..9731068 100644
--- a/logo/src/xlogo/StyledDocument/DocumentLogoHistorique.java
+++ b/logo/src/xlogo/StyledDocument/DocumentLogoHistorique.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/package xlogo.StyledDocument;
import java.awt.Color;
diff --git a/logo/src/xlogo/gpl/x4s_info.html b/logo/src/xlogo/gpl/x4s_info.html
index be553dd..acbfc7f 100644
--- a/logo/src/xlogo/gpl/x4s_info.html
+++ b/logo/src/xlogo/gpl/x4s_info.html
@@ -5,10 +5,16 @@
<body>
<h2>
XLogo4Schools</h2>
- Version 0.9.03beta-2014-11-03
+ Version 0.9.04beta-2014-12-16
<p>
XLogo4Schools is a modified, extended and reengineered version of Lo&#239;c Le Coq&#39;s XLogo. It is the result of a six month Bachelor&#39;s thesis conducted by Marko &#381;ivkovi&#263; at ETHZ, D-INFK department from March 2013 until September 2013.</p>
- <p>
+
+ <h3>Where can I find an XLogo language reference and documentation?</h3>
+ In most cases, XLogo4Schools is very similar to XLogo. Therefore you can use the <a href="http://downloads.tuxfamily.org/xlogo/downloads-en/manual-html-en/manual-en.html" target="_blank">XLogo language reference and documentation</a> found.
+ Currently, there is no <a href="https://sourceforge.net/p/xlogo4schools/wiki/Home/" target="_blank">XLogo4Schools documentation</a>, but it is planned. Thank you for your patience.
+
+ <h3>Credits</h3>
+
I want to thank <a href="http://www.ite.ethz.ch/people/host/jhromkov" target="_blank">Prof. Juraj Hromkovi&#269;</a> for giving me the opportunity to dive into the world of Logo and for letting me do the reengineering of XLogo for my Bachelor&#39;s Thesis. Very special thanks go to <a href="http://www.ite.ethz.ch/people/fachdidaktik/serafing/curriculum" target="_blank">Giovanni Serafini</a> who acted as an excellent adviser and mentor during this project. I also want to thank <a href="http://www.inf.ethz.ch/personal/gebauerh/" target="_blank">Dr. Heidi Gebauer</a>, <a href="http://www.ite.ethz.ch/people/postdocs/ivanak" target="_blank">Dr. Ivana Kosirova</a>, <a href="http://www.ite.ethz.ch/people/researchassistants/lkeller" target="_blank">Lucia Keller</a>,&nbsp; and <a href="http://www.ite.ethz.ch/people/researchassistants/steffenb" target="_blank">Bj&ouml;rn Steffen</a> from Prof. Hromkovi&#269;&#39;s chair for their intensive contributions during the requirements analysis phase. I enjoyed the many talks and discussions and appreciated every new idea from you. And finally I want to thank the other Logo tutors, Lukas H&auml;fliger, Samuel Bryner,&nbsp; Alexander Viand, Petra Hromkovi&#269;ova, Stefan Dietiker, and Christine Zeller, who contributed in numerous inspiring talks during the many Logo projects.</p>
<h3>What was reengineered?</h3>
<p>
@@ -38,10 +44,5 @@
<li>
Measured on a Sierpinski Triangle of depth 9, XLogo4Schools is around 25% faster than XLogo (16s vs. 21s on my machine). It is even faster, when many procedures are added to the workspace. XLogo used a stack to manage its procedures which took O(N) string comparisons to find a procedure. Interestingly, the designated stack operations push and pop are not really used. For the same purpose, XLogo4Schools uses now a HashMap that usually works in O(1).</li>
</ul>
-
- <h3>Where can I find an XLogo language reference and documentation?</h3>
- In most cases, XLogo4Schools is very similar to XLogo. Therefore you can use the <a href="http://downloads.tuxfamily.org/xlogo/downloads-en/manual-html-en/manual-en.html" target="_blank">XLogo language reference and documentation</a> found.
- Currently, there is no <a href="https://sourceforge.net/p/xlogo4schools/wiki/Home/" target="_blank">XLogo4Schools documentation</a>, but it is planned. Thank you for your patience.
-
</body>
</html> \ No newline at end of file
diff --git a/logo/src/xlogo/gui/AImprimer.java b/logo/src/xlogo/gui/AImprimer.java
index 7f20ecb..ca8f5ff 100644
--- a/logo/src/xlogo/gui/AImprimer.java
+++ b/logo/src/xlogo/gui/AImprimer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/Editor.java b/logo/src/xlogo/gui/Editor.java
index 6da4cd8..68d2321 100644
--- a/logo/src/xlogo/gui/Editor.java
+++ b/logo/src/xlogo/gui/Editor.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/EditorTextArea.java b/logo/src/xlogo/gui/EditorTextArea.java
index 387b30f..f0ae38b 100644
--- a/logo/src/xlogo/gui/EditorTextArea.java
+++ b/logo/src/xlogo/gui/EditorTextArea.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/EditorTextPane.java b/logo/src/xlogo/gui/EditorTextPane.java
index fd069fe..da8af30 100644
--- a/logo/src/xlogo/gui/EditorTextPane.java
+++ b/logo/src/xlogo/gui/EditorTextPane.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/EditorTextZone.java b/logo/src/xlogo/gui/EditorTextZone.java
index b14749b..0c73881 100644
--- a/logo/src/xlogo/gui/EditorTextZone.java
+++ b/logo/src/xlogo/gui/EditorTextZone.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/HistoryPanel.java b/logo/src/xlogo/gui/HistoryPanel.java
index d1c17ba..14b2b31 100644
--- a/logo/src/xlogo/gui/HistoryPanel.java
+++ b/logo/src/xlogo/gui/HistoryPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
@@ -70,7 +70,7 @@ public class HistoryPanel extends JPanel implements HistoryWriter
private static final long serialVersionUID = 1L;
// numéro identifiant la police de
// l'historique avec "ecris"
- public static int fontPrint = GlobalConfig.police_id(WSManager.getWorkspaceConfig().getFont()); // TODO
+ public static int fontPrint = GlobalConfig.getFontId(WSManager.getWorkspaceConfig().getFont()); // TODO
// how
// to
// remove
diff --git a/logo/src/xlogo/gui/Lis.java b/logo/src/xlogo/gui/Lis.java
index bd6c3ff..9f24c30 100644
--- a/logo/src/xlogo/gui/Lis.java
+++ b/logo/src/xlogo/gui/Lis.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/MyTextAreaDialog.java b/logo/src/xlogo/gui/MyTextAreaDialog.java
index fb689ce..b7f6815 100644
--- a/logo/src/xlogo/gui/MyTextAreaDialog.java
+++ b/logo/src/xlogo/gui/MyTextAreaDialog.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/MyToolBar.java b/logo/src/xlogo/gui/MyToolBar.java
index bb7afa3..c1157d3 100644
--- a/logo/src/xlogo/gui/MyToolBar.java
+++ b/logo/src/xlogo/gui/MyToolBar.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/ReplaceFrame.java b/logo/src/xlogo/gui/ReplaceFrame.java
index f51229f..e068e73 100644
--- a/logo/src/xlogo/gui/ReplaceFrame.java
+++ b/logo/src/xlogo/gui/ReplaceFrame.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/SearchFrame.java b/logo/src/xlogo/gui/SearchFrame.java
index 2a177e8..2728067 100644
--- a/logo/src/xlogo/gui/SearchFrame.java
+++ b/logo/src/xlogo/gui/SearchFrame.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/Searchable.java b/logo/src/xlogo/gui/Searchable.java
index 2244de8..2ad1c93 100644
--- a/logo/src/xlogo/gui/Searchable.java
+++ b/logo/src/xlogo/gui/Searchable.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/Traduc.java b/logo/src/xlogo/gui/Traduc.java
index 1c36acc..93b6234 100644
--- a/logo/src/xlogo/gui/Traduc.java
+++ b/logo/src/xlogo/gui/Traduc.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/ZoneCommande.java b/logo/src/xlogo/gui/ZoneCommande.java
index 0bc5f76..cd99211 100644
--- a/logo/src/xlogo/gui/ZoneCommande.java
+++ b/logo/src/xlogo/gui/ZoneCommande.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/ZoneEdition.java b/logo/src/xlogo/gui/ZoneEdition.java
index afbda11..69f0035 100644
--- a/logo/src/xlogo/gui/ZoneEdition.java
+++ b/logo/src/xlogo/gui/ZoneEdition.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/components/ColorStyleSelectionPanel.java b/logo/src/xlogo/gui/components/ColorStyleSelectionPanel.java
index 0e161a2..bd5e039 100644
--- a/logo/src/xlogo/gui/components/ColorStyleSelectionPanel.java
+++ b/logo/src/xlogo/gui/components/ColorStyleSelectionPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* a lot of modifications, extensions, refactorings have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/components/ProcedureSearch.java b/logo/src/xlogo/gui/components/ProcedureSearch.java
index 4c01acc..88244af 100644
--- a/logo/src/xlogo/gui/components/ProcedureSearch.java
+++ b/logo/src/xlogo/gui/components/ProcedureSearch.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/TurtleComboBox.java b/logo/src/xlogo/gui/components/TurtleComboBox.java
index 952ed7e..f73be74 100644
--- a/logo/src/xlogo/gui/components/TurtleComboBox.java
+++ b/logo/src/xlogo/gui/components/TurtleComboBox.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were adapted by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/X4SComponent.java b/logo/src/xlogo/gui/components/X4SComponent.java
index f28341d..9c05d05 100644
--- a/logo/src/xlogo/gui/components/X4SComponent.java
+++ b/logo/src/xlogo/gui/components/X4SComponent.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/X4SFrame.java b/logo/src/xlogo/gui/components/X4SFrame.java
index 1d06c8c..9472ee1 100644
--- a/logo/src/xlogo/gui/components/X4SFrame.java
+++ b/logo/src/xlogo/gui/components/X4SFrame.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/X4SGui.java b/logo/src/xlogo/gui/components/X4SGui.java
index c0dbc81..f23f859 100644
--- a/logo/src/xlogo/gui/components/X4SGui.java
+++ b/logo/src/xlogo/gui/components/X4SGui.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/fileslist/FilesList.java b/logo/src/xlogo/gui/components/fileslist/FilesList.java
index eaef2b9..e653fb9 100644
--- a/logo/src/xlogo/gui/components/fileslist/FilesList.java
+++ b/logo/src/xlogo/gui/components/fileslist/FilesList.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/fileslist/FilesListItem.java b/logo/src/xlogo/gui/components/fileslist/FilesListItem.java
index 33c3934..efd472b 100644
--- a/logo/src/xlogo/gui/components/fileslist/FilesListItem.java
+++ b/logo/src/xlogo/gui/components/fileslist/FilesListItem.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/components/fileslist/IFilesListItem.java b/logo/src/xlogo/gui/components/fileslist/IFilesListItem.java
index 684ec96..9b75c24 100644
--- a/logo/src/xlogo/gui/components/fileslist/IFilesListItem.java
+++ b/logo/src/xlogo/gui/components/fileslist/IFilesListItem.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/preferences/AbstractPanelColor.java b/logo/src/xlogo/gui/preferences/AbstractPanelColor.java
index e580526..6f43e99 100644
--- a/logo/src/xlogo/gui/preferences/AbstractPanelColor.java
+++ b/logo/src/xlogo/gui/preferences/AbstractPanelColor.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/preferences/PanelColor.java b/logo/src/xlogo/gui/preferences/PanelColor.java
index 2fbfe18..c3e7489 100644
--- a/logo/src/xlogo/gui/preferences/PanelColor.java
+++ b/logo/src/xlogo/gui/preferences/PanelColor.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq
+ * Contents of this file were initially written by Loic Le Coq
*/
package xlogo.gui.preferences;
diff --git a/logo/src/xlogo/gui/translation/BottomPanel.java b/logo/src/xlogo/gui/translation/BottomPanel.java
index bcd98e3..fc54250 100644
--- a/logo/src/xlogo/gui/translation/BottomPanel.java
+++ b/logo/src/xlogo/gui/translation/BottomPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings migh have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/translation/FirstPanel.java b/logo/src/xlogo/gui/translation/FirstPanel.java
index 1fc0309..6bb6c05 100644
--- a/logo/src/xlogo/gui/translation/FirstPanel.java
+++ b/logo/src/xlogo/gui/translation/FirstPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings migh have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/translation/MyTable.java b/logo/src/xlogo/gui/translation/MyTable.java
index 9976a09..cd8c410 100644
--- a/logo/src/xlogo/gui/translation/MyTable.java
+++ b/logo/src/xlogo/gui/translation/MyTable.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings migh have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/translation/TopPanel.java b/logo/src/xlogo/gui/translation/TopPanel.java
index 239398b..751f886 100644
--- a/logo/src/xlogo/gui/translation/TopPanel.java
+++ b/logo/src/xlogo/gui/translation/TopPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings migh have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/gui/translation/TranslateXLogo.java b/logo/src/xlogo/gui/translation/TranslateXLogo.java
index 9be2d37..2206f8d 100644
--- a/logo/src/xlogo/gui/translation/TranslateXLogo.java
+++ b/logo/src/xlogo/gui/translation/TranslateXLogo.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings migh have been applied by Marko Zivkovic
*/
@@ -47,7 +47,7 @@ import xlogo.gui.SearchFrame;
/**
* Modifications made by Marko: <br>
* IO error is displayed through DialogMessenger (singleton) instead of {@link Application#ecris()}. Result: This class is completely decoupled from the Application class.
- * @author lo�c Le Coq, slightly modified by Marko Zivkovic
+ * @author loic Le Coq, slightly modified by Marko Zivkovic
*/
public class TranslateXLogo extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
diff --git a/logo/src/xlogo/gui/welcome/WelcomeScreen.java b/logo/src/xlogo/gui/welcome/WelcomeScreen.java
index 3a67e2d..890e806 100644
--- a/logo/src/xlogo/gui/welcome/WelcomeScreen.java
+++ b/logo/src/xlogo/gui/welcome/WelcomeScreen.java
@@ -1,31 +1,27 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/*
+ * XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
- *
* Contact Information: marko88zivkovic at gmail dot com
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details. You should have received a copy of the
- * GNU General Public License along with this program; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the
+ * GNU General Public License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
- *
- *
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
- *
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
- *
* Contents of this file were entirely written by Marko Zivkovic
*/
package xlogo.gui.welcome;
+
import java.awt.event.*;
import javax.swing.*;
@@ -55,59 +51,58 @@ import xlogo.Application;
* @author Marko
*/
public class WelcomeScreen extends X4SFrame {
-
- JFrame frame;
- private JLabel label;
+ JFrame frame;
- private JLabel workspace;
- private JLabel username;
-
- private JComboBox workspaceSelection;
- private JComboBox userSelection;
-
- private JButton openWorkspaceSettingsBtn;
- private JButton enterButton;
+ private JLabel label;
- private JButton infoButton;
- private JButton gplButton;
+ private JLabel workspace;
+ private JLabel username;
- private JPanel panel;
- private GroupLayout groupLayout;
+ private JComboBox workspaceSelection;
+ private JComboBox userSelection;
- private ActionListener onApplicationEnterListener;
-
- private WorkspaceSettings workspaceSettings;
+ private JButton openWorkspaceSettingsBtn;
+ private JButton enterButton;
+
+ private JButton infoButton;
+ private JButton gplButton;
+
+ private JPanel panel;
+ private GroupLayout groupLayout;
+
+ private ActionListener onApplicationEnterListener;
+ private ActionListener onWorkspaceListChangeListener;
+ private ActionListener onEnterWorkspaceListener;
+
+ private WorkspaceSettings workspaceSettings;
/**
*
* @param listener to be informed when the user is ready to enter the application
*/
- public WelcomeScreen(ActionListener onApplicationEnterListener){
+ public WelcomeScreen(ActionListener onApplicationEnterListener) {
this.onApplicationEnterListener = onApplicationEnterListener;
}
-
+
@Override
- public JFrame getFrame()
- {
+ public JFrame getFrame() {
return frame;
}
-
+
@Override
- protected void initComponent()
- {
+ protected void initComponent() {
frame = new JFrame(){
private static final long serialVersionUID = -6730403281163492211L;
-
+
@Override
- public void dispose()
- {
+ public void dispose() {
try {
WSManager.getInstance().getGlobalConfigInstance().store();
- } catch (IOException e) {
- DialogMessenger.getInstance().dispatchMessage(
- translate("ws.error.title"),
+ }
+ catch (IOException e) {
+ DialogMessenger.getInstance().dispatchMessage(translate("ws.error.title"),
translate("storage.could.not.store.gc"));
}
@@ -118,14 +113,13 @@ public class WelcomeScreen extends X4SFrame {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setIconImage(Toolkit.getDefaultToolkit().createImage(Utils.class.getResource("Icon_x4s.png")));
frame.setTitle("XLogo4Schools");
-
-
+
workspace = new JLabel("Workspace");
username = new JLabel("User");
-
+
workspaceSelection = new JComboBox();
userSelection = new JComboBox();
-
+
openWorkspaceSettingsBtn = new JButton("Settings");
enterButton = new JButton("Enter");
@@ -133,31 +127,19 @@ public class WelcomeScreen extends X4SFrame {
gplButton = new JButton();
panel = new JPanel();
-
+
// The XLogo4Schools logo
//ImageIcon logo = Utils.dimensionne_image("Logo_xlogo4schools.png", this);
infoButton.setIcon(createImageIcon("info_icon.png", "Info", 40, 40));
gplButton.setIcon(createImageIcon("gnu_gpl.png", "GPL", 40, 40));
label = new JLabel(createImageIcon("Logo_xlogo4schools.png", "XLogo4Schools", 250, 40));
- initWorkspaceListModel();
+ populateWorkspaceList();
populateUserList();
-
- workspaceSettings = new WorkspaceSettings(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- // When the window is closed, repopulate workspace and user lists, update language, enable this window again.
- setMessageManagerParent();
- setText();
- populateWorkspaceList();
- populateUserList();
- frame.setEnabled(true);
- }
- });
}
-
+
@Override
- protected void layoutComponent()
- {
+ protected void layoutComponent() {
frame.getContentPane().add(panel);
frame.setResizable(false);
@@ -175,7 +157,7 @@ public class WelcomeScreen extends X4SFrame {
panel.add(enterButton);
panel.add(infoButton);
panel.add(gplButton);
-
+
workspaceSelection.setMinimumSize(new Dimension(200, 25));
userSelection.setMinimumSize(new Dimension(200, 25));
workspaceSelection.setMaximumSize(new Dimension(200, 25));
@@ -187,55 +169,82 @@ public class WelcomeScreen extends X4SFrame {
groupLayout.setAutoCreateGaps(true);
groupLayout.setAutoCreateContainerGaps(true);
- groupLayout.setVerticalGroup(
- groupLayout.createSequentialGroup()
- .addGroup(groupLayout.createParallelGroup()
- .addComponent(gplButton)
- .addComponent(infoButton)
- .addComponent(label))
- .addGroup(groupLayout.createParallelGroup()
- .addComponent(workspace)
- .addComponent(workspaceSelection)
- .addComponent(openWorkspaceSettingsBtn))
- .addGroup(groupLayout.createParallelGroup()
- .addComponent(username)
- .addComponent(userSelection)
- .addComponent(enterButton))
- );
-
- groupLayout.setHorizontalGroup(
- groupLayout.createParallelGroup()
- .addGroup(
- groupLayout.createSequentialGroup()
- .addComponent(label)
- .addComponent(gplButton)
- .addComponent(infoButton))
- .addGroup(
- groupLayout.createSequentialGroup()
- .addGroup(groupLayout.createParallelGroup()
- .addComponent(workspace)
- .addComponent(username))
- .addGroup(groupLayout.createParallelGroup()
- .addComponent(workspaceSelection)
- .addComponent(userSelection))
- .addGroup(groupLayout.createParallelGroup()
- .addComponent(openWorkspaceSettingsBtn)
- .addComponent(enterButton))
- )
- );
+ groupLayout.setVerticalGroup(groupLayout
+ .createSequentialGroup()
+ .addGroup(
+ groupLayout.createParallelGroup().addComponent(gplButton).addComponent(infoButton)
+ .addComponent(label))
+ .addGroup(
+ groupLayout.createParallelGroup().addComponent(workspace).addComponent(workspaceSelection)
+ .addComponent(openWorkspaceSettingsBtn))
+ .addGroup(
+ groupLayout.createParallelGroup().addComponent(username).addComponent(userSelection)
+ .addComponent(enterButton)));
+
+ groupLayout.setHorizontalGroup(groupLayout
+ .createParallelGroup()
+ .addGroup(
+ groupLayout.createSequentialGroup().addComponent(label).addComponent(gplButton)
+ .addComponent(infoButton))
+ .addGroup(
+ groupLayout
+ .createSequentialGroup()
+ .addGroup(
+ groupLayout.createParallelGroup().addComponent(workspace)
+ .addComponent(username))
+ .addGroup(
+ groupLayout.createParallelGroup().addComponent(workspaceSelection)
+ .addComponent(userSelection))
+ .addGroup(
+ groupLayout.createParallelGroup().addComponent(openWorkspaceSettingsBtn)
+ .addComponent(enterButton))));
}
-
+
+ private boolean ignoreGuiEvents = false;
+
@Override
- protected void initEventListeners()
- {
- workspaceSelection.addItemListener(new ItemListener() {
+ protected void initEventListeners() {
+
+ GlobalConfig gc = WSManager.getGlobalConfig();
+
+ onEnterWorkspaceListener = new ActionListener(){
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ignoreGuiEvents = true;
+ populateWorkspaceList();
+ populateUserList();
+ ignoreGuiEvents = false;
+
+ }
+ };
+
+ gc.addEnterWorkspaceListener(onEnterWorkspaceListener);
+
+ onWorkspaceListChangeListener = new ActionListener(){
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ignoreGuiEvents = true;
+ populateWorkspaceList();
+ populateUserList();
+ ignoreGuiEvents = false;
+ }
+ };
+
+ WSManager.getGlobalConfig().addWorkspaceListChangeListener(onWorkspaceListChangeListener);
+
+ workspaceSelection.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e) {
+ if (ignoreGuiEvents) {
+ return;
+ }
String workspace = (String) workspaceSelection.getSelectedItem();
- enterWorkspace(workspace);
+ enterWorkspace(workspace);
}
});
// Open workspace settings button
- openWorkspaceSettingsBtn.addActionListener(new ActionListener() {
+ openWorkspaceSettingsBtn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
showWorkspaceSettings();
}
@@ -243,18 +252,26 @@ public class WelcomeScreen extends X4SFrame {
// Select user combo box
final JTextComponent tc = (JTextComponent) userSelection.getEditor().getEditorComponent();
- tc.getDocument().addDocumentListener(new DocumentListener() {
- public void removeUpdate(DocumentEvent arg0) { enableOrDisableEnter(); }
- public void insertUpdate(DocumentEvent arg0) { enableOrDisableEnter(); }
- public void changedUpdate(DocumentEvent arg0) { enableOrDisableEnter(); }
- private void enableOrDisableEnter()
- {
+ tc.getDocument().addDocumentListener(new DocumentListener(){
+ public void removeUpdate(DocumentEvent arg0) {
+ enableOrDisableEnter();
+ }
+
+ public void insertUpdate(DocumentEvent arg0) {
+ enableOrDisableEnter();
+ }
+
+ public void changedUpdate(DocumentEvent arg0) {
+ enableOrDisableEnter();
+ }
+
+ private void enableOrDisableEnter() {
String username = tc.getText();
enterButton.setEnabled(username != null && username.length() != 0);
}
});
- userSelection.addActionListener(new ActionListener() {
+ userSelection.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
String username = (String) userSelection.getSelectedItem();
enterButton.setEnabled(username != null && username.length() != 0);
@@ -262,58 +279,53 @@ public class WelcomeScreen extends X4SFrame {
});
// Enter user space button
- enterButton.addActionListener(new ActionListener() {
+ enterButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
- enterApplication();
+ new Thread(new Runnable(){
+ @Override
+ public void run() {
+ enterApplication();
+ }
+ }).start();
}
});
gplButton.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e)
- {
- showGPL();
+ public void actionPerformed(ActionEvent e) {
+ new Thread(new Runnable(){
+ @Override
+ public void run() {
+ showGPL();
+ }
+ }).start();
}
});
infoButton.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e)
- {
- showInfo();
+ public void actionPerformed(ActionEvent arg0) {
+ new Thread(new Runnable(){
+ @Override
+ public void run() {
+ showInfo();
+ }
+ }).start();
}
});
}
- private void initWorkspaceListModel()
- {
- WSManager wsManager = WSManager.getInstance();
- try
- {
- String lastUsedWorkspace = wsManager.getGlobalConfigInstance().getLastUsedWorkspace();
- wsManager.enterWorkspace(lastUsedWorkspace);
- populateWorkspaceList();
- }
- catch (IOException e)
- {
- DialogMessenger
- .getInstance()
- .dispatchMessage(
- "I'm sorry, something very bad happened",
- "Please report this error message. You could try to delete the file X4S_GlobalConfig from your home directory, "
- + "and restart XLogo4Schools. You will have to import your Workspaces again.\n\n"
- + e.toString());
- }
- }
-
- private void populateWorkspaceList()
- {
+ private void populateWorkspaceList() {
GlobalConfig gc = WSManager.getInstance().getGlobalConfigInstance();
String[] workspaces = gc.getAllWorkspaces();
workspaceSelection.setModel(new DefaultComboBoxModel(workspaces));
+ selectCurrentWorkspace();
+ }
+
+ private void selectCurrentWorkspace(){
+ GlobalConfig gc = WSManager.getInstance().getGlobalConfigInstance();
workspaceSelection.setSelectedItem(gc.getLastUsedWorkspace());
}
- private void populateUserList()
- {
+ private void populateUserList() {
WorkspaceConfig wc = WSManager.getInstance().getWorkspaceConfigInstance();
String[] users = wc.getUserList();
userSelection.setModel(new DefaultComboBoxModel(users));
@@ -327,90 +339,107 @@ public class WelcomeScreen extends X4SFrame {
try {
WSManager.getInstance().enterWorkspace(workspaceName);
populateUserList();
- } catch (IOException e) {
- DialogMessenger.getInstance().dispatchMessage(
- translate("ws.error.title"),
- translate("ws.settings.could.not.enter.wp") + "\n\n" + e.toString());
+ }
+ catch (IOException e) {
+ DialogMessenger.getInstance().dispatchMessage(translate("ws.error.title"),
+ translate("ws.settings.could.not.enter.wp") + "\n\n" + e.toString());
}
}
-
- private synchronized void showWorkspaceSettings()
- {
- Runnable runnable = new Runnable() {
+
+ private synchronized void showWorkspaceSettings() {
+ Runnable runnable = new Runnable(){
public void run() {
String authentification = null;
GlobalConfig gc = WSManager.getInstance().getGlobalConfigInstance();
- if (gc.isPasswordRequired())
- {
+ if (gc.isPasswordRequired()) {
authentification = showPasswordPopup();
if (authentification == null)
return; // user cancelled the process
-
- if(!gc.authenticate(new String(authentification)))
- {
+
+ if (!gc.authenticate(new String(authentification))) {
// Could not authenticate => cancel
- DialogMessenger.getInstance().dispatchMessage(
- translate("i.am.sorry"),
+ DialogMessenger.getInstance().dispatchMessage(translate("i.am.sorry"),
translate("welcome.wrong.pw"));
return;
}
}
frame.setEnabled(false);
- workspaceSettings.showFrame(authentification);
+ getWorkspaceSettings().showFrame(authentification);
}
};
new Thread(runnable).start();
}
+ private synchronized WorkspaceSettings getWorkspaceSettings() {
+ if (workspaceSettings == null) {
+ workspaceSettings = new WorkspaceSettings(new ActionListener(){
+ public void actionPerformed(ActionEvent arg0) {
+ // When the window is closed, repopulate workspace and user lists, update language, enable this window again.
+ setMessageManagerParent();
+ setText();
+ populateUserList();
+ frame.setEnabled(true);
+ }
+ });
+ }
+ return workspaceSettings;
+ }
+
protected String showPasswordPopup() {
JPasswordField passwordField = new JPasswordField();
int option = JOptionPane.showConfirmDialog(frame, passwordField, translate("welcome.enter.pw"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
-
- if (option == JOptionPane.OK_OPTION) {
- return new String(passwordField.getPassword());
- }
+
+ if (option == JOptionPane.OK_OPTION) { return new String(passwordField.getPassword()); }
return null;
}
-
- public void enterApplication()
- {
+
+ public void enterApplication() {
String username = (String) userSelection.getSelectedItem();
if ((username == null) || (username.length() == 0))
return; // this should not happen since the enter button is disabled
-
- if(!Storable.checkLegalName(username))
- {
- DialogMessenger.getInstance().dispatchError(
- translate(MessageKeys.NAME_ERROR_TITLE),
+
+ if (!Storable.checkLegalName(username)) {
+ DialogMessenger.getInstance().dispatchError(translate(MessageKeys.NAME_ERROR_TITLE),
translate(MessageKeys.ILLEGAL_NAME));
return;
}
-
WorkspaceConfig wc = WSManager.getInstance().getWorkspaceConfigInstance();
if (!wc.existsUserLogically(username))
wc.createUser(username);
try {
WSManager.getInstance().enterUserSpace(username);
- } catch (IOException e) {
- DialogMessenger.getInstance().dispatchMessage(
- translate("ws.error.title"),
- translate("welcome.could.not.enter.user") + e.toString());
+ }
+ catch (IOException e) {
+ DialogMessenger.getInstance().dispatchMessage(translate("ws.error.title"),
+ translate("welcome.could.not.enter.user") + "\n" + e.toString());
return;
}
-
- workspaceSettings.stopEventListeners();
+ cleanupAfterEnter();
+ }
+
+ private void cleanupAfterEnter() {
+ if (workspaceSettings != null){
+ workspaceSettings.stopEventListeners();
+ // TODO remove each reference to workspace settings
+ workspaceSettings = null;
+ }
+ WSManager.getGlobalConfig().removeEnterWorkspaceListener(onEnterWorkspaceListener);
+ WSManager.getGlobalConfig().removeWorkspaceListChangeListener(onWorkspaceListChangeListener);
+ try {
+ WSManager.getWorkspaceConfig().store();
+ }
+ catch (IOException ignore) { }
onApplicationEnterListener.actionPerformed(new ActionEvent(this, 0, null));
- System.gc();
}
- public void setText()
- {
+ @Override
+ public void setText() {
workspace.setText(translate("welcome.workspace"));
username.setText(translate("welcome.username"));
openWorkspaceSettingsBtn.setText(translate("welcome.settings"));
@@ -423,8 +452,7 @@ public class WelcomeScreen extends X4SFrame {
* Like in XLogo, almost unmodified.
* It is displayed in the language of the currently selected workspace.
*/
- private void showGPL()
- {
+ private void showGPL() {
JFrame frame = new JFrame(translate("menu.help.licence"));
frame.setIconImage(Toolkit.getDefaultToolkit().createImage(WebPage.class.getResource("Logo_xlogo4schools.png")));
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
@@ -435,21 +463,17 @@ public class WelcomeScreen extends X4SFrame {
String langCode = WSManager.getWorkspaceConfig().getLanguage().getLanguageCode();
String path = "gpl/gpl-" + langCode + ".html";
-
+
java.net.URL helpURL = Application.class.getResource(path);
- if (helpURL != null)
- {
- try
- {
+ if (helpURL != null) {
+ try {
editorPane.setPage(helpURL);
}
- catch (IOException e1)
- {
+ catch (IOException e1) {
System.err.println("Attempted to read a bad URL: " + helpURL);
}
}
- else
- {
+ else {
System.err.println("Couldn't find file: " + path);
}
@@ -461,9 +485,8 @@ public class WelcomeScreen extends X4SFrame {
frame.getContentPane().add(editorScrollPane);
frame.setVisible(true);
}
-
- private void showInfo()
- {
+
+ private void showInfo() {
JFrame frame = new JFrame(translate("welcome.info.title"));
frame.setIconImage(Toolkit.getDefaultToolkit().createImage(WebPage.class.getResource("Icon_x4s.png")));
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
@@ -472,21 +495,17 @@ public class WelcomeScreen extends X4SFrame {
editorPane.setEditable(false);
String path = "gpl/x4s_info.html";
-
+
java.net.URL helpURL = Application.class.getResource(path);
- if (helpURL != null)
- {
- try
- {
+ if (helpURL != null) {
+ try {
editorPane.setPage(helpURL);
}
- catch (IOException e1)
- {
+ catch (IOException e1) {
System.err.println("Attempted to read a bad URL: " + helpURL);
}
}
- else
- {
+ else {
System.err.println("Couldn't find file: " + path);
}
@@ -507,4 +526,4 @@ public class WelcomeScreen extends X4SFrame {
Image img = Toolkit.getDefaultToolkit().getImage(Utils.class.getResource(path));
return new ImageIcon(img.getScaledInstance(width, heigth, Image.SCALE_SMOOTH));
}
-} \ No newline at end of file
+}
diff --git a/logo/src/xlogo/gui/welcome/WorkspaceSettings.java b/logo/src/xlogo/gui/welcome/WorkspaceSettings.java
index e924809..fbc9f48 100644
--- a/logo/src/xlogo/gui/welcome/WorkspaceSettings.java
+++ b/logo/src/xlogo/gui/welcome/WorkspaceSettings.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/welcome/settings/tabs/AbstractWorkspacePanel.java b/logo/src/xlogo/gui/welcome/settings/tabs/AbstractWorkspacePanel.java
index a226e64..52d49e3 100644
--- a/logo/src/xlogo/gui/welcome/settings/tabs/AbstractWorkspacePanel.java
+++ b/logo/src/xlogo/gui/welcome/settings/tabs/AbstractWorkspacePanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -51,11 +51,15 @@ public abstract class AbstractWorkspacePanel extends X4SComponent{
protected abstract JComboBox getWorkspaceSelection();
+ private boolean ignoreGuiEvents = false;
+
@Override
protected void initEventListeners()
{
getWorkspaceSelection().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
+ if (ignoreGuiEvents)
+ return;
new Thread(new Runnable() {
public void run() {
String wsName = (String) getWorkspaceSelection().getSelectedItem();
@@ -70,14 +74,18 @@ public abstract class AbstractWorkspacePanel extends X4SComponent{
gc.addWorkspaceListChangeListener(workspaceListChangeListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
+ ignoreGuiEvents = true;
populateWorkspaceList();
+ ignoreGuiEvents = false;
}
});
gc.addEnterWorkspaceListener(enterWorkspaceListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
- getWorkspaceSelection().setSelectedItem(gc.getLastUsedWorkspace());
+ ignoreGuiEvents = true;
+ selectCurrentWorkspace();
+ ignoreGuiEvents = false;
}
});
}
@@ -91,6 +99,7 @@ public abstract class AbstractWorkspacePanel extends X4SComponent{
gc.removeWorkspaceListChangeListener(workspaceListChangeListener);
}
+
protected abstract void setValues();
protected abstract void enableComponents();
@@ -101,9 +110,14 @@ public abstract class AbstractWorkspacePanel extends X4SComponent{
GlobalConfig gc = WSManager.getInstance().getGlobalConfigInstance();
String[] workspaces = gc.getAllWorkspaces();
getWorkspaceSelection().setModel(new DefaultComboBoxModel(workspaces));
+ selectCurrentWorkspace();
+ }
+
+ protected void selectCurrentWorkspace(){
+ GlobalConfig gc = WSManager.getInstance().getGlobalConfigInstance();
String lastUsed = gc.getLastUsedWorkspace();
- enterWorkspace(lastUsed);
getWorkspaceSelection().setSelectedItem(lastUsed);
+ setValues();
}
protected void deleteWorkspace() {
diff --git a/logo/src/xlogo/gui/welcome/settings/tabs/ContestTab.java b/logo/src/xlogo/gui/welcome/settings/tabs/ContestTab.java
index e2dfa0a..53d658b 100644
--- a/logo/src/xlogo/gui/welcome/settings/tabs/ContestTab.java
+++ b/logo/src/xlogo/gui/welcome/settings/tabs/ContestTab.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/welcome/settings/tabs/GlobalTab.java b/logo/src/xlogo/gui/welcome/settings/tabs/GlobalTab.java
index ecaef9c..ae03255 100644
--- a/logo/src/xlogo/gui/welcome/settings/tabs/GlobalTab.java
+++ b/logo/src/xlogo/gui/welcome/settings/tabs/GlobalTab.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/welcome/settings/tabs/SyntaxHighlightingTab.java b/logo/src/xlogo/gui/welcome/settings/tabs/SyntaxHighlightingTab.java
index c5926f3..c576e73 100644
--- a/logo/src/xlogo/gui/welcome/settings/tabs/SyntaxHighlightingTab.java
+++ b/logo/src/xlogo/gui/welcome/settings/tabs/SyntaxHighlightingTab.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceCreationPanel.java b/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceCreationPanel.java
index 06f8ad6..c7c6e9f 100644
--- a/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceCreationPanel.java
+++ b/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceCreationPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceTab.java b/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceTab.java
index 3b0e8a4..ff25672 100644
--- a/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceTab.java
+++ b/logo/src/xlogo/gui/welcome/settings/tabs/WorkspaceTab.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -31,6 +31,7 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
+import java.io.IOException;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
@@ -94,7 +95,8 @@ public class WorkspaceTab extends AbstractWorkspacePanel{
protected JComboBox getWorkspaceSelection() {
return workspaceSelection;
}
-
+
+ @Override
protected void initComponent()
{
component = new JPanel();
@@ -126,6 +128,7 @@ public class WorkspaceTab extends AbstractWorkspacePanel{
setValues();
}
+ @Override
protected void layoutComponent()
{
workspaceSelection.setMinimumSize(new Dimension(150,25));
@@ -407,8 +410,6 @@ public class WorkspaceTab extends AbstractWorkspacePanel{
userCreatable.setEnabled(true);
}
-
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* USER : ADD, REMOVE, IMPORT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -419,8 +420,13 @@ public class WorkspaceTab extends AbstractWorkspacePanel{
WorkspaceConfig wc = WSManager.getInstance().getWorkspaceConfigInstance();
String[] users = wc.getUserList();
userSelection.setModel(new DefaultComboBoxModel(users));
- String lastUser = wc.getLastActiveUser();
- userSelection.setSelectedItem(lastUser);
+ try {
+ wc.enterInitialUserSpace();
+ String lastUser = wc.getLastActiveUser();
+ userSelection.setSelectedItem(lastUser);
+ }
+ catch (IOException ignore) {
+ }
}
private void addUser()
diff --git a/logo/src/xlogo/interfaces/BasicFileContainer.java b/logo/src/xlogo/interfaces/BasicFileContainer.java
index 5e12d22..34d87cd 100644
--- a/logo/src/xlogo/interfaces/BasicFileContainer.java
+++ b/logo/src/xlogo/interfaces/BasicFileContainer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/interfaces/BroadcasterErrorFileContainer.java b/logo/src/xlogo/interfaces/BroadcasterErrorFileContainer.java
index ceb4bcb..faba027 100644
--- a/logo/src/xlogo/interfaces/BroadcasterErrorFileContainer.java
+++ b/logo/src/xlogo/interfaces/BroadcasterErrorFileContainer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/interfaces/ErrorDetector.java b/logo/src/xlogo/interfaces/ErrorDetector.java
index 01b59dc..f0ea465 100644
--- a/logo/src/xlogo/interfaces/ErrorDetector.java
+++ b/logo/src/xlogo/interfaces/ErrorDetector.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/interfaces/MessageBroadcaster.java b/logo/src/xlogo/interfaces/MessageBroadcaster.java
index 8021a36..ae38816 100644
--- a/logo/src/xlogo/interfaces/MessageBroadcaster.java
+++ b/logo/src/xlogo/interfaces/MessageBroadcaster.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/interfaces/ProcedureMapper.java b/logo/src/xlogo/interfaces/ProcedureMapper.java
index 32e73bb..e8e8c19 100644
--- a/logo/src/xlogo/interfaces/ProcedureMapper.java
+++ b/logo/src/xlogo/interfaces/ProcedureMapper.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/interfaces/X4SModeSwitcher.java b/logo/src/xlogo/interfaces/X4SModeSwitcher.java
index 4ddc248..48f66ca 100644
--- a/logo/src/xlogo/interfaces/X4SModeSwitcher.java
+++ b/logo/src/xlogo/interfaces/X4SModeSwitcher.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/Affichage.java b/logo/src/xlogo/kernel/Affichage.java
index 7da2120..f1d4686 100644
--- a/logo/src/xlogo/kernel/Affichage.java
+++ b/logo/src/xlogo/kernel/Affichage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/DrawPanel.java b/logo/src/xlogo/kernel/DrawPanel.java
index 269a0c0..a631169 100644
--- a/logo/src/xlogo/kernel/DrawPanel.java
+++ b/logo/src/xlogo/kernel/DrawPanel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/InstructionBuffer.java b/logo/src/xlogo/kernel/InstructionBuffer.java
index befe0d9..d9a2920 100644
--- a/logo/src/xlogo/kernel/InstructionBuffer.java
+++ b/logo/src/xlogo/kernel/InstructionBuffer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/Interprete.java b/logo/src/xlogo/kernel/Interprete.java
index 897814b..0a2f18b 100644
--- a/logo/src/xlogo/kernel/Interprete.java
+++ b/logo/src/xlogo/kernel/Interprete.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/Kernel.java b/logo/src/xlogo/kernel/Kernel.java
index 108fef4..2a33841 100644
--- a/logo/src/xlogo/kernel/Kernel.java
+++ b/logo/src/xlogo/kernel/Kernel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LaunchPrimitive.java b/logo/src/xlogo/kernel/LaunchPrimitive.java
index 47827cd..8c74965 100644
--- a/logo/src/xlogo/kernel/LaunchPrimitive.java
+++ b/logo/src/xlogo/kernel/LaunchPrimitive.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LogoError.java b/logo/src/xlogo/kernel/LogoError.java
index 175c243..55300b1 100644
--- a/logo/src/xlogo/kernel/LogoError.java
+++ b/logo/src/xlogo/kernel/LogoError.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/LoopFillPolygon.java b/logo/src/xlogo/kernel/LoopFillPolygon.java
index f2cb0fd..dc78018 100644
--- a/logo/src/xlogo/kernel/LoopFillPolygon.java
+++ b/logo/src/xlogo/kernel/LoopFillPolygon.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LoopFor.java b/logo/src/xlogo/kernel/LoopFor.java
index 473fd28..f9845ca 100644
--- a/logo/src/xlogo/kernel/LoopFor.java
+++ b/logo/src/xlogo/kernel/LoopFor.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LoopForEach.java b/logo/src/xlogo/kernel/LoopForEach.java
index 3d0c518..1cae805 100644
--- a/logo/src/xlogo/kernel/LoopForEach.java
+++ b/logo/src/xlogo/kernel/LoopForEach.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LoopProperties.java b/logo/src/xlogo/kernel/LoopProperties.java
index ac252e4..df79c3e 100644
--- a/logo/src/xlogo/kernel/LoopProperties.java
+++ b/logo/src/xlogo/kernel/LoopProperties.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LoopRepeat.java b/logo/src/xlogo/kernel/LoopRepeat.java
index 5362d46..17bd91b 100644
--- a/logo/src/xlogo/kernel/LoopRepeat.java
+++ b/logo/src/xlogo/kernel/LoopRepeat.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/LoopWhile.java b/logo/src/xlogo/kernel/LoopWhile.java
index c4451c8..3ab205d 100644
--- a/logo/src/xlogo/kernel/LoopWhile.java
+++ b/logo/src/xlogo/kernel/LoopWhile.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/MP3Player.java b/logo/src/xlogo/kernel/MP3Player.java
index e996bd2..ae9b9c1 100644
--- a/logo/src/xlogo/kernel/MP3Player.java
+++ b/logo/src/xlogo/kernel/MP3Player.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/MyCalculator.java b/logo/src/xlogo/kernel/MyCalculator.java
index 1fde09c..31fbb56 100644
--- a/logo/src/xlogo/kernel/MyCalculator.java
+++ b/logo/src/xlogo/kernel/MyCalculator.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/MyFlow.java b/logo/src/xlogo/kernel/MyFlow.java
index 2c7b5e3..538cc3c 100644
--- a/logo/src/xlogo/kernel/MyFlow.java
+++ b/logo/src/xlogo/kernel/MyFlow.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/MyFlowReader.java b/logo/src/xlogo/kernel/MyFlowReader.java
index 2b3409b..c3c202c 100644
--- a/logo/src/xlogo/kernel/MyFlowReader.java
+++ b/logo/src/xlogo/kernel/MyFlowReader.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/MyFlowWriter.java b/logo/src/xlogo/kernel/MyFlowWriter.java
index 7651aee..3e357f0 100644
--- a/logo/src/xlogo/kernel/MyFlowWriter.java
+++ b/logo/src/xlogo/kernel/MyFlowWriter.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/Primitive.java b/logo/src/xlogo/kernel/Primitive.java
index 0d0d8d1..2f01664 100644
--- a/logo/src/xlogo/kernel/Primitive.java
+++ b/logo/src/xlogo/kernel/Primitive.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/Turtle.java b/logo/src/xlogo/kernel/Turtle.java
index 82f3a76..b6f55bd 100644
--- a/logo/src/xlogo/kernel/Turtle.java
+++ b/logo/src/xlogo/kernel/Turtle.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoException.java b/logo/src/xlogo/kernel/grammar/LogoException.java
index 225a677..4d326fe 100644
--- a/logo/src/xlogo/kernel/grammar/LogoException.java
+++ b/logo/src/xlogo/kernel/grammar/LogoException.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoList.java b/logo/src/xlogo/kernel/grammar/LogoList.java
index 1cd6ea5..f72e74b 100644
--- a/logo/src/xlogo/kernel/grammar/LogoList.java
+++ b/logo/src/xlogo/kernel/grammar/LogoList.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoNumber.java b/logo/src/xlogo/kernel/grammar/LogoNumber.java
index fd367bb..f4380d3 100644
--- a/logo/src/xlogo/kernel/grammar/LogoNumber.java
+++ b/logo/src/xlogo/kernel/grammar/LogoNumber.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoParser.java b/logo/src/xlogo/kernel/grammar/LogoParser.java
index ccf3436..70e0b06 100644
--- a/logo/src/xlogo/kernel/grammar/LogoParser.java
+++ b/logo/src/xlogo/kernel/grammar/LogoParser.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoPrimitive.java b/logo/src/xlogo/kernel/grammar/LogoPrimitive.java
index 52044a3..2f48394 100644
--- a/logo/src/xlogo/kernel/grammar/LogoPrimitive.java
+++ b/logo/src/xlogo/kernel/grammar/LogoPrimitive.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoRightDelimiter.java b/logo/src/xlogo/kernel/grammar/LogoRightDelimiter.java
index fb46026..95b6d5f 100644
--- a/logo/src/xlogo/kernel/grammar/LogoRightDelimiter.java
+++ b/logo/src/xlogo/kernel/grammar/LogoRightDelimiter.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoTree.java b/logo/src/xlogo/kernel/grammar/LogoTree.java
index 4e6b66e..8c8d335 100644
--- a/logo/src/xlogo/kernel/grammar/LogoTree.java
+++ b/logo/src/xlogo/kernel/grammar/LogoTree.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoType.java b/logo/src/xlogo/kernel/grammar/LogoType.java
index d407431..5bf46cd 100644
--- a/logo/src/xlogo/kernel/grammar/LogoType.java
+++ b/logo/src/xlogo/kernel/grammar/LogoType.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoTypeNull.java b/logo/src/xlogo/kernel/grammar/LogoTypeNull.java
index b764063..1aaa0a3 100644
--- a/logo/src/xlogo/kernel/grammar/LogoTypeNull.java
+++ b/logo/src/xlogo/kernel/grammar/LogoTypeNull.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoVariable.java b/logo/src/xlogo/kernel/grammar/LogoVariable.java
index d2a7e91..629ba72 100644
--- a/logo/src/xlogo/kernel/grammar/LogoVariable.java
+++ b/logo/src/xlogo/kernel/grammar/LogoVariable.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/grammar/LogoWord.java b/logo/src/xlogo/kernel/grammar/LogoWord.java
index e155180..fb4ad0d 100644
--- a/logo/src/xlogo/kernel/grammar/LogoWord.java
+++ b/logo/src/xlogo/kernel/grammar/LogoWord.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/gui/GuiButton.java b/logo/src/xlogo/kernel/gui/GuiButton.java
index 1d440a5..11201d3 100644
--- a/logo/src/xlogo/kernel/gui/GuiButton.java
+++ b/logo/src/xlogo/kernel/gui/GuiButton.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/gui/GuiComponent.java b/logo/src/xlogo/kernel/gui/GuiComponent.java
index c144432..da4cdcd 100644
--- a/logo/src/xlogo/kernel/gui/GuiComponent.java
+++ b/logo/src/xlogo/kernel/gui/GuiComponent.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/gui/GuiMap.java b/logo/src/xlogo/kernel/gui/GuiMap.java
index d2c071e..16b1b73 100644
--- a/logo/src/xlogo/kernel/gui/GuiMap.java
+++ b/logo/src/xlogo/kernel/gui/GuiMap.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/gui/GuiMenu.java b/logo/src/xlogo/kernel/gui/GuiMenu.java
index 2a424f3..fff6c04 100644
--- a/logo/src/xlogo/kernel/gui/GuiMenu.java
+++ b/logo/src/xlogo/kernel/gui/GuiMenu.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/network/ChatFrame.java b/logo/src/xlogo/kernel/network/ChatFrame.java
index 227f4ca..322a7a4 100644
--- a/logo/src/xlogo/kernel/network/ChatFrame.java
+++ b/logo/src/xlogo/kernel/network/ChatFrame.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/network/NetworkClientChat.java b/logo/src/xlogo/kernel/network/NetworkClientChat.java
index cf9ce0b..0be29e5 100644
--- a/logo/src/xlogo/kernel/network/NetworkClientChat.java
+++ b/logo/src/xlogo/kernel/network/NetworkClientChat.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/network/NetworkClientExecute.java b/logo/src/xlogo/kernel/network/NetworkClientExecute.java
index 22c3753..19356ae 100644
--- a/logo/src/xlogo/kernel/network/NetworkClientExecute.java
+++ b/logo/src/xlogo/kernel/network/NetworkClientExecute.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/network/NetworkClientSend.java b/logo/src/xlogo/kernel/network/NetworkClientSend.java
index 2954436..92525e6 100644
--- a/logo/src/xlogo/kernel/network/NetworkClientSend.java
+++ b/logo/src/xlogo/kernel/network/NetworkClientSend.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/network/NetworkServer.java b/logo/src/xlogo/kernel/network/NetworkServer.java
index f12b383..58e451d 100644
--- a/logo/src/xlogo/kernel/network/NetworkServer.java
+++ b/logo/src/xlogo/kernel/network/NetworkServer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/Conic.java b/logo/src/xlogo/kernel/perspective/Conic.java
index 6963b57..77c687a 100644
--- a/logo/src/xlogo/kernel/perspective/Conic.java
+++ b/logo/src/xlogo/kernel/perspective/Conic.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/Element3D.java b/logo/src/xlogo/kernel/perspective/Element3D.java
index d3473cf..69de12b 100644
--- a/logo/src/xlogo/kernel/perspective/Element3D.java
+++ b/logo/src/xlogo/kernel/perspective/Element3D.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/ElementLine.java b/logo/src/xlogo/kernel/perspective/ElementLine.java
index 5aa0a8a..6a80557 100644
--- a/logo/src/xlogo/kernel/perspective/ElementLine.java
+++ b/logo/src/xlogo/kernel/perspective/ElementLine.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/ElementPoint.java b/logo/src/xlogo/kernel/perspective/ElementPoint.java
index c77011a..b89fcd8 100644
--- a/logo/src/xlogo/kernel/perspective/ElementPoint.java
+++ b/logo/src/xlogo/kernel/perspective/ElementPoint.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/ElementPolygon.java b/logo/src/xlogo/kernel/perspective/ElementPolygon.java
index d0aa85b..8ae2168 100644
--- a/logo/src/xlogo/kernel/perspective/ElementPolygon.java
+++ b/logo/src/xlogo/kernel/perspective/ElementPolygon.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/FogDialog.java b/logo/src/xlogo/kernel/perspective/FogDialog.java
index 24b8bd1..49ed8c7 100644
--- a/logo/src/xlogo/kernel/perspective/FogDialog.java
+++ b/logo/src/xlogo/kernel/perspective/FogDialog.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/LightDialog.java b/logo/src/xlogo/kernel/perspective/LightDialog.java
index 13aa671..3638213 100644
--- a/logo/src/xlogo/kernel/perspective/LightDialog.java
+++ b/logo/src/xlogo/kernel/perspective/LightDialog.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/MyFog.java b/logo/src/xlogo/kernel/perspective/MyFog.java
index 1961fcc..9125216 100644
--- a/logo/src/xlogo/kernel/perspective/MyFog.java
+++ b/logo/src/xlogo/kernel/perspective/MyFog.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/MyLight.java b/logo/src/xlogo/kernel/perspective/MyLight.java
index 9c5c054..6285fea 100644
--- a/logo/src/xlogo/kernel/perspective/MyLight.java
+++ b/logo/src/xlogo/kernel/perspective/MyLight.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/Viewer3D.java b/logo/src/xlogo/kernel/perspective/Viewer3D.java
index e7bce56..0b7a312 100644
--- a/logo/src/xlogo/kernel/perspective/Viewer3D.java
+++ b/logo/src/xlogo/kernel/perspective/Viewer3D.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/perspective/World3D.java b/logo/src/xlogo/kernel/perspective/World3D.java
index d3ffcc5..19e0aa0 100644
--- a/logo/src/xlogo/kernel/perspective/World3D.java
+++ b/logo/src/xlogo/kernel/perspective/World3D.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/kernel/userspace/ErrorManager.java b/logo/src/xlogo/kernel/userspace/ErrorManager.java
index f1b18ec..975d5e7 100644
--- a/logo/src/xlogo/kernel/userspace/ErrorManager.java
+++ b/logo/src/xlogo/kernel/userspace/ErrorManager.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/GlobalVariableTable.java b/logo/src/xlogo/kernel/userspace/GlobalVariableTable.java
index 7d74560..21c04d1 100644
--- a/logo/src/xlogo/kernel/userspace/GlobalVariableTable.java
+++ b/logo/src/xlogo/kernel/userspace/GlobalVariableTable.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/ProcedureErrorMessage.java b/logo/src/xlogo/kernel/userspace/ProcedureErrorMessage.java
index 2e2afc8..6e26742 100644
--- a/logo/src/xlogo/kernel/userspace/ProcedureErrorMessage.java
+++ b/logo/src/xlogo/kernel/userspace/ProcedureErrorMessage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/PropertyListTable.java b/logo/src/xlogo/kernel/userspace/PropertyListTable.java
index 7764d60..f3af494 100644
--- a/logo/src/xlogo/kernel/userspace/PropertyListTable.java
+++ b/logo/src/xlogo/kernel/userspace/PropertyListTable.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/UserSpace.java b/logo/src/xlogo/kernel/userspace/UserSpace.java
index d3b79d6..82010e9 100644
--- a/logo/src/xlogo/kernel/userspace/UserSpace.java
+++ b/logo/src/xlogo/kernel/userspace/UserSpace.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/context/ContextManager.java b/logo/src/xlogo/kernel/userspace/context/ContextManager.java
index fe5dab7..3ec90a9 100644
--- a/logo/src/xlogo/kernel/userspace/context/ContextManager.java
+++ b/logo/src/xlogo/kernel/userspace/context/ContextManager.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/context/ContextSwitcher.java b/logo/src/xlogo/kernel/userspace/context/ContextSwitcher.java
index e38c645..e4ff9a5 100644
--- a/logo/src/xlogo/kernel/userspace/context/ContextSwitcher.java
+++ b/logo/src/xlogo/kernel/userspace/context/ContextSwitcher.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/context/LogoContext.java b/logo/src/xlogo/kernel/userspace/context/LogoContext.java
index 15bdc1f..6c93e1e 100644
--- a/logo/src/xlogo/kernel/userspace/context/LogoContext.java
+++ b/logo/src/xlogo/kernel/userspace/context/LogoContext.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -50,7 +50,7 @@ import xlogo.storage.global.GlobalConfig;
* to refactor the existing interpreter. It is for sure something that should be done in the future, when the entire interpreter is refactored.
*
* @author Marko Zivkovic -
- * @author Lo�c Le Coq - methods inherited from XLogo are marked with author-tag
+ * @author Loic Le Coq - methods inherited from XLogo are marked with author-tag
*/
public class LogoContext
{
@@ -243,7 +243,7 @@ public class LogoContext
/**
* That's the String that is sent via TCP, and interpreted by the receiver in {@link NetworkContext},
* using {@link #setWorkspace(String)}
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
* @author Marko Zivkovic
* refactored using the new data structures.
*/
diff --git a/logo/src/xlogo/kernel/userspace/context/NetworkContext.java b/logo/src/xlogo/kernel/userspace/context/NetworkContext.java
index 937e513..88b1ea0 100644
--- a/logo/src/xlogo/kernel/userspace/context/NetworkContext.java
+++ b/logo/src/xlogo/kernel/userspace/context/NetworkContext.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -58,7 +58,7 @@ public class NetworkContext extends LogoContext
* <p>
* Initially, in remote mode, the workspace was temporarily replaced by a new one.
* To indicate that the workspace with its procedures should not be displayed
- * in the editor, Lo�c had added setAffichable(false), meaning not displayable.<br>
+ * in the editor, Loic had added setAffichable(false), meaning not displayable.<br>
*
* Note that in XLogo, the workspace contained exactly one file. Therefore
* a simple swap in swap would do. However, in XLogo4Schools, we need more
diff --git a/logo/src/xlogo/kernel/userspace/context/RecordContext.java b/logo/src/xlogo/kernel/userspace/context/RecordContext.java
index 48237de..eb885ff 100644
--- a/logo/src/xlogo/kernel/userspace/context/RecordContext.java
+++ b/logo/src/xlogo/kernel/userspace/context/RecordContext.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/context/UserContext.java b/logo/src/xlogo/kernel/userspace/context/UserContext.java
index 064e665..cfa21d8 100644
--- a/logo/src/xlogo/kernel/userspace/context/UserContext.java
+++ b/logo/src/xlogo/kernel/userspace/context/UserContext.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/files/LogoFile.java b/logo/src/xlogo/kernel/userspace/files/LogoFile.java
index 92fe23c..e4ace39 100644
--- a/logo/src/xlogo/kernel/userspace/files/LogoFile.java
+++ b/logo/src/xlogo/kernel/userspace/files/LogoFile.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -37,6 +37,9 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import xlogo.Logo;
import xlogo.interfaces.ErrorDetector;
import xlogo.interfaces.ProcedureMapper;
@@ -65,7 +68,7 @@ import xlogo.utils.Utils;
* The file's text can be set using {@link #setTextFromReader(BufferedReader)}} (preferred) or {@link #setText(String)}}.
* Both will try to parse the signature of all procedures using the constructor of {@link xlogo.kernel.userspace.procedures.Procedure}
*
- * @author Marko Zivkovic, (Lo�c Le Coq's parsing of procedures is not recognizable anymore.)
+ * @author Marko Zivkovic, (Loic Le Coq's parsing of procedures is not recognizable anymore.)
*
*/
public class LogoFile extends StorableDocument implements ExecutablesContainer, ProcedureMapper, ErrorDetector
@@ -76,6 +79,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
*/
private static final long serialVersionUID = 1117062836862782516L;
+ private static Logger logger = LogManager.getLogger(LogoFile.class.getSimpleName());
+
/**
* UserConfig of the owner of this file
*/
@@ -120,6 +125,7 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
public static LogoFile createNewVirtualFile(String fileName)
{
+ logger.trace("Creating new virtual file " + fileName);
LogoFile file = null;
try
{
@@ -136,6 +142,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
*/
public static LogoFile createNewFile(String fileName) throws IOException, IllegalArgumentException
{
+ logger.trace("Creating new file " + fileName);
+
LogoFile file = new LogoFile(fileName);
file.setupFileSystem();
return file;
@@ -149,6 +157,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
*/
public static LogoFile loadFile(String fileName) throws IOException
{
+ logger.trace("Loading " + fileName + " from current workspace");
+
UserConfig userConfig = WSManager.getUserConfig();
File path = userConfig.getLogoFilePath(fileName);
String text = Utils.readLogoFile(path.toString());
@@ -168,6 +178,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
*/
public static LogoFile importFile(File path, String newFileName) throws IOException
{
+ logger.trace("Importing " + newFileName + " from " + path.getAbsolutePath() + "into current workspace");
+
String text = Utils.readLogoFile(path.toString());
LogoFile file = new LogoFile(newFileName);
file.setText(text);
@@ -190,6 +202,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
@Override
public void setFileName(String newFileName)
{
+ logger.trace("Renaming file " + getPlainName() + " to " + newFileName);
+
if (newFileName == null || newFileName.length() == 0)
{
DialogMessenger.getInstance().dispatchError(
@@ -268,6 +282,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
@Override
public void delete()
{
+ logger.trace("Deleting file " + getPlainName());
+
super.delete();
Collection<String> procedures = new ArrayList<String>(executables.keySet());
executables.clear();
@@ -285,6 +301,8 @@ public class LogoFile extends StorableDocument implements ExecutablesContainer,
*/
private void doBackup() throws IOException
{
+ logger.trace("Creating backup file of current version of " + getPlainName());
+
WorkspaceConfig wc = WSManager.getInstance().getWorkspaceConfigInstance();
NumberOfBackups nob = wc.getNumberOfBackups();
diff --git a/logo/src/xlogo/kernel/userspace/files/LogoFileContainer.java b/logo/src/xlogo/kernel/userspace/files/LogoFileContainer.java
index 9c077a9..a19c693 100644
--- a/logo/src/xlogo/kernel/userspace/files/LogoFileContainer.java
+++ b/logo/src/xlogo/kernel/userspace/files/LogoFileContainer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/files/LogoFilesManager.java b/logo/src/xlogo/kernel/userspace/files/LogoFilesManager.java
index 7a54902..4fb05a3 100644
--- a/logo/src/xlogo/kernel/userspace/files/LogoFilesManager.java
+++ b/logo/src/xlogo/kernel/userspace/files/LogoFilesManager.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/files/RecordFile.java b/logo/src/xlogo/kernel/userspace/files/RecordFile.java
index 9220f28..ed89646 100644
--- a/logo/src/xlogo/kernel/userspace/files/RecordFile.java
+++ b/logo/src/xlogo/kernel/userspace/files/RecordFile.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -40,7 +40,6 @@ import java.util.Date;
import javax.swing.Timer;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import xlogo.Logo;
import xlogo.interfaces.MessageBroadcaster;
import xlogo.messages.async.dialog.DialogMessenger;
@@ -78,11 +77,12 @@ public class RecordFile extends LogoFile implements MessageBroadcaster
/**
+ * @throws Exception
* @throws NotImplementedException A virtual contest/record mode makes no sense.
*/
- public static RecordFile createNewVirtualFile(UserConfig userConfig, String fileName)
+ public static RecordFile createNewVirtualFile(UserConfig userConfig, String fileName) throws Exception
{
- throw new NotImplementedException();
+ throw new Exception("Not implemented");
}
@Override
diff --git a/logo/src/xlogo/kernel/userspace/procedures/ExecutablesContainer.java b/logo/src/xlogo/kernel/userspace/procedures/ExecutablesContainer.java
index 73c7295..52fc419 100644
--- a/logo/src/xlogo/kernel/userspace/procedures/ExecutablesContainer.java
+++ b/logo/src/xlogo/kernel/userspace/procedures/ExecutablesContainer.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/procedures/ExecutablesProvider.java b/logo/src/xlogo/kernel/userspace/procedures/ExecutablesProvider.java
index 6ae20ea..045549e 100644
--- a/logo/src/xlogo/kernel/userspace/procedures/ExecutablesProvider.java
+++ b/logo/src/xlogo/kernel/userspace/procedures/ExecutablesProvider.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/procedures/Procedure.java b/logo/src/xlogo/kernel/userspace/procedures/Procedure.java
index c485432..f96975c 100644
--- a/logo/src/xlogo/kernel/userspace/procedures/Procedure.java
+++ b/logo/src/xlogo/kernel/userspace/procedures/Procedure.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written Lo�c Le Coq.
+ * Contents of this file were initially written Loic Le Coq.
* The were heavily refactored, changed and extended by Marko Zivkovic
*/
@@ -265,7 +265,7 @@ public class Procedure
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
*/
public void decoupe()
{
@@ -316,7 +316,7 @@ public class Procedure
}
/**
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
*/
private String deleteComments(String line)
{
@@ -338,7 +338,7 @@ public class Procedure
}
/**
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
*/
public String toString()
{
@@ -369,7 +369,7 @@ public class Procedure
}
/**
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
*/
public StringBuffer cutInList()
{
@@ -546,7 +546,7 @@ public class Procedure
/**
* Reads from sb into args the name and the default value of an optional variable [:a value]. <br>
* value can be expression: number, word, list, ...
- * @author Lo�c Le Coq
+ * @author Loic Le Coq
* @author Marko Zivkovic refactored
*/
void extractOptionalVariable(StringBuffer sb, String[] args)
diff --git a/logo/src/xlogo/kernel/userspace/procedures/ProcedureErrorType.java b/logo/src/xlogo/kernel/userspace/procedures/ProcedureErrorType.java
index 3029320..fbb096e 100644
--- a/logo/src/xlogo/kernel/userspace/procedures/ProcedureErrorType.java
+++ b/logo/src/xlogo/kernel/userspace/procedures/ProcedureErrorType.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/kernel/userspace/procedures/ProceduresManager.java b/logo/src/xlogo/kernel/userspace/procedures/ProceduresManager.java
index bcaea16..6ba638b 100644
--- a/logo/src/xlogo/kernel/userspace/procedures/ProceduresManager.java
+++ b/logo/src/xlogo/kernel/userspace/procedures/ProceduresManager.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/Message.java b/logo/src/xlogo/messages/Message.java
index 50a6749..ceea455 100644
--- a/logo/src/xlogo/messages/Message.java
+++ b/logo/src/xlogo/messages/Message.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/MessageKeys.java b/logo/src/xlogo/messages/MessageKeys.java
index 8da9013..d5c6403 100644
--- a/logo/src/xlogo/messages/MessageKeys.java
+++ b/logo/src/xlogo/messages/MessageKeys.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/Messenger.java b/logo/src/xlogo/messages/Messenger.java
index d27dc9c..42cec95 100644
--- a/logo/src/xlogo/messages/Messenger.java
+++ b/logo/src/xlogo/messages/Messenger.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/AbstractAsyncMessenger.java b/logo/src/xlogo/messages/async/AbstractAsyncMessenger.java
index e75fec5..3c8f662 100644
--- a/logo/src/xlogo/messages/async/AbstractAsyncMessenger.java
+++ b/logo/src/xlogo/messages/async/AbstractAsyncMessenger.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/AsyncMediumAdapter.java b/logo/src/xlogo/messages/async/AsyncMediumAdapter.java
index a52c617..fd7dc40 100644
--- a/logo/src/xlogo/messages/async/AsyncMediumAdapter.java
+++ b/logo/src/xlogo/messages/async/AsyncMediumAdapter.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/AsyncMessage.java b/logo/src/xlogo/messages/async/AsyncMessage.java
index 5c3c4a8..7478cd2 100644
--- a/logo/src/xlogo/messages/async/AsyncMessage.java
+++ b/logo/src/xlogo/messages/async/AsyncMessage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/AsyncMessenger.java b/logo/src/xlogo/messages/async/AsyncMessenger.java
index 99b3c3c..fea5206 100644
--- a/logo/src/xlogo/messages/async/AsyncMessenger.java
+++ b/logo/src/xlogo/messages/async/AsyncMessenger.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/dialog/DialogMessage.java b/logo/src/xlogo/messages/async/dialog/DialogMessage.java
index 2ab099d..20bc8d5 100644
--- a/logo/src/xlogo/messages/async/dialog/DialogMessage.java
+++ b/logo/src/xlogo/messages/async/dialog/DialogMessage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/dialog/DialogMessenger.java b/logo/src/xlogo/messages/async/dialog/DialogMessenger.java
index 95fa512..106cacb 100644
--- a/logo/src/xlogo/messages/async/dialog/DialogMessenger.java
+++ b/logo/src/xlogo/messages/async/dialog/DialogMessenger.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/history/HistoryMessage.java b/logo/src/xlogo/messages/async/history/HistoryMessage.java
index ae3222c..595ae97 100644
--- a/logo/src/xlogo/messages/async/history/HistoryMessage.java
+++ b/logo/src/xlogo/messages/async/history/HistoryMessage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/history/HistoryMessenger.java b/logo/src/xlogo/messages/async/history/HistoryMessenger.java
index e6bbbf7..dd36631 100644
--- a/logo/src/xlogo/messages/async/history/HistoryMessenger.java
+++ b/logo/src/xlogo/messages/async/history/HistoryMessenger.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/messages/async/history/HistoryWriter.java b/logo/src/xlogo/messages/async/history/HistoryWriter.java
index 65bcff6..60bfabd 100644
--- a/logo/src/xlogo/messages/async/history/HistoryWriter.java
+++ b/logo/src/xlogo/messages/async/history/HistoryWriter.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/Storable.java b/logo/src/xlogo/storage/Storable.java
index ad5adf2..97e19a3 100644
--- a/logo/src/xlogo/storage/Storable.java
+++ b/logo/src/xlogo/storage/Storable.java
@@ -1,25 +1,24 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/*
+ * XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
- *
* Contact Information: marko88zivkovic at gmail dot com
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details. You should have received a copy of the
- * GNU General Public License along with this program; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the
+ * GNU General Public License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
- *
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -30,54 +29,49 @@ package xlogo.storage;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
-import java.util.StringTokenizer;
-public abstract class Storable implements Serializable
-{
+public abstract class Storable implements Serializable {
/**
*
*/
private static final long serialVersionUID = 3506253939129765438L;
-
+
/**
* The file's name with extension
*/
- private String fileName;
+ private String fileName;
/**
* The Directory where this is stored
*/
- private File location;
-
+ private File location;
+
/**
* Dirty : an object is dirty if it was changed since it was loaded or stored the last time.
*/
- private transient boolean dirty = true;
+ private transient boolean dirty = true;
/**
* Will not be stored if virtual.
*/
- private transient boolean isVirtual = false;
+ private transient boolean isVirtual = false;
/*
* PATH BUILDERS
*/
- public static File getFile(File dir, String fileName)
- {
+ public static File getFile(File dir, String fileName) {
return new File(dir.toString() + File.separator + fileName);
}
-
- public static File getDirectory(File prefix, String dirName)
- {
+ public static File getDirectory(File prefix, String dirName) {
return new File(prefix.toString() + File.separator + dirName);
}
/*
* Abstract
*/
-
+
/**
* Store this object to the file specified by {@link #getFilePath()} if it is dirty
* @throws IOException
@@ -99,16 +93,14 @@ public abstract class Storable implements Serializable
public abstract String getFileNameExtension();
- public String getFileName()
- {
+ public String getFileName() {
return getPlainName() + getFileNameExtension();
}
/**
* @return FileName without file extension
*/
- public String getPlainName()
- {
+ public String getPlainName() {
return fileName;
}
@@ -128,15 +120,13 @@ public abstract class Storable implements Serializable
String ext = getFileNameExtension();
String oldName = getPlainName();
- String newName = newFileName.endsWith(ext) && newFileName.length() > ext.length() ?
- newFileName.substring(0, newFileName.length() - ext.length())
- : newFileName;
+ String newName = newFileName.endsWith(ext) && newFileName.length() > ext.length() ? newFileName.substring(0,
+ newFileName.length() - ext.length()) : newFileName;
if (newName.equals(oldName) && oldName != null)
return;
- if (isVirtual || oldName == null)
- {
+ if (isVirtual || oldName == null) {
this.fileName = newFileName;
return;
}
@@ -148,51 +138,64 @@ public abstract class Storable implements Serializable
return;
File newPath = getFilePath();
- if(newPath.exists())
- newPath.delete();
-
- oldPath.renameTo(newPath);
+ if (newPath.exists())
+ newPath.delete();
+
+ oldPath.renameTo(newPath);
}
/**
* @return the directory where this should be stored to.
*/
- public File getLocation()
- {
+ public File getLocation() {
return location;
}
/**
- * If the specified location does not exist yet, it is created using mkdirs.<br>
* To set null or a file that is not a directory or a directory with no write permissions is an error, as long as this is not virtual.<br>
* Setting location has no effect if this is virtual.<br>
* @param location - the directory where this should be stored to.
* @throws IOException
* @throws IOException If the specified location is not a directory or no write permissions exist, or the chosen name is not legal.
*/
- public void setLocation(File location) throws IllegalArgumentException
- {
- if(isVirtual)
- return;
+ public void setLocation(File location) throws IllegalArgumentException {
+ if (isVirtual) { return; }
- if (location == null)
- throw new IllegalArgumentException("Location must not be null.");
+ if (location == null) { throw new IllegalArgumentException("Location must not be null."); }
- if(!location.isDirectory())
- {
- location.mkdirs();
- }
- if(!location.isDirectory() || !location.canWrite())
- throw new IllegalArgumentException("Cannot store this to specified location : " + location.toString());
this.location = location;
makeDirty();
}
/**
+ * If the specified location does not exist yet, it is created using mkdirs.
+ */
+ public void mkDirs() {
+ mkDirs(location);
+ }
+
+ public void mkDirs(File location) {
+ if (!location.isDirectory()) {
+ location.mkdirs();
+ }
+ if (!location.isDirectory() || !location.canWrite()) { throw new IllegalArgumentException(
+ "Cannot store this to specified location : " + location.toString()); }
+ }
+
+ public void mkParentDirs(File file) {
+ File parent = file.getParentFile();
+ if (!parent.exists()) {
+ parent.mkdirs();
+ }
+
+ if (!parent.isDirectory() || !parent.canWrite()) { throw new IllegalArgumentException(
+ "Cannot store this to specified location : " + location.toString()); }
+ }
+
+ /**
* @return the file where this should be stored to. Returns null if {@link getLocation()} returns null.
*/
- public File getFilePath()
- {
+ public File getFilePath() {
if (getLocation() == null)
return null;
return getFile(getLocation(), getFileName());
@@ -201,32 +204,36 @@ public abstract class Storable implements Serializable
/**
* @return whether the file specified by {@link #getFilePath()} exists.
*/
- public boolean existsPhysically()
- {
+ public boolean existsPhysically() {
if (getFilePath() == null)
return false;
return getFilePath().exists();
- }
+ }
/*
* isDirty
*/
- public boolean isDirty() { return dirty; }
+ public boolean isDirty() {
+ return dirty;
+ }
/**
* Should be called from every setter that sets a property that should be stored later
* @see StorableObject#makeClean()
*/
- protected void makeDirty() { dirty = true; }
+ protected void makeDirty() {
+ dirty = true;
+ }
/**
* Should be called whenever this was synchronized with its version on the file system (load or store)
* @see StorableObject#makeDirty()
*/
- protected void makeClean() { dirty = false; }
-
+ protected void makeClean() {
+ dirty = false;
+ }
/*
* isVirtual
@@ -235,32 +242,35 @@ public abstract class Storable implements Serializable
/**
* @see #isVirtual()
*/
- protected void makeVirtual() { isVirtual = true; }
+ protected void makeVirtual() {
+ isVirtual = true;
+ }
+
/**
* A virtual object will not be stored on the file system, even though {@link store()} was called.
* This allows to use the application without having an actual user account and without automatic saving.
* @return
*/
- public boolean isVirtual() { return isVirtual; }
+ public boolean isVirtual() {
+ return isVirtual;
+ }
// The best I found : http://stackoverflow.com/questions/893977/java-how-to-find-out-whether-a-file-name-is-valid
// some windows specific chars are not contained...
- public static final String ILLEGAL_NAME_CHARACTERS = "/\n\r\t\0\f`?*\\<>|\":";
+ public static final String ILLEGAL_NAME_CHARACTERS = "/\n\r\t\0\f`?*\\<>|\":";
- public static boolean checkLegalName(String name)
- {
+ public static boolean checkLegalName(String name) {
if (name == null || name.length() == 0)
return false;
//StringTokenizer check = new StringTokenizer(name, ILLEGAL_NAME_CHARACTERS, true);
//return (check.countTokens() == 1);
- for(char c : name.toCharArray())
- {
+ for (char c : name.toCharArray()) {
if (ILLEGAL_NAME_CHARACTERS.indexOf(c) > -1)
return false;
}
-
+
return true;
}
diff --git a/logo/src/xlogo/storage/StorableDocument.java b/logo/src/xlogo/storage/StorableDocument.java
index 104f64d..d3fe8ed 100644
--- a/logo/src/xlogo/storage/StorableDocument.java
+++ b/logo/src/xlogo/storage/StorableDocument.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -37,6 +37,9 @@ import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.util.Calendar;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import xlogo.storage.user.UserConfig;
import xlogo.storage.workspace.WorkspaceConfig;
@@ -47,6 +50,8 @@ public abstract class StorableDocument extends Storable
*
*/
private static final long serialVersionUID = 8218323197066522297L;
+
+ private static Logger logger = LogManager.getLogger(StorableDocument.class.getSimpleName());
/**
* Contents of the file
@@ -87,6 +92,7 @@ public abstract class StorableDocument extends Storable
return;
File file = getFilePath();
+ logger.trace("Storing document: " + file.getAbsolutePath());
if (!file.getParentFile().exists())
file.getParentFile().mkdirs();
@@ -108,8 +114,10 @@ public abstract class StorableDocument extends Storable
@Override
public void storeCopyToFile(File file) throws IOException, IllegalArgumentException
{
+ logger.trace("Storing copy of " + getFileName() + " to " + file.getAbsolutePath());
try
{
+ mkParentDirs(file);
FileOutputStream f = new FileOutputStream(file);
BufferedOutputStream b = new BufferedOutputStream(f);
OutputStreamWriter osw = new OutputStreamWriter(b, "UTF8");
diff --git a/logo/src/xlogo/storage/StorableObject.java b/logo/src/xlogo/storage/StorableObject.java
index 085936a..f48665f 100644
--- a/logo/src/xlogo/storage/StorableObject.java
+++ b/logo/src/xlogo/storage/StorableObject.java
@@ -1,25 +1,24 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/*
+ * XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
- *
* Contact Information: marko88zivkovic at gmail dot com
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details. You should have received a copy of the
- * GNU General Public License along with this program; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the
+ * GNU General Public License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
- *
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -35,25 +34,29 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
/**
* The base class for anything that must be stored persistently.
* @author Marko Zivkovic
*/
public abstract class StorableObject extends Storable implements Serializable {
-
- private static final long serialVersionUID = -1738873382662156052L;
+
+ private static final long serialVersionUID = -1738873382662156052L;
+
+ private static Logger logger = LogManager.getLogger(StorableObject.class.getSimpleName());
/*
* PATH BUILDERS
*/
-
+
/**
* @param c
* @return X4S_ClassName.ser
*/
@SuppressWarnings("rawtypes")
- public static String getX4SObjectFileName(Class c)
- {
+ public static String getX4SObjectFileName(Class c) {
return "X4S_" + c.getSimpleName();
}
@@ -64,8 +67,7 @@ public abstract class StorableObject extends Storable implements Serializable {
* @return pathname for dir/X4S_ClassName.ser
*/
@SuppressWarnings("rawtypes")
- public static String getFilePath(File dir, Class c)
- {
+ public static String getFilePath(File dir, Class c) {
return dir.toString() + File.separator + getX4SObjectFileName(c);
}
@@ -75,23 +77,20 @@ public abstract class StorableObject extends Storable implements Serializable {
* @return file for pathname as defined by {@link #getFilePath(File, Class)}
*/
@SuppressWarnings("rawtypes")
- public static File getFile(File dir, Class c)
- {
+ public static File getFile(File dir, Class c) {
String path = getFilePath(dir, c) + ".ser";
return new File(path);
}
@Override
- public String getFileNameExtension()
- {
+ public String getFileNameExtension() {
return ".ser";
}
/**
* Constructor. The FileName will be equal to
*/
- public StorableObject()
- {
+ public StorableObject() {
setFileName(getX4SObjectFileName(getClass()));
}
@@ -99,24 +98,24 @@ public abstract class StorableObject extends Storable implements Serializable {
* Store & Load
*/
- public void store() throws IOException
- {
- if(isDirty() && !isVirtual())
+ public void store() throws IOException {
+ if (isDirty() && !isVirtual())
storeCopyToFile(getFilePath());
}
- public void storeCopyToFile(File file) throws IOException, IllegalArgumentException
- {
- if(file == null)
+ public void storeCopyToFile(File file) throws IOException, IllegalArgumentException {
+ if (file == null)
throw new IllegalArgumentException("file must not be null.");
- if (!isVirtual())
- {
+ logger.trace("Storing Object to " + file.getAbsolutePath());
+
+ if (!isVirtual()) {
+ mkParentDirs(file);
FileOutputStream fileOut = new FileOutputStream(file);
- ObjectOutputStream out = new ObjectOutputStream(fileOut);
- out.writeObject(this);
- out.close();
- fileOut.close();
+ ObjectOutputStream out = new ObjectOutputStream(fileOut);
+ out.writeObject(this);
+ out.close();
+ fileOut.close();
}
makeClean();
}
@@ -129,20 +128,22 @@ public abstract class StorableObject extends Storable implements Serializable {
* @throws ClassNotFoundException
* @throws ClassCastException
*/
- public static StorableObject loadObject(File file) throws IOException, ClassNotFoundException, ClassCastException
- {
+ public static StorableObject loadObject(File file) throws IOException, ClassNotFoundException, ClassCastException {
+ logger.trace("Loading Object from " + file.getAbsolutePath());
+
FileInputStream fileIn = new FileInputStream(file);
- ObjectInputStream in = new ObjectInputStream(fileIn);
- Object object = in.readObject();
- in.close();
- fileIn.close();
-
- if (!(object instanceof StorableObject))
- throw new ClassCastException("The specified file (" + file.toString() + ") does not contain an instance of Storable: " + object.getClass().toString());
-
- StorableObject storable = (StorableObject) object;
- storable.makeClean();
- return storable;
- }
+ ObjectInputStream in = new ObjectInputStream(fileIn);
+ Object object = in.readObject();
+ in.close();
+ fileIn.close();
+ if (!(object instanceof StorableObject))
+ throw new ClassCastException("The specified file (" + file.toString()
+ + ") does not contain an instance of Storable: " + object.getClass().toString());
+
+ StorableObject storable = (StorableObject) object;
+ storable.makeClean();
+ return storable;
+ }
+
}
diff --git a/logo/src/xlogo/storage/WSManager.java b/logo/src/xlogo/storage/WSManager.java
index 73ef556..e43c0f3 100644
--- a/logo/src/xlogo/storage/WSManager.java
+++ b/logo/src/xlogo/storage/WSManager.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/global/GlobalConfig.java b/logo/src/xlogo/storage/global/GlobalConfig.java
index 6cd9124..5c0a959 100644
--- a/logo/src/xlogo/storage/global/GlobalConfig.java
+++ b/logo/src/xlogo/storage/global/GlobalConfig.java
@@ -1,27 +1,22 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/*
+ * XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
- *
* Contact Information: marko88zivkovic at gmail dot com
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details. You should have received a copy of the
- * GNU General Public License along with this program; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the
+ * GNU General Public License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
- *
- *
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
- *
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
- *
* Contents of this file were entirely written by Marko Zivkovic
*/
@@ -38,13 +33,24 @@ import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
+import java.util.Map;
+import java.util.Map.Entry;
import java.util.TreeMap;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import net.samuelcampos.usbdrivedectector.USBDeviceDetectorManager;
+import net.samuelcampos.usbdrivedectector.USBStorageDevice;
+import net.samuelcampos.usbdrivedectector.events.IUSBDriveListener;
+import net.samuelcampos.usbdrivedectector.events.USBStorageEvent;
+import xlogo.AppSettings;
import xlogo.Logo;
import xlogo.messages.MessageKeys;
import xlogo.messages.async.dialog.DialogMessenger;
import xlogo.storage.StorableObject;
import xlogo.storage.WSManager;
+import xlogo.storage.user.UserConfig;
import xlogo.storage.workspace.WorkspaceConfig;
/**
@@ -52,91 +58,137 @@ import xlogo.storage.workspace.WorkspaceConfig;
* @author Marko Zivkovic
*/
public class GlobalConfig extends StorableObject implements Serializable {
-
- private static final long serialVersionUID = 2787615728665011813L;
- public static final String LOGO_FILE_EXTENSION = ".lgo";
- public static boolean DEBUG = true; // TODO set false
+ private static final long serialVersionUID = 2787615728665011813L;
+ private static Logger logger = LogManager.getLogger(GlobalConfig.class.getSimpleName());
+ public static final String LOGO_FILE_EXTENSION = ".lgo";
+ public static boolean DEBUG = true; // TODO set false
+
/**
* Creates the global config at default location, together with a virtual workspace
*/
- protected GlobalConfig()
- {
- try
- {
+ protected GlobalConfig() {
+ try {
setLocation(getDefaultLocation());
}
- catch (IllegalArgumentException ignore) { } // This is thrown if name illegal, but it is legal
+ catch (IllegalArgumentException ignore) {} // This is thrown if name illegal, but it is legal
workspaces = new TreeMap<String, String>();
workspaces.put(WorkspaceConfig.VIRTUAL_WORKSPACE, "");
+ workspaces.put(WorkspaceConfig.USER_DEFAULT_WORKSPACE, WorkspaceConfig.getDefaultWorkspaceDirectory().getAbsolutePath());
}
/**
* If GlobalConfig exists on the file system in default location, it is loaded, otherwise it will be created there.
* @return
*/
- public static GlobalConfig create()
- {
+ public static GlobalConfig create() {
File gcf = getFile(getDefaultLocation(), GlobalConfig.class);
GlobalConfig globalConfig = null;
-
- try
- {
- if (gcf.exists())
+ if (gcf.exists()) {
+ logger.trace("Try to read GlobalConfig from " + gcf.getAbsolutePath());
+ try {
globalConfig = (GlobalConfig) loadObject(gcf);
- else
- {
+ }
+ catch (Exception e) {
+ logger.error("GlobalConfig was corrupted.");
+ DialogMessenger.getInstance().dispatchError(
+ "Error while loading configuration files",
+ "Could not read GlobalConfig file " + e.toString()
+ + "\n Instead creating a new one.\nYou might need to import you workspaces manually.");
+ gcf.delete();
+ globalConfig = null;
+ }
+ }
+
+ if (globalConfig == null) {
+ try {
+ logger.info(gcf.getAbsolutePath() + " not found. Creating new.");
globalConfig = new GlobalConfig();
globalConfig.store();
}
- }catch(Exception e)
- {
- // Best effort : We will try to operate the program without storing anything on disk
- globalConfig = getNewVirtualInstance();
- DialogMessenger.getInstance().dispatchError("Error while setting up XLogo4Schools", "Could not create or open GlobalConfig file at default location: " + e.toString());
+ catch (Exception e) {
+ // Best effort : We will try to operate the program without storing anything on disk
+ logger.error("Cannot store global config at " + gcf.getAbsolutePath() + ". Running in virtual mode.");
+ globalConfig = getNewVirtualInstance();
+ DialogMessenger.getInstance().dispatchError("Error while setting up XLogo4Schools",
+ "Could not create or open GlobalConfig file at default location: " + e.toString());
+ }
}
- globalConfig.enterLastUsedWorkspace();// This is used to have a workspace ready at the beginning, without any user interaction.
+ globalConfig.init();
return globalConfig;
}
- public static GlobalConfig getNewVirtualInstance()
- {
+ protected void init(){
+ logger.trace("Initialize");
+ initUSBWorkspaces();
+ cleanUpWorkspaces();
+ enterInitialWorkspace();
+ }
+
+ private void cleanUpWorkspaces() {
+ logger.trace("Cleaning up workspaces.");
+ Map<String, String> existingWorkspaces = new TreeMap<String, String>();
+ Map<String, String> lostWorkspaces = new TreeMap<String, String>();
+ for (Entry<String, String> e : workspaces.entrySet()) {
+ File file = new File(e.getValue());
+ if (file.exists() || WorkspaceConfig.isSpecialWorkspace(e.getKey(), e.getValue())) {
+ logger.trace("\tConfirmed existence: " + e.getKey() + " at " + e.getValue());
+ existingWorkspaces.put(e.getKey(), e.getValue());
+ }
+ else {
+ logger.trace("\tLost workspace: " + e.getKey() + " at " + e.getValue());
+ if (e.getKey().equals(lastUsedWorkspace)){
+ lastUsedWorkspace = null;
+ currentWorkspace = null;
+ }
+ lostWorkspaces.put(e.getKey(), e.getValue());
+ }
+ }
+
+ if(!existingWorkspaces.containsKey(WorkspaceConfig.USER_DEFAULT_WORKSPACE)){
+ // This might be the case if the GlobalConfig version stored on the disk comes from a version
+ // that did not contain a default workspace
+ existingWorkspaces.put(WorkspaceConfig.USER_DEFAULT_WORKSPACE, WorkspaceConfig.getDefaultWorkspaceLocation().getAbsolutePath());
+ }
+
+ if (lostWorkspaces.size() > 0) {
+ StringBuilder msg = new StringBuilder();
+ msg.append("Some workspaces could not be found:\n"); // TODO translate
+ for (Entry<String, String> e : lostWorkspaces.entrySet()) {
+ msg.append("\t").append(e.getKey()).append(" at ").append(e.getValue()).append("\n");
+ }
+ DialogMessenger.getInstance().dispatchMessage(msg.toString());
+ }
+ workspaces = existingWorkspaces;
+ }
+
+ public static GlobalConfig getNewVirtualInstance() {
GlobalConfig gc = new GlobalConfig();
gc.makeVirtual();
return gc;
}
- /**
- * @return File from system property "user.home"
- */
- public static File getDefaultLocation()
- {
- return new File(System.getProperty("user.home"));
- }
-
- /*
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Physical Workspaces (stored on file system)
- */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- public void createWorkspace(File dir, String workspaceName) throws IOException
- {
+ public void createWorkspace(File dir, String workspaceName) throws IOException {
+ logger.trace("Creating workspace '" + workspaceName + "' at " + dir.getAbsolutePath());
if (WorkspaceConfig.createNewWorkspace(dir, workspaceName) != null)
addWorkspace(workspaceName, dir.toString());
}
- public void importWorkspace(File workspaceDir, String wsName)
- {
- if(!WSManager.isWorkspaceDirectory(workspaceDir))
- {
- DialogMessenger.getInstance().dispatchError(
- Logo.messages.getString(MessageKeys.WS_ERROR_TITLE),
+ public void importWorkspace(File workspaceDir, String workspaceName) {
+ logger.trace("Importing workspace '" + workspaceName + "' from " + workspaceDir.getAbsolutePath());
+ if (!WSManager.isWorkspaceDirectory(workspaceDir)) {
+ DialogMessenger.getInstance().dispatchError(Logo.messages.getString(MessageKeys.WS_ERROR_TITLE),
workspaceDir + " " + Logo.messages.getString(MessageKeys.WS_NOT_A_WORKSPACE_DIRECTORY));
return;
}
- addWorkspace(wsName, workspaceDir.getParent());
+ addWorkspace(workspaceName, workspaceDir.getParent());
}
/**
@@ -145,93 +197,181 @@ public class GlobalConfig extends StorableObject implements Serializable {
* @return the specified workspace or null if it does not exist.
* @throws IOException
*/
- private WorkspaceConfig retrieveWorkspace(String workspaceName) throws IOException
- {
- if(!existsWorkspace(workspaceName))
- {
- System.out.print("Attempting to load an inexistent workspace.");
+ private WorkspaceConfig retrieveWorkspace(String workspaceName) throws IOException {
+ WorkspaceConfig wsc = getLoadedWorkspace(workspaceName);
+ if (wsc != null) {
+ logger.trace("Retrieving cached workspace: " + workspaceName);
+ return wsc;
+ }
+
+ if (!existsWorkspace(workspaceName)) {
+ logger.warn("Attempting to load an inexistent workspace: " + workspaceName);
return null;
}
- File dir = getWorkspaceLocation(workspaceName);
- WorkspaceConfig wc = WorkspaceConfig.loadWorkspace(dir, workspaceName);
- if (wc == null)
- {
+ File location = getWorkspaceLocation(workspaceName);
+
+ if (WorkspaceConfig.isDefaultWorkspace(workspaceName, location)) {
+ logger.trace("Retrieving Default workspace from: " + location.getAbsolutePath());
+ wsc = getDefaultWorkspace();
+ }
+ else if (isUSBDrive(workspaceName)) {
+ logger.trace("Retrieving USB workspace: " + workspaceName);
+ wsc = initUSBDrive(workspaceName);
+ }
+ else {
+ logger.trace("Retrieving workspace: " + workspaceName + " from " + location.getAbsolutePath());
+ wsc = WorkspaceConfig.loadWorkspace(location, workspaceName);
+ }
+
+ if (wsc == null) {
WSManager.getInstance().deleteWorkspace(workspaceName, false);
}
- return wc;
+ cacheWorkspace(workspaceName, wsc);
+
+ return wsc;
+ }
+
+ private WorkspaceConfig getDefaultWorkspace() throws IOException{
+ File wsDir = WorkspaceConfig.getDefaultWorkspaceDirectory();
+ File wsFile = getFile(wsDir, WorkspaceConfig.class);
+ File wsLocation = WorkspaceConfig.getDefaultWorkspaceLocation();
+ WorkspaceConfig wsc = null;
+ if (wsFile.exists()) {
+ wsc = WorkspaceConfig.loadWorkspace(wsLocation, WorkspaceConfig.USER_DEFAULT_WORKSPACE);
+ } else {
+ wsc = WorkspaceConfig.createNewWorkspace(wsLocation, WorkspaceConfig.USER_DEFAULT_WORKSPACE);
+ wsc.setAllowUserCreation(true);
+ wsc.createUser(UserConfig.DEFAULT_USER);
+ }
+ return wsc;
}
- /*
- * Logical Workspaces (name and location stored in Map)
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Workspace Cache
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ /**
+ * Workspace Objects that have already been created or loaded from disk.
*/
+ private transient Map<String, WorkspaceConfig> cachedWorkspaces;
+
+ private WorkspaceConfig getLoadedWorkspace(String workspaceName) {
+ if (cachedWorkspaces == null) {
+ cachedWorkspaces = new TreeMap<String, WorkspaceConfig>();
+ }
+ return cachedWorkspaces.get(workspaceName);
+ }
+
+ private void cacheWorkspace(String workspaceName, WorkspaceConfig wsc) {
+ cachedWorkspaces.put(workspaceName, wsc);
+ }
- private TreeMap<String,String> workspaces;
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Workspaces
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ /**
+ * Logical Workspaces (name and location stored in Map)
+ */
+ private Map<String, String> workspaces;
/**
* @param workspaceName
* @param location where the workspace is located: location/workspaceName/
*/
- public void addWorkspace(String workspaceName, String location)
- {
+ public void addWorkspace(String workspaceName, String location) {
+ logger.trace("Adding workspace: '" + workspaceName + "' at " + location);
workspaces.put(workspaceName, location);
makeDirty();
notifyWorkspaceListChanged();
+ setLastUsedWorkspace(workspaceName);
+ enterInitialWorkspace();
}
- public void removeWorkspace(String workspaceName)
- {
+ public void removeWorkspace(String workspaceName) {
+ logger.trace("Removing workspace: " + workspaceName);
workspaces.remove(workspaceName);
+ cachedWorkspaces.remove(workspaceName);
makeDirty();
notifyWorkspaceListChanged();
+ if(lastUsedWorkspace.equals(workspaceName)){
+ lastUsedWorkspace = null;
+ currentWorkspace = null;
+ enterInitialWorkspace();
+ }
+ }
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Workspace File Utility
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ /**
+ * @return File from system property "user.home"
+ */
+ public static File getDefaultLocation() {
+ return new File(System.getProperty("user.home"));
}
/**
* @param wsName
- * @return the location of the workspace in the file system, or null if the workspace does not exist
+ * @return the parent directory of the workspace directory, or null if the workspace does not exist
*/
- public File getWorkspaceLocation(String wsName)
- {
+ public File getWorkspaceLocation(String wsName) {
String location = workspaces.get(wsName);
- if(location == null)
+ if (location == null)
return null;
return new File(location);
}
- public File getWorkspaceDirectory(String wsName)
- {
+ /**
+ * @param wsName
+ * @return The workspace Directory that contains a physical representation of {@link WorkspaceConfig}
+ */
+ public File getWorkspaceDirectory(String wsName) {
File wsLocation = getWorkspaceLocation(wsName);
- if(wsLocation == null)
+ if (wsLocation == null)
return null;
return new File(wsLocation.toString() + File.separator + wsName);
}
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Workspaces
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* @return the names of all existing workspaces
*/
- public String[] getAllWorkspaces()
- {
+ public String[] getAllWorkspaces() {
return (String[]) workspaces.keySet().toArray(new String[workspaces.size()]);
}
-
+
/**
* A workspace exists logically, if its location is known by the GlobalConfig.
* @param workspace
* @return
*/
- public boolean existsWorkspace(String workspace)
- {
- return getWorkspaceLocation(workspace) != null;
+ public boolean existsWorkspace(String workspace) {
+ return workspaces.get(workspace) != null;
}
- /*
+
+ public String getFirstUSBWorkspace() {
+ for (String ws : workspaces.keySet()) {
+ if (isUSBDrive(ws)) { return ws; }
+ }
+ return null;
+ }
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Last used workspace
- */
- private String lastUsedWorkspace;
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- public String getLastUsedWorkspace()
- {
+ private String lastUsedWorkspace;
+
+ public String getLastUsedWorkspace() {
return lastUsedWorkspace;
}
@@ -239,46 +379,63 @@ public class GlobalConfig extends StorableObject implements Serializable {
* Succeeds if the workspace exists
* @param workspace
*/
- private void setLastUsedWorkspace(String workspace)
- {
- if(existsWorkspace(workspace))
- {
- lastUsedWorkspace = new String(workspace);
+ private void setLastUsedWorkspace(String workspace) {
+ if (existsWorkspace(workspace)) {
+ lastUsedWorkspace = workspace;
makeDirty();
}
}
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Current Workspace
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ private transient WorkspaceConfig currentWorkspace;
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Entering and Leaving Workspaces
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ public WorkspaceConfig getCurrentWorkspace() {
+ return currentWorkspace;
+ }
+
/**
* This is used to have a workspace ready at the beginning, without any user interaction.
* <p>
- * Enters the workspace that was used the last time XLogo4Schools was run on this computer.
- * If no regular workspace is available, a purely logical "virtual workspace" is entered instead.
+ * Tries to enter workspaces with the following priority.
+ * 1. Last used workspace (if any)
+ * 2. Default workspace, if there is no last used workspace
+ * 3. Virtual Workspace, if entering or creating the default workspace failed for some reason.
*/
- private void enterLastUsedWorkspace()
- {
- String last = getLastUsedWorkspace();
+ private void enterInitialWorkspace() {
+ logger.trace("Entering initial workspace.");
+
+ String initialWs = getFirstUSBWorkspace();
+
+ if (initialWs == null) {
+ initialWs = getLastUsedWorkspace();
+ }
- if(last == null || !existsWorkspace(last))
- last = WorkspaceConfig.VIRTUAL_WORKSPACE; // this exists, see constructor
+ if (initialWs == null) {
+ initialWs = WorkspaceConfig.USER_DEFAULT_WORKSPACE;
+ }
+
+ if (initialWs == null) {
+ initialWs = WorkspaceConfig.VIRTUAL_WORKSPACE; // this exists, see constructor
+ }
try {
- enterWorkspace(last);
- } catch (IOException e1) {
- try { enterWorkspace(WorkspaceConfig.VIRTUAL_WORKSPACE); } catch (IOException e2) { }
+ enterWorkspace(initialWs);
+ }
+ catch (IOException e1) {
+ try {
+ enterWorkspace(WorkspaceConfig.VIRTUAL_WORKSPACE);
+ }
+ catch (IOException e2) {}
DialogMessenger.getInstance().dispatchError("Workspace Error", "Cannot enter workspace: " + e1.toString());
}
}
-
- /*
- * Current Workspace
- */
-
- private transient WorkspaceConfig currentWorkspace;
-
- public WorkspaceConfig getCurrentWorkspace()
- {
- return currentWorkspace;
- }
/**
* Load the workspace
@@ -286,10 +443,9 @@ public class GlobalConfig extends StorableObject implements Serializable {
* @param workspaceName - the workspace to load and enter
* @throws IOException - if the workspace could not be loaded
*/
- public void enterWorkspace(String workspaceName) throws IOException
- {
- if(currentWorkspace != null)
- {
+ public void enterWorkspace(String workspaceName) throws IOException {
+ logger.trace("Entering workspace: " + workspaceName);
+ if (currentWorkspace != null) {
leaveWorkspace();
}
currentWorkspace = retrieveWorkspace(workspaceName);
@@ -299,35 +455,130 @@ public class GlobalConfig extends StorableObject implements Serializable {
setLastUsedWorkspace(workspaceName);
notifyWorkspacEntered();
+
+ currentWorkspace.enterInitialUserSpace();
+
+ AppSettings.getInstance().setLanguage(currentWorkspace.getLanguage());
}
/**
+ * Afterwards, currentWorkspace is null
* @throws IOException If workspace could not be saved.
*/
- void leaveWorkspace() throws IOException
- {
- if(currentWorkspace == null)
+ public void leaveWorkspace() throws IOException {
+ if (currentWorkspace == null)
throw new IllegalStateException("Attempt to leave workspace without being in one.");
+ logger.trace("Leaving workspace: " + currentWorkspace.getWorkspaceName());
- if(currentWorkspace.getActiveUser() != null)
- {
+ if (currentWorkspace.getActiveUser() != null) {
currentWorkspace.leaveUserSpace();
}
- if(currentWorkspace.isDirty())
+ if (currentWorkspace.isDirty())
currentWorkspace.store();
currentWorkspace = null;
}
-
- /*
- * Password protection
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * USB Detection & Handling
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ private transient USBDeviceDetectorManager driveDetector;
+
+ /**
+ * Detect External Drives
*/
+ protected void initUSBWorkspaces() {
+ driveDetector = new USBDeviceDetectorManager(800);
+
+ for (USBStorageDevice rmDevice : driveDetector.getRemovableDevices()) {
+ if (rmDevice.canRead() && rmDevice.canWrite()) {
+ addUSBDrive(rmDevice);
+ }
+ }
+
+ driveDetector.addDriveListener(new IUSBDriveListener(){
+
+ @Override
+ public void usbDriveEvent(USBStorageEvent event) {
+ USBStorageDevice rmDevice = event.getStorageDevice();
+ switch (event.getEventType()) {
+ case CONNECTED:
+ addUSBDrive(rmDevice);
+ break;
+ case REMOVED:
+ removeUSBDrive(rmDevice);
+ break;
+ }
+ }
+ });
+ }
+
+ protected void addUSBDrive(USBStorageDevice rmDevice) {
+ if (getWorkspaceDirectory(rmDevice.getSystemDisplayName()) == null) {
+ logger.trace("USB Drive attached: " + rmDevice);
+ String deviceName = rmDevice.getSystemDisplayName();
+ File location = rmDevice.getRootDirectory();
+ addWorkspace(deviceName, location.getAbsolutePath());
+ }
+ }
+
+ protected void removeUSBDrive(USBStorageDevice rmDevice) {
+ logger.trace("USB Drive removed: " + rmDevice);
+ String deviceName = rmDevice.getSystemDisplayName();
+ removeWorkspace(deviceName);
+ }
+
+ protected WorkspaceConfig initUSBDrive(String deviceName) throws IOException {
+ logger.trace("Initializing USB Drive: " + deviceName);
+ File usbRoot = null;
+ for (USBStorageDevice device : driveDetector.getRemovableDevices()) {
+ if (deviceName.equals(device.getSystemDisplayName())) {
+ usbRoot = device.getRootDirectory();
+ break;
+ }
+ }
+ if (usbRoot == null) { return null; }
+
+ File wsDir = WorkspaceConfig.getDirectory(usbRoot, WorkspaceConfig.USB_DEFAULT_WORKSPACE);
+ File wsConfigFile = WorkspaceConfig.getFile(wsDir, WorkspaceConfig.class);
+
+ WorkspaceConfig wsc = null;
+ if (wsConfigFile.exists()) {
+ logger.trace("Loading USB workspace from " + wsDir.getAbsolutePath());
+ wsc = WorkspaceConfig.loadWorkspace(usbRoot, WorkspaceConfig.USB_DEFAULT_WORKSPACE);
+ for (String user : wsc.getUserList()) {
+ logger.trace("\t Having user " + user);
+ }
+ }
+ else {
+ logger.trace("Creating new temporary USB workspace at " + usbRoot);
+ wsc = WorkspaceConfig.createDeferredWorkspace(usbRoot, WorkspaceConfig.USB_DEFAULT_WORKSPACE);
+ wsc.setAllowUserCreation(true);
+ }
+ return wsc;
+ }
+
+ /* *
+ * Workspace Types
+ * */
+
+ public boolean isUSBDrive(String workspaceName) {
+ for (USBStorageDevice device : driveDetector.getRemovableDevices()) {
+ if (workspaceName.equals(device.getSystemDisplayName())) { return true; }
+ }
+ return false;
+ }
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Password protection
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* if null, no password is requested
*/
- private byte[] masterPassword = null;
+ private byte[] masterPassword = null;
/**
* Need old password to authenticate
@@ -335,28 +586,25 @@ public class GlobalConfig extends StorableObject implements Serializable {
* @param newPw
* @return success
*/
- public boolean setNewPassword(String oldPw, String newPw)
- {
- if(masterPassword == null || authenticate(oldPw))
- {
+ public boolean setNewPassword(String oldPw, String newPw) {
+ if (masterPassword == null || authenticate(oldPw)) {
if (newPw == null)
masterPassword = null;
else
masterPassword = hash(newPw);
makeDirty();
return true;
- }else
- {
+ }
+ else {
return false;
}
}
- public boolean isPasswordRequired()
- {
+ public boolean isPasswordRequired() {
return masterPassword != null;
}
- public boolean authenticate(String password){
+ public boolean authenticate(String password) {
if (masterPassword == null)
return true;
String entered = null;
@@ -373,69 +621,79 @@ public class GlobalConfig extends StorableObject implements Serializable {
* @param text
* @return hashed bytes
*/
- private byte[] hash(String text)
- {
+ private byte[] hash(String text) {
if (text == null)
return null;
byte[] bytesOfMessage;
try {
bytesOfMessage = text.getBytes("UTF-8");
- } catch (UnsupportedEncodingException e1) {
+ }
+ catch (UnsupportedEncodingException e1) {
bytesOfMessage = text.getBytes(); // this should not happen anyway
}
-
+
try {
MessageDigest md = MessageDigest.getInstance("MD5");
return md.digest(bytesOfMessage);
- } catch (NoSuchAlgorithmException e) {
+ }
+ catch (NoSuchAlgorithmException e) {
return bytesOfMessage; // this should not happen anyway
}
}
- /*
- * PATH
- */
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Path variable
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
- * This Stack contains all startup files
+ * Path to the current directory for the Logo environment
*/
- private ArrayList<String> path = new ArrayList<String>();
+ private ArrayList<String> path = new ArrayList<String>();
public ArrayList<String> getPath() {
return path;
}
-
-
+
public void setPath(ArrayList<String> path) {
this.path = path;
makeDirty();
}
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Application Meta Data
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ /**
+ * This is not really used. Artifact from the past.
+ * @return
+ */
public static String getVersion() {
return "XLogo4Schools 0.0.1";
}
-
- /**
+
+ /* *
* Note : should be equal as in {@link Lanceur}
*/
//private static String PROPERTIES_PREFIX = "ch.ethz.abz.xlogo4schools";
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * JRE Memory allocation parameters
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
/**
* Note : should be equal as in {@link Lanceur}
*/
- private static int DEFAULT_MEMORY_ALLOC = 128;
+ private static int DEFAULT_MEMORY_ALLOC = 128;
- private static int maximumMemory;
+ private static int maximumMemory;
/**
* The Maximum amount of memory that this application is allowed to consume by the JVM
* @return
*/
- public static int getMaximumMemory()
- {
- if (maximumMemory < 64)
- {
+ public static int getMaximumMemory() {
+ if (maximumMemory < 64) {
// This doesn't work as expected :-(
//Preferences prefs = Preferences.systemRoot().node(PROPERTIES_PREFIX);
//maximumMemory = prefs.getInt("appMemory", DEFAULT_MEMORY_ALLOC);
@@ -444,51 +702,51 @@ public class GlobalConfig extends StorableObject implements Serializable {
return maximumMemory;
}
- private transient int maxMemoryAtNextStart = getMaximumMemory();
-
- public static final Font[] fonts = GraphicsEnvironment
- .getLocalGraphicsEnvironment().getAllFonts();// Toolkit.getDefaultToolkit().getFontList();
-
+ private transient int maxMemoryAtNextStart = getMaximumMemory();
+
/**
* @return The amount of memory in MB that Lanceur will cause JVM to allocate to XLogo4Schools the next time this application is started.
*/
- public int getMaxMemoryAtNextStart()
- {
+ public int getMaxMemoryAtNextStart() {
if (maxMemoryAtNextStart < 64)
maxMemoryAtNextStart = getMaximumMemory();
return maxMemoryAtNextStart;
}
+
/**
* @see #getMaxMemoryAtNextStart()
* cannot set this below 64MB
* @param maxMemory
*/
- public void setMaxMemoryAtNextStart(int maxMemory)
- {
+ public void setMaxMemoryAtNextStart(int maxMemory) {
if (maxMemory < 64)
return;
// This doesn't work as well :-(
//Preferences prefs = Preferences.systemRoot().node(PROPERTIES_PREFIX);
//prefs.putInt("appMemory", maxMemory);
}
-
- static public int police_id(Font font) {
- for (int i = 0; i < fonts.length; i++) {
- if (fonts[i].getFontName().equals(font.getFontName()))
- return i;
- }
- return 0;
- }
/**
* The amount of memory that the memory checker allows the application to consume.
* It's 0.9*{@link #getMaximumMemory()}} in bytes.
*/
- public static long getMemoryThreshold()
- {
+ public static long getMemoryThreshold() {
return (long) (0.9 * ((long) GlobalConfig.getMaximumMemory() * 1024L * 1024L));
}
-
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Fonts
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ public static final Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment()
+ .getAllFonts(); // Toolkit.getDefaultToolkit().getFontList();
+ static public int getFontId(Font font) {
+ for (int i = 0; i < fonts.length; i++) {
+ if (fonts[i].getFontName().equals(font.getFontName()))
+ return i;
+ }
+ return 0;
+ }
/* * * * * * *
* Event Handling
@@ -496,50 +754,46 @@ public class GlobalConfig extends StorableObject implements Serializable {
// workspace list change
- private transient ArrayList<ActionListener> workspaceListChangeListeners;
+ private transient ArrayList<ActionListener> workspaceListChangeListeners;
- public void addWorkspaceListChangeListener(ActionListener listener)
- {
+ public void addWorkspaceListChangeListener(ActionListener listener) {
if (workspaceListChangeListeners == null)
workspaceListChangeListeners = new ArrayList<ActionListener>();
workspaceListChangeListeners.add(listener);
}
- public void removeWorkspaceListChangeListener(ActionListener listener)
- {
+ public void removeWorkspaceListChangeListener(ActionListener listener) {
workspaceListChangeListeners.remove(listener);
}
- private void notifyWorkspaceListChanged()
- {
+ private void notifyWorkspaceListChanged() {
+ if (workspaceListChangeListeners == null)
+ workspaceListChangeListeners = new ArrayList<ActionListener>();
ActionEvent event = new ActionEvent(this, 0, "workspaceListChanged");
for (ActionListener listener : workspaceListChangeListeners)
listener.actionPerformed(event);
}
-
+
// enter workspace event
- private transient ArrayList<ActionListener> enterWorkspaceListeners;
+ private transient ArrayList<ActionListener> enterWorkspaceListeners;
- public void addEnterWorkspaceListener(ActionListener listener)
- {
+ public void addEnterWorkspaceListener(ActionListener listener) {
if (enterWorkspaceListeners == null)
enterWorkspaceListeners = new ArrayList<ActionListener>();
enterWorkspaceListeners.add(listener);
}
- public void removeEnterWorkspaceListener(ActionListener listener)
- {
+ public void removeEnterWorkspaceListener(ActionListener listener) {
enterWorkspaceListeners.remove(listener);
}
- private void notifyWorkspacEntered()
- {
+ private void notifyWorkspacEntered() {
if (enterWorkspaceListeners == null)
return;
ActionEvent event = new ActionEvent(this, 0, "workspaceEntered");
for (ActionListener listener : enterWorkspaceListeners)
listener.actionPerformed(event);
}
-
+
}
diff --git a/logo/src/xlogo/storage/user/DrawQuality.java b/logo/src/xlogo/storage/user/DrawQuality.java
index 565bb53..5d14360 100644
--- a/logo/src/xlogo/storage/user/DrawQuality.java
+++ b/logo/src/xlogo/storage/user/DrawQuality.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/user/LookAndFeel.java b/logo/src/xlogo/storage/user/LookAndFeel.java
index b4a2187..13d07c1 100644
--- a/logo/src/xlogo/storage/user/LookAndFeel.java
+++ b/logo/src/xlogo/storage/user/LookAndFeel.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/user/PenShape.java b/logo/src/xlogo/storage/user/PenShape.java
index cce19ee..52fee5b 100644
--- a/logo/src/xlogo/storage/user/PenShape.java
+++ b/logo/src/xlogo/storage/user/PenShape.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/user/UserConfig.java b/logo/src/xlogo/storage/user/UserConfig.java
index c2f85c5..2d6b1c0 100644
--- a/logo/src/xlogo/storage/user/UserConfig.java
+++ b/logo/src/xlogo/storage/user/UserConfig.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -57,6 +57,8 @@ public class UserConfig extends StorableObject implements Serializable
{
private static final long serialVersionUID = 8897730869795295485L;
+ public static final String DEFAULT_USER = "Default User";
+
// This was initially in Panel_Font, which is not used anymore.
public static final Font[] fontes = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
diff --git a/logo/src/xlogo/storage/workspace/ContestConfig.java b/logo/src/xlogo/storage/workspace/ContestConfig.java
index 197e4d5..87584f0 100644
--- a/logo/src/xlogo/storage/workspace/ContestConfig.java
+++ b/logo/src/xlogo/storage/workspace/ContestConfig.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/workspace/Language.java b/logo/src/xlogo/storage/workspace/Language.java
index f19b3ac..df32f70 100644
--- a/logo/src/xlogo/storage/workspace/Language.java
+++ b/logo/src/xlogo/storage/workspace/Language.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/workspace/NumberOfBackups.java b/logo/src/xlogo/storage/workspace/NumberOfBackups.java
index 1c8d4b2..3aa3534 100644
--- a/logo/src/xlogo/storage/workspace/NumberOfBackups.java
+++ b/logo/src/xlogo/storage/workspace/NumberOfBackups.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/workspace/SyntaxHighlightConfig.java b/logo/src/xlogo/storage/workspace/SyntaxHighlightConfig.java
index ac89e64..b4fcf10 100644
--- a/logo/src/xlogo/storage/workspace/SyntaxHighlightConfig.java
+++ b/logo/src/xlogo/storage/workspace/SyntaxHighlightConfig.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,10 +16,10 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
diff --git a/logo/src/xlogo/storage/workspace/WorkspaceConfig.java b/logo/src/xlogo/storage/workspace/WorkspaceConfig.java
index 9a3b60a..3a09e41 100644
--- a/logo/src/xlogo/storage/workspace/WorkspaceConfig.java
+++ b/logo/src/xlogo/storage/workspace/WorkspaceConfig.java
@@ -1,25 +1,25 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/*
+ * XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details. You should have received a copy of the
- * GNU General Public License along with this program; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the
+ * GNU General Public License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
- *
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
* Contents of this file were entirely written by Marko Zivkovic
@@ -32,6 +32,11 @@ import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import xlogo.AppSettings;
import xlogo.Logo;
@@ -40,6 +45,7 @@ import xlogo.messages.async.dialog.DialogMessenger;
import xlogo.storage.Storable;
import xlogo.storage.StorableObject;
import xlogo.storage.WSManager;
+import xlogo.storage.global.GlobalConfig;
import xlogo.storage.user.UserConfig;
/**
@@ -58,31 +64,63 @@ import xlogo.storage.user.UserConfig;
* @author Marko Zivkovic
*/
public class WorkspaceConfig extends StorableObject implements Serializable {
-
- private static final long serialVersionUID = -3554871695113998509L;
-
+
+ private static final long serialVersionUID = -3554871695113998509L;
+
/**
* Name of the virtual workspace
*/
- public static final String VIRTUAL_WORKSPACE = "Guest Workspace (no automatic save)";
-
- protected WorkspaceConfig()
- {
+ public static final String VIRTUAL_WORKSPACE = "Guest Workspace (no automatic save)";
+ public static final String USB_DEFAULT_WORKSPACE = "XLogo4Schools";
+ public static final String USER_DEFAULT_WORKSPACE = "XLogo4Schools-Workspace";
+
+ private static Logger logger = LogManager.getLogger(WorkspaceConfig.class.getSimpleName());
+
+ public static File getDefaultWorkspaceDirectory(){
+ File location = GlobalConfig.getDefaultLocation();
+ return getDirectory(location, USER_DEFAULT_WORKSPACE);
+ }
+
+ public static File getDefaultWorkspaceLocation(){
+ return GlobalConfig.getDefaultLocation();
+ }
+
+ public static boolean isSpecialWorkspace(String workspaceName, String location) {
+ return isVirtualWorkspace(workspaceName) || isDefaultWorkspace(workspaceName, location);
+ }
+
+ public static boolean isSpecialWorkspace(String workspaceName, File location) {
+ return isVirtualWorkspace(workspaceName) || isDefaultWorkspace(workspaceName, location);
+ }
+
+ public static boolean isVirtualWorkspace(String workspaceName) {
+ return VIRTUAL_WORKSPACE.equals(workspaceName);
+ }
+
+ public static boolean isDefaultWorkspace(String workspaceName, String location) {
+ return isDefaultWorkspace(workspaceName, new File(location));
+ }
+
+ public static boolean isDefaultWorkspace(String workspaceName, File location) {
+ return workspaceName.equals(USER_DEFAULT_WORKSPACE) &&
+ location.equals(getDefaultWorkspaceLocation());
+ }
+
+ protected WorkspaceConfig() {
super();
userList = new ArrayList<String>();
language = Language.LANGUAGE_ENGLISH;
- font = new Font("dialog",Font.PLAIN,14); // TODO on access check if it is null.
+ font = new Font("dialog", Font.PLAIN, 14); // TODO on access check if it is null.
// TODO what if incompatible?
- syntaxHighlightingStyles = new SyntaxHighlightConfig();
AppSettings.getInstance().setFont(font);
+ syntaxHighlightingStyles = new SyntaxHighlightConfig();
}
/**
* @return
* @throws IllegalStateException if this is not virtual and {@link #getLocation()} returns null
*/
- public String getWorkspaceName() throws IllegalStateException
- {
+ public String getWorkspaceName() throws IllegalStateException {
if (isVirtual())
return VIRTUAL_WORKSPACE;
@@ -95,20 +133,19 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
/*
* Static constructors
*/
- private static WorkspaceConfig virtualWS;
+ private static WorkspaceConfig virtualWS;
/**
* A virtual user can enter the application in a virtual workspace without having an actual user account on the file system. Hence nothing will be stored.
* A regular user (not virtual) will have his own folder in a regular workspace on the file system and all his preferences and files are stored there.
* To create a regular workspace, use {@link #createNewWorkspace(File, String)},
- * to load a regular workspace from the file system, user {@link #loadWorkspace(File)}}.
+ * to load a regular workspace from the file system, use {@link #loadWorkspace(File)}}.
* @see #isVirtual()
* @return a virtual workspace
*/
- public static WorkspaceConfig createVirtualWorkspace()
- {
- if (virtualWS == null)
- {
+ public static WorkspaceConfig createVirtualWorkspace() {
+ logger.trace("Creating virtual workspace.");
+ if (virtualWS == null) {
virtualWS = new WorkspaceConfig();
virtualWS.makeVirtual();
}
@@ -116,46 +153,79 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
}
@Override
- protected void makeVirtual()
- {
+ protected void makeVirtual() {
super.makeVirtual();
userList = new ArrayList<String>();
userList.add(UserConfig.VIRTUAL_USER);
lastActiveUser = UserConfig.VIRTUAL_USER;
- try { enterUserSpace(UserConfig.VIRTUAL_USER); } catch (IOException e) { /* Does not happen */ }
+ try {
+ enterUserSpace(UserConfig.VIRTUAL_USER);
+ }
+ catch (IOException e) { /* Does not happen */}
}
- /**
- * @param dir
- * @param workspaceName
- * @return
- * @throws IOException
- */
- public static WorkspaceConfig createNewWorkspace(File dir, String workspaceName) throws IOException
- {
- if (!Storable.checkLegalName(workspaceName))
- {
- DialogMessenger.getInstance().dispatchError(
- Logo.messages.getString(MessageKeys.NAME_ERROR_TITLE),
+ private static WorkspaceConfig createWorkspace(File dir, String workspaceName) throws IOException {
+ if (!Storable.checkLegalName(workspaceName)) {
+ DialogMessenger.getInstance().dispatchError(Logo.messages.getString(MessageKeys.NAME_ERROR_TITLE),
Logo.messages.getString(MessageKeys.ILLEGAL_NAME));
return null;
}
File wsd = getDirectory(dir, workspaceName);
- boolean existed = wsd.exists();
- if (!existed)
- {
- wsd.mkdirs();
- }
- // wsd exists and it is empty
WorkspaceConfig wsc = new WorkspaceConfig();
wsc.setLocation(wsd);
- //if(existed && WSManager.isUserDirectory(wsd))
- // wsc.refreshUserList();
+ return wsc;
+ }
+
+ /**
+ * @param dir
+ * @param workspaceName
+ * @return
+ * @throws IOException
+ */
+ public static WorkspaceConfig createNewWorkspace(File dir, String workspaceName) throws IOException {
+ logger.trace("Creating workspace " + workspaceName + " at " + dir.getAbsolutePath());
+ WorkspaceConfig wsc = createWorkspace(dir, workspaceName);
wsc.store();
return wsc;
}
-
+
+ /**
+ * Physically storing this workspace is deferred until explicitly disabled.
+ * This is used to temporarily make the USB Workspace and the Default Workspace available, but only store it when {@link #store()} is called the next time.
+ * @param dir
+ * @return
+ * @throws IOException
+ */
+ public static WorkspaceConfig createDeferredWorkspace(File dir, String workspaceName) throws IOException {
+ logger.trace("Creating deferred workspace " + workspaceName + " at " + dir.getAbsolutePath());
+ WorkspaceConfig wsc = createWorkspace(dir, workspaceName);
+ wsc.setStoringDeferred(true);
+ return wsc;
+ }
+
+ private transient boolean isStoringDeferred = false;
+
+ public void setStoringDeferred(boolean val) {
+ this.isStoringDeferred = val;
+ }
+
+ @Override
+ protected void makeDirty(){
+ super.makeDirty();
+ setStoringDeferred(false);
+ }
+
+ @Override
+ public void store() throws IOException {
+ if (!isStoringDeferred) {
+ super.store();
+ }
+ else {
+ isStoringDeferred = false;
+ }
+ }
+
/**
* @see #loadWorkspace(File)
* @param dir - location of the workspace
@@ -163,8 +233,7 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* @return
* @throws IOException
*/
- public static WorkspaceConfig loadWorkspace(File dir, String workspaceName) throws IOException
- {
+ public static WorkspaceConfig loadWorkspace(File dir, String workspaceName) throws IOException {
File wsc = getDirectory(dir, workspaceName);
return loadWorkspace(wsc);
}
@@ -175,12 +244,9 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* If workspaceDir specifies a {@link WorkspaceConfig#VIRTUAL_WORKSPACE}, the virtual workspace is returned instead.
* @throws IOException
*/
- public static WorkspaceConfig loadWorkspace(File workspaceDir) throws IOException
- {
- if(workspaceDir.getName().equals(WorkspaceConfig.VIRTUAL_WORKSPACE))
- {
- return createVirtualWorkspace();
- }
+ public static WorkspaceConfig loadWorkspace(File workspaceDir) throws IOException {
+ logger.trace("Loading workspace from " + workspaceDir.getAbsolutePath());
+ if (workspaceDir.getName().equals(WorkspaceConfig.VIRTUAL_WORKSPACE)) { return createVirtualWorkspace(); }
File wsf = getFile(workspaceDir, WorkspaceConfig.class);
@@ -189,8 +255,9 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
wsc = (WorkspaceConfig) WorkspaceConfig.loadObject(wsf);
wsc.setLocation(workspaceDir);
return wsc;
- } catch (ClassNotFoundException e) {
- return null; // this won't happen
+ }
+ catch (ClassNotFoundException e) {
+ return null;
}
}
@@ -201,20 +268,18 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
/**
* @see #getUserList()
*/
- private ArrayList<String> userList;
+ private ArrayList<String> userList;
/**
* The names of the logical users in the workspace
* @return
*/
- public String[] getUserList()
- {
+ public String[] getUserList() {
String[] users = new String[userList.size()];
return userList.toArray(users);
}
- public File getUserDirectroy(String username)
- {
+ public File getUserDirectroy(String username) {
if (!existsUserLogically(username) || isVirtual())
return null;
@@ -228,42 +293,45 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* <p> Has no effect if this is virtual.
* @param username
*/
- public void createUser(String username)
- {
- if (!Storable.checkLegalName(username))
- {
- DialogMessenger.getInstance().dispatchError(
- Logo.messages.getString(MessageKeys.NAME_ERROR_TITLE),
+ public void createUser(String username) {
+ logger.trace("Creating user: " + username);
+ if (!Storable.checkLegalName(username)) {
+ DialogMessenger.getInstance().dispatchError(Logo.messages.getString(MessageKeys.NAME_ERROR_TITLE),
Logo.messages.getString(MessageKeys.ILLEGAL_NAME));
return;
}
- if(isVirtual())
- {
- DialogMessenger.getInstance().dispatchError("Workspace Error", "Attempt to create new user to virtual workspace.");
+ if (isVirtual()) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error",
+ "Attempt to create new user to virtual workspace.");
return;
}
File userDir = getDirectory(getLocation(), username);
- if(!userDir.mkdirs())
- {
- DialogMessenger.getInstance().dispatchError("Workspace Error","Could not make required directories: " + userDir.toString());
+ if (!userDir.mkdirs() && !userDir.isDirectory()) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error",
+ "Could not make required directories: " + userDir.toString());
return;
}
- if (!existsUserLogically(username))
- {
+ if (!existsUserLogically(username)) {
userList.add(username);
makeDirty();
}
-
+
// Make new user logically existent in workspace config file
- try { store(); } catch (IOException e) {
- DialogMessenger.getInstance().dispatchError("Workspace Error","Could not store workspace.");
+ try {
+ store();
}
- if(!existsUserPhysically(username))
+ catch (IOException e) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error", "Could not store workspace."); // TODO translate
+ }
+ if (!existsUserPhysically(username)){
UserConfig.createNewUser(this, username);
+ }
+
+ lastActiveUser = username;
}
/**
@@ -276,8 +344,9 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* @throws IOException
* @see WSManager#isUserDirectory(File)
*/
- public void importUser(File srcUserDir, String destUsername) throws IllegalArgumentException, IOException
- {
+ public void importUser(File srcUserDir, String destUsername) throws IllegalArgumentException, IOException {
+ logger.trace("Importing user '" + destUsername + "' from " + srcUserDir.getAbsolutePath());
+
if (isVirtual())
return;
@@ -288,50 +357,62 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
File targetUserDir = getDirectory(getLocation(), destUsername);
WSManager.copyFullyRecursive(srcUserDir, targetUserDir);
+
+ lastActiveUser = destUsername;
}
/**
* @param userName will be removed logically only
+ * @throws IOException
*/
- public void removeUser(String userName)
- {
- if(existsUserLogically(userName))
+ public void removeUser(String username){
+ logger.trace("Removing user: " + username);
+ if (existsUserLogically(username)){
makeDirty();
+ }
- userList.remove(userName);
+ userList.remove(username);
+ cachedUserSpaces.remove(username);
+
+ if (activeUser != null && activeUser.getUserName().equals(username)){
+ activeUser = null;
+ lastActiveUser = null;
+ makeDirty();
+ }
}
/**
- * @param username - if this exists not logically in the workspace, null is returned.
+ * @param username - if this does not exists logically in the workspace, null is returned.
* @return a {@link UserConfig} generated from the file system. If this is a virtual workspace, a virtual user is created instead.
* @throws IOException if the UserConfig could not be loaded
* @see UserConfig#loadUser(File, String)
*/
- public UserConfig loadUser(String username) throws IOException
- {
- if(!existsUserLogically(username))
- {
- DialogMessenger.getInstance().dispatchError("Workspace Error","Attempt to load inexistent user: " + username + ". Try to import this user.");
+ public UserConfig loadUser(String username) throws IOException {
+ logger.trace("Loading user: " + username);
+ if (!existsUserLogically(username)) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error",
+ "Attempt to load inexistent user: " + username + ". Try to import this user.");
return null;
}
- if(isVirtual())
+ if (isVirtual())
return UserConfig.createVirtualUser();
// exists logically and is not virtual
- if(!existsUserPhysically(username))
- {
+ if (!existsUserPhysically(username)) {
// but it does exist logically => it must have been corrupted externally.
// => restore it.
- if(!getLocation().mkdirs())
- {
- DialogMessenger.getInstance().dispatchError("Workspace Error","Could not make required directories.");
+ if (!getLocation().mkdirs()) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error", "Could not make required directories.");
return null;
}
// user creation requires existence of the workspace on file system
- try { store(); } catch (IOException e) {
- DialogMessenger.getInstance().dispatchError("Workspace Error","Could not store workspace.");
+ try {
+ store();
+ }
+ catch (IOException e) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error", "Could not store workspace.");
}
return UserConfig.createNewUser(this, username);
}
@@ -344,27 +425,27 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* The users in this list may contain users that have been deleted logically before.
* @return
*/
- public ArrayList<String> getPhysicalUserList()
- {
- if(isVirtual())
+ public ArrayList<String> getPhysicalUserList() {
+ if (isVirtual())
return new ArrayList<String>();
-
+
ArrayList<String> users = new ArrayList<String>();
- if (WSManager.isWorkspaceDirectory(getLocation()))
- {
- DialogMessenger.getInstance().dispatchError("Workspace Error", "Current workspace was probably deleted. I will recreate it.");
- try { store(); } catch (IOException e) {
- DialogMessenger.getInstance().dispatchError("Workspace Error", "I could not recreate the Workspace. Try to delete the Workspace and recreate it manually.");
+ if (WSManager.isWorkspaceDirectory(getLocation())) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error",
+ "Current workspace was probably deleted. I will recreate it.");
+ try {
+ store();
+ }
+ catch (IOException e) {
+ DialogMessenger.getInstance().dispatchError("Workspace Error",
+ "I could not recreate the Workspace. Try to delete the Workspace and recreate it manually.");
return users;
}
}
-
- for(File dir : WSManager.listDirectories(getLocation()))
- {
- if(WSManager.isUserDirectory(dir))
- {
+ for (File dir : WSManager.listDirectories(getLocation())) {
+ if (WSManager.isUserDirectory(dir)) {
users.add(dir.getName());
}
}
@@ -376,8 +457,7 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* @param userName
* @return
*/
- public boolean existsUserLogically(String username)
- {
+ public boolean existsUserLogically(String username) {
return userList.contains(username);
}
@@ -387,8 +467,7 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* @return
* @see WSManager#isUserDirectory(File)
*/
- public boolean existsUserPhysically(String username)
- {
+ public boolean existsUserPhysically(String username) {
File userDir = getDirectory(getLocation(), username);
return WSManager.isUserDirectory(userDir);
}
@@ -397,13 +476,18 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* last active user
*/
- private String lastActiveUser;
+ private String lastActiveUser;
/**
* @return name of the last active user
*/
- public String getLastActiveUser()
- {
+ public String getLastActiveUser() {
+ if (lastActiveUser == null){
+ if (userList.size() > 0){
+ lastActiveUser = userList.get(0);
+ }
+ }
+
return lastActiveUser;
}
@@ -411,54 +495,86 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* Succeeds if the user exists
* @param workspace
*/
- public void setLastActiveUser(String username)
- {
- if(existsUserLogically(username) && !username.equals(lastActiveUser))
- {
+ public void setLastActiveUser(String username) {
+ if (existsUserLogically(username) && !username.equals(lastActiveUser)) {
lastActiveUser = new String(username);
makeDirty();
}
}
-
+
/*
* active user
*/
- private transient UserConfig activeUser;
+ private transient UserConfig activeUser;
- public UserConfig getActiveUser()
- {
+ public UserConfig getActiveUser() {
return activeUser;
}
+ public void enterInitialUserSpace() throws IOException{
+ String user = getLastActiveUser();
+ if (user != null){
+ enterUserSpace(user);
+ }
+ }
+
/**
* @throws IOException If the old userConfig could not be stored.
*/
- public void enterUserSpace(String username) throws IOException
- {
- if(activeUser != null)
- {
+ public void enterUserSpace(String username) throws IOException {
+ if (activeUser != null) {
leaveUserSpace();
}
+ logger.trace("Entering user space: " + username);
+
+ activeUser = retrieveUserSpace(username);
- if (isVirtual())
- activeUser = UserConfig.createVirtualUser();
- else
- activeUser = UserConfig.loadUser(this, username);
-
setLastActiveUser(username);
}
/**
* @throws IOException If userConfig could not be stored.
*/
- public void leaveUserSpace() throws IOException
- {
+ public void leaveUserSpace() throws IOException {
+ logger.trace("Leaving user space: " + activeUser.getUserName());
if (activeUser.isDirty())
activeUser.store();
activeUser = null;
- }
-
+ }
+
+ protected UserConfig retrieveUserSpace(String username){
+ UserConfig uc = getCachedUserSpace(username);
+ if (uc != null){
+ return uc;
+ }
+
+ if (isVirtual()){
+ uc = UserConfig.createVirtualUser();
+ } else {
+ uc = UserConfig.loadUser(this, username);
+ }
+
+ cacheUserSpace(username, uc);
+ return uc;
+ }
+
+ /**
+ * UserConfigs that have already been created or loaded from disk.
+ */
+ private transient Map<String, UserConfig> cachedUserSpaces;
+
+ private UserConfig getCachedUserSpace(String username) {
+ if (cachedUserSpaces == null){
+ cachedUserSpaces= new TreeMap<String, UserConfig>();
+ }
+ return cachedUserSpaces.get(username);
+ }
+
+ private void cacheUserSpace(String username, UserConfig wsc){
+ cachedUserSpaces.put(username, wsc);
+ }
+
/*
* Version control
*/
@@ -467,21 +583,19 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* How many old versions of a file should be kept, in addition to the most recent one?
* Default is infinite.
*/
- private NumberOfBackups numberOfBackups = NumberOfBackups.INFINITE;
+ private NumberOfBackups numberOfBackups = NumberOfBackups.INFINITE;
/**
* @see #numberOfBackups
*/
- public NumberOfBackups getNumberOfBackups()
- {
+ public NumberOfBackups getNumberOfBackups() {
return numberOfBackups;
}
/**
* @see #numberOfBackups
*/
- public void setNumberOfBackups(NumberOfBackups n)
- {
+ public void setNumberOfBackups(NumberOfBackups n) {
numberOfBackups = n;
makeDirty();
}
@@ -489,21 +603,19 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
/*
* Workspace language
*/
-
+
/**
* The language to be used within this workspace
*/
- public Language language;
+ public Language language;
- public void setLanguage(Language language)
- {
+ public void setLanguage(Language language) {
this.language = language;
AppSettings.getInstance().setLanguage(language);
makeDirty();
}
- public Language getLanguage()
- {
+ public Language getLanguage() {
return language;
}
@@ -511,74 +623,64 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
* Allow users (children) to create new user accounts in workspaces?
*/
- private boolean allowUserCreation = true;
+ private boolean allowUserCreation = true;
- public void setAllowUserCreation(boolean allowed)
- {
+ public void setAllowUserCreation(boolean allowed) {
this.allowUserCreation = allowed;
makeDirty();
}
- public boolean isUserCreationAllowed()
- {
+ public boolean isUserCreationAllowed() {
return allowUserCreation && !isVirtual();
}
-
+
/*
* Contest //TODO create options in workspace settings
*/
- private ContestConfig contestConfig;
+ private ContestConfig contestConfig;
- protected ContestConfig getContestSettings()
- {
+ protected ContestConfig getContestSettings() {
return contestConfig;
}
- public int getNOfContestFiles()
- {
+ public int getNOfContestFiles() {
if (contestConfig == null)
contestConfig = new ContestConfig();
return getContestSettings().getNOfContestFiles();
}
-
- public void setNOfContestFiles(int nOfContestFiles)
- {
+
+ public void setNOfContestFiles(int nOfContestFiles) {
getContestSettings().setNOfContestFiles(nOfContestFiles);
}
-
- public int getNOfContestBonusFiles()
- {
+
+ public int getNOfContestBonusFiles() {
return getContestSettings().getNOfContestBonusFiles();
}
-
- public void setNOfContestBonusFiles(int nOfContestBonusFiles)
- {
+
+ public void setNOfContestBonusFiles(int nOfContestBonusFiles) {
getContestSettings().setNOfContestBonusFiles(nOfContestBonusFiles);
}
/*
* Syntax Highlighting
*/
- private SyntaxHighlightConfig syntaxHighlightingStyles; // TODO = new SyntaxHighlightStyles();
-
+ private SyntaxHighlightConfig syntaxHighlightingStyles; // TODO = new SyntaxHighlightStyles();
+
/**
* This font is the default font for all menus ... in XLogo Application
*/
- private Font font;// TODO =new Font("dialog",Font.PLAIN,14);
-
- public SyntaxHighlightConfig getSyntaxHighlightStyles()
- {
- if (syntaxHighlightingStyles == null)
- {
+ private Font font; // TODO =new Font("dialog",Font.PLAIN,14);
+
+ public SyntaxHighlightConfig getSyntaxHighlightStyles() {
+ if (syntaxHighlightingStyles == null) {
syntaxHighlightingStyles = new SyntaxHighlightConfig();
makeDirty();
}
return syntaxHighlightingStyles;
}
- public void setSyntaxHighlightConfig(SyntaxHighlightConfig syntaxHighlightingStyles)
- {
+ public void setSyntaxHighlightConfig(SyntaxHighlightConfig syntaxHighlightingStyles) {
this.syntaxHighlightingStyles = syntaxHighlightingStyles;
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(syntaxHighlightingStyles);
@@ -587,88 +689,87 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
public int getPrimitiveColor() {
return getSyntaxHighlightStyles().getPrimitiveColor();
}
-
-
+
public void setPrimitiveColor(int primitiveColor) {
getSyntaxHighlightStyles().setPrimitiveColor(primitiveColor);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getPrimitiveStyle() {
return getSyntaxHighlightStyles().getPrimitiveStyle();
}
-
+
public void setPrimitiveStyle(int primitiveStyle) {
getSyntaxHighlightStyles().setPrimitiveStyle(primitiveStyle);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getOperatorColor() {
return getSyntaxHighlightStyles().getOperatorColor();
}
-
+
public void setOperandColor(int operatorColor) {
getSyntaxHighlightStyles().setOperatorColor(operatorColor);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getOperatorStyle() {
return getSyntaxHighlightStyles().getOperatorStyle();
}
-
+
public void setOperandStyle(int operatorStyle) {
getSyntaxHighlightStyles().setOperatorStyle(operatorStyle);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getCommentColor() {
return getSyntaxHighlightStyles().getCommentColor();
}
-
+
public void setCommentColor(int commentColor) {
getSyntaxHighlightStyles().setCommentColor(commentColor);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getCommentStyle() {
return getSyntaxHighlightStyles().getCommentStyle();
}
-
+
public void setCommentStyle(int commentStyle) {
getSyntaxHighlightStyles().setCommentStyle(commentStyle);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getBraceColor() {
return getSyntaxHighlightStyles().getBraceColor();
}
-
+
public void setBraceColor(int braceColor) {
getSyntaxHighlightStyles().setBraceColor(braceColor);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public int getBraceStyle() {
return getSyntaxHighlightStyles().getBraceStyle();
}
-
+
public void setBraceStyle(int braceStyle) {
getSyntaxHighlightStyles().setBraceStyle(braceStyle);
makeDirty();
AppSettings.getInstance().setSyntaxHighlightingStyles(getSyntaxHighlightStyles());
}
-
+
public boolean isSyntaxHighlightingEnabled() {
return getSyntaxHighlightStyles().isColorEnabled();
}
-
+
public void setSyntaxHighlightingEnabled(boolean colorEnabled) {
getSyntaxHighlightStyles().setColorEnabled(colorEnabled);
makeDirty();
@@ -678,7 +779,7 @@ public class WorkspaceConfig extends StorableObject implements Serializable {
public Font getFont() {
return font;
}
-
+
public void setFont(Font font) {
this.font = font;
makeDirty();
diff --git a/logo/src/xlogo/utils/ExtensionFichier.java b/logo/src/xlogo/utils/ExtensionFichier.java
index 4fcf708..e2dbd38 100644
--- a/logo/src/xlogo/utils/ExtensionFichier.java
+++ b/logo/src/xlogo/utils/ExtensionFichier.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/package xlogo.utils;
import javax.swing.filechooser.*;
diff --git a/logo/src/xlogo/utils/Utils.java b/logo/src/xlogo/utils/Utils.java
index 3c2e703..3182bf7 100644
--- a/logo/src/xlogo/utils/Utils.java
+++ b/logo/src/xlogo/utils/Utils.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/utils/WebPage.java b/logo/src/xlogo/utils/WebPage.java
index 56f1528..c49ada8 100644
--- a/logo/src/xlogo/utils/WebPage.java
+++ b/logo/src/xlogo/utils/WebPage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/
diff --git a/logo/src/xlogo/utils/WriteImage.java b/logo/src/xlogo/utils/WriteImage.java
index 13426f9..485c4e9 100644
--- a/logo/src/xlogo/utils/WriteImage.java
+++ b/logo/src/xlogo/utils/WriteImage.java
@@ -1,4 +1,4 @@
-/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Lo�c Le Coq
+/* XLogo4Schools - A Logo Interpreter specialized for use in schools, based on XLogo by Loic Le Coq
* Copyright (C) 2013 Marko Zivkovic
*
* Contact Information: marko88zivkovic at gmail dot com
@@ -16,13 +16,13 @@
*
*
* This Java source code belongs to XLogo4Schools, written by Marko Zivkovic
- * during his Bachelor thesis at the computer science department of ETH Z�rich,
+ * during his Bachelor thesis at the computer science department of ETH Zurich,
* in the year 2013 and/or during future work.
*
- * It is a reengineered version of XLogo written by Lo�c Le Coq, published
+ * It is a reengineered version of XLogo written by Loic Le Coq, published
* under the GPL License at http://xlogo.tuxfamily.org/
*
- * Contents of this file were initially written by Lo�c Le Coq,
+ * Contents of this file were initially written by Loic Le Coq,
* modifications, extensions, refactorings might have been applied by Marko Zivkovic
*/