-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Yakindu/issue_xtext_migration
Migrated to current 3.5.0 master
- Loading branch information
Showing
34 changed files
with
909 additions
and
941 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
25 changes: 25 additions & 0 deletions
25
plugins/com.yakindu.sct.domain.scenario.lang.ui/META-INF/MANIFEST.MF_gen
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,25 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: com.yakindu.sct.domain.scenario.lang.ui | ||
Bundle-SymbolicName: com.yakindu.sct.domain.scenario.lang.ui;singleton:=true | ||
Bundle-Version: 0.0.1.qualifier | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Bundle-ActivationPolicy: lazy | ||
Export-Package: com.yakindu.sct.domain.scenario.ide.contentassist.antlr, | ||
com.yakindu.sct.domain.scenario.ide.contentassist.antlr.internal, | ||
com.yakindu.sct.domain.scenario.lang.ui.internal, | ||
com.yakindu.sct.domain.scenario.ui.contentassist, | ||
com.yakindu.sct.domain.scenario.ui.quickfix | ||
Require-Bundle: org.antlr.runtime, | ||
org.eclipse.compare, | ||
org.eclipse.ui, | ||
org.eclipse.ui.editors, | ||
org.eclipse.xtend.lib;resolution:=optional, | ||
org.eclipse.xtext.builder, | ||
org.eclipse.xtext.ui, | ||
org.eclipse.xtext.ui.codetemplates.ui, | ||
org.eclipse.xtext.ui.shared, | ||
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0" | ||
Import-Package: org.apache.log4j | ||
Bundle-Activator: com.yakindu.sct.domain.scenario.lang.ui.internal.LangActivator | ||
Automatic-Module-Name: com.yakindu.sct.domain.scenario.lang.ui |
679 changes: 344 additions & 335 deletions
679
plugins/com.yakindu.sct.domain.scenario.lang.ui/plugin.xml_gen
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
...main.scenario.lang.ui/src/com/yakindu/sct/domain/scenario/ide/ScenarioTextIdeModule.xtend
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,10 @@ | ||
/* | ||
* (c) by committers of YAKINDU */ | ||
package com.yakindu.sct.domain.scenario.ide | ||
|
||
|
||
/** | ||
* Use this class to register ide components. | ||
*/ | ||
class ScenarioTextIdeModule extends AbstractScenarioTextIdeModule { | ||
} |
19 changes: 19 additions & 0 deletions
19
...omain.scenario.lang.ui/src/com/yakindu/sct/domain/scenario/ide/ScenarioTextIdeSetup.xtend
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,19 @@ | ||
/* | ||
* (c) by committers of YAKINDU */ | ||
package com.yakindu.sct.domain.scenario.ide | ||
|
||
import com.google.inject.Guice | ||
import com.yakindu.sct.domain.scenario.ScenarioTextRuntimeModule | ||
import com.yakindu.sct.domain.scenario.ScenarioTextStandaloneSetup | ||
import org.eclipse.xtext.util.Modules2 | ||
|
||
/** | ||
* Initialization support for running Xtext languages as language servers. | ||
*/ | ||
class ScenarioTextIdeSetup extends ScenarioTextStandaloneSetup { | ||
|
||
override createInjector() { | ||
Guice.createInjector(Modules2.mixin(new ScenarioTextRuntimeModule, new ScenarioTextIdeModule)) | ||
} | ||
|
||
} |
100 changes: 0 additions & 100 deletions
100
....domain.scenario.lang.ui/src/com/yakindu/sct/domain/scenario/ui/ScenarioTextUiModule.java
This file was deleted.
Oops, something went wrong.
84 changes: 84 additions & 0 deletions
84
...domain.scenario.lang.ui/src/com/yakindu/sct/domain/scenario/ui/ScenarioTextUiModule.xtend
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,84 @@ | ||
package com.yakindu.sct.domain.scenario.ui | ||
|
||
import com.google.inject.Binder | ||
import com.google.inject.Provider | ||
import com.google.inject.name.Names | ||
import org.eclipse.jface.text.ITextHover | ||
import org.eclipse.ui.plugin.AbstractUIPlugin | ||
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider | ||
import org.eclipse.xtext.resource.clustering.DynamicResourceClusteringPolicy | ||
import org.eclipse.xtext.resource.clustering.IResourceClusteringPolicy | ||
import org.eclipse.xtext.resource.containers.IAllContainersState | ||
import org.eclipse.xtext.ui.editor.hover.DispatchingEObjectTextHover | ||
import org.eclipse.xtext.ui.editor.hover.IEObjectHover | ||
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider | ||
import org.eclipse.xtext.ui.editor.hover.ProblemAnnotationHover | ||
import org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory | ||
import org.eclipse.xtext.ui.editor.model.JavaClassPathResourceForIEditorInputFactory | ||
import org.eclipse.xtext.ui.editor.model.ResourceForIEditorInputFactory | ||
import org.eclipse.xtext.ui.resource.IResourceSetProvider | ||
import org.eclipse.xtext.ui.resource.SimpleResourceSetProvider | ||
import org.eclipse.xtext.ui.resource.XtextResourceSetProvider | ||
import org.eclipse.xtext.ui.shared.Access | ||
import org.yakindu.base.utils.jface.help.CrossRefObjectTextHover | ||
import org.yakindu.base.utils.jface.help.HelpHoverProvider | ||
import org.yakindu.sct.model.stext.ui.help.STextUserHelpDocumentationProvider | ||
|
||
class ScenarioTextUiModule extends AbstractScenarioTextUiModule { | ||
new(AbstractUIPlugin plugin) { | ||
super(plugin) | ||
} | ||
|
||
def Class<? extends IEObjectDocumentationProvider> bindIEObjectDocumentationProvider() { | ||
return STextUserHelpDocumentationProvider | ||
} | ||
|
||
def Class<? extends DispatchingEObjectTextHover> bindDispatchingEObjectTextHover() { | ||
return CrossRefObjectTextHover | ||
} | ||
|
||
override Class<? extends IEObjectHover> bindIEObjectHover() { | ||
return CrossRefObjectTextHover | ||
} | ||
|
||
def Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { | ||
return HelpHoverProvider | ||
} | ||
|
||
override void configure(Binder binder) { | ||
super.configure(binder) | ||
binder.bind(typeof(String)).annotatedWith(Names::named("stylesheet")).toInstance("/StextHoverStyleSheet.css") | ||
} | ||
|
||
override Provider<IAllContainersState> provideIAllContainersState() { | ||
if (Access::getJdtHelper().get().isJavaCoreAvailable()) { | ||
return Access::getJavaProjectsState() | ||
} else { | ||
return Access::getWorkspaceProjectsState() | ||
} | ||
} | ||
|
||
override Class<? extends IResourceSetProvider> bindIResourceSetProvider() { | ||
if (Access::getJdtHelper().get().isJavaCoreAvailable()) { | ||
return typeof(XtextResourceSetProvider) | ||
} else { | ||
return typeof(SimpleResourceSetProvider) | ||
} | ||
} | ||
|
||
override Class<? extends IResourceForEditorInputFactory> bindIResourceForEditorInputFactory() { | ||
if (Access::getJdtHelper().get().isJavaCoreAvailable()) { | ||
return typeof(JavaClassPathResourceForIEditorInputFactory) | ||
} else { | ||
return typeof(ResourceForIEditorInputFactory) | ||
} | ||
} | ||
|
||
override Class<? extends ITextHover> bindITextHover() { | ||
return typeof(ProblemAnnotationHover) | ||
} | ||
|
||
def Class<? extends IResourceClusteringPolicy> bindIResourceClusteringPolicy() { | ||
return typeof(DynamicResourceClusteringPolicy) | ||
} | ||
} |
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
22 changes: 0 additions & 22 deletions
22
...src/com/yakindu/sct/domain/scenario/ui/labeling/ScenarioTextDescriptionLabelProvider.java
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...rc/com/yakindu/sct/domain/scenario/ui/labeling/ScenarioTextDescriptionLabelProvider.xtend
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,23 @@ | ||
/* | ||
* (c) by committers of YAKINDU */ | ||
package com.yakindu.sct.domain.scenario.ui.labeling | ||
|
||
import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider | ||
|
||
/** | ||
* Provides labels for IEObjectDescriptions and IResourceDescriptions. | ||
* | ||
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider | ||
*/ | ||
class ScenarioTextDescriptionLabelProvider extends DefaultDescriptionLabelProvider { | ||
|
||
// Labels and icons can be computed like this: | ||
|
||
// override text(IEObjectDescription ele) { | ||
// ele.name.toString | ||
// } | ||
// | ||
// override image(IEObjectDescription ele) { | ||
// ele.EClass.name + '.gif' | ||
// } | ||
} |
29 changes: 0 additions & 29 deletions
29
...io.lang.ui/src/com/yakindu/sct/domain/scenario/ui/labeling/ScenarioTextLabelProvider.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...o.lang.ui/src/com/yakindu/sct/domain/scenario/ui/labeling/ScenarioTextLabelProvider.xtend
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,30 @@ | ||
/* | ||
* (c) by committers of YAKINDU */ | ||
package com.yakindu.sct.domain.scenario.ui.labeling | ||
|
||
import com.google.inject.Inject | ||
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider | ||
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider | ||
|
||
/** | ||
* Provides labels for EObjects. | ||
* | ||
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider | ||
*/ | ||
class ScenarioTextLabelProvider extends DefaultEObjectLabelProvider { | ||
|
||
@Inject | ||
new(AdapterFactoryLabelProvider delegate) { | ||
super(delegate); | ||
} | ||
|
||
// Labels and icons can be computed like this: | ||
|
||
// def text(Greeting ele) { | ||
// 'A greeting to ' + ele.name | ||
// } | ||
// | ||
// def image(Greeting ele) { | ||
// 'Greeting.gif' | ||
// } | ||
} |
Oops, something went wrong.