Search in sources :

Example 1 with ThisResource

use of org.eclipse.xpect.xtext.lib.setup.ThisResource in project n4js by eclipse.

the class HyperlinkXpectMethod method hyperlinks.

/**
 * @param expectation
 *            a list of expected URIs to jump to by this hyperlink
 * @param resource
 *            the resource under test
 * @param region
 *            the offset where hyperlinking should be invoked
 * @throws Exception
 *             some exceptions
 */
@ParameterParser(syntax = "('at' arg2=STRING)?")
@Xpect
public void hyperlinks(// arg0
@CommaSeparatedValuesExpectation ICommaSeparatedValuesExpectation expectation, // arg1
@ThisResource XtextResource resource, // arg2
RegionWithCursor region) throws Exception {
    ContentAssistProcessorTestBuilder fixture = n4ContentAssistProcessorTestBuilderHelper.createTestBuilderForResource(resource);
    String currentModelToParse = resource.getParseResult().getRootNode().getText();
    IXtextDocument xtextDocument = fixture.getDocument(resource, currentModelToParse);
    // in case of cross-file hyperlinks, we have to make sure the target resources are fully resolved
    final ResourceSet resSet = resource.getResourceSet();
    for (Resource currRes : new ArrayList<>(resSet.getResources())) N4JSResource.postProcess(currRes);
    ITextViewer sourceViewer = fixture.getSourceViewer(currentModelToParse, xtextDocument);
    IHyperlink[] hyperlinks = hyperlinkDetector.detectHyperlinks(sourceViewer, new Region(region.getGlobalCursorOffset(), 0), true);
    // cleaned up resource, otherwise #createTestBuilder() above will fail next time this method is called
    XtextResourceCleanUtil.cleanXtextResource(resource);
    ArrayList<String> result = Lists.newArrayList();
    if (hyperlinks != null) {
        for (IHyperlink hyperlink : hyperlinks) {
            result.add(getTargetDescription(resource, hyperlink));
        }
    }
    expectation.assertEquals(result);
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) IHyperlink(org.eclipse.jface.text.hyperlink.IHyperlink) ThisResource(org.eclipse.xpect.xtext.lib.setup.ThisResource) XtextResource(org.eclipse.xtext.resource.XtextResource) N4JSResource(org.eclipse.n4js.resource.N4JSResource) Resource(org.eclipse.emf.ecore.resource.Resource) ArrayList(java.util.ArrayList) Region(org.eclipse.jface.text.Region) ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) IXtextDocument(org.eclipse.xtext.ui.editor.model.IXtextDocument) ITextViewer(org.eclipse.jface.text.ITextViewer) Xpect(org.eclipse.xpect.runner.Xpect) ParameterParser(org.eclipse.xpect.parameter.ParameterParser)

Example 2 with ThisResource

use of org.eclipse.xpect.xtext.lib.setup.ThisResource in project n4js by eclipse.

the class QuickFixXpectMethod method quickFixAndRun.

/*-
	contentAssistList kind 'smart' at 'a.<|>methodA'       display   'methodA2'            --> 'methodA2(): any - A'
	quickFix                       at 'a.<|>method'        apply     'methodA2'  fileValid --> a.<|>methodA2();
	quickFixAndRun                 at 'a.<|>method'        apply     'methodHelloWorld' --> Hello World
	                        kind        offset             checkType  selected    mode
	                                    arg2                          arg3
	 */
/**
 * Apply quick fix, compile and run the result. Compares the generated stdout-result to the expectation on the right
 * hand side.
 *
 * @param expectation
 *            - expected output of running script, just stdout no error-stream. Expecting the error-stream to be
 *            empty.
 * @param resource
 *            - injected resource
 * @param offset
 *            - parsed arg2 - cursor position
 * @param selected
 *            - parsed arg3 - selection from list of expectations
 * @param offset2issue
 *            - injected Map of issues
 * @param init
 *            - injected xpect-initizalizer
 * @param fileSetupContext
 *            - injected xpect meta-info about file under test.
 * @throws Exception
 *             in failure case
 */
