Skip to content

Commit

Permalink
fix application.properties completion (#238)
Browse files Browse the repository at this point in the history
* fix application.properties completion

revertting to old jsoup because of remark

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* updated memory settings

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* updated memory settings

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

* revert

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

---------

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
  • Loading branch information
sbouchet authored Oct 12, 2023
1 parent da40850 commit 8006556
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
architecture: x64
distribution: 'temurin'
cache: maven

# Install Maven 3.9
- name: Set up Maven
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f #v4.5
Expand All @@ -54,11 +55,7 @@ jobs:
# Build and compile using Maven
- name: Build/Compile and run unit tests
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d #v1
with:
run: >
mvn clean verify -U -fae --settings build-ci/maven-settings.xml -DskipITests=true
-Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp
run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp

# Archive artifacts to be applied in Publish Reports workflow
- name: Archiving test artifacts
Expand Down
2 changes: 1 addition & 1 deletion plugins/org.jboss.tools.quarkus.lsp4e/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.lsp4e,
org.eclipse.jdt.core.manipulation,
org.eclipse.jdt.ui,
org.eclipse.lsp4mp.jdt.core,
org.jsoup;bundle-version="1.8.3";visibility:=reexport,
org.eclipse.ui,
org.jboss.tools.foundation.ui,
org.apache.commons.lang3,
Expand All @@ -35,6 +34,7 @@ Bundle-ClassPath: .,
server/org.eclipse.lsp4mp.ls-uber.jar,
server/com.redhat.quarkus.ls.jar,
lib/remark.jar,
lib/jsoup.jar,
server/com.redhat.qute.ls-uber.jar
Bundle-Activator: org.jboss.tools.quarkus.lsp4e.QuarkusLSPPlugin
Export-Package: org.jboss.tools.quarkus.lsp4e
Expand Down
5 changes: 5 additions & 0 deletions plugins/org.jboss.tools.quarkus.lsp4e/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
<artifactId>remark</artifactId>
<version>1.2.0</version>
</artifactItem>
<artifactItem>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.9.2</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.jboss.tools.quarkus.lsp4e.internal.ls;

import org.jsoup.internal.StringUtil;
import org.jsoup.helper.StringUtil;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.nodes.TextNode;
Expand All @@ -46,7 +46,9 @@ public class HtmlToPlainText {
*/
public String getPlainText(Element element) {
FormattingVisitor formatter = new FormattingVisitor();
NodeTraversor.traverse(formatter, element); // walk the DOM, and call .head() and .tail() for each node
NodeTraversor traversor = new NodeTraversor(formatter);
traversor.traverse(element); // walk the DOM, and call .head() and .tail() for each node

return formatter.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.jboss.tools.quarkus.lsp4e.QuarkusLSPPlugin;
import org.jsoup.safety.Cleaner;
import org.jsoup.safety.Safelist;
import org.jsoup.safety.Whitelist;

import com.overzealous.remark.Options;
import com.overzealous.remark.Options.Tables;
Expand Down Expand Up @@ -50,7 +50,7 @@ public class JavaDoc2MarkdownConverter extends AbstractJavaDocConverter {
Field safelistField = Cleaner.class.getDeclaredField("safelist");
safelistField.setAccessible(true);

Safelist s = (Safelist) safelistField.get(c);
Whitelist s = (Whitelist) safelistField.get(c);

s.addProtocols("a", "href", "file", "jdt");
s.addProtocols("img", "src", "file");
Expand Down

0 comments on commit 8006556

Please sign in to comment.