-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
GH-154: Fixed Jena-based processor registration defect.
- Loading branch information
Showing
15 changed files
with
218 additions
and
105 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
1 change: 1 addition & 0 deletions
1
....research.sadl.jena/src/META-INF/services/com.ge.research.sadl.processing.IModelProcessor
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 @@ | ||
com.ge.research.sadl.jena.JenaBasedSadlModelProcessor |
1 change: 1 addition & 0 deletions
1
...arch.sadl.jena/src/META-INF/services/com.ge.research.sadl.processing.ISadlImportProcessor
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 @@ | ||
com.ge.research.sadl.jena.JenaBasedSadlImportProcessor |
1 change: 1 addition & 0 deletions
1
...h.sadl.jena/src/META-INF/services/com.ge.research.sadl.processing.ISadlInferenceProcessor
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 @@ | ||
com.ge.research.sadl.jena.JenaBasedSadlInferenceProcessor |
71 changes: 71 additions & 0 deletions
71
...om.ge.research.sadl.tests/src/com/ge/research/sadl/tests/GH_154_CheckProcessorsTest.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,71 @@ | ||
/************************************************************************ | ||
* Copyright © 2007-2017 - General Electric Company, All Rights Reserved | ||
* | ||
* Project: SADL | ||
* | ||
* Description: The Semantic Application Design Language (SADL) is a | ||
* language for building semantic models and expressing rules that | ||
* capture additional domain knowledge. The SADL-IDE (integrated | ||
* development environment) is a set of Eclipse plug-ins that | ||
* support the editing and testing of semantic models using the | ||
* SADL language. | ||
* | ||
* This software is distributed "AS-IS" without ANY WARRANTIES | ||
* and licensed under the Eclipse Public License - v 1.0 | ||
* which is available at http://www.eclipse.org/org/documents/epl-v10.php | ||
* | ||
***********************************************************************/ | ||
package com.ge.research.sadl.tests | ||
|
||
import com.ge.research.sadl.jena.JenaBasedSadlImportProcessor | ||
import com.ge.research.sadl.jena.JenaBasedSadlInferenceProcessor | ||
import com.ge.research.sadl.jena.JenaBasedSadlModelProcessor | ||
import com.ge.research.sadl.processing.SadlImportProcessorProvider | ||
import com.ge.research.sadl.processing.SadlInferenceProcessorProvider | ||
import com.ge.research.sadl.processing.SadlModelProcessorProvider | ||
import com.google.inject.Inject | ||
import org.eclipse.xtext.testing.InjectWith | ||
import org.eclipse.xtext.testing.XtextRunner | ||
import org.junit.Assert | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Test for checking whether any SADL model, inference, and import | ||
* processors are available in the headless case. | ||
* | ||
* <p> | ||
* In this test we check the existence of the Jena-based ones. | ||
* The processors are registered via Java SPI. | ||
* | ||
* @author akos.kitta | ||
*/ | ||
@RunWith(XtextRunner) | ||
@InjectWith(SADLInjectorProvider) | ||
class GH_154_CheckProcessorsTest extends Assert { | ||
|
||
@Inject | ||
SadlModelProcessorProvider modelProcessorProvider; | ||
|
||
@Inject | ||
SadlInferenceProcessorProvider inferenceProcessorProvider | ||
|
||
@Inject | ||
SadlImportProcessorProvider importProcessorProvider | ||
|
||
@Test | ||
def void checkJenaModelProcessor() { | ||
modelProcessorProvider.allProcessors.filter(JenaBasedSadlModelProcessor).empty.assertFalse; | ||
} | ||
|
||
@Test | ||
def void checkJenaInferenceProcessor() { | ||
inferenceProcessorProvider.allProcessors.filter(JenaBasedSadlInferenceProcessor).empty.assertFalse; | ||
} | ||
|
||
@Test | ||
def void checkNotNullJenaImportProcessor() { | ||
importProcessorProvider.allProcessors.filter(JenaBasedSadlImportProcessor).empty.assertFalse; | ||
} | ||
|
||
} |
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
81 changes: 81 additions & 0 deletions
81
...ch.sadl.ui.tests/src/com/ge/research/sadl/ui/tests/GH_154_CheckProcessorsPluginTest.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,81 @@ | ||
/************************************************************************ | ||
* Copyright © 2007-2017 - General Electric Company, All Rights Reserved | ||
* | ||
* Project: SADL | ||
* | ||
* Description: The Semantic Application Design Language (SADL) is a | ||
* language for building semantic models and expressing rules that | ||
* capture additional domain knowledge. The SADL-IDE (integrated | ||
* development environment) is a set of Eclipse plug-ins that | ||
* support the editing and testing of semantic models using the | ||
* SADL language. | ||
* | ||
* This software is distributed "AS-IS" without ANY WARRANTIES | ||
* and licensed under the Eclipse Public License - v 1.0 | ||
* which is available at http://www.eclipse.org/org/documents/epl-v10.php | ||
* | ||
***********************************************************************/ | ||
package com.ge.research.sadl.ui.tests | ||
|
||
import com.ge.research.sadl.jena.JenaBasedSadlImportProcessor | ||
import com.ge.research.sadl.jena.JenaBasedSadlInferenceProcessor | ||
import com.ge.research.sadl.jena.JenaBasedSadlModelProcessor | ||
import com.ge.research.sadl.processing.SadlImportProcessorProvider | ||
import com.ge.research.sadl.processing.SadlInferenceProcessorProvider | ||
import com.ge.research.sadl.processing.SadlModelProcessorProvider | ||
import com.google.inject.Inject | ||
import org.eclipse.core.runtime.Platform | ||
import org.eclipse.xtext.testing.InjectWith | ||
import org.eclipse.xtext.testing.XtextRunner | ||
import org.junit.Assert | ||
import org.junit.BeforeClass | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Test for checking whether any SADL model, inference, and import | ||
* processors are available in the Eclipse-based case. | ||
* | ||
* <p> | ||
* In this test we check the existence of the Jena-based ones. | ||
* The processors are registered via Eclipse-based extension points. | ||
* | ||
* @author akos.kitta | ||
*/ | ||
@RunWith(XtextRunner) | ||
@InjectWith(SADLUiInjectorProvider) | ||
class GH_154_CheckProcessorsPluginTest extends Assert { | ||
|
||
@Inject | ||
SadlModelProcessorProvider modelProcessorProvider; | ||
|
||
@Inject | ||
SadlInferenceProcessorProvider inferenceProcessorProvider | ||
|
||
@Inject | ||
SadlImportProcessorProvider importProcessorProvider; | ||
|
||
@BeforeClass | ||
static def void assertRunningPlatform() { | ||
assertTrue('These tests require a running Eclipse platform. | ||
Execute them as a JUnit Plug-in Test. | ||
If you see this error from Maven, then please configure your POM to use Tycho Surefire correctly for test execution.', | ||
Platform.isRunning); | ||
} | ||
|
||
@Test | ||
def void checkJenaModelProcessor() { | ||
modelProcessorProvider.allProcessors.filter(JenaBasedSadlModelProcessor).empty.assertFalse; | ||
} | ||
|
||
@Test | ||
def void checkJenaInferenceProcessor() { | ||
inferenceProcessorProvider.allProcessors.filter(JenaBasedSadlInferenceProcessor).empty.assertFalse; | ||
} | ||
|
||
@Test | ||
def void checkNotNullJenaImportProcessor() { | ||
importProcessorProvider.allProcessors.filter(JenaBasedSadlImportProcessor).empty.assertFalse; | ||
} | ||
|
||
} |
5 changes: 0 additions & 5 deletions
5
...l.parent/com.ge.research.sadl.ui.tests/src/com/ge/research/sadl/ui/tests/HelloMaven.xtend
This file was deleted.
Oops, something went wrong.
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
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
47 changes: 0 additions & 47 deletions
47
...c/com/ge/research/sadl/ui/processing/ExtensionPointBasedSadlImportProcessorProvider.xtend
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.