Problem of Xtend result on RCP eclipse 2022-03 - eclipse-rcp

I'm coding a plugin to generate a code using xtend (model to text langage).
The code is working on my dev env but it is not the case on my RCP.
here is an example of the generated code on my dev env :
paths: /TempService/getTemp: post: operationId: getTempUsingpost parameters: - name: newParam in: query required: false schema:
and this is the genrated code on my rcp :
paths:
?FOR attribute : clazz.attributes? ?IF attribute instanceof Port? ?IF attribute.isConjugated? ?val classifier = attribute.type? ?OpenAPIPaths.generatePath(classifier)? ?ENDIF? ?ENDIF?
The problem appeared when I migrated to eclipse 2022-03 (from 2021-09).

Related

UI5 minifying and uglifying with #ui5/cli

I'm playing with the UI5 minifying and uglifying. As far as I know, there are two common approaches:
Grunt task with gruntfile.cjs, based on grunt-openui5.
UI5 Tooling with ui5.yaml, based on #ui5/cli.
My ui5.yaml:
specVersion: "2.5"
type: application
metadata:
name: com.myapp
framework:
name: OpenUI5
version: 1.95.0
resources:
configuration:
paths:
webapp: src/webapp
builder:
cachebuster:
signatureType: hash
componentPreload:
namespaces:
- "com/myapp"
paths:
- "src/webapp"
To run the minifying with #ui5/cli, I execute the following NPM-Script task: "test": "ui5 build preload", as the result, I get a brand new dist folder with minified and debug-friendly files (e.g. App.controller.js and App-dbg.controller.js), in addition, Component-preload.js is generated as well.
My questions:
Is Grunt-based approach a legacy, while #ui5/cli is standard approach nowadays?
Is it possible to get a minified version of the UI5 app (just a Component-preload.js) with #ui5/cli without a dist folder?

how to show the results of yml file in visual studio code

i am learning SWAGGER and Openapi. i downloaded the necessary plugins in visual studio code.
i added the below posted code to test.yml. how to see the results or the output of the code mentioned below.??
i just run the code in visual studio code but nothing appears
please let me know how to show the results of the code posted below.
code:
openapi: '3.0.2'
info:
title: Get distance providing start and end GPS coordinates.
version: '1.0'
servers:
- url: https://api.server.test/v1
paths:
/test:
get:
responses:
'200':
description: OK

How to to tell Eclipse/Buildship/Gradle to add dependencies to the Modulepath

I am trying to use Eclipse, Buildship, Gradle to develop java 9 applications.
Eclipse: Oxygen
Buildship: 2.2.0
Gradle: 4.3.1
I am looking for a way to tell Buildship/Gradle to add Project and External Dependencies to the Modulepath rather than the Classpath.
Here's a representation of what I see when I configure my Eclipse project Java Build Path.
Properties for TestMain
Java Build path
Source | Projects | Libraries | Order and Export
---------
Modulepath
- JRE System Library [JavaSe-9]
Classpath
- Project and External Dependencies
- Access rules: No rules defined
- External annotations: (None)
- Native library location: (None)
- coreutil-9.4.1.jar
- slf4j-api-1.7.2.1.jar
- ...
When I try to reference the automatic module coreutil in module-info.java I get the error coreutil cannot be resolved to a module.
If I manually add coreutil-9.4.1.jar to the Modulepath then the coreutil module becomes visible. This is a problem, however, since it is impractical to manually add over 60 libraries in some cases. Moreover, each time I Refresh Gradle Project they are all removed from the Modulepath.
Thanks for help.
Gaëtan
After talking to Donát Csikós at gradle (thanks Donát) adding the following to the build.gradle file solves the problem:
apply plugin: 'eclipse'
eclipse.classpath.file {
whenMerged {
entries.findAll { isModule(it) }.each { it.entryAttributes['module'] = 'true' }
}
}
boolean isModule(entry) {
// filter java 9 modules
entry.kind == 'lib' // Only libraries can be modules
}

How to query all Monticello packages from a Metacello Configuration?

I have a Metacello configuration like ConfigurationOfAthens and I want to know which packages provides, the result would be :
Athens-Cairo
Athens-CairoPools
Athens-Core
etc.
I tried
(GoferConfigurationReference name: 'ConfigurationOfAthens') packages.
but it is not understood by the system.
It this supported in Pharo 4?
If you want just the package names you could use helper classes to query from a Configuration. And so your query would be
(MTProject
newFromVersion: (ConfigurationOfAthens project version: #development)
inConfiguration: ConfigurationOfAthens) dependenciesFilteredBy: MTPackage.
These MT classes - which sounds like they should belong to Metacello - are not in Metacello package, but currently in Versionner (included by default in Pharo images).
Diving into results reveals that some "MTPackages" has not their corresponding "RPackage" (this could be a bug, or some weird feature in the package representation models). So you would need further filtering:
((MTProject
newFromVersion: (ConfigurationOfAthens project version: #development)
inConfiguration: ConfigurationOfAthens) dependenciesFilteredBy: MTPackage)
select: [ :pkgName |
(RPackageOrganizer default
packageNamed: pkgName name asSymbol
ifAbsent: []) notNil ]

Static type checking error for groovy collection.addAll

This message is also posted on grails mailing list.
In addition to my earlier question I downloaded the grails source from github.
Building via documented gradlew install works (almost) perfect. Than I imported the whole project into Eclipse. And with a bit fighting groovy plugins and "project - workspace-groovy-compiler-issues" I only have a few issues left, all boiling down to java Collection modification in groovy classes. For instance in PluginBuildSettings.groovy:
List<Resource> artefactResourcesList = []
...
artefactResources.addAll compileScopePluginInfo.artefactResources
which gives an error:
Groovy:[Static type checking] - Cannot call java.util.List#addAll(java.util.Collection ) with arguments [java.util.Set ]
I really don't see what the issue may be.
I tried changing the artefactResources declaration in PluginScopeInfo from:
Set<Resource> artefactResources = []
to:
Set<Object> artefactResources = []
which takes away error above, but introduces some other problems let alone the unittests. I'm not hindered with extensive groovy knowledge but it looks all perfect valid to me.
I'm using ggts:
Groovy/Grails Tool Suite
Version: 3.1.0.RELEASE
Build Id: 201210061306
groovy-compiler: 2.0.4.xx -20120921
On mac os x 8.2
java 6.0._37
groovy compiler: 2.0 (workspace and project).
With my favorite search engine I found a reference to grails bug 5516, which is solved but it looks resurected
Type checker fails verification of generic types with addAll
Fixed in 2.0 rc 3,