@Xpect
@ParameterParser(syntax = "('at' arg2=STRING)? ('apply'  arg3=STRING )?")
@ConsumedIssues({ Severity.INFO, Severity.ERROR, Severity.WARNING })
public void quickFixAndRun(// arg0
@StringExpectation(caseSensitive = true) IStringExpectation expectation, // arg1
@ThisResource XtextResource resource, // arg2
RegionWithCursor offset, // arg3
String selected, @IssuesByLine Multimap<Integer, Issue> offset2issue, ISetupInitializer<Object> init, FileSetupContext fileSetupContext) throws Exception {
    try {
        long timeStart = System.currentTimeMillis();
        logger.info("Execution started: " + new Date(timeStart));
        // System.out.println(
        // "##-Qr-## we got it selected='" + selected + "' at " + offset + " in " + resource.toString() + "");
        String executionResult;
        ExecutionResult exRes = new ExecutionResult();
        ResourceTweaker resourceTweaker = resourceToTweak -> {
            try {
                quickFix(null, resourceToTweak, offset, selected, "fileValid", "", offset2issue, false);
            } catch (Exception e) {
                Exceptions.sneakyThrow(e);
            }
        };
        Display.getDefault().syncExec(() -> exRes.result = compileAndExecute(resource, init, fileSetupContext, resourceTweaker));
        executionResult = exRes.result;
        long timeEnd = System.currentTimeMillis();
        logger.info("Execution finished: " + new Date(timeEnd));
        logger.info("Execution took " + (timeEnd - timeStart + 0.0) / 1000.0 + " seconds.");
        expectation.assertEquals(executionResult);
        // Reset resource after quick fix application and code execution
        resource.reparse(getContentForResourceUri(resource.getURI()));
    } finally {
        logger.info("Closing all editors");
        EditorsUtil.forceCloseAllEditors();
    }
    logger.info("Successful End of Execution");
}
Also used : VarDef(org.eclipse.n4js.xpect.config.VarDef) EditorsUtil(org.eclipse.n4js.tests.util.EditorsUtil) Exceptions(org.eclipse.xtext.xbase.lib.Exceptions) ISetupInitializer(org.eclipse.xpect.setup.ISetupInitializer) Date(java.util.Date) IssueResolutionProvider(org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider) Inject(com.google.inject.Inject) ICommaSeparatedValuesExpectation(org.eclipse.xpect.expectation.ICommaSeparatedValuesExpectation) IStringDiffExpectation(org.eclipse.xpect.expectation.IStringDiffExpectation) ILeafNode(org.eclipse.xtext.nodemodel.ILeafNode) N4JSActivator(org.eclipse.n4js.ui.internal.N4JSActivator) Logger(org.apache.log4j.Logger) Config(org.eclipse.n4js.xpect.config.Config) XtextEditor(org.eclipse.xtext.ui.editor.XtextEditor) ConsumedIssues(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.ConsumedIssues) StringDiffExpectation(org.eclipse.xpect.expectation.StringDiffExpectation) RegionWithCursor(org.eclipse.n4js.xpect.ui.methods.contentassist.RegionWithCursor) EObject(org.eclipse.emf.ecore.EObject) Display(org.eclipse.swt.widgets.Display) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) IssueResolution(org.eclipse.xtext.ui.editor.quickfix.IssueResolution) TestingResourceValidator(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.TestingResourceValidator) List(java.util.List) XpEnvironmentData(org.eclipse.n4js.xpect.config.XpEnvironmentData) Path(org.eclipse.core.runtime.Path) Optional(java.util.Optional) Xpect(org.eclipse.xpect.runner.Xpect) CheckMode(org.eclipse.xtext.validation.CheckMode) ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) URI(org.eclipse.emf.common.util.URI) ThisResource(org.eclipse.xpect.xtext.lib.setup.ThisResource) ResourceTweaker(org.eclipse.n4js.xpect.common.ResourceTweaker) StringExpectation(org.eclipse.xpect.expectation.StringExpectation) IssuesByLine(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.IssuesByLine) Multimap(com.google.common.collect.Multimap) NodeModelUtils(org.eclipse.xtext.nodemodel.util.NodeModelUtils) ValidationTestModuleSetup(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup) Lists(com.google.common.collect.Lists) CancelIndicator(org.eclipse.xtext.util.CancelIndicator) IFile(org.eclipse.core.resources.IFile) QuickFixTestHelper(org.eclipse.n4js.xpect.ui.common.QuickFixTestHelper) XpectImport(org.eclipse.xpect.XpectImport) ParameterParser(org.eclipse.xpect.parameter.ParameterParser) CommaSeparatedValuesExpectation(org.eclipse.xpect.expectation.CommaSeparatedValuesExpectation) GeneratorOption(org.eclipse.n4js.generator.GeneratorOption) XtextResource(org.eclipse.xtext.resource.XtextResource) N4JSOffsetAdapter(org.eclipse.n4js.xpect.common.N4JSOffsetAdapter) Severity(org.eclipse.xtext.diagnostics.Severity) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) XpectN4JSES5TranspilerHelper(org.eclipse.n4js.xpect.ui.common.XpectN4JSES5TranspilerHelper) XpectCommentRemovalUtil(org.eclipse.n4js.xpect.common.XpectCommentRemovalUtil) Issue(org.eclipse.xtext.validation.Issue) FileSetupContext(org.eclipse.xpect.xtext.lib.setup.FileSetupContext) ITokenAdapter(org.eclipse.xpect.expectation.IStringDiffExpectation.ITokenAdapter) Collections(java.util.Collections) IStringExpectation(org.eclipse.xpect.expectation.IStringExpectation) Assert.assertEquals(org.junit.Assert.assertEquals) SystemLoaderInfo(org.eclipse.n4js.runner.SystemLoaderInfo) ResourceTweaker(org.eclipse.n4js.xpect.common.ResourceTweaker) Date(java.util.Date) IOException(java.io.IOException) ConsumedIssues(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.ConsumedIssues) Xpect(org.eclipse.xpect.runner.Xpect) ParameterParser(org.eclipse.xpect.parameter.ParameterParser)

