Skip to content

Commit

Permalink
update the workflow of the ros derived grammars to properly support t…
Browse files Browse the repository at this point in the history
…he version 2.30
  • Loading branch information
ipa-nhg committed Mar 24, 2023
1 parent 57c8ac5 commit 5067f0a
Show file tree
Hide file tree
Showing 32 changed files with 218 additions and 312 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ide


/**
* Use this class to register ide components.
*/
class RosSystemIdeModule extends AbstractRosSystemIdeModule {
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ide

import com.google.inject.Guice
import de.fraunhofer.ipa.rossystem.RosSystemRuntimeModule
import de.fraunhofer.ipa.rossystem.RosSystemStandaloneSetup
import org.eclipse.xtext.util.Modules2

/**
* Initialization support for running Xtext languages as language servers.
*/
class RosSystemIdeSetup extends RosSystemStandaloneSetup {

override createInjector() {
Guice.createInjector(Modules2.mixin(new RosSystemRuntimeModule, new RosSystemIdeModule))
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Require-Bundle: de.fraunhofer.ipa.rossystem.xtext,
org.eclipse.compare;bundle-version="3.8.500",
org.eclipse.xtext.builder;bundle-version="2.30.0",
de.fraunhofer.ipa.ros.xtext;bundle-version="2.0.0",
de.fraunhofer.ipa.ros.xtext.ui;bundle-version="2.0.0"
de.fraunhofer.ipa.ros.xtext.ui;bundle-version="2.0.0",
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0",
org.eclipse.xtend.lib;bundle-version="2.14.0";resolution:=optional
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: de.fraunhofer.ipa.rossystem.ui.contentassist,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import de.fraunhofer.ipa.rossystem.ui.labeling.RosSystemLabelProvider;
import de.fraunhofer.ipa.rossystem.ui.outline.RosSystemOutlineTreeProvider;
import de.fraunhofer.ipa.rossystem.ui.quickfix.RosSystemQuickfixProvider;
import de.fraunhofer.ipa.rossystem.validation.RosSystemValidatorConfigurationBlock;
import org.eclipse.compare.IViewerCreator;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
Expand Down Expand Up @@ -81,7 +80,6 @@
import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences;
import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
import org.eclipse.xtext.ui.shared.Access;
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;

/**
* Manual modifications go to {@link RosSystemUiModule}.
Expand Down Expand Up @@ -144,11 +142,6 @@ public Class<? extends CompletionPrefixProvider> bindCompletionPrefixProvider()
return IndentationAwareCompletionPrefixProvider.class;
}

// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
public Class<? extends AbstractValidatorConfigurationBlock> bindAbstractValidatorConfigurationBlock() {
return RosSystemValidatorConfigurationBlock.class;
}

// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
return FQNPrefixMatcher.class;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
* generated by Xtext 2.25.0
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ui.outline;
package de.fraunhofer.ipa.rossystem.ui.outline

import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider

/**
* Customization of the default outline structure.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#outline
*/
public class RosSystemOutlineTreeProvider extends DefaultOutlineTreeProvider {
class RosSystemOutlineTreeProvider extends DefaultOutlineTreeProvider {

}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ui

import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor

/**
* Use this class to register components to be used within the Eclipse IDE.
*/
@FinalFieldsConstructor
class RosSystemUiModule extends AbstractRosSystemUiModule {
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ui.contentassist


/**
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#content-assist
* on how to customize the content assistant.
*/
class RosSystemProposalProvider extends AbstractRosSystemProposalProvider {
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ui.labeling

import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider

/**
* Provides labels for IEObjectDescriptions and IResourceDescriptions.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#label-provider
*/
class RosSystemDescriptionLabelProvider 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'
// }
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.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/310_eclipse_support.html#label-provider
*/
class RosSystemLabelProvider 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'
// }
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* generated by Xtext 2.30.0
*/
package de.fraunhofer.ipa.rossystem.ui.quickfix

import de.fraunhofer.ipa.ros.ui.quickfix.BasicsQuickfixProvider

/**
* Custom quickfixes.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes
*/
class RosSystemQuickfixProvider extends BasicsQuickfixProvider {

// @Fix(RosSystemValidator.INVALID_NAME)
// def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) {
// acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [
// context |
// val xtextDocument = context.xtextDocument
// val firstLetter = xtextDocument.get(issue.offset, 1)
// xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase)
// ]
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Require-Bundle: de.fraunhofer.ipa.rossystem,
org.eclipse.xtext.util,
org.antlr.runtime;bundle-version="4.7.2",
de.fraunhofer.ipa.ros.xtext;bundle-version="2.0.0",
de.fraunhofer.ipa.ros.xtext.ui;bundle-version="2.0.0"
de.fraunhofer.ipa.ros.xtext.ui;bundle-version="2.0.0",
org.eclipse.xtend.lib;bundle-version="2.14.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: de.fraunhofer.ipa.rossystem.scoping,
de.fraunhofer.ipa.rossystem.serializer,
Expand Down
Loading

0 comments on commit 5067f0a

Please sign in to comment.