public code v1

This commit is contained in:
2026-05-22 11:14:29 +02:00
parent 427197ec5a
commit b8141736eb
28859 changed files with 575079 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
<?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>
+1
View File
@@ -0,0 +1 @@
/bin/
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>afryca.domain.integer</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>
</projectDescription>
@@ -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,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: afryca.domain.integer;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: afryca.domain;bundle-version="1.0.0"
Export-Package: afryca.domain.integer
Automatic-Module-Name: afryca.domain.integer
@@ -0,0 +1,4 @@
#Properties file for afryca.domain.integer
Bundle-Name = Integer domain
integer_name = Numeric integer
integer_type = Numeric
@@ -0,0 +1,4 @@
#Properties file for afryca.domain.integer
Bundle-Name = Integer domain
integer_name = Numérico entero
integer_type = Numérico
@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="afryca.domain.domain">
<domain
id="afryca.domain.integer"
implementation="afryca.domain.integer.NumericIntegerDomain"
name="%integer_name"
type="%integer_type">
</domain>
</extension>
</plugin>
@@ -0,0 +1,128 @@
package afryca.domain.integer;
import afryca.domain.Domain;
import afryca.valueforcer.ValueForcer;
public class NumericIntegerDomain extends Domain {
public static final String ID = "afryca.domain.integer"; //$NON-NLS-1$
private int min;
private int max;
public NumericIntegerDomain() {
super();
min = 0;
max = 0;
}
public void setMin(int _min) {
min = _min;
}
public int getMin() {
return min;
}
public void setMax(int _max) {
max = _max;
}
public int getMax() {
return max;
}
public void setMinMax(int min, int max) {
ValueForcer.notGreaterThan(min, max);
this.min = min;
this.max = max;
}
@Override
public double midpoint() {
return ((double) (max + min)) / 2d;
}
@Override
public String formatDescriptionDomain() {
String prefix = "(I) "; //$NON-NLS-1$
return prefix + toString();
}
@Override
public void parse(String readableDomain) {
String[] info = readableDomain.split(";");
generateId(info[0]);
readableDomain = info[1];
readableDomain = readableDomain.replace("[", "");
readableDomain = readableDomain.replace("]", "");
generateLimits(readableDomain);
}
private void generateId(String id) {
setId(id);
}
private void generateLimits(String readableDomain) {
String limits[] = readableDomain.split(",");
setMinMax(Integer.parseInt(limits[0]), Integer.parseInt(limits[1]));
}
@Override
public String toString() {
return "[" + min + ", " + max + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@Override
public String toStringFile() {
return ID + ";" + getId() + ";[" + min + "," + max + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if(!super.equals(obj))
return false;
NumericIntegerDomain other = (NumericIntegerDomain) obj;
if (min == 0) {
if (other.min != 0)
return false;
} else if (min != other.min)
return false;
if (max == 0) {
if (other.max != 0)
return false;
} else if (max != other.max)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((min == 0) ? 0 : min);
result = prime * result + ((max == 0) ? 0 : max);
return result;
}
@Override
public Object clone() {
NumericIntegerDomain result = null;
result = (NumericIntegerDomain) super.clone();
return result;
}
@Override
public Object createDataRandom() {
return min + (int)(Math.random() * ((max - min) + 1));
}
}
@@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: afryca.domain.integer;singleton:=true
Bundle-Version: 1.0.0.202101221157
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: afryca.domain;bundle-version="1.0.0"
Export-Package: afryca.domain.integer
Automatic-Module-Name: afryca.domain.integer
@@ -0,0 +1,4 @@
#Fri Jan 22 13:00:29 CET 2021
artifact.main=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.domain.integer\\target\\afryca.domain.integer-1.0.0-SNAPSHOT.jar
artifact.attached.p2artifacts=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.domain.integer\\target\\p2artifacts.xml
artifact.attached.p2metadata=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.domain.integer\\target\\p2content.xml
@@ -0,0 +1,3 @@
artifactId=afryca.domain.integer
groupId=afryca.group
version=1.0.0-SNAPSHOT
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='afryca.domain.integer' version='1.0.0.202101221157'>
<properties size='5'>
<property name='artifact.size' value='4803'/>
<property name='download.size' value='4803'/>
<property name='maven-groupId' value='afryca.group'/>
<property name='maven-artifactId' value='afryca.domain.integer'/>
<property name='maven-version' value='1.0.0-SNAPSHOT'/>
</properties>
</artifact>
</artifacts>
@@ -0,0 +1,46 @@
<?xml version='1.0' encoding='UTF-8'?>
<units size='1'>
<unit id='afryca.domain.integer' version='1.0.0.202101221157' generation='2'>
<update id='afryca.domain.integer' range='[0.0.0,1.0.0.202101221157)' severity='0'/>
<properties size='6'>
<property name='es.Bundle-Name' value='Integer domain'/>
<property name='df_LT.Bundle-Name' value='Integer domain'/>
<property name='org.eclipse.equinox.p2.name' value='%Bundle-Name'/>
<property name='maven-groupId' value='afryca.group'/>
<property name='maven-artifactId' value='afryca.domain.integer'/>
<property name='maven-version' value='1.0.0-SNAPSHOT'/>
</properties>
<provides size='7'>
<provided namespace='org.eclipse.equinox.p2.iu' name='afryca.domain.integer' version='1.0.0.202101221157'/>
<provided namespace='osgi.bundle' name='afryca.domain.integer' version='1.0.0.202101221157'/>
<provided namespace='java.package' name='afryca.domain.integer' version='0.0.0'/>
<provided namespace='osgi.identity' name='afryca.domain.integer' version='1.0.0.202101221157'>
<properties size='1'>
<property name='type' value='osgi.bundle'/>
</properties>
</provided>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.localization' name='es' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
</provides>
<requires size='2'>
<required namespace='osgi.bundle' name='afryca.domain' range='1.0.0'/>
<requiredProperties namespace='osgi.ee' match='(&amp;(osgi.ee=JavaSE)(version=1.8))'>
<description>
afryca.domain.integer
</description>
</requiredProperties>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='afryca.domain.integer' version='1.0.0.202101221157'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: afryca.domain.integer;singleton:=true&#xA;Bundle-Version: 1.0.0.202101221157&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
</units>