public code v1
This commit is contained in:
@@ -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>
|
||||
@@ -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.method.sorting.phase.referencereference</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<name>[bundle] Referencereference</name>
|
||||
</project>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>flintstones.method.sorting.phase.referencereference</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>1779484362698</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>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
+7
@@ -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
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
@@ -0,0 +1,24 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Referencereference
|
||||
Bundle-SymbolicName: flintstones.method.sorting.phase.referencereference;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Automatic-Module-Name: flintstones.method.sorting.phase.referencereference
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Require-Bundle: javax.inject,
|
||||
flintstones.model.problemelement.service,
|
||||
flintstones.model.ahppreferences.service,
|
||||
org.eclipse.e4.core.contexts,
|
||||
flintstones.entity.method.phase.ui,
|
||||
org.eclipse.swt,
|
||||
flintstones.model.ui.service,
|
||||
flintstones.entity.problemelement,
|
||||
flintstones.entity.ahppreferences,
|
||||
org.eclipse.e4.core.di,
|
||||
flintstones.entity.preferences.preferencecollection,
|
||||
flintstones.entity.method.phase,
|
||||
flintstones.entity.ahp.ui,
|
||||
flintstones.valuation.ahp.ui,
|
||||
flintstones.model.ahpsort.profileassignment.service,
|
||||
flintstones.model.ahp.referencepoint.service,
|
||||
flintstones.entity.ahpsort.referencepoint
|
||||
@@ -0,0 +1,5 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="flintstones.phasemethod.extensionpoint">
|
||||
<phase
|
||||
implementation="flintstones.method.sorting.phase.referencereference.SortingReferencepointReferencePointModel"
|
||||
uid="flintstones.method.sorting.phase.referencereference">
|
||||
</phase>
|
||||
</extension>
|
||||
<extension
|
||||
point="flintstones.phasemethod.ui">
|
||||
<phasemethod_ui
|
||||
implementation="flintstones.method.sorting.phase.referencereference.SortingReferencepointReferencepointUI"
|
||||
phasemethod="flintstones.method.sorting.phase.referencereference"
|
||||
uid="flintstones.method.sorting.phase.referencereference.ui">
|
||||
</phasemethod_ui>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package flintstones.method.sorting.phase.referencereference;
|
||||
|
||||
import flintstones.entity.method.phase.PhaseMethod;
|
||||
|
||||
public class SortingReferencepointReferencePointModel extends PhaseMethod {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Sorting Reference_Point-Reference-Point";
|
||||
}
|
||||
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package flintstones.method.sorting.phase.referencereference;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
||||
import org.eclipse.e4.core.contexts.IEclipseContext;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
import flintstones.entity.ahp.ui.PreferencesRatingPart;
|
||||
import flintstones.entity.ahppreferences.PreferenceBuild;
|
||||
import flintstones.entity.ahpsort.referencepoint.AHPSortReferencencePoint;
|
||||
import flintstones.entity.method.phase.ui.PhaseMethodUI;
|
||||
import flintstones.entity.problemelement.entities.Criterion;
|
||||
import flintstones.entity.problemelement.entities.Expert;
|
||||
import flintstones.entity.problemelement.entities.ProblemElement;
|
||||
import flintstones.model.ahp.referencepoint.service.IReferencePointService;
|
||||
import flintstones.model.ahpsort.profileassignment.service.IProfileAssignmentService;
|
||||
import flintstones.model.problemelement.service.IProblemElementService;
|
||||
import flintstones.model.ui.service.UiService;
|
||||
|
||||
public class SortingReferencepointReferencepointUI extends PhaseMethodUI {
|
||||
|
||||
@Inject
|
||||
IProfileAssignmentService profileService;
|
||||
|
||||
@Inject
|
||||
IProblemElementService problemService;
|
||||
|
||||
@Inject
|
||||
IReferencePointService referencePointsService;
|
||||
|
||||
@Inject
|
||||
IEclipseContext context;
|
||||
|
||||
PreferencesRatingPart preferencesPart;
|
||||
|
||||
Composite parent;
|
||||
|
||||
/**
|
||||
* Inits the part.
|
||||
*
|
||||
* @param parent the parent
|
||||
*/
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
this.parent = getBaseComposite();
|
||||
UiService.setGridLayout(parent, 1);
|
||||
UiService.setGridData(parent, 9, 9, true, true);
|
||||
|
||||
build();
|
||||
}
|
||||
|
||||
private void build() {
|
||||
|
||||
ProblemElement[] otherPe = problemService.getAll(Criterion.Type);
|
||||
ProblemElement[] mainPe = problemService.getAll(Expert.Type);
|
||||
|
||||
Arrays.stream(parent.getChildren()).forEach(k -> k.dispose());
|
||||
|
||||
// Create PreferenceBuild - BASIC, NO MAIN
|
||||
ArrayList<PreferenceBuild> builds = new ArrayList<>();
|
||||
for(int i = 0; i < mainPe.length; ++i) {
|
||||
for (int j = 0; j < otherPe.length; j++) {
|
||||
|
||||
List<AHPSortReferencencePoint> listLeftPe = referencePointsService.get((Criterion) otherPe[j]);
|
||||
Collections.sort(listLeftPe);
|
||||
|
||||
ProblemElement[] leftPe = listLeftPe.toArray(new ProblemElement[0]);
|
||||
ProblemElement[] rightPe = leftPe;
|
||||
|
||||
PreferenceBuild build = new PreferenceBuild(mainPe[i], otherPe[j], leftPe, rightPe);
|
||||
ContextInjectionFactory.inject(build, context);
|
||||
builds.add(build);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
preferencesPart = ContextInjectionFactory.make(PreferencesRatingPart.class, context);
|
||||
preferencesPart.initPreferencesRatingPart(parent, builds.toArray(new PreferenceBuild[0]));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
// build();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isForwardEnabled() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user