Example 3 with ThisResource

use of org.eclipse.xpect.xtext.lib.setup.ThisResource in project n4js by eclipse.

the class OrganizeImportXpectMethod method organizeImports.

/**
 * Give the result as a multiline diff. If cancellation due to multiple possible resolution is expected, provide the
 * expected Exception with 'XPECT organizeImports ambiguous "Exception-Message" -->'.
 *
 * If the parameter is not provided, always the first computed solution in the list will be taken
 *
 * @param ambiguous
 *            - String Expectation in {@link BreakException}
 */
@ParameterParser(syntax = "('ambiguous' arg0=STRING)?")
@Xpect
@ConsumedIssues({ Severity.INFO, Severity.ERROR, Severity.WARNING })
public void organizeImports(// arg0
String ambiguous, @StringDiffExpectation(whitespaceSensitive = false, allowSingleSegmentDiff = false, allowSingleLineDiff = false) IStringDiffExpectation expectation, @ThisResource XtextResource resource) throws Exception {
    logger.info("organize imports ...");
    boolean bAmbiguityCheck = ambiguous != null && ambiguous.trim().length() > 0;
    Interaction iaMode = bAmbiguityCheck ? Interaction.breakBuild : Interaction.takeFirst;
    try {
        if (expectation == null) /* || expectation.isEmpty() */
        {
            // Cannot access the region which could be asked for it's length.
            throw new AssertionFailedError("The test is missing a diff: // XPECT organizeImports --> [old string replaced|new string expected] ");
        }
        // capture text for comparison:
        String beforeApplication = resource.getParseResult().getRootNode().getText();
        N4ContentAssistProcessorTestBuilder fixture = n4ContentAssistProcessorTestBuilderHelper.createTestBuilderForResource(resource);
        IXtextDocument xtextDoc = fixture.getDocument(resource, beforeApplication);
        // in case of cross-file hyperlinks, we have to make sure the target resources are fully resolved
        final ResourceSet resSet = resource.getResourceSet();
        for (Resource currRes : new ArrayList<>(resSet.getResources())) {
            N4JSResource.postProcess(currRes);
        }
        // Calling organize imports
        Display.getDefault().syncExec(() -> imortsOrganizer.unsafeOrganizeDocument(xtextDoc, iaMode));
        if (bAmbiguityCheck) {
            // should fail if here
            assertEquals("Expected ambiguous resolution to break the organize import command.", ambiguous, "");
        }
        // checking that no errors are left.
        String textAfterApplication = xtextDoc.get();
        // compare with expectation, it's a multiline-diff expectation.
        String before = XpectCommentRemovalUtil.removeAllXpectComments(beforeApplication);
        String after = XpectCommentRemovalUtil.removeAllXpectComments(textAfterApplication);
        expectation.assertDiffEquals(before, after);
    } catch (Exception exc) {
        if (exc instanceof RuntimeException && exc.getCause() instanceof BreakException) {
            String breakMessage = exc.getCause().getMessage();
            assertEquals(ambiguous, breakMessage);
        } else {
            throw exc;
        }
    }
}
Also used : Interaction(org.eclipse.n4js.ui.organize.imports.Interaction) ThisResource(org.eclipse.xpect.xtext.lib.setup.ThisResource) XtextResource(org.eclipse.xtext.resource.XtextResource) N4JSResource(org.eclipse.n4js.resource.N4JSResource) Resource(org.eclipse.emf.ecore.resource.Resource) ArrayList(java.util.ArrayList) BreakException(org.eclipse.n4js.ui.organize.imports.BreakException) N4ContentAssistProcessorTestBuilder(org.eclipse.n4js.xpect.ui.methods.contentassist.N4ContentAssistProcessorTestBuilder) ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) AssertionFailedError(junit.framework.AssertionFailedError) BreakException(org.eclipse.n4js.ui.organize.imports.BreakException) IXtextDocument(org.eclipse.xtext.ui.editor.model.IXtextDocument) ConsumedIssues(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.ConsumedIssues) Xpect(org.eclipse.xpect.runner.Xpect) ParameterParser(org.eclipse.xpect.parameter.ParameterParser)

