diff options
author | 2018-01-13 19:33:26 +0100 | |
---|---|---|
committer | 2018-01-13 19:33:26 +0100 | |
commit | 7e50434905cbb7f5d03636033b698e17a9075e9d (patch) | |
tree | 10e0968c20ac55dae4f5dc6077f39cf9947e3cb9 /Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf | |
parent | Test and measurement runners (diff) | |
download | VIATRA-Generator-7e50434905cbb7f5d03636033b698e17a9075e9d.tar.gz VIATRA-Generator-7e50434905cbb7f5d03636033b698e17a9075e9d.tar.zst VIATRA-Generator-7e50434905cbb7f5d03636033b698e17a9075e9d.zip |
Initial commit of the configuration language and application
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf')
7 files changed, 135 insertions, 0 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/ApplicationConfigurationUiModule.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/ApplicationConfigurationUiModule.xtend new file mode 100644 index 00000000..ad86ba44 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/ApplicationConfigurationUiModule.xtend | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ui | ||
5 | |||
6 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | ||
7 | |||
8 | /** | ||
9 | * Use this class to register components to be used within the Eclipse IDE. | ||
10 | */ | ||
11 | @FinalFieldsConstructor | ||
12 | class ApplicationConfigurationUiModule extends AbstractApplicationConfigurationUiModule { | ||
13 | } | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/contentassist/ApplicationConfigurationProposalProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/contentassist/ApplicationConfigurationProposalProvider.xtend new file mode 100644 index 00000000..4eb4bf2b --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/contentassist/ApplicationConfigurationProposalProvider.xtend | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ui.contentassist | ||
5 | |||
6 | |||
7 | /** | ||
8 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist | ||
9 | * on how to customize the content assistant. | ||
10 | */ | ||
11 | class ApplicationConfigurationProposalProvider extends AbstractApplicationConfigurationProposalProvider { | ||
12 | } | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java new file mode 100644 index 00000000..74e30ac6 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java | |||
@@ -0,0 +1,16 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.ui.execute; | ||
2 | |||
3 | import org.eclipse.core.commands.AbstractHandler; | ||
4 | import org.eclipse.core.commands.ExecutionEvent; | ||
5 | import org.eclipse.core.commands.ExecutionException; | ||
6 | import org.eclipse.core.commands.IHandler; | ||
7 | |||
8 | public class ExecuteScriptHandler extends AbstractHandler implements IHandler { | ||
9 | |||
10 | @Override | ||
11 | public Object execute(ExecutionEvent event) throws ExecutionException { | ||
12 | System.out.println("Called"); | ||
13 | return null; | ||
14 | } | ||
15 | |||
16 | } | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/labeling/ApplicationConfigurationDescriptionLabelProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/labeling/ApplicationConfigurationDescriptionLabelProvider.xtend new file mode 100644 index 00000000..eaade5a8 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/labeling/ApplicationConfigurationDescriptionLabelProvider.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ui.labeling | ||
5 | |||
6 | import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider | ||
7 | |||
8 | /** | ||
9 | * Provides labels for IEObjectDescriptions and IResourceDescriptions. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider | ||
12 | */ | ||
13 | class ApplicationConfigurationDescriptionLabelProvider extends DefaultDescriptionLabelProvider { | ||
14 | |||
15 | // Labels and icons can be computed like this: | ||
16 | |||
17 | // override text(IEObjectDescription ele) { | ||
18 | // ele.name.toString | ||
19 | // } | ||
20 | // | ||
21 | // override image(IEObjectDescription ele) { | ||
22 | // ele.EClass.name + '.gif' | ||
23 | // } | ||
24 | } | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/labeling/ApplicationConfigurationLabelProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/labeling/ApplicationConfigurationLabelProvider.xtend new file mode 100644 index 00000000..7d8396ef --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/labeling/ApplicationConfigurationLabelProvider.xtend | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ui.labeling | ||
5 | |||
6 | import com.google.inject.Inject | ||
7 | import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider | ||
8 | import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider | ||
9 | |||
10 | /** | ||
11 | * Provides labels for EObjects. | ||
12 | * | ||
13 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider | ||
14 | */ | ||
15 | class ApplicationConfigurationLabelProvider extends DefaultEObjectLabelProvider { | ||
16 | |||
17 | @Inject | ||
18 | new(AdapterFactoryLabelProvider delegate) { | ||
19 | super(delegate); | ||
20 | } | ||
21 | |||
22 | // Labels and icons can be computed like this: | ||
23 | |||
24 | // def text(Greeting ele) { | ||
25 | // 'A greeting to ' + ele.name | ||
26 | // } | ||
27 | // | ||
28 | // def image(Greeting ele) { | ||
29 | // 'Greeting.gif' | ||
30 | // } | ||
31 | } | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/outline/ApplicationConfigurationOutlineTreeProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/outline/ApplicationConfigurationOutlineTreeProvider.xtend new file mode 100644 index 00000000..94c0e8fe --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/outline/ApplicationConfigurationOutlineTreeProvider.xtend | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ui.outline | ||
5 | |||
6 | import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider | ||
7 | |||
8 | /** | ||
9 | * Customization of the default outline structure. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#outline | ||
12 | */ | ||
13 | class ApplicationConfigurationOutlineTreeProvider extends DefaultOutlineTreeProvider { | ||
14 | |||
15 | } | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/quickfix/ApplicationConfigurationQuickfixProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/quickfix/ApplicationConfigurationQuickfixProvider.xtend new file mode 100644 index 00000000..317e1b0a --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/quickfix/ApplicationConfigurationQuickfixProvider.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ui.quickfix | ||
5 | |||
6 | import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider | ||
7 | |||
8 | /** | ||
9 | * Custom quickfixes. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes | ||
12 | */ | ||
13 | class ApplicationConfigurationQuickfixProvider extends DefaultQuickfixProvider { | ||
14 | |||
15 | // @Fix(ApplicationConfigurationValidator.INVALID_NAME) | ||
16 | // def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { | ||
17 | // acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ | ||
18 | // context | | ||
19 | // val xtextDocument = context.xtextDocument | ||
20 | // val firstLetter = xtextDocument.get(issue.offset, 1) | ||
21 | // xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) | ||
22 | // ] | ||
23 | // } | ||
24 | } | ||