forked from redhat-developer/quarkus-ls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Definition from application.properties to Java field which have Config*
annotation Fixes #4 Signed-off-by: azerr <azerr@redhat.com>
- Loading branch information
1 parent
75c048d
commit cbdf66b
Showing
21 changed files
with
522 additions
and
32 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
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
65 changes: 65 additions & 0 deletions
65
...us.jdt.core/src/main/java/com/redhat/quarkus/commons/QuarkusPropertyDefinitionParams.java
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,65 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019 Red Hat Inc. and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* Contributors: | ||
* Red Hat Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.quarkus.commons; | ||
|
||
/** | ||
* Quarkus property definition parameters to retrieve the definition of the | ||
* Quarkus property in Java class field. | ||
* | ||
* @author Angelo ZERR | ||
* | ||
*/ | ||
public class QuarkusPropertyDefinitionParams { | ||
|
||
private String uri; | ||
|
||
private String propertySource; | ||
|
||
/** | ||
* Returns the application.properties URI. | ||
* | ||
* @return the application.properties URI | ||
*/ | ||
public String getUri() { | ||
return uri; | ||
} | ||
|
||
/** | ||
* Set the application.properties URI | ||
* | ||
* @param uri the application.properties URI | ||
*/ | ||
public void setUri(String uri) { | ||
this.uri = uri; | ||
} | ||
|
||
/** | ||
* Returns the Quarkus property source. This source contains the class name and | ||
* field name where Quarkus property is defined like | ||
* <code>io.quarkus.deployment.ApplicationConfig#name</code>. | ||
* | ||
* @return the Quarkus property source. | ||
*/ | ||
public String getPropertySource() { | ||
return propertySource; | ||
} | ||
|
||
/** | ||
* Set the Quarkus property source. This source contains the class name and | ||
* field name where Quarkus property is defined like | ||
* <code>io.quarkus.deployment.ApplicationConfig#name</code>. | ||
* | ||
* @param propertySource the Quarkus property source. | ||
*/ | ||
public void setPropertySource(String propertySource) { | ||
this.propertySource = propertySource; | ||
} | ||
|
||
} |
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: 47 additions & 0 deletions
47
...us.jdt.core/src/main/java/com/redhat/quarkus/jdt/internal/core/MavenArtifactResolver.java
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,47 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019 Red Hat Inc. and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* Contributors: | ||
* Red Hat Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.quarkus.jdt.internal.core; | ||
|
||
import java.io.File; | ||
|
||
import com.redhat.quarkus.jdt.internal.core.QuarkusDeploymentJavaProject.ArtifactResolver; | ||
import com.redhat.quarkus.jdt.internal.core.utils.DependencyUtil; | ||
|
||
/** | ||
* Maven artifact resolver used to download JAR and JAR sources with maven. | ||
* | ||
* @author Angelo ZERR | ||
* | ||
*/ | ||
public class MavenArtifactResolver implements ArtifactResolver { | ||
|
||
@Override | ||
public String getArtifact(String groupId, String artifactId, String version) { | ||
File jarFile = null; | ||
try { | ||
jarFile = DependencyUtil.getArtifact(groupId, artifactId, version, null); | ||
} catch (Exception e) { | ||
return null; | ||
} | ||
return jarFile != null ? jarFile.toString() : null; | ||
} | ||
|
||
@Override | ||
public String getSources(String groupId, String artifactId, String version) { | ||
File jarFile = null; | ||
try { | ||
jarFile = DependencyUtil.getSources(groupId, artifactId, version); | ||
} catch (Exception e) { | ||
return null; | ||
} | ||
return jarFile != null ? jarFile.toString() : null; | ||
} | ||
|
||
} |
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
Oops, something went wrong.