Example 4 with ThisResource

use of org.eclipse.xpect.xtext.lib.setup.ThisResource in project n4js by eclipse.

the class ContentAssistXpectMethod method contentAssistList.

/*-
	 contentAssistList              at ’a.<|>methodA’       display    ’methodA2’           --> ’methodA2(): any - A’
	 contentAssistList              at 'a.<|>methodA'       proposals                       --> <$objectProposals>, methodA2
	 contentAssistList              at 'a.<|>methodA'       proposals                       --> <$objectProposals>, methodA2
	 contentAssistList              at 'a.<|>methodA'       proposals                       --> methodA, methodA2
	 contentAssistList              at 'a.<|>methodA'       proposals             contains  --> methodA2
	 contentAssistList              at 'a.<|>methodA'       proposals             exactly   --> methodA, methodA2
	 contentAssistList              at 'a.<|>methodA'       proposals             not       --> methodB
	 contentAssistList              at 'a.<|>methodA'       proposals             ordered   --> methodA, methodA2
	 contentAssistList              at 'a.<|>methodA'       proposals             unordered --> methodA2, methodA
	 contentAssistList              at 'a.<|>methodA'       display   'methodA2'            --> 'methodA2(): any - A'
	 contentAssistList kind 'smart' at 'a.<|>methodA'       display   'methodA2'            --> 'methodA2(): any - A'
	
	                    kind        offset                  checkType  selected    mode
	                    arg4        arg2                    arg3       arg5        arg6
	 */
/**
 * Compares the expected list of expected display strings with the actual computed one by the proposal provider.
 *
 * @param expect
 *            injected from right hand side - a list expected display strings
 * @param resource
 *            injected - the resource under test
 * @param offset
 *            arg2 - the offset of where to invoke content assist given as string matching next line with cursor
 *            position
 * @param checkType
 *            arg3 - one of {proposals | display }
 * @param kind
 *            arg4 - contentAssist - cycling: current kind like 'n4js'(default) or 'recommenders'
 * @param selected
 *            arg5 - chosen selection form the proposal list
 * @param mode
 *            arg6 - depending on checkTye: apply->{insert(default)|override}, proposals->{contains,
 *            exactly(default), not}
 * @param orderMod
 *            arg7 - for proposal-modes contains/exactly there are two mode available{ordered, unordered(default)}
 * @throws Exception
 *             some exception
 */
