OCLStdLib extension [message #1065516] |
Wed, 26 June 2013 05:34  |
Eclipse User |
|
|
|
Hi,
I want to extend StdLib and for that purpose i am looking OCLstdlibTests.java for help.
In testImport method :
String testFile =
"import 'minimal.oclstdlib';\n"+
"import 'minimal.oclstdlib';\n"+
"library lib : lib = 'http://minimal.oclstdlib'{\n"+
" type OclAny : AnyType {\n"+
" operation a(elem : Boolean) : Boolean {\n"+
" post a: result = elem;\n"+
" }\n"+
" }\n"+
"}\n";
why import statemnet is saying 'minimal.oclstdlib' and also 'library lib : lib = 'http://minimal.oclstdlib'? It feels importing itself?
I would like to import .oclstdlib which is currently being utilized so my import statement should be saying some thing like
import 'http://www.eclipse.org/ocl/3.1.0/OCL.oclstdlib' ???
I want add an operation and want to use "=>" to sepecify class (class residing in my own plugin) which can resolve operation and i want to make sure my new oclstdlib is loaded. Can i specify the class from my own plugin?
Regards,
|
|
|
|
|
|
|
|
|
|
|
|
Re: OCLStdLib extension [message #1074173 is a reply to message #1073757] |
Fri, 26 July 2013 04:19   |
Eclipse User |
|
|
|
thanks!
In my org.eclipse.ocl kepler EGIT repository, i am getting compliation error
"The hierarchy of the type OCLContentProposer is inconsistent" in org.eclipse.ocl.examples.editor.ocl.ui plugin. Same error is there in many classes in same package.
The second compilation error i am facing is (org.eclipse.ocl.examples.editor.ocl.ui.ecore)
The return types are incompatible for the inherited methods ICreationFactory.createNodeLocator(ICSTRootEnvironment<?,?,?,?,?,?,?,?,?,?,?,?>), AbstractCreationFactory.createNodeLocator(ICSTRootEnvironment<?,?,?,?,?,?,?,?,?,?,?,?>)
Third compilation error is in class OCLinEcoreGenModelGeneratorAdapter (org.eclipse.ocl.examples.codegen.oclinecore)
Null type mismatch: required '@NonNull Ecore2Pivot' but the provided value is inferred as @Nullable
at
for (@SuppressWarnings("null")@NonNull EOperation eOperation : eClass.getEOperations()) {
installOperation(ecore2pivot, eOperation, results);}
Can you please help me fixing these compilation errors in repository
Regards,
[Updated on: Fri, 26 July 2013 04:53] by Moderator
|
|
|
Re: OCLStdLib extension [message #1074198 is a reply to message #1074173] |
Fri, 26 July 2013 05:09   |
Eclipse User |
|
|
|
Hi
Given the <?,?,?,?,?,?,?,?,?,?,?,?> in your example you are clearly
using the Class OCL. These template arguments are very painful and one
of the reasons for the new Pivot-basedc OCL.
The OCL StdLib is very difficult to extend; another reason. The new
approach is defined by a model.
The errors are standardl Java errors so you need to correct your Java
code, though sometimes a Clean and Rebuild All is sufficient.
Regards
Ed Willink
On 26/07/2013 09:19, ModelGeek Mising name wrote:
> thanks!
>
> In my org.eclipse.ocl kepler EGIT repository, i am getting compliation
> error "The hierarchy of the type OCLContentProposer is inconsistent"
> in org.eclipse.ocl.examples.editor.ocl.ui plugin. Same error is there
> in many classes in same package.
>
> The other compilation error i am facing is
> (org.eclipse.ocl.examples.editor.ocl.ui.ecore)
>
> The return types are incompatible for the inherited methods
> ICreationFactory.createNodeLocator(ICSTRootEnvironment<?,?,?,?,?,?,?,?,?,?,?,?>),
> AbstractCreationFactory.createNodeLocator(ICSTRootEnvironment<?,?,?,?,?,?,?,?,?,?,?,?>)
>
>
> Can you please help me fixing these compilation errors in repository
>
> Regards,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|