-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EDITORS-294 Allow selecting inherited signatures in calls.
- Loading branch information
Showing
17 changed files
with
632 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
**/bin/ | ||
**/*.class | ||
target/ | ||
xtend-gen/ |
34 changes: 34 additions & 0 deletions
34
...ors.sirius.custom/src/org/palladiosimulator/editors/sirius/custom/util/PCMQueryUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.palladiosimulator.editors.sirius.custom.util; | ||
|
||
import java.util.ArrayDeque; | ||
import java.util.Collection; | ||
import java.util.HashSet; | ||
import java.util.Queue; | ||
|
||
import org.palladiosimulator.pcm.repository.OperationInterface; | ||
|
||
public final class PCMQueryUtils { | ||
|
||
private PCMQueryUtils() { | ||
// intentionally empty | ||
} | ||
|
||
public static Collection<OperationInterface> getTransitiveParentInterfaceClosureIncludingSelf( | ||
OperationInterface self) { | ||
Collection<OperationInterface> closure = new HashSet<>(); | ||
Queue<OperationInterface> queue = new ArrayDeque<>(); | ||
queue.add(self); | ||
while (!queue.isEmpty()) { | ||
OperationInterface current = queue.poll(); | ||
closure.add(current); | ||
current.getParentInterfaces__Interface() | ||
.stream() | ||
.filter(OperationInterface.class::isInstance) | ||
.map(OperationInterface.class::cast) | ||
.filter(i -> !closure.contains(i)) | ||
.forEach(queue::add); | ||
} | ||
return closure; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/org.palladiosimulator.editors.sirius.custom.tests/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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-11"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"> | ||
<attributes> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="xtend-gen"> | ||
<attributes> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
34 changes: 34 additions & 0 deletions
34
tests/org.palladiosimulator.editors.sirius.custom.tests/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.palladiosimulator.editors.sirius.custom.tests</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<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> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
</natures> | ||
</projectDescription> |
9 changes: 9 additions & 0 deletions
9
tests/org.palladiosimulator.editors.sirius.custom.tests/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | ||
org.eclipse.jdt.core.compiler.compliance=11 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=11 |
14 changes: 14 additions & 0 deletions
14
tests/org.palladiosimulator.editors.sirius.custom.tests/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Sirius Editors Custom Code Tests | ||
Bundle-SymbolicName: org.palladiosimulator.editors.sirius.custom.tests | ||
Bundle-Version: 5.1.0.qualifier | ||
Fragment-Host: org.palladiosimulator.editors.sirius.custom;bundle-version="5.0.0" | ||
Automatic-Module-Name: org.palladiosimulator.editors.sirius.custom.tests | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 | ||
Import-Package: org.junit;version="4.12.0", | ||
org.junit.jupiter.api;version="5.7.0" | ||
Require-Bundle: com.google.guava, | ||
org.eclipse.xtext.xbase.lib, | ||
org.eclipse.xtend.lib, | ||
org.eclipse.xtend.lib.macro |
5 changes: 5 additions & 0 deletions
5
tests/org.palladiosimulator.editors.sirius.custom.tests/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source.. = src/,\ | ||
xtend-gen/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
. |
Oops, something went wrong.