Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/target/
target/
.git-versioned-pom.xml
xslt
.konveyor
Expand Down
8 changes: 8 additions & 0 deletions inez.model.tests/.eclipse-pmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="true" />
<rulesets>
<ruleset name="Kode Konveyor ruleset" ref=".konveyor/konveyor.xml" refcontext="project" />
<ruleset name="Upstream rules" ref=".konveyor/upstream.xml" refcontext="project" />
</rulesets>
</eclipse-pmd>
1 change: 0 additions & 1 deletion inez.model.tests/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions inez.model.tests/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>ch.acanda.eclipse.pmd.builder.PMDNature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion inez.model.tests/build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source.. = src/main/java/
source.. = src/main/java/,src/main/resources
output.. = target/classes/
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -79,19 +78,6 @@ void test() throws IOException {
assertTrue(element.isInstance(THING_ID));
}

private List<String> ancestry(String x) {
if (x == null)
return List.of("<none>");
if (x.equals(THING_ID))
return List.of(THING_ID);
if (x.equals(ROOT_ID))
return List.of(ROOT_ID);
BridiElement element = bridiElementFactory.apply(x);
List<String> ancestry = new ArrayList<>(ancestry(element.getParent().id));
ancestry.add(0, x);
return ancestry;
}

private String loadResourceAsString(String definitionName)
throws IOException {
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class CreateBridiElementServiceTest extends TestBase
@Override
public void setUp() {
super.setUp();
element = createBridiElement.apply(MY_MODEL_ID, HUMAN_ID, ALICE_REPR, null);
element = createBridiElement.apply(MY_MODEL_ID, HUMAN_ID, ALICE_REPR);
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Bridi>> argument = ArgumentCaptor.forClass(List.class);
verify(createBridiElement.saveBridi).apply(argument.capture());
saved = argument.getValue();
Expand Down Expand Up @@ -94,6 +95,7 @@ void test5_1() {
void test6() {
createBridiElement.apply(MY_MODEL_ID, HUMAN_ID, ALICE_REPR, IS_A_ID,
ALICE_ID, GOD_ID);
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Bridi>> argument = ArgumentCaptor.forClass(List.class);
verify(createBridiElement.saveBridi, times(2)).apply(argument.capture());
List<Bridi> saved = argument.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,15 @@ class QueryProcessorEndToEndTest implements BridiTestData {
@Autowired
InezImpl inez;

@Autowired
SpringBootBundleActivator springBootBundleActivator;

@BeforeEach
private void setUp() {
ServiceReference sr = mock(ServiceReference.class);
void setUp() {
ServiceReference<Save> sr = mock(ServiceReference.class);
BundleContext ctx = mock(BundleContext.class);
when(ctx.getServiceReference("io.github.magwas.inez.functions.Save"))
when((ServiceReference<Save>)ctx.getServiceReference("io.github.magwas.inez.functions.Save"))
.thenReturn(sr);
when(ctx.getService(sr)).thenReturn(new Save());
springBootBundleActivator.bundleContext = ctx;
SpringBootBundleActivator.bundleContext = ctx;
inez.initialize();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static org.mockito.Mockito.mock;

public class SaveBridiServiceStub {
private static SaveBridiService stub() {
static SaveBridiService stub() {
SaveBridiService mock = mock(SaveBridiService.class);
return mock;
}
Expand Down
4 changes: 2 additions & 2 deletions inez.model/.eclipse-pmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="true" />
<rulesets>
<ruleset name="Kode Konveyor ruleset" ref="konveyor-pmdrules/target/classes/konveyor.xml" refcontext="workspace" />
<ruleset name="Upstream rules" ref="konveyor-pmdrules/target/classes/upstream.xml" refcontext="workspace" />
<ruleset name="Kode Konveyor ruleset" ref=".konveyor/konveyor.xml" refcontext="project" />
<ruleset name="Upstream rules" ref=".konveyor/upstream.xml" refcontext="project" />
</rulesets>
</eclipse-pmd>
2 changes: 0 additions & 2 deletions inez.model/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion inez.model/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
bin.includes = META-INF/,\
plugin.xml,\
.
output.. = target/classes/
source.. = src/main/java
5 changes: 0 additions & 5 deletions inez.model/plugin.xml

This file was deleted.

18 changes: 0 additions & 18 deletions inez.model/src/main/java/io/github/magwas/inez/Main.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
import io.github.magwas.inez.Inez;
import io.github.magwas.inez.InezImpl;
import io.github.magwas.inez.query.BridiFunction;
import io.github.magwas.kodekonveyorannotations.Glue;

@SpringBootApplication
@EnableMapRepositories("io.github.magwas.inez.storage")
@ComponentScan(basePackages = { "io.github.magwas" })
@Glue
public class SpringBootBundleActivator implements BundleActivator {

public static BundleContext bundleContext;
Expand Down
2 changes: 1 addition & 1 deletion inez.parser.tests/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
8 changes: 8 additions & 0 deletions inez.parser.tests/.eclipse-pmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="true" />
<rulesets>
<ruleset name="Kode Konveyor ruleset" ref=".konveyor/konveyor.xml" refcontext="project" />
<ruleset name="Upstream rules" ref=".konveyor/upstream.xml" refcontext="project" />
</rulesets>
</eclipse-pmd>
2 changes: 0 additions & 2 deletions inez.parser.tests/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions inez.parser.tests/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>ch.acanda.eclipse.pmd.builder.PMDNature</nature>
</natures>
</projectDescription>
6 changes: 3 additions & 3 deletions inez.parser/.eclipse-pmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="false" />
<analysis enabled="true" />
<rulesets>
<ruleset name="Kode Konveyor ruleset" ref="konveyor-pmdrules/target/classes/konveyor.xml" refcontext="workspace" />
<ruleset name="Upstream rules" ref="konveyor-pmdrules/target/classes/upstream.xml" refcontext="workspace" />
<ruleset name="Kode Konveyor ruleset" ref=".konveyor/konveyor.xml" refcontext="project" />
<ruleset name="Upstream rules" ref=".konveyor/upstream.xml" refcontext="project" />
</rulesets>
</eclipse-pmd>
1 change: 0 additions & 1 deletion inez.parser/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions inez.parser/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>ch.acanda.eclipse.pmd.builder.PMDNature</nature>
</natures>
</projectDescription>
1 change: 0 additions & 1 deletion inez.target/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions inez.ui.product/.gitignore

This file was deleted.

8 changes: 8 additions & 0 deletions inez.ui.tests/.eclipse-pmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="true" />
<rulesets>
<ruleset name="Kode Konveyor ruleset" ref=".konveyor/konveyor.xml" refcontext="project" />
<ruleset name="Upstream rules" ref=".konveyor/upstream.xml" refcontext="project" />
</rulesets>
</eclipse-pmd>
2 changes: 0 additions & 2 deletions inez.ui.tests/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions inez.ui.tests/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>ch.acanda.eclipse.pmd.builder.PMDNature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions inez.ui/.eclipse-pmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="true" />
<rulesets>
<ruleset name="Kode Konveyor ruleset" ref=".konveyor/konveyor.xml" refcontext="project" />
<ruleset name="Upstream rules" ref=".konveyor/upstream.xml" refcontext="project" />
</rulesets>
</eclipse-pmd>
2 changes: 0 additions & 2 deletions inez.ui/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions inez.ui/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>ch.acanda.eclipse.pmd.builder.PMDNature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion inez.ui/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source.. = src/
output.. = bin/
output.. = target/classes
bin.includes = plugin.xml,\
META-INF/,\
.
4 changes: 2 additions & 2 deletions inez.ui/src/io/github/magwas/inez/ui/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public Object start(IApplicationContext context) {
int returnCode = PlatformUI.createAndRunWorkbench(display,
new ApplicationWorkbenchAdvisor());
if (returnCode == PlatformUI.RETURN_RESTART) {
return IApplication.EXIT_RESTART;
return EXIT_RESTART;
}
return IApplication.EXIT_OK;
return EXIT_OK;
} finally {
display.dispose();
}
Expand Down
12 changes: 0 additions & 12 deletions inez.ui/src/io/github/magwas/inez/ui/Perspective.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,4 @@ public void createInitialLayout(IPageLayout layout) {

}

private void addFolderLayouts(IPageLayout layout) {
// The declared order of these matters
folderLayoutLeftTop = layout.createFolder(LEFT_TOP, IPageLayout.LEFT, .23f,
IPageLayout.ID_EDITOR_AREA);
folderLayoutLeftBottom = layout.createFolder("Left bottom",
IPageLayout.BOTTOM, .6f, LEFT_TOP);
folderLayoutRight = layout.createPlaceholderFolder("right",
IPageLayout.RIGHT, .85f, IPageLayout.ID_EDITOR_AREA);
folderLayoutBottom = layout.createFolder("bottom", IPageLayout.BOTTOM, .7f,
IPageLayout.ID_EDITOR_AREA);
}

}
12 changes: 6 additions & 6 deletions inez.ui/src/io/github/magwas/inez/ui/mindmap/MindMapNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public class MindMapNode extends AbstractMindMapItem implements Serializable {
*/
private Rectangle bounds;

private List<MindMapConnection> incomingConnections = new ArrayList();
private List<MindMapConnection> outgoingConnections = new ArrayList();
private List<MindMapConnection> incomingConnections = new ArrayList<>();
private List<MindMapConnection> outgoingConnections = new ArrayList<>();

public void addIncomingConnection(MindMapConnection conn) {
incomingConnections.add(conn);
Expand Down Expand Up @@ -90,19 +90,19 @@ public void removeOutgoingConnection(MindMapConnection conn) {

public void setBounds(Rectangle bounds) {
pcs.firePropertyChange(PROP_BOUNDS, this.bounds,
(this.bounds = bounds.getCopy()));
this.bounds = bounds.getCopy());
}

public void setColor(Color color) {
pcs.firePropertyChange(PROP_COLOR, this.color, (this.color = color));
pcs.firePropertyChange(PROP_COLOR, this.color, this.color = color);
}

public void setDescription(String description) {
pcs.firePropertyChange(PROP_DESCRIPTION, this.description,
(this.description = description));
this.description = description);
}

public void setTitle(String title) {
pcs.firePropertyChange(PROP_TITLE, this.title, (this.title = title));
pcs.firePropertyChange(PROP_TITLE, this.title, this.title = title);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.github.magwas.inez.ui.mindmap.visuals;

import javafx.scene.shape.Polygon;

public class ArrowHead extends Polygon {
public ArrowHead() {
super(0, 0, 10, 3, 10, -3);
}
}
Loading
Loading