@Xpect
@ParameterParser(syntax = "( ('kind' arg4=STRING)? 'at' (arg2=STRING (arg3=ID  (arg5=STRING)?  (arg6=ID (arg7=ID)? )? )? )? )?")
@ConsumedIssues({ Severity.INFO, Severity.ERROR, Severity.WARNING })
public void contentAssistList(// arg0
@CommaSeparatedValuesExpectation(quoted = true) ICommaSeparatedValuesExpectation expect, // arg1
@ThisResource XtextResource resource, // arg2 //@ThisOffset is obsolete
RegionWithCursor offset, // arg3
String checkType, // arg4
String kind, // arg5
String selected, // arg6
String mode, // arg7
String orderMod, ISetupInitializer<XpEnvironmentData> uiTestRunInit) throws Exception {
    XpEnvironmentData xpEnvData = new XpEnvironmentData();
    uiTestRunInit.initialize(xpEnvData);
    xpEnvData.setResourceUnderTest(resource);
    // Expansion of Variables. This changes the original expectation:
    CommaSeparatedValuesExpectationImpl csvE = (CommaSeparatedValuesExpectationImpl) expect;
    Pair<CommaSeparatedValuesExpectationImpl, CharSequence> exptectationAndText = expandVariables(csvE, xpEnvData);
    CommaSeparatedValuesExpectationImpl expectation = exptectationAndText.getKey();
    CharSequence expectedText = exptectationAndText.getValue();
    // System.out.println("---|" + expectedText + "|---");
    List<String> proposals = getProposalDisplayStrings(resource, offset, kind);
    if (("display").equals(checkType)) {
        // TODO check original code, seems like errors wehn porting
        // expectation exactly one string:
        // pick the proposal, test that only one is Picked && verify with expectation.
        List<String> candidates = proposals.stream().filter(p -> p.contains(selected)).collect(Collectors.toList());
        if (candidates.size() > 1) {
            StringBuilder sb = new StringBuilder();
            sb.append("more then one proposal matches the selection '").append(selected).append("' matches:[");
            candidates.forEach(m -> sb.append(m).append(","));
            sb.append("]");
            throw new RuntimeException(sb.toString());
        }
        if (candidates.size() == 0) {
            StringBuilder sb = new StringBuilder();
            sb.append("nothing matches the selection '").append(selected).append("' available are [");
            candidates.forEach(m -> sb.append(m).append(","));
            sb.append("]");
            throw new RuntimeException(sb.toString());
        }
        // exactly one:
        expectation.assertEquals(candidates);
        return;
    } else if ("proposals".equals(checkType)) {
        // order-mode, default is 'unordered'
        boolean ordered = ("ordered" == orderMod || "ordered" == mode);
        if (mode == null) {
            if (ordered) {
                assertExactlyOrdered(proposals, separateOnCommaAndQuote(expectedText), expectation);
            } else {
                assertExactly(proposals, separateOnCommaAndQuote(expectedText), expectation);
            }
            return;
        }
        switch(mode) {
            case "":
            // just in case mode is default, then orderMod gets assigned to mode
            case "ordered":
            // just in case mode is default, then orderMod gets assigned to mode
            case "unordered":
            case // default case.
            "exactly":
                if (ordered) {
                    assertExactlyOrdered(proposals, separateOnCommaAndQuote(expectedText), expectation);
                } else {
                    assertExactly(proposals, separateOnCommaAndQuote(expectedText), expectation);
                }
                return;
            case "contains":
                {
                    if (ordered) {
                        assertContainingMatchAllOrdered(proposals, separateOnCommaAndQuote(expectedText), expectation);
                    } else {
                        assertContainingMatchAll(proposals, separateOnCommaAndQuote(expectedText), expectation);
                    }
                    return;
                }
            case "not":
                // ordered / unordered doesn't apply here
                assertNoMatch(proposals, separateOnCommaAndQuote(expectedText), expectation);
                return;
            default:
                throw new RuntimeException("unrecognized mode for proposal-test : '" + mode + "'");
        }
    } else {
        throw new UnsupportedOperationException("unrecognized checktype: '" + checkType + "'");
    }
}
Also used : VarDef(org.eclipse.n4js.xpect.config.VarDef) Arrays(java.util.Arrays) IExpectationRegion(org.eclipse.xpect.expectation.IExpectationRegion) ISetupInitializer(org.eclipse.xpect.setup.ISetupInitializer) ThisResource(org.eclipse.xpect.xtext.lib.setup.ThisResource) Inject(com.google.inject.Inject) ICommaSeparatedValuesExpectation(org.eclipse.xpect.expectation.ICommaSeparatedValuesExpectation) HashMap(java.util.HashMap) QuickFixTestHelper.extractSingleChangedLine(org.eclipse.n4js.xpect.ui.common.QuickFixTestHelper.extractSingleChangedLine) AtomicReference(java.util.concurrent.atomic.AtomicReference) Point(org.eclipse.swt.graphics.Point) XtextResourceCleanUtil(org.eclipse.n4js.xpect.ui.common.XtextResourceCleanUtil) Logger(org.apache.log4j.Logger) QuickFixTestHelper.separateOnCommaAndQuote(org.eclipse.n4js.xpect.ui.common.QuickFixTestHelper.separateOnCommaAndQuote) ValidationTestModuleSetup(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup) Lists(com.google.common.collect.Lists) Config(org.eclipse.n4js.xpect.config.Config) Map(java.util.Map) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) TemplateProposal(org.eclipse.jface.text.templates.TemplateProposal) ComparisonFailure(junit.framework.ComparisonFailure) XpectImport(org.eclipse.xpect.XpectImport) ParameterParser(org.eclipse.xpect.parameter.ParameterParser) ConsumedIssues(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.ConsumedIssues) CommaSeparatedValuesExpectation(org.eclipse.xpect.expectation.CommaSeparatedValuesExpectation) XtextResource(org.eclipse.xtext.resource.XtextResource) N4JSOffsetAdapter(org.eclipse.n4js.xpect.common.N4JSOffsetAdapter) QuickFixTestHelper.asString2(org.eclipse.n4js.xpect.ui.common.QuickFixTestHelper.asString2) Severity(org.eclipse.xtext.diagnostics.Severity) AbstractExpectation(org.eclipse.xpect.expectation.impl.AbstractExpectation) ExpectationCollection(org.eclipse.xpect.expectation.impl.ExpectationCollection) AssertionFailedError(junit.framework.AssertionFailedError) Display(org.eclipse.swt.widgets.Display) Collectors(java.util.stream.Collectors) ChangeInfo(org.eclipse.n4js.xpect.ui.common.QuickFixTestHelper.ChangeInfo) IteratorExtensions(org.eclipse.xtext.xbase.lib.IteratorExtensions) List(java.util.List) XpEnvironmentData(org.eclipse.n4js.xpect.config.XpEnvironmentData) Predicate(com.google.common.base.Predicate) CommaSeparatedValuesExpectationImpl(org.eclipse.xpect.expectation.impl.CommaSeparatedValuesExpectationImpl) Entry(java.util.Map.Entry) Optional(java.util.Optional) IXtextDocument(org.eclipse.xtext.ui.editor.model.IXtextDocument) Pair(org.eclipse.xtext.xbase.lib.Pair) Comparator(java.util.Comparator) IStringExpectation(org.eclipse.xpect.expectation.IStringExpectation) Xpect(org.eclipse.xpect.runner.Xpect) XpEnvironmentData(org.eclipse.n4js.xpect.config.XpEnvironmentData) CommaSeparatedValuesExpectationImpl(org.eclipse.xpect.expectation.impl.CommaSeparatedValuesExpectationImpl) ConsumedIssues(org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.ConsumedIssues) Xpect(org.eclipse.xpect.runner.Xpect) ParameterParser(org.eclipse.xpect.parameter.ParameterParser)

Aggregations

ParameterParser (org.eclipse.xpect.parameter.ParameterParser)4 Xpect (org.eclipse.xpect.runner.Xpect)4 ThisResource (org.eclipse.xpect.xtext.lib.setup.ThisResource)4 XtextResource (org.eclipse.xtext.resource.XtextResource)3 Lists (com.google.common.collect.Lists)2 Inject (com.google.inject.Inject)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Optional (java.util.Optional)2 AssertionFailedError (junit.framework.AssertionFailedError)2 Logger (org.apache.log4j.Logger)2 Resource (org.eclipse.emf.ecore.resource.Resource)2 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)2 N4JSResource (org.eclipse.n4js.resource.N4JSResource)2 N4JSOffsetAdapter (org.eclipse.n4js.xpect.common.N4JSOffsetAdapter)2 Config (org.eclipse.n4js.xpect.config.Config)2 VarDef (org.eclipse.n4js.xpect.config.VarDef)2 XpEnvironmentData (org.eclipse.n4js.xpect.config.XpEnvironmentData)2 ConsumedIssues (org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup.ConsumedIssues)2 IXtextDocument (org.eclipse.xtext.ui.editor.model.IXtextDocument)2