public code v1

This commit is contained in:
Francisco Jesús Martínez Mimbrera
2026-05-23 00:32:57 +02:00
commit 759a8968a2
4357 changed files with 163763 additions and 0 deletions
@@ -0,0 +1,7 @@
<?flintstones.helper.data.xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>flintstones.group</groupId>
<artifactId>flintstones.bundles</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>flintstones.domain.numeric.real</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>[bundle] Real</name>
</project>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>flintstones.domain.numeric.real</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1779484362546</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: flintstones.domain.numeric.real;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: flintstones.domain.numeric.real
Require-Bundle: flintstones.domain.numeric;visibility:=reexport,
flintstones.helper.data.wxml,
javax.inject,
flintstones.entity.domain,
org.apache.commons.lang,
flintstones.helper.data
Automatic-Module-Name: flintstones.domain.numeric.real
@@ -0,0 +1,4 @@
#Properties file for flintstones.domain.numeric.real
Bundle-Name = Real
domain.name.real = Real
domain.name.real.intervalar = Real intervalar
@@ -0,0 +1,4 @@
#Properties file for flintstones.domain.numeric.real
Bundle-Name = Real
domain.name.real = Real
domain.name.real.intervalar = Real intervalar
@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<?eclipse version="3.4"?>
<plugin>
<extension
point="flintstones.entity.domain">
<domain
category="flintstones.domain.numeric.category"
implementation="flintstones.domain.numeric.real.NumericRealDomain"
label="%domain.name.real"
uid="flintstones.domain.numeric.real">
</domain>
</extension> <extension
point="flintstones.entity.domain">
<domain
category="flintstones.domain.numeric.intervalar.category"
implementation="flintstones.domain.numeric.real.NumericRealDomain"
label="%domain.name.real.intervalar"
uid="flintstones.domain.numeric.real.intervalar">
</domain>
</extension>
<extension
point="flintstones.entity.domain.fastadd">
<domain_instance
uid="flintstones.domain.numeric.real.random"
domain_id="flintstones.domain.numeric.real"
label="Random Real Domain"
implementation="flintstones.domain.numeric.real.instance.RealRandomRangedInstance">
</domain_instance>
<domain_instance
uid="flintstones.domain.numeric.real.between0100"
domain_id="flintstones.domain.numeric.real"
label="Real Domain [0-100]"
implementation="flintstones.domain.numeric.real.instance.RealBetween0100Instance">
</domain_instance>
<domain_instance
uid="flintstones.domain.numeric.real.between010"
domain_id="flintstones.domain.numeric.real"
label="Real Domain [0-10]"
implementation="flintstones.domain.numeric.real.instance.RealBetween010Instance">
</domain_instance>
<domain_instance
uid="flintstones.domain.numeric.real.norange"
domain_id="flintstones.domain.numeric.real"
label="No range Real Domain"
implementation="flintstones.domain.numeric.real.instance.RealNoRangeInstance">
</domain_instance>
</extension>
</plugin>
@@ -0,0 +1,32 @@
package flintstones.domain.numeric.real;
import javax.inject.Inject;
import org.eclipse.e4.core.services.nls.Translation;
import flintstones.domain.numeric.NumericDomain;
import flintstones.domain.numeric.real.messages.Messages;
import flintstones.helper.data.wxml.WNode;
@SuppressWarnings("javadoc")
public class NumericRealDomain extends NumericDomain {
@Inject
@Translation
private Messages messages;
public static final String ID = "flintstones.domain.numeric.real"; //$NON-NLS-1$
@Override
public void read(WNode node) {
this.inRange = Boolean.parseBoolean(node.getAttribute(NumericDomain.Fields.inRange));
if (!this.inRange) {
this.min = 0.0d;
this.max = 0.0d;
} else {
this.min = Double.parseDouble(node.getAttribute(NumericDomain.Fields.min));
this.max = Double.parseDouble(node.getAttribute(NumericDomain.Fields.max));
}
}
}
@@ -0,0 +1,26 @@
package flintstones.domain.numeric.real.instance;
import flintstones.domain.numeric.real.NumericRealDomain;
import flintstones.entity.domain.Domain;
import flintstones.entity.domain.DomainInstance;
public class RealBetween0100Instance extends DomainInstance {
@Override
public Domain getInstance() {
NumericRealDomain domain = (NumericRealDomain) getDomain();
domain.setInRange(true);
double max = 100;
double min = 0;
String name = getLabel();;
domain.setMax(max);
domain.setMin(min);
domain.setName(name);
return domain;
}
}
@@ -0,0 +1,26 @@
package flintstones.domain.numeric.real.instance;
import flintstones.domain.numeric.real.NumericRealDomain;
import flintstones.entity.domain.Domain;
import flintstones.entity.domain.DomainInstance;
public class RealBetween010Instance extends DomainInstance {
@Override
public Domain getInstance() {
NumericRealDomain domain = (NumericRealDomain) getDomain();
domain.setInRange(true);
double max = 10;
double min = 0;
String name = getLabel();;
domain.setMax(max);
domain.setMin(min);
domain.setName(name);
return domain;
}
}
@@ -0,0 +1,21 @@
package flintstones.domain.numeric.real.instance;
import flintstones.domain.numeric.real.NumericRealDomain;
import flintstones.entity.domain.Domain;
import flintstones.entity.domain.DomainInstance;
public class RealNoRangeInstance extends DomainInstance {
@Override
public Domain getInstance() {
NumericRealDomain domain = (NumericRealDomain) getDomain();
domain.setInRange(false);
String name = getLabel();
domain.setName(name);
return domain;
}
}
@@ -0,0 +1,35 @@
package flintstones.domain.numeric.real.instance;
import java.util.Random;
import flintstones.domain.numeric.real.NumericRealDomain;
import flintstones.entity.domain.Domain;
import flintstones.entity.domain.DomainInstance;
import flintstones.helper.DoubleHelper;
public class RealRandomRangedInstance extends DomainInstance {
@Override
public Domain getInstance() {
NumericRealDomain domain = (NumericRealDomain) getDomain();
domain.setInRange(true);
Random rand = new Random();
double n = (rand.nextDouble()*rand.nextInt()%10000);
double m = (rand.nextDouble()*rand.nextInt()%10000);
if(m > n) {
double x = n;
n = m;
m = x;
}
String name = getLabel() + " ["+DoubleHelper.Draw(m)+","+DoubleHelper.Draw(n)+"]_";
domain.setMax(n);
domain.setMin(m);
domain.setName(name);
return domain;
}
}
@@ -0,0 +1,13 @@
package flintstones.domain.numeric.real.messages;
//This file has been auto-generated
import org.eclipse.e4.core.services.nls.Message;
@Message
@SuppressWarnings("javadoc")
public class Messages {
public String category;
public String name_intervalar;
public String name;
}
@@ -0,0 +1,3 @@
category=Numeric real
name_intervalar=Numeric real intervalar
name=Numeric real
@@ -0,0 +1,3 @@
category=Numérico real
name_intervalar=Numérico real intervalar
name=Numérico real