mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
Merge pull request #1114 from eclipse/sz_issue734
[#403] Fixed regression in injector provider
This commit is contained in:
commit
d91faabd5d
21 changed files with 22 additions and 45 deletions
|
@ -67,8 +67,7 @@ public class IndentationAwareUiTestLanguageInjectorProvider implements IInjector
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,8 +67,7 @@ public class PartialContentAssistTestLanguageInjectorProvider implements IInject
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,8 +67,7 @@ public class PartialSerializationTestLanguageInjectorProvider implements IInject
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,8 +67,7 @@ public class RenameTestLanguageInjectorProvider implements IInjectorProvider, IR
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,8 +67,7 @@ public class TestLanguageInjectorProvider implements IInjectorProvider, IRegistr
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class FileAwareTestLanguageInjectorProvider implements IInjectorProvider,
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class XtextGrammarTestLanguageInjectorProvider implements IInjectorProvid
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class FormatterTestLanguageInjectorProvider implements IInjectorProvider,
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class RegionAccessTestLanguageInjectorProvider implements IInjectorProvid
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class LazyLinkingTestLanguageInjectorProvider implements IInjectorProvide
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class FragmentTestLanguageExInjectorProvider implements IInjectorProvider
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class FragmentTestLanguageInjectorProvider implements IInjectorProvider,
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class IndentationAwareTestLanguageInjectorProvider implements IInjectorPr
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class NoParametersTestLanguageInjectorProvider implements IInjectorProvid
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class ParametersTestLanguageExInjectorProvider implements IInjectorProvid
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class ParametersTestLanguageInjectorProvider implements IInjectorProvider
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class TwoParametersTestLanguageInjectorProvider implements IInjectorProvi
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class SequencerTestLanguageInjectorProvider implements IInjectorProvider,
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,8 +41,7 @@ public class XtextInjectorProvider implements IInjectorProvider, IRegistryConfig
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
|
@ -210,9 +210,8 @@ class JUnitFragment extends AbstractStubGeneratingFragment {
|
|||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
if (injector == null) {
|
||||
getInjector();
|
||||
} else {
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
||||
'''
|
||||
|
|
|
@ -513,13 +513,10 @@ public class JUnitFragment extends AbstractStubGeneratingFragment {
|
|||
_builder.append("getInjector();");
|
||||
_builder.newLine();
|
||||
_builder.append("\t\t");
|
||||
_builder.append("} else {");
|
||||
_builder.newLine();
|
||||
_builder.append("\t\t\t");
|
||||
_builder.append("stateAfterInjectorCreation.restoreGlobalState();");
|
||||
_builder.append("}");
|
||||
_builder.newLine();
|
||||
_builder.append("\t\t");
|
||||
_builder.append("}");
|
||||
_builder.append("stateAfterInjectorCreation.restoreGlobalState();");
|
||||
_builder.newLine();
|
||||
_builder.append("\t");
|
||||
_builder.append("}");
|
||||
|
|
Loading…
Reference in a new issue