Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
kimokipo committed Jun 23, 2022
0 parents commit 1f7d88a
Show file tree
Hide file tree
Showing 1,990 changed files with 490,007 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.metadata/.lock
.metadata/.log
.metadata/version.ini
.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.urischeme.prefs
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache
.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache
.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup
.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
.metadata/.plugins/org.eclipse.ui.intro/introstate
.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
.metadata/.plugins/org.eclipse.core.resources/.root/3.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.2.4" icons="true" always-add-relationships="false" generalizations="true" realizations="true"
associations="true" dependencies="false" nesting-relationships="true" router="FAN">
<class id="1" language="java" name="src.com.ScratchHome.HomeModifier" project="ScratchHome2.0"
file="/ScratchHome2.0/src/com/ScratchHome/HomeModifier.java" binary="false" corner="BOTTOM_RIGHT">
<position height="97" width="191" x="41" y="-75"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="2" language="java" name="src.com.ScratchHome.ControlPanel" project="ScratchHome2.0"
file="/ScratchHome2.0/src/com/ScratchHome/ControlPanel.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="1001" y="438"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="3" language="java" name="src.com.ScratchHome.JSONAction" project="ScratchHome2.0"
file="/ScratchHome2.0/src/com/ScratchHome/JSONAction.java" binary="false" corner="BOTTOM_RIGHT">
<position height="259" width="371" x="272" y="-75"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="4" language="java" name="src.com.ScratchHome.ScratchListener" project="ScratchHome2.0"
file="/ScratchHome2.0/src/com/ScratchHome/ScratchListener.java" binary="false" corner="BOTTOM_RIGHT">
<position height="349" width="322" x="340" y="224"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="5" language="java" name="src.com.ScratchHome.ScratchAction" project="ScratchHome2.0"
file="/ScratchHome2.0/src/com/ScratchHome/ScratchAction.java" binary="false" corner="BOTTOM_RIGHT">
<position height="259" width="248" x="683" y="-75"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="6" language="java" name="src.com.ScratchHome.ScratchHomePlugin" project="ScratchHome2.0"
file="/ScratchHome2.0/src/com/ScratchHome/ScratchHomePlugin.java" binary="false" corner="BOTTOM_RIGHT">
<position height="133" width="261" x="971" y="-75"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<association id="7">
<bendpoint x="692" y="224"/>
<end type="SOURCE" refId="5" navigable="false">
<attribute id="8" name="controlPanel"/>
<multiplicity id="9" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="2" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<association id="10">
<end type="SOURCE" refId="5" navigable="false">
<attribute id="11" name="scratchListener"/>
<multiplicity id="12" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="4" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<association id="13">
<end type="SOURCE" refId="4" navigable="false">
<attribute id="14" name="controlpanel"/>
<multiplicity id="15" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="2" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<association id="16">
<bendpoint x="713" y="224"/>
<end type="SOURCE" refId="2" navigable="false">
<attribute id="17" name="sa"/>
<multiplicity id="18" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="5" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</classifier-display>
<association-display labels="true" multiplicity="true"/>
</class-diagram>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<launchPerspectives/>\n
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.ucls,*.useq
org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=12
org.eclipse.jdt.core.compiler.compliance=12
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=12
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1655978158934" defaultVMConnector\="">\n <vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\n <vm id\="1655978158934" name\="jdk-12.0.1" path\="/mnt/n7fs/java/jdk-12.0.1"/>\n </vmType>\n</vmSettings>\n
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
overviewRuler_migration=migrated_3.1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions .metadata/.plugins/org.eclipse.jdt.core/indexNamesMap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INDEX VERSION 1.131
1 change: 1 addition & 0 deletions .metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java
4 changes: 4 additions & 0 deletions .metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INDEX VERSION 1.131+/home/khammi/Scratch/ScratchHome2.0/.metadata/.plugins/org.eclipse.jdt.core
4180181173.index
887267619.index
327027428.index
4 changes: 4 additions & 0 deletions .metadata/.plugins/org.eclipse.jdt.launching/.install.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<dirs>
<entry loc="/mnt/n7fs/java/jdk-12.0.1" stamp="1559634225138"/>
</dirs>
4 changes: 4 additions & 0 deletions .metadata/.plugins/org.eclipse.jdt.launching/libraryInfos.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<libraryInfos>
<libraryInfo home="/mnt/n7fs/java/jdk-12.0.1" version="12.0.1"/>
</libraryInfos>
66 changes: 66 additions & 0 deletions .metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="JavaElementSearchActions">
</section>
<section name="completion_proposal_size">
</section>
<section name="quick_assist_proposal_size">
</section>
<section name="JarPackageWizard">
<item key="JarPackageWizardPage.EXPORT_CLASS_FILES" value="true"/>
<item key="JarPackageWizardPage.EXPORT_OUTPUT_FOLDER" value="false"/>
<item key="JarPackageWizardPage.EXPORT_JAVA_FILES" value="false"/>
<item key="JarPackageWizardPage.REFACTORINGS" value="false"/>
<item key="JarPackageWizardPage.COMPRESS" value="true"/>
<item key="JarPackageWizardPage.INCLUDE_DIRECTORY_ENTRIES" value="false"/>
<item key="JarPackageWizardPage.OVERWRITE" value="false"/>
<item key="jarOptionsWizardPage.EXPORT_WARNINGS" value="true"/>
<item key="jarOptionsWizardPage.EXPORT_ERRORS" value="true"/>
<item key="jarOptionsWizardPage.STORE_USE_SRC_FOLDERS" value="false"/>
<item key="jarOptionsWizardPage.BUILD_IF_NEEDED" value="true"/>
<item key="jarOptionsWizardPage.SAVE_DESCRIPTION" value="false"/>
<item key="jarOptionsWizardPage.DESCRIPTION_LOCATION" value=""/>
<item key="JarManifestWizardPage.GENERATE_MANIFEST" value="true"/>
<item key="JarManifestWizardPage.SAVE_MANIFEST" value="false"/>
<item key="JarManifestWizardPage.REUSE_MANIFEST" value="false"/>
<item key="JarManifestWizardPage.MANIFEST_LOCATION" value=""/>
<item key="JarManifestWizardPage.SEAL_JAR" value="false"/>
<list key="JarPackageWizardPage.DESTINATION_NAMES_ID">
<item value="/home/khammi/test.jar"/>
</list>
</section>
<section name="JavadocWizardDialog">
<item key="DIALOG_X_ORIGIN" value="383"/>
<item key="DIALOG_Y_ORIGIN" value="0"/>
<item key="DIALOG_WIDTH" value="606"/>
<item key="DIALOG_HEIGHT" value="617"/>
<item key="DIALOG_FONT_NAME" value="1|Ubuntu|11.0|0|GTK|1|"/>
</section>
<section name="javadoc">
<item key="javadoc_command_history" value="/mnt/n7fs/java/jdk-12.0.1/bin/javadoc"/>
<item key="fromStandard" value="true"/>
<item key="docletname" value=""/>
<item key="docletpath" value=""/>
<item key="access" value="public"/>
<item key="use" value="true"/>
<item key="author" value="true"/>
<item key="version" value="true"/>
<item key="nodeprecated" value="false"/>
<item key="nodeprecatedlist" value="false"/>
<item key="splitindex" value="true"/>
<item key="noindex" value="false"/>
<item key="notree" value="false"/>
<item key="nonavbar" value="false"/>
<item key="openinbrowser" value="false"/>
<item key="source" value="1.7"/>
<item key="antpath" value="/home/khammi/Scratch/ScratchHome2.0/JavaProject/javadoc.xml"/>
<item key="destdir" value="/home/khammi/Scratch/ScratchHome2.0/JavaProject/doc"/>
<section name="projects">
<section name="JavaProject">
<item key="href" value="file:/home/khammi/Scratch/ScratchHome2.0/JavaProject/doc/;https://docs.oracle.com/en/java/javase/12/docs/api/"/>
<item key="destdir" value="/home/khammi/Scratch/ScratchHome2.0/JavaProject/doc"/>
<item key="antpath" value="/home/khammi/Scratch/ScratchHome2.0/JavaProject/javadoc.xml"/>
</section>
</section>
</section>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<session version="1.0">
<refactoring comment="Delete resource &apos;ScratchHomePlugin&apos;" deleteContents="false" description="Delete resource &apos;ScratchHomePlugin&apos;" element1="/ScratchHomePlugin" flags="7" id="org.eclipse.ltk.core.refactoring.delete.resources" resources="1" stamp="1655984115149"/>
</session>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1655984115149 Delete resource 'ScratchHomePlugin'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="RefactoringWizard.preview">
<item key="width" value="600"/>
<item key="height" value="400"/>
</section>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Cached timestamps
#Thu Jun 23 13:58:19 CEST 2022
Binary file not shown.
134 changes: 134 additions & 0 deletions Extension/ScratchHome.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
class ScratchHome {
static message = "empty";
static status = "empty";
constructor() {
this.socket = null;
this.wsUrl = "ws://localhost:8000";
}

getblocks(){
return [
{
"opcode": "setColor",
"blockType": "command",
"text": "colorer [object] en [colorList] ",
"arguments": {
"object": {
"type": "string",
"defaultValue": "Lit bébé(827158385)"
},
"colorList": {
"type": "string",
"menu": "colorMenu"
}
}
},
{
"opcode": "switchOnOff",
"blockType": "command",
"text": "[switchList] le/la [lamp]",
"arguments": {
"switchList": {
"type": "string",
"menu": "switchMenu"
},
"lamp": {
"type": "string",
"defaultValue": "Suspension(296454286)"
},
}
},
{
"opcode": 'getMessage',
"blockType": "reporter",
"text": "message"
},
{
"opcode": 'getStatus',
"blockType": "reporter",
"text": "status"
}
];
}

getInfo() {
return {
"id": "scratchhome",
"name": "ScratchHome",
"blocks": this.getblocks(),
"menus":{
"colorMenu":{
"items": ["noir", "bleu", "cyan", "gris", "vert", "magenta", "rouge", "blanc", "jaune"]
},
"switchMenu":{
"items": ["Allumer", "Eteindre"]
}
}
};
}
connect() {
// open the connection if one does not exist
if (this.socket !== null
&& this.socket.readyState !== WebSocket.CLOSED) {
return;
}

//console.log("Trying to establish a WebSocket connection to <code>" + wsUrl + "</code>");

// Create a websocket
this.socket = new WebSocket(this.wsUrl);

this.socket.onopen = function(event) {
ScratchHome.status = "Connected!";
};

this.socket.onmessage = function(event) {
if (event.data){
ScratchHome.message = event.data;
}
};

this.socket.onclose = function(event) {
ScratchHome.status = "Connection Closed";
};
}

send(text) {
this.socket.send(text);
}

closeSocket() {
this.socket.close();
}

setColor({object,colorList}) {
this.connect();
this.send("setColor/"+object+"/"+colorList);
}

switchOnOff({switchList,lamp}) {
this.connect();
this.send("switchOnOff/"+switchList+"/"+lamp);

}
/**
* Get the current message.
* @return {string} - the current message.
*/
getMessage () {
this.connect();
return ScratchHome.message;
}

/**
* Get the current status.
* @return {string} - the current status.
*/
getStatus () {
this.connect();
return ScratchHome.status;
}
}

Scratch.extensions.register(new ScratchHome())

7 changes: 7 additions & 0 deletions JavaProject/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="lib" path="SweetHome3D-5.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Loading

0 comments on commit 1f7d88a

Please sign in to comment.