Skip to content

Commit

Permalink
Improve compute of Quarkus/Microprofile properties
Browse files Browse the repository at this point in the history
Fixes #154

Signed-off-by: azerr <azerr@redhat.com>
  • Loading branch information
angelozerr committed Dec 9, 2019
1 parent 041b300 commit 33f6a21
Show file tree
Hide file tree
Showing 362 changed files with 11,826 additions and 10,250 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ cache:
- "$HOME/.m2/wrapper"

script:
- "cd quarkus.jdt && ./mvnw clean verify"
- "cd ../quarkus.ls/com.redhat.quarkus.ls && ./mvnw clean verify"
- "cd microprofile.jdt && chmod +x mvnw && ./mvnw clean verify"
- "cd ../microprofile.ls/com.redhat.microprofile.ls && chmod +x mvnw && ./mvnw clean verify"

notifications:
email: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

This project contains:

* [Quarkus JDT LS Extensions](https://github.com/redhat-developer/quarkus-ls/tree/master/quarkus.jdt)
* [Quarkus Language Server](https://github.com/redhat-developer/quarkus-ls/tree/master/quarkus.ls)
* [MicroProfile JDT LS Extensions](https://github.com/redhat-developer/quarkus-ls/tree/master/microprofile.jdt)
* [MicroProfile Language Server](https://github.com/redhat-developer/quarkus-ls/tree/master/microprofile.ls)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: quarkus.jdt.ls Core Extension
Bundle-SymbolicName: com.redhat.quarkus.jdt.core;singleton:=true
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: com.redhat.microprofile.jdt.core;singleton:=true
Bundle-Version: 0.0.5.qualifier
Bundle-Activator: com.redhat.quarkus.jdt.core.QuarkusActivator
Bundle-Activator: com.redhat.microprofile.jdt.internal.core.MicroProfileCorePlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.jdt.core.manipulation,
Expand All @@ -15,5 +17,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.lsp4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: com.redhat.quarkus.commons,
com.redhat.quarkus.jdt.core
Export-Package: com.redhat.microprofile.commons,
com.redhat.microprofile.commons.metadata,
com.redhat.microprofile.jdt.core,
com.redhat.microprofile.jdt.core.utils
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source.. = src/main/java/
output.. = target/classes/
bin.includes = plugin.xml,\
META-INF/,\
.,\
plugin.properties,\
schema/
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
###############################################################################
# Copyright (c) 2019 Red Hat Inc. and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Red Hat Inc. - initial API and implementation
###############################################################################
pluginName=JDT MicroProfile Extension
providerName=Red Hat
propertiesProviders.name=MicroProfile properties providers extension
30 changes: 30 additions & 0 deletions microprofile.jdt/com.redhat.microprofile.jdt.core/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.5"?>
<plugin>

<extension-point id="propertiesProviders"
name="%propertiesProviders.name"
schema="schema/propertiesProviders.exsd" />

<!-- Delegate command handler for application.properties file -->
<extension point="org.eclipse.jdt.ls.core.delegateCommandHandler">
<delegateCommandHandler class="com.redhat.microprofile.jdt.internal.core.ls.MicroProfileDelegateCommandHandler">
<command id="microprofile/projectInfo"/>
<command id="microprofile/propertyDefinition"/>
</delegateCommandHandler>
</extension>

<!-- Delegate command handler for Java file -->
<extension point="org.eclipse.jdt.ls.core.delegateCommandHandler">
<delegateCommandHandler class="com.redhat.microprofile.jdt.internal.core.ls.MicroProfileDelegateCommandHandlerForJava">
<command id="microprofile/java/codeLens"/>
<command id="microprofile/java/hover"/>
</delegateCommandHandler>
</extension>

<!-- Properties provider from the MicroProfile @ConfigProperty annotation -->
<extension point="com.redhat.microprofile.jdt.core.propertiesProviders">
<provider class="com.redhat.microprofile.jdt.internal.core.providers.MicroProfileConfigPropertyProvider" />
</extension>

</plugin>
23 changes: 23 additions & 0 deletions microprofile.jdt/com.redhat.microprofile.jdt.core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>parent</artifactId>
<groupId>com.redhat.microprofile</groupId>
<version>0.0.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>com.redhat.microprofile.jdt.core</artifactId>
<packaging>eclipse-plugin</packaging>
<name>MicroProfile JDT LS Extension</name>
<description>MicroProfile JDT LS Extension - Core</description>

<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="com.redhat.quarkus.jdt.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="com.redhat.quarkus.jdt.core" id="propertiesProviders" name="Properties providers"/>
</appinfo>
<documentation>
This extension point allows adding a properties provider to provide capability to collect MicroProfile/Quarkus properties from Java libraries and sources.
</documentation>
</annotation>

<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="provider"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>

</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>

</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>

</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>

<element name="provider">
<annotation>
<documentation>
TODO
</documentation>
</annotation>
<complexType>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
Name of a class that implements IPropertiesProvider.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":com.redhat.microprofile.jdt.core.IPropertiesProvider"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>

<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
2.0
</documentation>
</annotation>

<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
The following is an example of a properties provider extension:

&lt;pre&gt;
&lt;extension point=&quot;com.redhat.quarkus.jdt.core.propertiesProvider&quot;&gt;
&lt;provider
class=&quot;com.example.MyPropertyProvider&quot;&gt;
&lt;/provider&gt;
&lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>




</schema>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Contributors:
* Red Hat Inc. - initial API and implementation
*******************************************************************************/
package com.redhat.quarkus.commons;
package com.redhat.microprofile.commons;

/**
* Classpath kind where application.properties is stored:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
* Contributors:
* Red Hat Inc. - initial API and implementation
*******************************************************************************/
package com.redhat.quarkus.commons;
package com.redhat.microprofile.commons;

/**
* Quarkus Java codelens parameters.
*
* @author Angelo ZERR
*
*/
public class QuarkusJavaCodeLensParams {
public class MicroProfileJavaCodeLensParams {

private String uri;
private boolean urlCodeLensEnabled;
Expand All @@ -25,11 +25,11 @@ public class QuarkusJavaCodeLensParams {

private transient String localBaseURL;

public QuarkusJavaCodeLensParams() {
public MicroProfileJavaCodeLensParams() {

}

public QuarkusJavaCodeLensParams(String uri) {
public MicroProfileJavaCodeLensParams(String uri) {
this();
setUri(uri);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Contributors:
* Red Hat Inc. - initial API and implementation
*******************************************************************************/
package com.redhat.quarkus.commons;
package com.redhat.microprofile.commons;

import org.eclipse.lsp4j.Range;

Expand All @@ -17,7 +17,7 @@
* This class represents the return object for the
* <code>quarkus.java.hover</code> command
*/
public class QuarkusJavaHoverInfo {
public class MicroProfileJavaHoverInfo {

private String propertyKey;
private String propertyValue;
Expand All @@ -29,7 +29,7 @@ public class QuarkusJavaHoverInfo {
* @param propertyValue the property value of the property key being hovered
* @param range the range of the property key being hovered
*/
public QuarkusJavaHoverInfo(String propertyKey, String propertyValue, Range range) {
public MicroProfileJavaHoverInfo(String propertyKey, String propertyValue, Range range) {
this.propertyKey = propertyKey;
this.propertyValue = propertyValue;
this.range = range;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Contributors:
* Red Hat Inc. - initial API and implementation
*******************************************************************************/
package com.redhat.quarkus.commons;
package com.redhat.microprofile.commons;

import org.eclipse.lsp4j.Position;

Expand All @@ -17,16 +17,16 @@
* @author Angelo ZERR
*
*/
public class QuarkusJavaHoverParams {
public class MicroProfileJavaHoverParams {

private String uri;
private Position position;

public QuarkusJavaHoverParams() {
public MicroProfileJavaHoverParams() {

}

public QuarkusJavaHoverParams(String uri, Position position) {
public MicroProfileJavaHoverParams(String uri, Position position) {
this();
setUri(uri);
setPosition(position);
Expand Down
Loading

0 comments on commit 33f6a21

Please sign in to comment.