Skip to content
Snippets Groups Projects
Commit aa6fee44 authored by Fabian Brosig's avatar Fabian Brosig
Browse files

newly generated xtend fragments

parent 7150ff3c
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,13 @@
*/
package edu.kit.ipd.descartes.mm.adaptation.sta.ui.labeling;
import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
/**
* Provides labels for a IEObjectDescriptions and IResourceDescriptions.
*
* see http://www.eclipse.org/Xtext/documentation.html#labelProvider
*/
@SuppressWarnings("all")
public class StaLangDescriptionLabelProvider /* implements org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider */{
public class StaLangDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
}
......@@ -3,16 +3,19 @@
*/
package edu.kit.ipd.descartes.mm.adaptation.sta.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 a EObjects.
*
* see http://www.eclipse.org/Xtext/documentation.html#labelProvider
*/
@SuppressWarnings("all")
public class StaLangLabelProvider /* implements org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider */{
/* @Inject
*/public StaLangLabelProvider(final /* org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider */Object delegate) {
throw new Error("Unresolved compilation problems:"
+ "\nThe method super is undefined for the type StaLangLabelProvider");
public class StaLangLabelProvider extends DefaultEObjectLabelProvider {
@Inject
public StaLangLabelProvider(final AdapterFactoryLabelProvider delegate) {
super(delegate);
}
}
......@@ -3,11 +3,13 @@
*/
package edu.kit.ipd.descartes.mm.adaptation.sta.ui.outline;
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
/**
* Customization of the default outline structure.
*
* see http://www.eclipse.org/Xtext/documentation.html#outline
*/
@SuppressWarnings("all")
public class StaLangOutlineTreeProvider /* implements org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider */{
public class StaLangOutlineTreeProvider extends DefaultOutlineTreeProvider {
}
......@@ -3,11 +3,13 @@
*/
package edu.kit.ipd.descartes.mm.adaptation.sta.ui.quickfix;
import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
/**
* Custom quickfixes.
*
* see http://www.eclipse.org/Xtext/documentation.html#quickfixes
*/
@SuppressWarnings("all")
public class StaLangQuickfixProvider /* implements org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider */{
public class StaLangQuickfixProvider extends DefaultQuickfixProvider {
}
......@@ -3,7 +3,15 @@
*/
package edu.kit.ipd.descartes.mm.adaptation.sta.formatting;
import com.google.inject.Inject;
import edu.kit.ipd.descartes.mm.adaptation.sta.services.StaLangGrammarAccess;
import java.util.List;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.TerminalRule;
import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
import org.eclipse.xtext.formatting.impl.FormattingConfig;
import org.eclipse.xtext.util.Pair;
import org.eclipse.xtext.xbase.lib.Extension;
/**
* This class contains custom formatting description.
......@@ -14,40 +22,48 @@ import edu.kit.ipd.descartes.mm.adaptation.sta.services.StaLangGrammarAccess;
* Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
*/
@SuppressWarnings("all")
public class StaLangFormatter /* implements AbstractDeclarativeFormatter */{
/* @Inject
*/private StaLangGrammarAccess _staLangGrammarAccess;
public class StaLangFormatter extends AbstractDeclarativeFormatter {
@Inject
@Extension
private StaLangGrammarAccess _staLangGrammarAccess;
protected Object configureFormatting(final /* FormattingConfig */Object c) {
throw new Error("Unresolved compilation problems:"
+ "\nThe method findKeywordPairs is undefined for the type StaLangFormatter"
+ "\nThe method findKeywords is undefined for the type StaLangFormatter"
+ "\nThe method or field SL_COMMENTRule is undefined for the type StaLangFormatter"
+ "\nThe method or field ML_COMMENTRule is undefined for the type StaLangFormatter"
+ "\nThe method or field ML_COMMENTRule is undefined for the type StaLangFormatter"
+ "\nsetIndentation cannot be resolved"
+ "\nfirst cannot be resolved"
+ "\nsecond cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nafter cannot be resolved"
+ "\nfirst cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nbefore cannot be resolved"
+ "\nsecond cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nafter cannot be resolved"
+ "\nsecond cannot be resolved"
+ "\nsetNoLinewrap cannot be resolved"
+ "\nbefore cannot be resolved"
+ "\nsetNoSpace cannot be resolved"
+ "\nbefore cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nafter cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nbefore cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nbefore cannot be resolved"
+ "\nsetLinewrap cannot be resolved"
+ "\nafter cannot be resolved");
protected void configureFormatting(final FormattingConfig c) {
List<Pair<Keyword, Keyword>> _findKeywordPairs = this._staLangGrammarAccess.findKeywordPairs("{", "}");
for (final Pair<Keyword, Keyword> pair : _findKeywordPairs) {
{
Keyword _first = pair.getFirst();
Keyword _second = pair.getSecond();
c.setIndentation(_first, _second);
FormattingConfig.LinewrapLocator _setLinewrap = c.setLinewrap(1);
Keyword _first_1 = pair.getFirst();
_setLinewrap.after(_first_1);
FormattingConfig.LinewrapLocator _setLinewrap_1 = c.setLinewrap(1);
Keyword _second_1 = pair.getSecond();
_setLinewrap_1.before(_second_1);
FormattingConfig.LinewrapLocator _setLinewrap_2 = c.setLinewrap(1);
Keyword _second_2 = pair.getSecond();
_setLinewrap_2.after(_second_2);
}
}
List<Keyword> _findKeywords = this._staLangGrammarAccess.findKeywords(",");
for (final Keyword comma : _findKeywords) {
{
FormattingConfig.NoLinewrapLocator _setNoLinewrap = c.setNoLinewrap();
_setNoLinewrap.before(comma);
FormattingConfig.NoSpaceLocator _setNoSpace = c.setNoSpace();
_setNoSpace.before(comma);
FormattingConfig.LinewrapLocator _setLinewrap = c.setLinewrap();
_setLinewrap.after(comma);
}
}
FormattingConfig.LinewrapLocator _setLinewrap = c.setLinewrap(0, 1, 2);
TerminalRule _sL_COMMENTRule = this._staLangGrammarAccess.getSL_COMMENTRule();
_setLinewrap.before(_sL_COMMENTRule);
FormattingConfig.LinewrapLocator _setLinewrap_1 = c.setLinewrap(0, 1, 2);
TerminalRule _mL_COMMENTRule = this._staLangGrammarAccess.getML_COMMENTRule();
_setLinewrap_1.before(_mL_COMMENTRule);
FormattingConfig.LinewrapLocator _setLinewrap_2 = c.setLinewrap(0, 1, 1);
TerminalRule _mL_COMMENTRule_1 = this._staLangGrammarAccess.getML_COMMENTRule();
_setLinewrap_2.after(_mL_COMMENTRule_1);
}
}
......@@ -4,6 +4,8 @@
package edu.kit.ipd.descartes.mm.adaptation.sta.generator;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.generator.IFileSystemAccess;
import org.eclipse.xtext.generator.IGenerator;
/**
* Generates code from your model files on save.
......@@ -11,7 +13,7 @@ import org.eclipse.emf.ecore.resource.Resource;
* see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration
*/
@SuppressWarnings("all")
public class StaLangGenerator /* implements IGenerator */{
public void doGenerate(final Resource resource, final /* IFileSystemAccess */Object fsa) {
public class StaLangGenerator implements IGenerator {
public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment