diff --git a/build.gradle b/build.gradle index 9e17e38..f540749 100644 --- a/build.gradle +++ b/build.gradle @@ -50,12 +50,12 @@ configurations.create('contentassist') //} def groovyVersion = '4.0.15' -def springVersion = '5.2.0.RELEASE' +def springVersion = '6.0.13' dependencies { contentassist( - 'javax.annotation:javax.annotation-api:1.3.2', - 'javax.inject:javax.inject:1', + 'jakarta.annotation:jakarta.annotation-api:2.1.1', + 'jakarta.inject:jakarta.inject-api:2.0.0', 'nz.net.ultraq.jaxb:jaxb-utilities:3.0.0-SNAPSHOT', 'nz.net.ultraq.groovy:groovy-extensions:2.2.0', 'nz.net.ultraq.groovy:groovy-profiling-extensions:0.7.0', diff --git a/org.thymeleaf.extras.eclipse.contentassist/META-INF/MANIFEST.MF b/org.thymeleaf.extras.eclipse.contentassist/META-INF/MANIFEST.MF index 6d124aa..812ca25 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/META-INF/MANIFEST.MF +++ b/org.thymeleaf.extras.eclipse.contentassist/META-INF/MANIFEST.MF @@ -6,6 +6,7 @@ Bundle-Version: 3.1.0.qualifier Bundle-Activator: org.thymeleaf.extras.eclipse.ContentAssistPlugin Require-Bundle: org.eclipse.core.resources;bundle-version="3.19.0", org.eclipse.core.runtime;bundle-version="3.27.0", + org.eclipse.e4.ui.model.workbench;bundle-version="2.4.0", org.eclipse.jdt.core;bundle-version="3.34.0", org.eclipse.jdt.ui;bundle-version="3.29.0", org.eclipse.jface.text;bundle-version="3.24.0", @@ -17,18 +18,6 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="3.19.0", Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: Thymeleaf Project -Export-Package: org.thymeleaf.extras.eclipse.autocomplete;uses:="org.eclipse.core.runtime,org.eclipse.wst.sse.ui.contentassist,org.thymeleaf.extras.eclipse.contentassist", - org.thymeleaf.extras.eclipse.autocomplete.generators; - uses:="org.eclipse.wst.xml.core.internal.provisional.document, - org.thymeleaf.extras.eclipse.contentassist, - org.eclipse.jface.text, - org.eclipse.wst.sse.core.internal.provisional.text", - org.thymeleaf.extras.eclipse.autocomplete.proposals; - uses:="org.eclipse.jface.text.contentassist, - org.eclipse.swt.graphics, - org.thymeleaf.extras.eclipse.dialect.xml, - org.eclipse.jface.text", - org.thymeleaf.extras.eclipse.hover;uses:="org.thymeleaf.extras.eclipse.contentassist,org.eclipse.jface.text" Bundle-ClassPath: ., lib/apiguardian-api-1.1.0.jar, lib/attoparser-2.0.5.RELEASE.jar, @@ -40,9 +29,9 @@ Bundle-ClassPath: ., lib/groovy-xml-4.0.15.jar, lib/jakarta.activation-1.2.2.jar, lib/jakarta.activation-api-1.2.2.jar, + lib/jakarta.annotation-api-2.1.1.jar, + lib/jakarta.inject-api-2.0.0.jar, lib/jakarta.xml.bind-api-2.3.3.jar, - lib/javax.annotation-api-1.3.2.jar, - lib/javax.inject-1.jar, lib/jaxb-impl-2.3.5.jar, lib/jaxb-utilities-3.0.0-SNAPSHOT.jar, lib/junit-jupiter-5.7.2.jar, @@ -55,10 +44,10 @@ Bundle-ClassPath: ., lib/objenesis-3.2.jar, lib/opentest4j-1.2.0.jar, lib/slf4j-api-1.7.36.jar, - lib/spring-aop-5.2.0.RELEASE.jar, - lib/spring-beans-5.2.0.RELEASE.jar, - lib/spring-context-5.2.0.RELEASE.jar, - lib/spring-core-5.2.0.RELEASE.jar, - lib/spring-expression-5.2.0.RELEASE.jar, - lib/spring-jcl-5.2.0.RELEASE.jar, - lib/spring-test-5.2.0.RELEASE.jar + lib/spring-aop-6.0.13.jar, + lib/spring-beans-6.0.13.jar, + lib/spring-context-6.0.13.jar, + lib/spring-core-6.0.13.jar, + lib/spring-expression-6.0.13.jar, + lib/spring-jcl-6.0.13.jar, + lib/spring-test-6.0.13.jar diff --git a/org.thymeleaf.extras.eclipse.contentassist/build.properties b/org.thymeleaf.extras.eclipse.contentassist/build.properties index c1b2acc..fd59ce2 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/build.properties +++ b/org.thymeleaf.extras.eclipse.contentassist/build.properties @@ -17,8 +17,6 @@ bin.includes = .,\ lib/jakarta.activation-1.2.2.jar,\ lib/jakarta.activation-api-1.2.2.jar,\ lib/jakarta.xml.bind-api-2.3.3.jar,\ - lib/javax.annotation-api-1.3.2.jar,\ - lib/javax.inject-1.jar,\ lib/jaxb-impl-2.3.5.jar,\ lib/jaxb-utilities-3.0.0-SNAPSHOT.jar,\ lib/junit-jupiter-5.7.2.jar,\ @@ -31,10 +29,12 @@ bin.includes = .,\ lib/objenesis-3.2.jar,\ lib/opentest4j-1.2.0.jar,\ lib/slf4j-api-1.7.36.jar,\ - lib/spring-aop-5.2.0.RELEASE.jar,\ - lib/spring-beans-5.2.0.RELEASE.jar,\ - lib/spring-context-5.2.0.RELEASE.jar,\ - lib/spring-core-5.2.0.RELEASE.jar,\ - lib/spring-expression-5.2.0.RELEASE.jar,\ - lib/spring-jcl-5.2.0.RELEASE.jar,\ - lib/spring-test-5.2.0.RELEASE.jar + lib/spring-aop-6.0.13.jar,\ + lib/spring-beans-6.0.13.jar,\ + lib/spring-context-6.0.13.jar,\ + lib/spring-core-6.0.13.jar,\ + lib/spring-expression-6.0.13.jar,\ + lib/spring-jcl-6.0.13.jar,\ + lib/spring-test-6.0.13.jar,\ + lib/jakarta.inject-api-2.0.0.jar,\ + lib/jakarta.annotation-api-2.1.1.jar diff --git a/org.thymeleaf.extras.eclipse.contentassist/plugin.xml b/org.thymeleaf.extras.eclipse.contentassist/plugin.xml index b639785..3b47c73 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/plugin.xml +++ b/org.thymeleaf.extras.eclipse.contentassist/plugin.xml @@ -3,7 +3,7 @@ @@ -25,7 +25,7 @@ + id="org.thymeleaf.extras.eclipse.contentassist.ThymeleafBuilder"> + value="org.thymeleaf.extras.eclipse.contentassist.ThymeleafNature"> @@ -80,7 +80,7 @@ + value="org.thymeleaf.extras.eclipse.contentassist.ThymeleafNature"> @@ -104,7 +104,7 @@ + value="org.thymeleaf.extras.eclipse.contentassist.ThymeleafNature"> @@ -128,7 +128,7 @@ + value="org.thymeleaf.extras.eclipse.contentassist.ThymeleafNature"> diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistConfig.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistConfig.groovy index 163f400..5f1a740 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistConfig.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistConfig.groovy @@ -18,10 +18,13 @@ package org.thymeleaf.extras.eclipse import org.eclipse.core.resources.IWorkspace import org.eclipse.core.resources.ResourcesPlugin import org.eclipse.jface.resource.ImageRegistry +import org.eclipse.ui.PlatformUI import org.eclipse.ui.IWorkbench import org.springframework.context.annotation.Bean import org.springframework.context.annotation.ComponentScan import org.springframework.context.annotation.Configuration +import org.thymeleaf.extras.eclipse.dialect.XmlDialectLoader +import org.thymeleaf.extras.eclipse.dialect.cache.DialectCache /** * Spring configuration for the core part of the plugin. @@ -39,7 +42,7 @@ class ContentAssistConfig { @Bean IWorkbench workbench() { - return ContentAssistPlugin.default.workbench + return PlatformUI.workbench } @Bean diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistContainer.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistContainer.groovy deleted file mode 100644 index 9d11da9..0000000 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistContainer.groovy +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2019, The Thymeleaf Project (http://www.thymeleaf.org/) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.thymeleaf.extras.eclipse - -import org.springframework.context.ConfigurableApplicationContext -import org.springframework.context.annotation.AnnotationConfigApplicationContext - -/** - * Spring IoC container for the content assist plugin. - * - * @author Emanuel Rabina - */ -@Singleton -class ContentAssistContainer { - - @Delegate - private final ConfigurableApplicationContext applicationContext = new AnnotationConfigApplicationContext(ContentAssistConfig) -} diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistPlugin.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistPlugin.groovy index 6636489..2fcf913 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistPlugin.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/ContentAssistPlugin.groovy @@ -21,6 +21,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin import org.eclipse.wst.html.ui.internal.HTMLUIPlugin import org.eclipse.wst.html.ui.internal.preferences.HTMLUIPreferenceNames import org.osgi.framework.BundleContext +import org.springframework.context.ApplicationContext +import org.springframework.context.annotation.AnnotationConfigApplicationContext /** * Plugin activator class for the Thymeleaf content assist module. @@ -39,6 +41,17 @@ class ContentAssistPlugin extends AbstractUIPlugin { private static ContentAssistPlugin plugin + ApplicationContext applicationContext + + /** + * Shortcut to the {@code getBean} method of the underlying application + * context. + */ + public T getBean(Class requiredType) { + + return plugin.applicationContext.getBean(requiredType) + } + /** * Returns the shared instance of this plugin. * @@ -86,7 +99,7 @@ class ContentAssistPlugin extends AbstractUIPlugin { }) } - ContentAssistContainer.instance + applicationContext = new AnnotationConfigApplicationContext(ContentAssistConfig) } @Override @@ -94,6 +107,5 @@ class ContentAssistPlugin extends AbstractUIPlugin { plugin = null super.stop(context) - ContentAssistContainer.instance.close() } } diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputer.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputer.groovy index 1ef1b34..0384fb2 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputer.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputer.groovy @@ -19,7 +19,7 @@ package org.thymeleaf.extras.eclipse.autocomplete import org.eclipse.core.runtime.IProgressMonitor import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext import org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer -import org.thymeleaf.extras.eclipse.ContentAssistContainer +import org.thymeleaf.extras.eclipse.ContentAssistPlugin import org.thymeleaf.extras.eclipse.autocomplete.generators.ProposalGenerator import org.thymeleaf.extras.eclipse.autocomplete.generators.AttributeProcessorProposalGenerator import org.thymeleaf.extras.eclipse.autocomplete.generators.AttributeRestrictionProposalGenerator @@ -46,10 +46,10 @@ class CompletionProposalComputer implements ICompletionProposalComputer { CompletionProposalComputer() { this( - ContentAssistContainer.instance.getBean(ElementProcessorProposalGenerator), - ContentAssistContainer.instance.getBean(AttributeProcessorProposalGenerator), - ContentAssistContainer.instance.getBean(AttributeRestrictionProposalGenerator), - ContentAssistContainer.instance.getBean(ExpressionObjectProposalGenerator) + ContentAssistPlugin.default.getBean(ElementProcessorProposalGenerator), + ContentAssistPlugin.default.getBean(AttributeProcessorProposalGenerator), + ContentAssistPlugin.default.getBean(AttributeRestrictionProposalGenerator), + ContentAssistPlugin.default.getBean(ExpressionObjectProposalGenerator) ) } diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGenerator.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGenerator.groovy index d58b91c..29487b9 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGenerator.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGenerator.groovy @@ -27,8 +27,8 @@ import org.thymeleaf.extras.eclipse.wrappers.JavaProjectLocator import org.w3c.dom.NamedNodeMap import org.w3c.dom.Node -import javax.inject.Inject -import javax.inject.Named +import jakarta.inject.Inject +import jakarta.inject.Named /** * Proposal generator for Thymeleaf attribute processors. diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeRestrictionProposalGenerator.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeRestrictionProposalGenerator.groovy index 8e0c56b..d0cf56f 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeRestrictionProposalGenerator.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeRestrictionProposalGenerator.groovy @@ -25,8 +25,8 @@ import org.thymeleaf.extras.eclipse.autocomplete.proposals.AttributeRestrictionC import org.thymeleaf.extras.eclipse.dialect.cache.DialectCache import org.w3c.dom.Node -import javax.inject.Inject -import javax.inject.Named +import jakarta.inject.Inject +import jakarta.inject.Named /** * Proposal generator for Thymeleaf attribute restrictions. diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ElementProcessorProposalGenerator.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ElementProcessorProposalGenerator.groovy index 1420b6b..8589afa 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ElementProcessorProposalGenerator.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ElementProcessorProposalGenerator.groovy @@ -26,8 +26,8 @@ import org.thymeleaf.extras.eclipse.autocomplete.proposals.ElementProcessorCompl import org.thymeleaf.extras.eclipse.dialect.cache.DialectCache import org.w3c.dom.Node -import javax.inject.Inject -import javax.inject.Named +import jakarta.inject.Inject +import jakarta.inject.Named /** * Proposal generator for Thymeleaf element processors. diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ExpressionObjectProposalGenerator.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ExpressionObjectProposalGenerator.groovy index e745627..1939814 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ExpressionObjectProposalGenerator.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/ExpressionObjectProposalGenerator.groovy @@ -25,8 +25,8 @@ import org.thymeleaf.extras.eclipse.autocomplete.proposals.ExpressionObjectMetho import org.thymeleaf.extras.eclipse.dialect.cache.DialectCache import org.w3c.dom.Node -import javax.inject.Inject -import javax.inject.Named +import jakarta.inject.Inject +import jakarta.inject.Named /** * Proposal generator for Thymeleaf expression objects. diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/builder/ThymeleafBuilder.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/builder/ThymeleafBuilder.groovy index f04278a..5ccf56b 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/builder/ThymeleafBuilder.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/builder/ThymeleafBuilder.groovy @@ -27,7 +27,7 @@ import org.eclipse.jdt.core.IJavaProject import org.eclipse.jdt.core.JavaCore import org.slf4j.Logger import org.slf4j.LoggerFactory -import org.thymeleaf.extras.eclipse.ContentAssistContainer +import org.thymeleaf.extras.eclipse.ContentAssistPlugin import org.thymeleaf.extras.eclipse.dialect.cache.DialectCache import static org.eclipse.core.resources.IResource.* @@ -50,7 +50,7 @@ class ThymeleafBuilder extends IncrementalProjectBuilder { private static final Logger logger = LoggerFactory.getLogger(ThymeleafBuilder) - private final DialectCache dialectCache = ContentAssistContainer.instance.getBean(DialectCache) + private final DialectCache dialectCache = ContentAssistPlugin.default.getBean(DialectCache) /** * Remove HTML validation messages that refer to unknown attributes, when diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/SingleFileDialectLocator.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/SingleFileDialectLocator.groovy index 1dc7afc..bf837a3 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/SingleFileDialectLocator.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/SingleFileDialectLocator.groovy @@ -20,7 +20,7 @@ import org.eclipse.core.resources.IWorkspace import org.eclipse.core.runtime.IPath import groovy.transform.TupleConstructor -import javax.inject.Inject +import jakarta.inject.Inject /** * A dialect locator target at a single, already-known, dialect file. diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/XmlDialectLoader.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/XmlDialectLoader.groovy index e8fb27c..0db9eb4 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/XmlDialectLoader.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/XmlDialectLoader.groovy @@ -21,7 +21,7 @@ import nz.net.ultraq.jaxb.XmlReader import org.thymeleaf.extras.eclipse.dialect.xml.Dialect import org.thymeleaf.extras.eclipse.resources.ResourceLoader -import javax.inject.Named +import jakarta.inject.Named /** * Loads dialect help/documentation XML files from those returned by a diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCache.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCache.groovy index 97d5de2..3e705c3 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCache.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCache.groovy @@ -28,10 +28,10 @@ import org.thymeleaf.extras.eclipse.dialect.xml.ExpressionObjectMethod import org.thymeleaf.extras.eclipse.dialect.xml.Processor import static org.eclipse.core.resources.IResourceChangeEvent.* -import javax.annotation.PostConstruct -import javax.annotation.PreDestroy -import javax.inject.Inject -import javax.inject.Named +import jakarta.annotation.PostConstruct +import jakarta.annotation.PreDestroy +import jakarta.inject.Inject +import jakarta.inject.Named import javax.xml.namespace.QName /** diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectChangeListener.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectChangeListener.groovy index e6ca645..f5051f0 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectChangeListener.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectChangeListener.groovy @@ -28,12 +28,12 @@ import org.thymeleaf.extras.eclipse.dialect.SingleFileDialectLocator import org.thymeleaf.extras.eclipse.dialect.XmlDialectLoader import static org.eclipse.core.resources.IResourceChangeEvent.* +import jakarta.annotation.PreDestroy +import jakarta.inject.Inject +import jakarta.inject.Named import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ExecutorService import java.util.concurrent.Executors -import javax.annotation.PreDestroy -import javax.inject.Inject -import javax.inject.Named /** * A resource change listener, acting on changes made to any dialect files, diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectItemProcessor.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectItemProcessor.groovy index bd0fb16..78a575e 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectItemProcessor.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectItemProcessor.groovy @@ -21,7 +21,8 @@ import org.eclipse.jdt.core.IJavaProject import org.eclipse.jdt.ui.JavadocContentAccess import org.thymeleaf.extras.eclipse.dialect.xml.* -import javax.inject.Named +import jakarta.inject.Named + /** * Creates a content-assist ready dialect item from a dialect file definition. * diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectTree.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectTree.groovy index da6797e..3cb9202 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectTree.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectTree.groovy @@ -23,7 +23,7 @@ import org.thymeleaf.extras.eclipse.dialect.xml.DialectItem import org.thymeleaf.extras.eclipse.dialect.xml.ElementProcessor import org.thymeleaf.extras.eclipse.dialect.xml.ExpressionObjectMethod -import javax.inject.Named +import jakarta.inject.Named /** * Representation of all of the projects which contain dialect files found in diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/hover/InfoHoverComputer.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/hover/InfoHoverComputer.groovy index 44ae0d0..f8cf3fc 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/hover/InfoHoverComputer.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/hover/InfoHoverComputer.groovy @@ -26,7 +26,7 @@ import org.eclipse.jface.text.ITextViewer import org.eclipse.swt.widgets.Shell import org.eclipse.ui.IWorkbench import org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter -import org.thymeleaf.extras.eclipse.ContentAssistContainer +import org.thymeleaf.extras.eclipse.ContentAssistPlugin import org.thymeleaf.extras.eclipse.dialect.cache.DialectCache /** @@ -47,7 +47,7 @@ class InfoHoverComputer implements ITextHover, ITextHoverExtension { */ InfoHoverComputer() { - this(ContentAssistContainer.instance.getBean(DialectCache), ContentAssistContainer.instance.getBean(IWorkbench)) + this(ContentAssistPlugin.default.getBean(DialectCache), ContentAssistPlugin.default.getBean(IWorkbench)) } /** diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/nature/ThymeleafNature.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/nature/ThymeleafNature.groovy index 65577b0..176a09a 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/nature/ThymeleafNature.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/nature/ThymeleafNature.groovy @@ -16,9 +16,9 @@ package org.thymeleaf.extras.eclipse.nature - import org.eclipse.core.resources.IProject -import org.eclipse.core.resources.IProjectNature +import org.eclipse.core.resources.IProjectNature + /** * Configures a project that has been given the Thymeleaf nature. * @@ -26,8 +26,8 @@ import org.eclipse.core.resources.IProjectNature */ class ThymeleafNature implements IProjectNature { - static final String THYMELEAF_NATURE_ID = 'org.thymeleaf.extras.eclipse.core.ThymeleafNature' - static final String THYMELEAF_BUILDER_ID = 'org.thymeleaf.extras.eclipse.core.ThymeleafBuilder' + static final String THYMELEAF_NATURE_ID = 'org.thymeleaf.extras.eclipse.contentassist.ThymeleafNature' + static final String THYMELEAF_BUILDER_ID = 'org.thymeleaf.extras.eclipse.contentassist.ThymeleafBuilder' IProject project diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/resources/ResourceTree.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/resources/ResourceTree.groovy index b4c20dc..7adfbcc 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/resources/ResourceTree.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/resources/ResourceTree.groovy @@ -16,10 +16,11 @@ package org.thymeleaf.extras.eclipse.resources -import javax.inject.Named import org.eclipse.core.runtime.IPath import org.eclipse.jdt.core.IJavaProject +import jakarta.inject.Named + /** * Generic representation of resources in a developer's workspace, divided-up by * projects. diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/TemplateLoader.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/TemplateLoader.groovy index 92fcad5..835b626 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/TemplateLoader.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/TemplateLoader.groovy @@ -21,7 +21,8 @@ import org.attoparser.dom.DOMMarkupParser import org.thymeleaf.extras.eclipse.resources.ResourceLoader import org.thymeleaf.extras.eclipse.template.model.Template -import javax.inject.Named +import jakarta.inject.Named + /** * Creates template metadata for any templates picked out by a template locator. * diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/cache/TemplateCache.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/cache/TemplateCache.groovy index 37aa20c..3e13f20 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/cache/TemplateCache.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/template/cache/TemplateCache.groovy @@ -16,8 +16,6 @@ package org.thymeleaf.extras.eclipse.template.cache -import javax.inject.Inject -import javax.inject.Named import org.eclipse.jdt.core.IJavaProject import org.thymeleaf.extras.eclipse.resources.ResourceTree import org.thymeleaf.extras.eclipse.template.ProjectTemplateLocator @@ -25,6 +23,9 @@ import org.thymeleaf.extras.eclipse.template.TemplateLoader import org.thymeleaf.extras.eclipse.template.model.Fragment import org.thymeleaf.extras.eclipse.template.model.Template +import jakarta.inject.Inject +import jakarta.inject.Named + /** * A basic in-memory store of all known template fragments per project. * diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/wrappers/JavaProjectLocator.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/wrappers/JavaProjectLocator.groovy index c0d4955..03e1485 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/wrappers/JavaProjectLocator.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/main/groovy/org/thymeleaf/extras/eclipse/wrappers/JavaProjectLocator.groovy @@ -20,8 +20,8 @@ import org.eclipse.jdt.core.IJavaProject import org.eclipse.jdt.core.JavaCore import org.eclipse.ui.IWorkbench -import javax.inject.Inject -import javax.inject.Named +import jakarta.inject.Inject +import jakarta.inject.Named /** * A basic wrapper around Eclipse's static methods to get the Java project for diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputerTests.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputerTests.groovy index 02c9e14..37a83fd 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputerTests.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/CompletionProposalComputerTests.groovy @@ -30,7 +30,7 @@ import org.thymeleaf.extras.eclipse.autocomplete.generators.ExpressionObjectProp import static org.junit.jupiter.api.Assertions.* import static org.mockito.Mockito.* -import javax.inject.Inject +import jakarta.inject.Inject /** * Tests for the {@link CompletionProposalComputer}, which aggregates diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGeneratorTests.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGeneratorTests.groovy index 1cd214c..54bf122 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGeneratorTests.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/autocomplete/generators/AttributeProcessorProposalGeneratorTests.groovy @@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.* import static org.mockito.Mockito.* import groovy.xml.DOMBuilder -import javax.inject.Inject +import jakarta.inject.Inject /** * Tests for the {@link AttributeProcessorProposalGenerator}, which comes up diff --git a/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCacheTests.groovy b/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCacheTests.groovy index 62a9e25..b640fc3 100644 --- a/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCacheTests.groovy +++ b/org.thymeleaf.extras.eclipse.contentassist/src/test/groovy/org/thymeleaf/extras/eclipse/dialect/cache/DialectCacheTests.groovy @@ -23,7 +23,7 @@ import org.thymeleaf.extras.eclipse.TestContentAssistConfig import static org.junit.jupiter.api.Assertions.* import static org.mockito.Mockito.* -import javax.inject.Inject +import jakarta.inject.Inject /** * Tests for the {@link DialectCache} class which is a store of dialect