+ * May block during execution. Pumps the UI event loop if called from the UI thread. Cancellation from progress
+ * monitor is honored and signaled in the return value.
+ *
+ * @param location where to place them, may be {@code null} for the workspace root
+ * @param archetype archetype
+ * @param groupId groupid
+ * @param artifactId artifactid
+ * @param version version
+ * @param javaPackage java package
+ * @param properties initial properties (some properties will be set/overriden by this call)
+ * @param interactive see {@link IMavenLauncher#runMaven(File, String, Map, boolean)}
+ * @param monitor monitor for progress and cancellation, may be {@code null}
+ * @return a list of created projects.
+ * @throws CoreException to signal an error or a cancellation (if the contained status is CANCEL)
+ * @since 1.8
+ */
+ public Collection createArchetypeProjects(
+ IPath location, IArchetype archetype, String groupId, String artifactId, String version, String javaPackage,
+ Map properties, boolean interactive, IProgressMonitor monitor)
+ throws CoreException {
+
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace(
+ ).getRoot();
+
+ if (location == null) {
+
+ // if the project should be created in the workspace, figure out the path
+
+ location = workspaceRoot.getLocation();
+ }
+
+ File basedir = location.toFile();
+
+ if ((basedir == null) || (!basedir.mkdirs() && !basedir.isDirectory())) {
+ throw new CoreException(LiferayMavenCore.createErrorStatus(""));
+ }
+ //See https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html
+ Map userProperties = new LinkedHashMap<>(properties);
+
+ userProperties.put("archetypeGroupId", archetype.getGroupId());
+ userProperties.put("archetypeArtifactId", archetype.getArtifactId());
+ userProperties.put("archetypeVersion", archetype.getVersion());
+ userProperties.put("groupId", groupId);
+ userProperties.put("artifactId", artifactId);
+ userProperties.put("version", version);
+ userProperties.put("package", javaPackage);
+ userProperties.put("outputDirectory", basedir.getAbsolutePath());
+ String projectFolder = location.append(
+ artifactId
+ ).toFile(
+ ).getAbsolutePath();
+
+ CompletableFuture> mavenRun = null;
+ File[] workingDir = new File[1];
+
+ try (var workingDirCleaner = createEmptyWorkingDirectory(workingDir)) {
+ String goals = "-U " + LiferayArchetypePlugin.ARCHETYPE_PREFIX + ":generate";
+
+ mavenRun = mavenLauncher.runMaven(workingDir[0], goals, userProperties, interactive);
+
+ mavenRun.get(); //wait for maven build to complete...
+ LocalProjectScanner scanner = new LocalProjectScanner(List.of(projectFolder), true, mavenModelManager);
+
+ try {
+ scanner.run(monitor);
+ }
+ catch (InterruptedException e) {
+ return List.of();
+ }
+
+ return projectConfigurationManager.collectProjects(scanner.getProjects());
+ }
+ catch (CancellationException | InterruptedException | OperationCanceledException ex) {
+
+ // ensure cancellations that might not have originated from the Future itself, request it to cancel
+
+ if (mavenRun != null) {
+ mavenRun.cancel(true);
+ }
+
+ // in all cases, for API compatibility, do not throw OCE, and instead throw a CoreException with CANCEL status
+
+ throw new CoreException(Status.CANCEL_STATUS);
+ }
+ catch (ExecutionException | IOException ex) {
+ throw new CoreException(LiferayMavenCore.createErrorStatus("", ex)); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Creates project structure(s) using the given {@link IArchetype}. These projects are not imported automatically so
+ * {@link IProjectConfigurationManager#importProjects(Collection, org.eclipse.m2e.core.project.ProjectImportConfiguration, IProgressMonitor)
+ * IProjectConfigurationManager.importProjects()} must be called if they are to be imported into the workspace.
+ *
+ * May block during execution. Pumps the UI event loop if called from the UI thread. Cancellation from progress
+ * monitor is honored and signaled in the return value.
+ *
+ * Equivalent to
+ * {@link #createArchetypeProjects(IPath, IArchetype, String, String, String, String, Map, boolean, IProgressMonitor)}
+ * with interactive = false
+ *
+ * @param location where to place them, may be {@code null} for the workspace root
+ * @param archetype archetype
+ * @param groupId groupid
+ * @param artifactId artifactid
+ * @param version version
+ * @param javaPackage java package
+ * @param properties initial properties (some properties will be set/overriden by this call)
+ * @param monitor monitor for progress and cancellation, may be {@code null}
+ * @return a list of created projects.
+ * @throws CoreException to signal an error or a cancellation (if the contained status is CANCEL)
+ * @since 1.8
+ */
+ public Collection createArchetypeProjects(
+ IPath location, IArchetype archetype, String groupId, String artifactId, String version, String javaPackage,
+ Map properties, IProgressMonitor monitor)
+ throws CoreException {
+
+ return createArchetypeProjects(
+ location, archetype, groupId, artifactId, version, javaPackage, properties, false, monitor);
+ }
+
+ private static Closeable createEmptyWorkingDirectory(File[] workingDir) throws IOException {
+ Path tempWorkingDir = Files.createTempDirectory("m2e-archetypeGenerator");
+
+ Files.createDirectories(tempWorkingDir.resolve(".mvn")); // Ensure tempWorkingDir is used as maven.multiModuleProjectDirectory
+ workingDir[0] = tempWorkingDir.toFile();
+
+ return () -> FileUtils.deleteDirectory(workingDir[0]);
+ }
+
+}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayArchetypePlugin.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayArchetypePlugin.java
new file mode 100644
index 0000000000..6c71099649
--- /dev/null
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayArchetypePlugin.java
@@ -0,0 +1,166 @@
+package com.liferay.ide.maven.core;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.archetype.common.ArchetypeArtifactManager;
+import org.apache.maven.archetype.exception.UnknownArchetype;
+import org.apache.maven.archetype.metadata.ArchetypeDescriptor;
+import org.apache.maven.archetype.metadata.RequiredProperty;
+import org.apache.maven.archetype.source.ArchetypeDataSource;
+import org.apache.maven.archetype.source.ArchetypeDataSourceException;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.DefaultContainerConfiguration;
+import org.codehaus.plexus.DefaultPlexusContainer;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainerException;
+import org.codehaus.plexus.classworlds.ClassWorld;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.project.IArchetype;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.slf4j.ILoggerFactory;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Module;
+
+@Component(service = LiferayArchetypePlugin.class)
+@SuppressWarnings({ "restriction", "deprecation"})
+public class LiferayArchetypePlugin {
+
+ public static final String ARCHETYPE_PREFIX = "archetype";
+
+ @Reference
+ LiferayArchetypeGenerator archetypeGenerator;
+
+ @Reference
+ IMaven maven;
+
+ public LiferayArchetypePlugin() {
+ }
+
+ public LiferayArchetypeGenerator getGenerator() {
+ return archetypeGenerator;
+ }
+
+ /**
+ * Gets the required properties of an {@link IArchetype}.
+ *
+ * @param archetype the archetype possibly declaring required properties
+ * @param remoteArchetypeRepository the remote archetype repository, can be null.
+ * @param monitor the progress monitor, can be null.
+ * @return the required properties of the archetypes, null if none is found.
+ * @throws CoreException if no archetype can be resolved
+ */
+ public List getRequiredProperties(LiferayMavenArchetype archetype, IProgressMonitor monitor)
+ throws CoreException {
+
+ Assert.isNotNull(archetype, "Archetype can not be null");
+
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ final String groupId = archetype.getGroupId();
+ final String artifactId = archetype.getArtifactId();
+ final String version = archetype.getVersion();
+
+ final List repositories = new ArrayList<>(maven.getArtifactRepositories());
+
+ return maven.createExecutionContext(
+ ).execute(
+ (context, monitor1) -> {
+ ArtifactRepository localRepository = context.getLocalRepository();
+
+ if (archetypeArtifactManager.isFileSetArchetype(
+ groupId, artifactId, version, null, localRepository, repositories,
+ context.newProjectBuildingRequest())) {
+
+ ArchetypeDescriptor descriptor;
+
+ try {
+ descriptor = archetypeArtifactManager.getFileSetArchetypeDescriptor(
+ groupId, artifactId, version, null, localRepository, repositories,
+ context.newProjectBuildingRequest());
+ }
+ catch (UnknownArchetype ex) {
+ throw new CoreException(Status.error("UnknownArchetype", ex));
+ }
+
+ return descriptor.getRequiredProperties();
+ }
+
+ return null;
+ },
+ monitor
+ );
+ }
+
+ public void updateLocalCatalog(Archetype archetype) throws CoreException {
+ maven.createExecutionContext(
+ ).execute(
+ (ctx, m) -> {
+ ProjectBuildingRequest request = ctx.newProjectBuildingRequest();
+
+ try {
+ ArchetypeDataSource source = archetypeDataSourceMap.get("catalog");
+
+ source.updateCatalog(request, archetype);
+ }
+ catch (ArchetypeDataSourceException e) {
+ }
+
+ return null;
+ },
+ null
+ );
+ }
+
+ @Activate
+ void activate() throws ComponentLookupException, PlexusContainerException {
+ final Module logginModule = new AbstractModule() {
+
+ @Override
+ protected void configure() {
+ bind(
+ ILoggerFactory.class
+ ).toInstance(
+ LoggerFactory.getILoggerFactory()
+ );
+ }
+
+ };
+ final ContainerConfiguration cc = new DefaultContainerConfiguration() //
+ .setClassWorld(new ClassWorld("plexus.core", ArchetypeArtifactManager.class.getClassLoader())) //$NON-NLS-1$
+ .setClassPathScanning(PlexusConstants.SCANNING_INDEX) //
+ .setAutoWiring(true) //
+ .setName("plexus"); //$NON-NLS-1$
+ container = new DefaultPlexusContainer(cc, logginModule);
+ archetypeArtifactManager = container.lookup(ArchetypeArtifactManager.class);
+ archetypeDataSourceMap = container.lookupMap(ArchetypeDataSource.class);
+ }
+
+ @Deactivate
+ void shutdown() throws IOException {
+ container.dispose();
+ }
+
+ private ArchetypeArtifactManager archetypeArtifactManager;
+ private Map archetypeDataSourceMap;
+ private DefaultPlexusContainer container;
+
+}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/BuildFilePropertyTester.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenArchetype.java
similarity index 50%
rename from tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/BuildFilePropertyTester.java
rename to maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenArchetype.java
index f087efc18f..db60083a7d 100644
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/BuildFilePropertyTester.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenArchetype.java
@@ -12,28 +12,37 @@
* details.
*/
-package com.liferay.ide.project.ui;
+package com.liferay.ide.maven.core;
-import java.util.Objects;
+import org.apache.maven.archetype.catalog.Archetype;
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IFile;
+import org.eclipse.m2e.core.project.IArchetype;
/**
- * @author Gregory Amerson
+ * @author Simon Jiang
*/
-public class BuildFilePropertyTester extends PropertyTester {
+@SuppressWarnings("restriction")
+public class LiferayMavenArchetype implements IArchetype {
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof IFile) {
- IFile file = (IFile)receiver;
+ public LiferayMavenArchetype(Archetype archetype) {
+ _archetype = archetype;
+ }
- if (file.exists() && Objects.equals("build.xml", file.getName())) {
- return true;
- }
- }
+ @Override
+ public String getArtifactId() {
+ return _archetype.getArtifactId();
+ }
- return false;
+ @Override
+ public String getGroupId() {
+ return _archetype.getGroupId();
}
+ @Override
+ public String getVersion() {
+ return _archetype.getVersion();
+ }
+
+ private Archetype _archetype;
+
}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenCore.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenCore.java
index 8ef095027e..7099ca619a 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenCore.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenCore.java
@@ -16,6 +16,8 @@
import com.liferay.ide.core.util.MultiStatusBuilder;
+import java.util.Objects;
+
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
@@ -29,6 +31,7 @@
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
/**
* @author Gregory Amerson
@@ -42,10 +45,10 @@ public class LiferayMavenCore extends Plugin {
public static final String PLUGIN_ID = "com.liferay.ide.maven.core";
- // set maven project context root with suffix
-
public static final String PREF_ADD_MAVEN_PLUGIN_SUFFIX = "add-maven-plugin-suffix";
+ // set maven project context root with suffix
+
public static final String PREF_ARCHETYPE_GAV_EXT = "archetype-gav-ext";
public static final String PREF_ARCHETYPE_GAV_HOOK = "archetype-gav-hook";
@@ -76,8 +79,6 @@ public class LiferayMavenCore extends Plugin {
public static final String PREF_DISABLE_CUSTOM_JSP_VALIDATION = "disable-custom-jsp-validation";
- // The key of disable customJspValidation checking
-
public static Status createErrorStatus(String msg) {
return new Status(IStatus.ERROR, PLUGIN_ID, msg, null);
}
@@ -90,6 +91,8 @@ public static IStatus createErrorStatus(Throwable throwable) {
return createErrorStatus(throwable.getMessage(), throwable);
}
+ // The key of disable customJspValidation checking
+
public static IStatus createMultiStatus(int severity, IStatus[] statuses) {
return new MultiStatus(
LiferayMavenCore.PLUGIN_ID, severity, statuses, statuses[0].getMessage(), statuses[0].getException());
@@ -141,20 +144,40 @@ public static MultiStatusBuilder newMultiStatus() {
public LiferayMavenCore() {
}
+ public LiferayArchetypePlugin getArchetypePlugin() {
+ synchronized (this) {
+ if (_archetypeManager == null) {
+ _archetypeManager = new ServiceTracker<>(_context, LiferayArchetypePlugin.class, null);
+
+ _archetypeManager.open();
+ }
+ }
+
+ return _archetypeManager.getService();
+ }
+
public void start(BundleContext context) throws Exception {
+ _context = context;
super.start(context);
_plugin = this;
}
public void stop(BundleContext context) throws Exception {
+ if (Objects.nonNull(_archetypeManager)) {
+ _archetypeManager.close();
+ }
+
_plugin = null;
super.stop(context);
}
- // The plug-in ID
-
private static LiferayMavenCore _plugin;
private static final IScopeContext[] _scopes = {InstanceScope.INSTANCE, DefaultScope.INSTANCE};
+ // The plug-in ID
+
+ private ServiceTracker _archetypeManager;
+ private BundleContext _context;
+
}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectConfigurator.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectConfigurator.java
index 06ce968f2f..f5a5e1a992 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectConfigurator.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectConfigurator.java
@@ -52,6 +52,9 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.MavenPluginActivator;
import org.eclipse.m2e.core.internal.markers.IMavenMarkerManager;
@@ -63,6 +66,7 @@
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
import org.eclipse.m2e.jdt.IClasspathDescriptor;
import org.eclipse.m2e.jdt.IJavaProjectConfigurator;
+import org.eclipse.m2e.jdt.internal.MavenClasspathHelpers;
import org.eclipse.m2e.wtp.WTPProjectsUtil;
import org.eclipse.m2e.wtp.WarPluginConfiguration;
import org.eclipse.osgi.util.NLS;
@@ -108,10 +112,10 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor moni
monitor = new NullProgressMonitor();
}
- monitor.beginTask(NLS.bind(Msgs.configuringLiferayProject, request.getProject()), 100);
+ monitor.beginTask(NLS.bind(Msgs.configuringLiferayProject, MavenUtil.getProject(request)), 100);
Plugin liferayMavenPlugin = MavenUtil.getPlugin(
- request.getMavenProjectFacade(), ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, monitor);
+ request.mavenProjectFacade(), ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, monitor);
if (!_shouldConfigure(liferayMavenPlugin, request)) {
monitor.done();
@@ -119,7 +123,7 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor moni
return;
}
- IProject project = request.getProject();
+ IProject project = MavenUtil.getProject(request);
IFile pomFile = project.getFile(IMavenConstants.POM_FILE_NAME);
IFacetedProject facetedProject = ProjectFacetsManager.create(project, false, monitor);
@@ -128,7 +132,7 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor moni
monitor.worked(25);
- MavenProject mavenProject = request.getMavenProject();
+ MavenProject mavenProject = request.mavenProject();
List errors = _findLiferayMavenPluginProblems(request, monitor);
@@ -277,6 +281,18 @@ public void configureClasspath(IMavenProjectFacade facade, IClasspathDescriptor
public void configureRawClasspath(
ProjectConfigurationRequest request, IClasspathDescriptor classpath, IProgressMonitor monitor)
throws CoreException {
+
+ IMavenProjectFacade mavenProjectFacade = request.mavenProjectFacade();
+
+ IClasspathEntry jreContainerEntry = MavenClasspathHelpers.getJREContainerEntry(
+ JavaCore.create(mavenProjectFacade.getProject()));
+
+ classpath.removeEntry(jreContainerEntry.getPath());
+
+ IClasspathEntry defaultJREContainerEntry = JavaCore.newContainerEntry(
+ JavaRuntime.newJREContainerPath(JavaRuntime.getDefaultVMInstall()));
+
+ classpath.addEntry(defaultJREContainerEntry);
}
protected void configureDeployedName(IProject project, String deployedFileName) {
@@ -414,7 +430,7 @@ private List _findLiferayMavenPluginProblems(
// pointed to valid location
Plugin liferayMavenPlugin = MavenUtil.getPlugin(
- request.getMavenProjectFacade(), ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, monitor);
+ request.mavenProjectFacade(), ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, monitor);
if (liferayMavenPlugin != null) {
Xpp3Dom config = (Xpp3Dom)liferayMavenPlugin.getConfiguration();
@@ -525,14 +541,14 @@ private MavenProblemInfo _installNewLiferayFacet(
MavenProblemInfo retval = null;
- String pluginType = MavenUtil.getLiferayMavenPluginType(request.getMavenProject());
+ String pluginType = MavenUtil.getLiferayMavenPluginType(request.mavenProject());
if (pluginType == null) {
pluginType = ILiferayMavenConstants.DEFAULT_PLUGIN_TYPE;
}
Plugin liferayMavenPlugin = MavenUtil.getPlugin(
- request.getMavenProjectFacade(), ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, monitor);
+ request.mavenProjectFacade(), ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, monitor);
IFacetedProject.Action action = _getNewLiferayFacetInstallAction(pluginType);
if (action != null) {
@@ -597,8 +613,8 @@ private boolean _shouldAddLiferayNature(MavenProject mavenProject, IFacetedProje
* for liferay specific files
*/
private boolean _shouldConfigure(Plugin liferayMavenPlugin, ProjectConfigurationRequest request) {
- IProject project = request.getProject();
- MavenProject mavenProject = request.getMavenProject();
+ IProject project = MavenUtil.getProject(request);
+ MavenProject mavenProject = request.mavenProject();
boolean configureAsLiferayPlugin = false;
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectProvider.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectProvider.java
index 4ed60f30a5..8c100622d7 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectProvider.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenProjectProvider.java
@@ -57,6 +57,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
@@ -116,7 +117,9 @@ public List getData(String key, Class type, Object... params) {
}
if (FileUtil.exists(pomFile)) {
- Model model = maven.readModel(pomFile);
+ MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
+
+ Model model = mavenModelManager.readMavenModel(pomFile);
File parentDir = pomFile.getParentFile();
@@ -129,7 +132,8 @@ public List getData(String key, Class type, Object... params) {
if (FileUtil.exists(parentDir)) {
try {
- model = maven.readModel(new File(parentDir, IMavenConstants.POM_FILE_NAME));
+ model = mavenModelManager.readMavenModel(
+ new File(parentDir, IMavenConstants.POM_FILE_NAME));
}
catch (Exception e) {
model = null;
@@ -192,9 +196,9 @@ else if (key.equals("parentVersion")) {
if (FileUtil.exists(parentPom)) {
try {
- IMaven maven = MavenPlugin.getMaven();
+ MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
- Model model = maven.readModel(parentPom);
+ Model model = mavenModelManager.readMavenModel(parentPom);
version.add(type.cast(model.getVersion()));
@@ -214,9 +218,9 @@ else if (key.equals("parentGroupId")) {
if (FileUtil.exists(parentPom)) {
try {
- IMaven maven = MavenPlugin.getMaven();
+ MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
- Model model = maven.readModel(parentPom);
+ Model model = mavenModelManager.readMavenModel(parentPom);
groupId.add(type.cast(model.getGroupId()));
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenWorkspaceProjectProvider.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenWorkspaceProjectProvider.java
index 3ef801c18b..4c7932a0b2 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenWorkspaceProjectProvider.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayMavenWorkspaceProjectProvider.java
@@ -15,6 +15,7 @@
package com.liferay.ide.maven.core;
import com.liferay.ide.core.ILiferayProject;
+import com.liferay.ide.core.ProductInfo;
import com.liferay.ide.core.util.CoreUtil;
import com.liferay.ide.core.util.FileUtil;
import com.liferay.ide.core.util.SapphireContentAccessor;
@@ -22,11 +23,14 @@
import com.liferay.ide.core.workspace.WorkspaceConstants;
import com.liferay.ide.project.core.ProjectCore;
import com.liferay.ide.project.core.modules.BladeCLI;
+import com.liferay.ide.project.core.util.ProjectUtil;
import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp;
import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceProjectProvider;
import java.io.File;
+import java.util.Map;
+import java.util.Objects;
import java.util.Properties;
import org.apache.maven.model.Model;
@@ -89,11 +93,27 @@ public IStatus createNewProject(NewLiferayWorkspaceOp op, IProgressMonitor monit
String targetPlatform = get(op.getTargetPlatform());
- String bundleUrl = get(op.getBundleUrl());
+ Map productInfos = ProjectUtil.getProductInfos();
+
+ ProductInfo productInfo = null;
+
+ for (ProductInfo product : productInfos.values()) {
+ try {
+ if (Objects.equals(product.getTargetPlatformVersion(), targetPlatform)) {
+ productInfo = product;
+
+ break;
+ }
+ }
+ catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ }
properties.setProperty(WorkspaceConstants.WORKSPACE_BOM_VERSION, targetPlatform);
- properties.setProperty(WorkspaceConstants.BUNDLE_URL_PROPERTY, bundleUrl);
+ properties.setProperty(
+ WorkspaceConstants.BUNDLE_URL_PROPERTY, ProjectUtil.decodeBundleUrl(productInfo));
MavenUtil.updateMavenPom(pomModel, pomFile);
}
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProfileCreator.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProfileCreator.java
index 1e105a921b..3b6ce3897d 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProfileCreator.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProfileCreator.java
@@ -88,15 +88,17 @@ public default Node createNewLiferayProfileNode(Document pomDocument, NewLiferay
}
if (newProfile != null) {
- IPath serverDir = liferayRuntime.getAppServerDir();
+ NodeUtil.appendTextNode(newProfile, "\n\t");
- IPath rootPath = serverDir.removeLastSegments(1);
+ NodeUtil.appendChildElement(newProfile, "id", get(newLiferayProfile.getId()));
+ NodeUtil.appendTextNode(newProfile, "\n\t");
- IPath autoDeployDir = rootPath.append("deploy");
+ Element activationElement = NodeUtil.appendChildElement(newProfile, "activation");
- NodeUtil.appendTextNode(newProfile, "\n\t");
+ NodeUtil.appendTextNode(activationElement, "\n\t\t");
+ NodeUtil.appendChildElement(activationElement, "activeByDefault", "true");
+ NodeUtil.appendTextNode(activationElement, "\n\t");
- NodeUtil.appendChildElement(newProfile, "id", get(newLiferayProfile.getId()));
NodeUtil.appendTextNode(newProfile, "\n\t");
Element propertiesElement = NodeUtil.appendChildElement(newProfile, "properties");
@@ -107,7 +109,15 @@ public default Node createNewLiferayProfileNode(Document pomDocument, NewLiferay
NodeUtil.appendTextNode(propertiesElement, "\n\t\t");
NodeUtil.appendChildElement(propertiesElement, "liferay.maven.plugin.version", liferayVersion);
NodeUtil.appendTextNode(propertiesElement, "\n\t\t");
+
+ IPath serverDir = liferayRuntime.getAppServerDir();
+
+ IPath rootPath = serverDir.removeLastSegments(1);
+
+ IPath autoDeployDir = rootPath.append("deploy");
+
NodeUtil.appendChildElement(propertiesElement, "liferay.auto.deploy.dir", autoDeployDir.toOSString());
+
NodeUtil.appendTextNode(propertiesElement, "\n\t\t");
NodeUtil.appendChildElement(
propertiesElement, "liferay.app.server.deploy.dir",
@@ -124,7 +134,7 @@ public default Node createNewLiferayProfileNode(Document pomDocument, NewLiferay
NodeFormatter formatter = new NodeFormatter();
- formatter.format(newNode);
+ formatter.format(root);
}
}
catch (Exception e) {
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProjectBuilder.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProjectBuilder.java
index bb2a0d291f..ced37db3dc 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProjectBuilder.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenProjectBuilder.java
@@ -406,7 +406,7 @@ public IStatus updateDependencies(IProject project, List dependencies)
File pomFile = new File(FileUtil.getLocationOSString(project), IMavenConstants.POM_FILE_NAME);
- Model model = maven.readModel(pomFile);
+ Model model = mavenProject.getModel();
for (Artifact artifact : dependencies) {
Dependency dependency = new Dependency();
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenUtil.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenUtil.java
index 26ebba2b87..cd139dc4c0 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenUtil.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/MavenUtil.java
@@ -29,9 +29,11 @@
import java.net.URISyntaxException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -71,7 +73,6 @@
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.embedder.IMavenExecutionContext;
-import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.project.AbstractProjectScanner;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -82,6 +83,7 @@
import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
import org.eclipse.m2e.wtp.ProjectUtils;
import org.eclipse.m2e.wtp.WarPluginConfiguration;
@@ -350,6 +352,18 @@ public static Plugin getPlugin(IMavenProjectFacade facade, String pluginKey, IPr
return retval;
}
+ public static IProject getProject(ProjectConfigurationRequest request) {
+ if (Objects.nonNull(request)) {
+ IMavenProjectFacade mavenProjectFacade = request.mavenProjectFacade();
+
+ if (Objects.nonNull(mavenProjectFacade)) {
+ return mavenProjectFacade.getProject();
+ }
+ }
+
+ return null;
+ }
+
public static IMavenProjectFacade getProjectFacade(IProject project) {
return getProjectFacade(project, new NullProgressMonitor());
}
@@ -437,12 +451,8 @@ public static boolean hasDependency(IProject mavenProject, String groupId, Strin
public static List importProject(String location, IProgressMonitor monitor)
throws CoreException, InterruptedException {
- MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
-
- File root = CoreUtil.getWorkspaceRootFile();
-
AbstractProjectScanner scanner = new LocalProjectScanner(
- root, location, false, mavenModelManager);
+ Arrays.asList(location), false, MavenPlugin.getMavenModelManager());
scanner.run(monitor);
@@ -516,9 +526,7 @@ public static boolean loadParentHierarchy(IMavenProjectFacade facade, IProgressM
break;
}
- IMaven maven = MavenPlugin.getMaven();
-
- MavenProject parentProject = maven.resolveParentProject(mavenProject, monitor);
+ MavenProject parentProject = mavenProject.getParent();
if (parentProject != null) {
mavenProject.setParent(parentProject);
@@ -557,12 +565,8 @@ public static void updateMavenPom(Model model, File file) throws IOException {
public static void updateProjectConfiguration(String projectName, String location, IProgressMonitor monitor)
throws InterruptedException {
- MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
-
- File root = CoreUtil.getWorkspaceRootFile();
-
AbstractProjectScanner scanner = new LocalProjectScanner(
- root, location, false, mavenModelManager);
+ Arrays.asList(location), false, MavenPlugin.getMavenModelManager());
scanner.run(monitor);
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenJSFModuleProjectProvider.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenJSFModuleProjectProvider.java
index f0ed649dae..ac6360cd5a 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenJSFModuleProjectProvider.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenJSFModuleProjectProvider.java
@@ -25,18 +25,16 @@
import java.io.File;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Objects;
-import java.util.Properties;
-import org.apache.maven.archetype.ArchetypeGenerationRequest;
-import org.apache.maven.archetype.ArchetypeGenerationResult;
-import org.apache.maven.archetype.ArchetypeManager;
import org.apache.maven.archetype.catalog.Archetype;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.repository.RemoteRepository;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -44,8 +42,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.m2e.core.internal.MavenPluginActivator;
-import org.eclipse.m2e.core.internal.embedder.MavenImpl;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.sapphire.Value;
import org.eclipse.sapphire.platform.PathBridge;
@@ -145,7 +142,7 @@ protected IPath createArchetypeProject(NewLiferayJSFModuleProjectOp op, IProgres
throw new CoreException(LiferayCore.createErrorStatus("Unable to create project from archetype."));
}
- Properties properties = new Properties();
+ Map properties = new HashMap<>();
IWorkspaceRoot workspaceRoot = CoreUtil.getWorkspaceRoot();
@@ -154,39 +151,17 @@ protected IPath createArchetypeProject(NewLiferayJSFModuleProjectOp op, IProgres
}
try {
- MavenPluginActivator pluginActivator = MavenPluginActivator.getDefault();
+ LiferayMavenCore liferayMavenCore = LiferayMavenCore.getDefault();
- ArchetypeGenerationRequest request = new ArchetypeGenerationRequest();
+ LiferayArchetypePlugin liferayArchetypePlugin = liferayMavenCore.getArchetypePlugin();
- MavenImpl mavenImpl = pluginActivator.getMaven();
+ LiferayArchetypeGenerator generator = liferayArchetypePlugin.getGenerator();
- request.setTransferListener(mavenImpl.createTransferListener(monitor));
+ Collection projects = generator.createArchetypeProjects(
+ location, new LiferayMavenArchetype(archetype), groupId, artifactId, version, javaPackage, properties,
+ false, monitor);
- request.setArchetypeGroupId(artifact.getGroupId());
- request.setArchetypeArtifactId(artifact.getArtifactId());
- request.setArchetypeVersion(artifact.getVersion());
-
- RemoteRepository remoteRepository = AetherUtil.newCentralRepository();
-
- request.setArchetypeRepository(remoteRepository.getUrl());
-
- request.setGroupId(groupId);
- request.setArtifactId(artifactId);
- request.setVersion(version);
- request.setPackage(javaPackage);
-
- // the model does not have a package field
-
- request.setLocalRepository(mavenImpl.getLocalRepository());
- request.setRemoteArtifactRepositories(mavenImpl.getArtifactRepositories(true));
- request.setProperties(properties);
- request.setOutputDirectory(location.toPortableString());
-
- ArchetypeGenerationResult result = _getArchetyper().generateProjectFromArchetype(request);
-
- Exception cause = result.getCause();
-
- if (cause != null) {
+ if (projects.isEmpty()) {
throw new CoreException(LiferayCore.createErrorStatus("Unable to create project from archetype."));
}
@@ -203,12 +178,4 @@ protected IPath createArchetypeProject(NewLiferayJSFModuleProjectOp op, IProgres
return projectLocation;
}
- private ArchetypeManager _getArchetyper() {
- MavenPluginActivator plugin = MavenPluginActivator.getDefault();
-
- org.eclipse.m2e.core.internal.archetype.ArchetypeManager archetypeManager = plugin.getArchetypeManager();
-
- return archetypeManager.getArchetyper();
- }
-
}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenPluginProjectProvider.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenPluginProjectProvider.java
index 4990c176c8..2aed318890 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenPluginProjectProvider.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/NewMavenPluginProjectProvider.java
@@ -33,27 +33,29 @@
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
-import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.apache.commons.io.FileUtils;
import org.apache.maven.archetype.catalog.Archetype;
-import org.apache.maven.archetype.exception.UnknownArchetype;
import org.apache.maven.archetype.metadata.RequiredProperty;
-import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
import org.apache.maven.model.Model;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -61,25 +63,21 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.m2e.core.internal.MavenPluginActivator;
-import org.eclipse.m2e.core.internal.archetype.ArchetypeManager;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.IMavenProjectRegistry;
+import org.eclipse.m2e.core.project.IMavenProjectImportResult;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
-import org.eclipse.m2e.core.project.MavenUpdateRequest;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.sapphire.ElementList;
import org.eclipse.sapphire.platform.PathBridge;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
/**
* @author Gregory Amerson
* @author Simon Jiang
@@ -98,8 +96,6 @@ public IStatus createNewProject(NewLiferayPluginProjectOp op, IProgressMonitor m
IStatus retval = null;
IMavenConfiguration mavenConfiguration = MavenPlugin.getMavenConfiguration();
- IMavenProjectRegistry mavenProjectRegistry = MavenPlugin.getMavenProjectRegistry();
- IProjectConfigurationManager projectConfigurationManager = MavenPlugin.getProjectConfigurationManager();
String groupId = get(op.getGroupId());
String artifactId = get(op.getProjectName());
@@ -134,73 +130,61 @@ public IStatus createNewProject(NewLiferayPluginProjectOp op, IProgressMonitor m
archetype.setVersion(archetypeVersion);
- MavenPluginActivator pluginActivator = MavenPluginActivator.getDefault();
-
- ArchetypeManager archetypeManager = pluginActivator.getArchetypeManager();
+ LiferayMavenCore liferayMavenCore = LiferayMavenCore.getDefault();
- ArtifactRepository remoteArchetypeRepository = archetypeManager.getArchetypeRepository(archetype);
+ LiferayArchetypePlugin archetypePlugin = liferayMavenCore.getArchetypePlugin();
- Properties properties = new Properties();
+ Map properties = new HashMap<>();
- try {
- List> archProps = archetypeManager.getRequiredProperties(archetype, remoteArchetypeRepository, monitor);
+ List archProps = archetypePlugin.getRequiredProperties(
+ new LiferayMavenArchetype(archetype), monitor);
- if (ListUtil.isNotEmpty(archProps)) {
- for (Object prop : archProps) {
- if (prop instanceof RequiredProperty) {
- RequiredProperty rProp = (RequiredProperty)prop;
+ if (ListUtil.isNotEmpty(archProps)) {
+ for (Object prop : archProps) {
+ if (prop instanceof RequiredProperty) {
+ RequiredProperty rProp = (RequiredProperty)prop;
- PluginType pluginType = get(op.getPluginType());
+ PluginType pluginType = get(op.getPluginType());
- if (pluginType.equals(PluginType.theme)) {
- String key = rProp.getKey();
+ if (pluginType.equals(PluginType.theme)) {
+ String key = rProp.getKey();
- if (key.equals("themeParent")) {
- properties.put(key, get(op.getThemeParent()));
- }
- else if (key.equals("themeType")) {
- properties.put(key, ThemeUtil.getTemplateExtension(get(op.getThemeFramework())));
- }
+ if (key.equals("themeParent")) {
+ properties.put(key, get(op.getThemeParent()));
}
- else {
- properties.put(rProp.getKey(), rProp.getDefaultValue());
+ else if (key.equals("themeType")) {
+ properties.put(key, ThemeUtil.getTemplateExtension(get(op.getThemeFramework())));
}
}
+ else {
+ properties.put(rProp.getKey(), rProp.getDefaultValue());
+ }
}
}
}
- catch (UnknownArchetype e1) {
- LiferayMavenCore.logError("Unable to find archetype required properties", e1);
- }
ResolverConfiguration resolverConfig = new ResolverConfiguration();
+ resolverConfig.setResolveWorkspaceProjects(false);
+
if (!CoreUtil.isNullOrEmpty(activeProfilesValue)) {
resolverConfig.setSelectedProfiles(activeProfilesValue);
}
- ProjectImportConfiguration configuration = new ProjectImportConfiguration(resolverConfig);
+ LiferayArchetypeGenerator generator = archetypePlugin.getGenerator();
- List newProjects = projectConfigurationManager.createArchetypeProjects(
- location, archetype, groupId, artifactId, version, javaPackage, properties, configuration, monitor);
+ Collection newMavenProjects = generator.createArchetypeProjects(
+ location, new LiferayMavenArchetype(archetype), groupId, artifactId, version, javaPackage, properties,
+ false, monitor);
- if (ListUtil.isNotEmpty(newProjects)) {
- op.setImportProjectStatus(true);
+ for (MavenProjectInfo mavenInfo : newMavenProjects) {
+ MavenProjectInfo parentMavenProjectInfo = mavenInfo.getParent();
- for (IProject project : newProjects) {
- ProjectName projectName = projectNames.insert();
-
- projectName.setName(project.getName());
+ if (Objects.nonNull(parentMavenProjectInfo)) {
+ continue;
}
- }
- if (ListUtil.isEmpty(newProjects)) {
- retval = LiferayMavenCore.createErrorStatus("New project was not created due to unknown error");
- }
- else {
- IProject firstProject = newProjects.get(0);
-
- // add new profiles if it was specified to add to project or parent poms
+ File pomFile = mavenInfo.getPomFile();
if (!CoreUtil.isNullOrEmpty(activeProfilesValue)) {
String[] activeProfiles = activeProfilesValue.split(",");
@@ -263,44 +247,70 @@ else if (key.equals("themeType")) {
List newProjectPomProfiles = getNewProfilesToSave(
activeProfiles, op.getNewLiferayProfiles(), ProfileLocation.projectPom);
- // only need to set the first project as nested projects should pickup the
- // parent setting
+ try {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- IMavenProjectFacade newMavenProject = mavenProjectRegistry.getProject(firstProject);
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
- IFile pomFile = newMavenProject.getPom();
+ Document pomDocument = docBuilder.parse(pomFile.getCanonicalPath());
- IDOMModel domModel = null;
+ for (NewLiferayProfile newProfile : newProjectPomProfiles) {
+ createNewLiferayProfileNode(pomDocument, newProfile);
+ }
- try {
- IModelManager modelManager = StructuredModelManager.getModelManager();
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
- domModel = (IDOMModel)modelManager.getModelForEdit(pomFile);
+ Transformer transformer = transformerFactory.newTransformer();
- for (NewLiferayProfile newProfile : newProjectPomProfiles) {
- createNewLiferayProfileNode(domModel.getDocument(), newProfile);
- }
+ DOMSource source = new DOMSource(pomDocument);
- domModel.save();
+ StreamResult result = new StreamResult(pomFile);
+
+ transformer.transform(source, result);
}
- catch (IOException ioe) {
+ catch (IOException | ParserConfigurationException | SAXException | TransformerException ioe) {
LiferayMavenCore.logError("Unable to save new Liferay profiles to project pom.", ioe);
}
- finally {
- if (domModel != null) {
- domModel.releaseFromEdit();
- }
- }
+ }
+ }
- for (IProject project : newProjects) {
- try {
- projectConfigurationManager.updateProjectConfiguration(
- new MavenUpdateRequest(project, mavenConfiguration.isOffline(), true), monitor);
- }
- catch (Exception e) {
- LiferayMavenCore.logError("Unable to update configuration for " + project.getName(), e);
- }
- }
+ ProjectImportConfiguration importConfiguration = new ProjectImportConfiguration(resolverConfig);
+
+ IProjectConfigurationManager projectConfigurationManager = MavenPlugin.getProjectConfigurationManager();
+
+ List importProjectResults = projectConfigurationManager.importProjects(
+ newMavenProjects, importConfiguration, null, monitor);
+
+ List newProjects = new ArrayList<>();
+
+ for (IMavenProjectImportResult result : importProjectResults) {
+ IProject importProject = result.getProject();
+
+ if ((importProject != null) && importProject.exists()) {
+ newProjects.add(importProject);
+ }
+ }
+
+ if (ListUtil.isNotEmpty(newProjects)) {
+ op.setImportProjectStatus(true);
+
+ for (IProject project : newProjects) {
+ ProjectName projectName = projectNames.insert();
+
+ projectName.setName(project.getName());
+ }
+ }
+
+ if (ListUtil.isEmpty(newProjects)) {
+ retval = LiferayMavenCore.createErrorStatus("New project was not created due to unknown error");
+ }
+ else {
+ IProject firstProject = newProjects.get(0);
+
+ // add new profiles if it was specified to add to project or parent poms
+
+ if (!CoreUtil.isNullOrEmpty(activeProfilesValue)) {
+ String[] activeProfiles = activeProfilesValue.split(",");
String pluginVersion = getNewLiferayProfilesPluginVersion(
activeProfiles, op.getNewLiferayProfiles(), archetypeVersion);
@@ -348,10 +358,10 @@ public IStatus validateProjectLocation(String projectName, IPath path) {
File pomFile = FileUtil.getFile(path.append(IMavenConstants.POM_FILE_NAME));
if (FileUtil.exists(pomFile)) {
- IMaven maven = MavenPlugin.getMaven();
+ MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
try {
- Model result = maven.readModel(pomFile);
+ Model result = mavenModelManager.readMavenModel(pomFile);
if (!Objects.equals("pom", result.getPackaging())) {
retval = LiferayMavenCore.createErrorStatus(
diff --git a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/aether/AetherUtil.java b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/aether/AetherUtil.java
index ff4c6f27ec..b3a4f4aece 100644
--- a/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/aether/AetherUtil.java
+++ b/maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/aether/AetherUtil.java
@@ -158,9 +158,15 @@ public static RemoteRepository newLiferayRepository() {
}
public static RepositorySystem newRepositorySystem() {
- MavenPluginActivator activator = MavenPluginActivator.getDefault();
+ try {
+ MavenPluginActivator activator = MavenPluginActivator.getDefault();
+
+ return activator.getRepositorySystem();
+ }
+ catch (Exception exception) {
+ }
- return activator.getRepositorySystem();
+ return null;
}
public static DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system) {
diff --git a/maven/plugins/com.liferay.ide.maven.ui/.classpath b/maven/plugins/com.liferay.ide.maven.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/maven/plugins/com.liferay.ide.maven.ui/.classpath
+++ b/maven/plugins/com.liferay.ide.maven.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/maven/plugins/com.liferay.ide.maven.ui/.project b/maven/plugins/com.liferay.ide.maven.ui/.project
index ae98db2164..c62c574216 100644
--- a/maven/plugins/com.liferay.ide.maven.ui/.project
+++ b/maven/plugins/com.liferay.ide.maven.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525003
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/maven/plugins/com.liferay.ide.maven.ui/.settings/org.eclipse.jdt.core.prefs b/maven/plugins/com.liferay.ide.maven.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/maven/plugins/com.liferay.ide.maven.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/maven/plugins/com.liferay.ide.maven.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/maven/plugins/com.liferay.ide.maven.ui/META-INF/MANIFEST.MF b/maven/plugins/com.liferay.ide.maven.ui/META-INF/MANIFEST.MF
index d84c78f038..7e0fb85c61 100644
--- a/maven/plugins/com.liferay.ide.maven.ui/META-INF/MANIFEST.MF
+++ b/maven/plugins/com.liferay.ide.maven.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.maven.ui
Bundle-Name: Liferay IDE Maven UI
Bundle-SymbolicName: com.liferay.ide.maven.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.maven.ui.LiferayMavenUI
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
@@ -15,16 +16,16 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.core.runtime,
org.eclipse.debug.ui,
org.eclipse.jdt.core,
- org.eclipse.m2e.core;bundle-version="[1.13,2.0)",
- org.eclipse.m2e.launching;bundle-version="[1.13,2.0)",
- org.eclipse.m2e.maven.runtime;bundle-version="[1.13,2.0)",
- org.eclipse.sapphire.modeling;bundle-version="[9,10)",
+ org.eclipse.m2e.core,
+ org.eclipse.m2e.launching,
+ org.eclipse.m2e.maven.runtime,
+ org.eclipse.sapphire.modeling,
org.eclipse.sapphire.ui;bundle-version="[9,10)",
org.eclipse.ui,
org.eclipse.ui.ide,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Export-Package: com.liferay.ide.maven.ui,
diff --git a/maven/plugins/com.liferay.ide.maven.ui/plugin.xml b/maven/plugins/com.liferay.ide.maven.ui/plugin.xml
index bc5a3f95dc..fbcf2ae27f 100644
--- a/maven/plugins/com.liferay.ide.maven.ui/plugin.xml
+++ b/maven/plugins/com.liferay.ide.maven.ui/plugin.xml
@@ -262,20 +262,6 @@
>
-
-
-
-
-
-
diff --git a/maven/plugins/com.liferay.ide.maven.ui/pom.xml b/maven/plugins/com.liferay.ide.maven.ui/pom.xml
index cda918e0d2..4a76ac990f 100644
--- a/maven/plugins/com.liferay.ide.maven.ui/pom.xml
+++ b/maven/plugins/com.liferay.ide.maven.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.maven.pluginsmaven-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.maven.ui
diff --git a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/ConfigProblemMarkerResolutionGenerator.java b/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/ConfigProblemMarkerResolutionGenerator.java
deleted file mode 100644
index 3fc345b547..0000000000
--- a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/ConfigProblemMarkerResolutionGenerator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.maven.ui;
-
-import com.liferay.ide.maven.core.ILiferayMavenConstants;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.IMarkerResolutionGenerator2;
-
-/**
- * @author Gregory Amerson
- */
-public class ConfigProblemMarkerResolutionGenerator implements IMarkerResolutionGenerator2 {
-
- public IMarkerResolution[] getResolutions(IMarker marker) {
- IMarkerResolution[] retval = null;
-
- if (correctMarker(marker)) {
- retval = new IMarkerResolution[] {
- new SelectActiveProfilesMarkerResolution(), new NewLiferayProfileMarkerResolution()
- };
- }
-
- return retval;
- }
-
- public boolean hasResolutions(IMarker marker) {
- return correctMarker(marker);
- }
-
- protected boolean correctMarker(IMarker marker) {
- try {
- return ILiferayMavenConstants.LIFERAY_MAVEN_MARKER_CONFIGURATION_WARNING_ID.equals(marker.getType());
- }
- catch (CoreException ce) {
- }
-
- return false;
- }
-
-}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/MavenConfigProblemMarkerResolutionGenerator.java b/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/MavenConfigProblemMarkerResolutionGenerator.java
deleted file mode 100644
index f20c08c6ad..0000000000
--- a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/MavenConfigProblemMarkerResolutionGenerator.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.maven.ui;
-
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.core.util.MarkerUtil;
-import com.liferay.ide.maven.core.ILiferayMavenConstants;
-import com.liferay.ide.maven.core.MavenUtil;
-
-import org.apache.maven.model.Plugin;
-import org.apache.maven.project.MavenProject;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.IMavenProjectRegistry;
-
-/**
- * @author Kuo Zhang
- */
-public class MavenConfigProblemMarkerResolutionGenerator extends ConfigProblemMarkerResolutionGenerator {
-
- @Override
- protected boolean correctMarker(IMarker marker) {
- IProject project = MarkerUtil.getProject(marker);
-
- if (FileUtil.notExists(project)) {
- return false;
- }
-
- IMavenProjectRegistry mavenProjectRegistry = MavenPlugin.getMavenProjectRegistry();
-
- IMavenProjectFacade projectFacade = mavenProjectRegistry.getProject(project);
-
- boolean retval = false;
-
- if (projectFacade != null) {
- MavenProject mavenProject = null;
-
- IProgressMonitor npm = new NullProgressMonitor();
-
- try {
- mavenProject = projectFacade.getMavenProject(npm);
- }
- catch (CoreException ce) {
- }
-
- if (mavenProject != null) {
- try {
- Plugin liferayMavenPlugin = MavenUtil.getPlugin(
- projectFacade, ILiferayMavenConstants.LIFERAY_MAVEN_PLUGIN_KEY, npm);
-
- if (liferayMavenPlugin != null) {
- retval = true;
- }
- }
- catch (CoreException ce) {
- }
- }
- }
-
- return retval;
- }
-
-}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/NewLiferayProfileMarkerResolution.java b/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/NewLiferayProfileMarkerResolution.java
deleted file mode 100644
index e957310ae2..0000000000
--- a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/NewLiferayProfileMarkerResolution.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.maven.ui;
-
-import com.liferay.ide.maven.core.LiferayMavenCore;
-import com.liferay.ide.maven.core.MavenProfileCreator;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.NewLiferayProfile;
-import com.liferay.ide.project.ui.wizard.NewLiferayPluginProjectWizard;
-import com.liferay.ide.ui.util.UIUtil;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.sapphire.ElementList;
-import org.eclipse.sapphire.ui.def.DefinitionLoader;
-import org.eclipse.sapphire.ui.forms.DialogDef;
-import org.eclipse.sapphire.ui.forms.swt.SapphireDialog;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-/**
- * @author Gregory Amerson
- * @author Simon Jiang
- */
-@SuppressWarnings("restriction")
-public class NewLiferayProfileMarkerResolution extends AbstractProjectMarkerResolution implements MavenProfileCreator {
-
- public NewLiferayProfileMarkerResolution() {
- }
-
- public String getLabel() {
- return "Create a new maven profile based on a Liferay runtime and attach it to the project.";
- }
-
- @Override
- protected int promptUser(IProject project, NewLiferayPluginProjectOp op) {
- ElementList profiles = op.getNewLiferayProfiles();
-
- NewLiferayProfile newLiferayProfile = profiles.insert();
-
- DefinitionLoader definitionLoader = DefinitionLoader.sdef(NewLiferayPluginProjectWizard.class);
-
- DefinitionLoader.Reference dialogRef = definitionLoader.dialog("NewLiferayProfile");
-
- SapphireDialog dialog = new SapphireDialog(UIUtil.getActiveShell(), newLiferayProfile, dialogRef);
-
- dialog.setBlockOnOpen(true);
-
- int result = dialog.open();
-
- if (result == SapphireDialog.OK) {
- IDOMModel domModel = null;
-
- try {
- IFile pomFile = project.getFile(IMavenConstants.POM_FILE_NAME);
-
- IModelManager modelManager = StructuredModelManager.getModelManager();
-
- domModel = (IDOMModel)modelManager.getModelForEdit(pomFile);
-
- createNewLiferayProfileNode(domModel.getDocument(), newLiferayProfile);
-
- domModel.save();
- }
- catch (Exception e) {
- LiferayMavenCore.logError("Unable to save new Liferay profiles to project pom.", e);
- }
- finally {
- if (domModel != null) {
- domModel.releaseFromEdit();
- }
- }
-
- addToActiveProfiles(op, newLiferayProfile);
- }
- else {
- ElementList elementList = op.getNewLiferayProfiles();
-
- elementList.remove(newLiferayProfile);
- }
-
- return result;
- }
-
-}
\ No newline at end of file
diff --git a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/SelectActiveProfilesMarkerResolution.java b/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/SelectActiveProfilesMarkerResolution.java
deleted file mode 100644
index 47310b5d84..0000000000
--- a/maven/plugins/com.liferay.ide.maven.ui/src/com/liferay/ide/maven/ui/SelectActiveProfilesMarkerResolution.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.maven.ui;
-
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.ui.wizard.NewLiferayPluginProjectWizard;
-import com.liferay.ide.ui.util.UIUtil;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.sapphire.ui.def.DefinitionLoader;
-import org.eclipse.sapphire.ui.forms.DialogDef;
-import org.eclipse.sapphire.ui.forms.swt.SapphireDialog;
-
-/**
- * @author Gregory Amerson
- */
-public class SelectActiveProfilesMarkerResolution extends AbstractProjectMarkerResolution {
-
- public String getLabel() {
- return "Select existing maven profiles to attach to the current project.";
- }
-
- protected int promptUser(IProject project, NewLiferayPluginProjectOp op) {
- DefinitionLoader definitionLoader = DefinitionLoader.sdef(NewLiferayPluginProjectWizard.class);
-
- DefinitionLoader.Reference dialogRef = definitionLoader.dialog("SelectActiveProfiles");
-
- SapphireDialog dialog = new SapphireDialog(UIUtil.getActiveShell(), op, dialogRef);
-
- dialog.setBlockOnOpen(true);
-
- return dialog.open();
- }
-
-}
\ No newline at end of file
diff --git a/maven/plugins/pom.xml b/maven/plugins/pom.xml
index d43559f3fa..728a1d85db 100644
--- a/maven/plugins/pom.xml
+++ b/maven/plugins/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ide.mavenmaven
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.maven.plugins
diff --git a/maven/pom.xml b/maven/pom.xml
index 49dfdf2488..1b2766d9fd 100644
--- a/maven/pom.xml
+++ b/maven/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ideparent
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOT../build/parent/pom.xml
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/.classpath b/maven/tests/com.liferay.ide.maven.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/.classpath
+++ b/maven/tests/com.liferay.ide.maven.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/.project b/maven/tests/com.liferay.ide.maven.core.tests/.project
index 81186920cb..b9e6429d9d 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/.project
+++ b/maven/tests/com.liferay.ide.maven.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525002
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/.settings/org.eclipse.jdt.core.prefs b/maven/tests/com.liferay.ide.maven.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/maven/tests/com.liferay.ide.maven.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/META-INF/MANIFEST.MF b/maven/tests/com.liferay.ide.maven.core.tests/META-INF/MANIFEST.MF
index 8a62d2bb1d..02ba65c439 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/META-INF/MANIFEST.MF
+++ b/maven/tests/com.liferay.ide.maven.core.tests/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.maven.core.tests
Bundle-Name: Liferay Maven Core Tests
Bundle-SymbolicName: com.liferay.ide.maven.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.core.tests,
@@ -15,14 +16,14 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
- org.eclipse.m2e.core;bundle-version="[1.13,2.0)",
- org.eclipse.m2e.maven.runtime;bundle-version="[1.13,2.0)",
- org.eclipse.m2e.tests.common;bundle-version="[1.13,2.0)",
+ org.eclipse.m2e.core,
+ org.eclipse.m2e.maven.runtime,
+ org.eclipse.m2e.tests.common,
org.eclipse.sapphire.modeling;bundle-version="[9,10)",
org.eclipse.sapphire.platform;bundle-version="[9,10)",
org.eclipse.wst.common.frameworks,
org.eclipse.wst.server.core,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.maven.core.tests
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/pom.xml b/maven/tests/com.liferay.ide.maven.core.tests/pom.xml
index 79b6dc49e8..33c72a05a8 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/pom.xml
+++ b/maven/tests/com.liferay.ide.maven.core.tests/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.maven.testsmaven-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.maven.core.tests
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/projects/gradle-liferay-workspace.zip b/maven/tests/com.liferay.ide.maven.core.tests/projects/gradle-liferay-workspace.zip
index 6a14c52c00..8ae297da1d 100644
Binary files a/maven/tests/com.liferay.ide.maven.core.tests/projects/gradle-liferay-workspace.zip and b/maven/tests/com.liferay.ide.maven.core.tests/projects/gradle-liferay-workspace.zip differ
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/projects/testGradleProject.zip b/maven/tests/com.liferay.ide.maven.core.tests/projects/testGradleProject.zip
index a1156a0b5b..bedfba1d9d 100644
Binary files a/maven/tests/com.liferay.ide.maven.core.tests/projects/testGradleProject.zip and b/maven/tests/com.liferay.ide.maven.core.tests/projects/testGradleProject.zip differ
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/projects/testWorkspace.zip b/maven/tests/com.liferay.ide.maven.core.tests/projects/testWorkspace.zip
index dd2333e6e1..18abbe88fd 100644
Binary files a/maven/tests/com.liferay.ide.maven.core.tests/projects/testWorkspace.zip and b/maven/tests/com.liferay.ide.maven.core.tests/projects/testWorkspace.zip differ
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/ImportLiferayModuleProjectOpTest.java b/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/ImportLiferayModuleProjectOpTest.java
index b1a1cd879b..46def5755c 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/ImportLiferayModuleProjectOpTest.java
+++ b/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/ImportLiferayModuleProjectOpTest.java
@@ -14,6 +14,7 @@
package com.liferay.ide.maven.core.tests;
+import com.liferay.ide.core.tests.TestUtil;
import com.liferay.ide.core.util.CoreUtil;
import com.liferay.ide.core.util.ZipUtil;
import com.liferay.ide.maven.core.LiferayMavenCore;
@@ -63,6 +64,8 @@ public void testImportGradleModuleProject() throws Exception {
MavenTestUtil.waitForJobsToComplete();
+ TestUtil.waitForBuildAndValidation();
+
IProject project = ProjectUtil.getProject(projectName);
Assert.assertTrue(project.exists());
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/MavenModuleFragmentProjectTests.java b/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/MavenModuleFragmentProjectTests.java
index c6ccab4de6..54feb84907 100644
--- a/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/MavenModuleFragmentProjectTests.java
+++ b/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/MavenModuleFragmentProjectTests.java
@@ -16,15 +16,6 @@
import static org.junit.Assert.assertTrue;
-import com.liferay.ide.core.tests.TestUtil;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.project.core.modules.fragment.NewModuleFragmentOp;
-import com.liferay.ide.project.core.modules.fragment.OverrideFilePath;
-import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp;
-import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOpMethods;
-import com.liferay.ide.server.core.tests.ServerCoreBase;
-import com.liferay.ide.server.util.ServerUtil;
-
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -40,6 +31,15 @@
import org.junit.BeforeClass;
import org.junit.Test;
+import com.liferay.ide.core.tests.TestUtil;
+import com.liferay.ide.core.util.CoreUtil;
+import com.liferay.ide.project.core.modules.fragment.NewModuleFragmentOp;
+import com.liferay.ide.project.core.modules.fragment.OverrideFilePath;
+import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp;
+import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOpMethods;
+import com.liferay.ide.server.core.tests.ServerCoreBase;
+import com.liferay.ide.server.util.ServerUtil;
+
/**
* @author Joye Luo
*/
@@ -135,14 +135,15 @@ public static void createLiferayWorkspaceProject() throws Exception {
workspaceOp.setProjectProvider("maven-liferay-workspace");
workspaceOp.setWorkspaceName( "test-maven-liferay-workspace" );
workspaceOp.setUseDefaultLocation( true );
- workspaceOp.setProvisionLiferayBundle(true);
+ workspaceOp.setProvisionLiferayBundle(false);
workspaceOp.setServerName("test-maven-liferay-workspace");
- workspaceOp.setLiferayVersion("7.3");
+ workspaceOp.setLiferayVersion("7.4");
+ workspaceOp.setTargetPlatform("7.4.3.101");
TestUtil.waitForBuildAndValidation();
-
+
NewLiferayWorkspaceOpMethods.execute( workspaceOp, ProgressMonitorBridge.create( new NullProgressMonitor() ) );
-
+
IProject workspaceProject = CoreUtil.getProject( "test-maven-liferay-workspace" );
assertTrue(workspaceProject != null);
diff --git a/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/NewLiferayPluginProjectMavenTests.java b/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/NewLiferayPluginProjectMavenTests.java
deleted file mode 100644
index 7d4303bf63..0000000000
--- a/maven/tests/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/NewLiferayPluginProjectMavenTests.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.maven.core.tests;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.project.core.IPortletFramework;
-import com.liferay.ide.project.core.NewLiferayProjectProvider;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-import com.liferay.ide.project.core.model.ProjectName;
-import com.liferay.ide.project.core.tests.ProjectCoreBase;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import java.io.File;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.sapphire.ElementList;
-import org.eclipse.sapphire.EnablementService;
-import org.eclipse.sapphire.PossibleValuesService;
-import org.eclipse.sapphire.Value;
-import org.eclipse.sapphire.modeling.Path;
-import org.eclipse.sapphire.platform.PathBridge;
-import org.eclipse.sapphire.services.ValidationService;
-
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Gregory Amerson
- */
-public class NewLiferayPluginProjectMavenTests extends ProjectCoreBase {
-
- @Test
- public void testCreateNewMavenProject() throws Exception {
- createMavenProjectName("test-name-1");
- }
-
- @Test
- public void testCreateProjectNameWithSpaces() throws Exception {
- createMavenProjectName("Test With Spaces");
- }
-
- @Test
- public void testCreateProjectNameWithUnderscores() throws Exception {
- createMavenProjectName("test_name_1");
- }
-
- @Test
- public void testGroupIdValidation() throws Exception {
- NewLiferayPluginProjectOp op = newProjectOp("test-group-id-validation");
-
- op.setProjectProvider("maven");
-
- ValidationService vs = op.getGroupId().service(ValidationService.class);
-
- op.setGroupId(".com.liferay.test");
-
- String expected = "A package name cannot start or end with a dot";
-
- Value groupId = op.getGroupId();
-
- Assert.assertEquals(expected, vs.validation().message());
- Assert.assertEquals(expected, groupId.validation().message());
-
- op.setGroupId("com.life*ray.test");
-
- String expected2 = "'life*ray' is not a valid Java identifier";
-
- groupId = op.getGroupId();
-
- Assert.assertEquals(expected2, vs.validation().message());
- Assert.assertEquals(expected2, groupId.validation().message());
- }
-
- @Ignore
- @Test
- public void testHookProjectName() throws Exception {
- NewLiferayPluginProjectOp op = newProjectOp("test-hook");
-
- op.setProjectProvider("maven");
- op.setPluginType(PluginType.hook);
- op.setUseDefaultLocation(true);
-
- IProject expectedProject = createMavenProject(op);
-
- String expectedProjectName = expectedProject.getName();
-
- ElementList names = op.getProjectNames();
-
- ProjectName name = names.get(0);
-
- String actualProjectName = name.getName().content();
-
- Assert.assertEquals(expectedProjectName, actualProjectName);
- }
-
- @Ignore
- @Test
- public void testLocationValidation() throws Exception {
- NewLiferayPluginProjectOp op = newProjectOp("test-location-validation-service");
-
- op.setProjectProvider("maven");
- op.setPluginType("portlet");
- op.setUseDefaultLocation(false);
-
- ValidationService vs = op.getLocation().service(ValidationService.class);
-
- String invalidLocation = null;
-
- invalidLocation = "not-absolute-location";
-
- op.setLocation(invalidLocation);
-
- String expected = "\"" + invalidLocation + "\" is not an absolute path.";
-
- Assert.assertEquals(_normalize(expected), _normalize(vs.validation().message()));
-
- Value location = op.getLocation();
-
- Assert.assertEquals(_normalize(expected), _normalize(location.validation().message()));
-
- if (CoreUtil.isWindows()) {
- invalidLocation = "Z:\\test-location-validation-service";
- }
- else {
- invalidLocation = "/test-location-validation-service";
- }
-
- op.setLocation(invalidLocation);
-
- String expected2 = "Cannot create project content at \"" + invalidLocation + "\"";
-
- Assert.assertEquals(expected2, vs.validation().message());
-
- Value location2 = op.getLocation();
-
- Assert.assertEquals(expected2, location2.validation().message());
-
- if (CoreUtil.isWindows()) {
- invalidLocation = CoreUtil.getWorkspaceRootLocation().getDevice() + "\\";
- }
- else {
- invalidLocation = "/";
- }
-
- op.setLocation(invalidLocation);
-
- String expected3 = "Project location is not empty or a parent pom.";
-
- Assert.assertEquals(expected3, vs.validation().message());
-
- // IDE-2069
-
- IPath path = getLiferayRuntimeDir();
-
- invalidLocation = path.removeLastSegments(2).toOSString();
-
- op.setLocation(invalidLocation);
-
- String expected5 = "Project location is not empty or a parent pom.";
-
- Assert.assertEquals(expected5, vs.validation().message());
-
- op.setLocation("");
-
- String expected4 = "Location must be specified.";
-
- Assert.assertEquals(expected4, vs.validation().message());
-
- Value location4 = op.getLocation();
-
- Assert.assertEquals(expected4, location4.validation().message());
- }
-
- @Test
- public void testParentFolderLocationValidation() throws Exception {
- File parentFolder = CoreUtil.getWorkspaceRootLocation(
- ).append(
- "test-parent-folder-location-validation-service"
- ).toFile();
-
- if (!parentFolder.exists()) {
- parentFolder.mkdir();
- }
-
- File pomFile = new File("projects/validations/location/pom.xml");
-
- FileUtil.copyFileToDir(pomFile, parentFolder);
-
- NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
-
- op.setProjectName("test-parent-folder-location-validation-service");
-
- ValidationService vs = op.getLocation().service(ValidationService.class);
-
- op.setProjectProvider("maven");
- op.setPluginType("portlet");
- op.setUseDefaultLocation(false);
- op.setLocation(parentFolder.getAbsolutePath());
-
- String projectName = op.getProjectName().content();
-
- String expected = "The project name \"" + projectName + "\" can not be the same as the parent.";
-
- Assert.assertEquals(expected, vs.validation().message());
-
- Value location = op.getLocation();
-
- Assert.assertEquals(expected, location.validation().message());
- }
-
- @Ignore
- @Test
- public void testPortletFrameworkValidation() throws Exception {
- if (shouldSkipBundleTests()) {
- return;
- }
-
- NewLiferayPluginProjectOp op = newProjectOp("test-portlet-framework-validation");
-
- op.setPluginType("portlet");
-
- ValidationService vs = op.getPortletFramework().service(ValidationService.class);
-
- Assert.assertEquals(true, vs.validation().ok());
-
- SDK newSDK = createNewSDK();
-
- newSDK.setVersion("6.0.0");
-
- IPortletFramework jsf = ProjectCore.getPortletFramework("jsf");
-
- op.setProjectProvider("ant");
- op.setPortletFramework("jsf");
-
- Assert.assertEquals(
- "Selected portlet framework requires SDK version at least " + jsf.getRequiredSDKVersion(),
- vs.validation().message());
- }
-
- @Test
- public void testPortletProjectName() throws Exception {
- NewLiferayPluginProjectOp op = newProjectOp("test-name");
-
- op.setProjectProvider("maven");
- op.setPluginType(PluginType.portlet);
- op.setUseDefaultLocation(true);
- op.setPortletFramework("mvc");
- op.setPortletName("testPortlet");
-
- IProject expectedProject = createMavenProject(op);
-
- String expectedProjectName = expectedProject.getName();
-
- ElementList names = op.getProjectNames();
-
- ProjectName name = names.get(0);
-
- String actualProjectName = name.getName().content();
-
- Assert.assertEquals(expectedProjectName, actualProjectName);
- }
-
- @Test
- public void testProjectNameListener() throws Exception {
- if (shouldSkipBundleTests()) {
- return;
- }
-
- NewLiferayPluginProjectOp op = newProjectOp("");
-
- SDK sdk = SDKUtil.createSDKFromLocation(getLiferayPluginsSdkDir());
-
- String projectName = "test-project-name-listener";
- String projectName2 = "test-project-name-listener-2";
-
- op.setProjectProvider("ant");
- op.setUseDefaultLocation(true);
- op.setPluginType("portlet");
-
- IPath exceptedLocation = null;
-
- op.setProjectName(projectName);
-
- IPath location = sdk.getLocation();
-
- exceptedLocation = location.append("portlets").append(projectName + "-portlet");
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
-
- op.setProjectName(projectName2);
-
- exceptedLocation = location.append("portlets").append(projectName2 + "-portlet");
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
-
- op.setProjectProvider("maven");
-
- op.setProjectName(projectName);
-
- exceptedLocation = CoreUtil.getWorkspaceRootLocation().append(projectName);
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
-
- op.setProjectName(projectName2);
-
- exceptedLocation = CoreUtil.getWorkspaceRootLocation().append(projectName2);
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
- }
-
- @Test
- public void testProjectProviderListener() throws Exception {
- if (shouldSkipBundleTests()) {
- return;
- }
-
- NewLiferayPluginProjectOp op = newProjectOp("test-project-provider-listener");
-
- String projectName = op.getProjectName().content();
-
- op.setPluginType("portlet");
- op.setUseDefaultLocation(true);
-
- SDK sdk = SDKUtil.createSDKFromLocation(getLiferayPluginsSdkDir());
-
- IPath exceptedLocation = null;
-
- op.setProjectProvider("ant");
-
- IPath location = sdk.getLocation();
-
- exceptedLocation = location.append("portlets").append(projectName + "-portlet");
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
-
- op.setProjectProvider("maven");
-
- exceptedLocation = CoreUtil.getWorkspaceRootLocation().append(projectName);
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
- }
-
- @Test
- public void testProjectProviderPossibleValues() throws Exception {
- if (shouldSkipBundleTests()) {
- return;
- }
-
- NewLiferayPluginProjectOp op = newProjectOp("test-project-provider-possbile-values");
-
- Value> provider = op.getProjectProvider();
-
- Set acturalValues = provider.service(PossibleValuesService.class).values();
-
- Assert.assertNotNull(acturalValues);
-
- Set exceptedValues = new HashSet<>();
-
- exceptedValues.add("ant");
- exceptedValues.add("maven");
-
- Assert.assertEquals(true, exceptedValues.containsAll(acturalValues));
- Assert.assertEquals(true, acturalValues.containsAll(exceptedValues));
- }
-
- @Test
- public void testServiceBuilderProjectName() throws Exception {
- NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
-
- op.setProjectName("test-name");
- op.setProjectProvider("maven");
- op.setPluginType(PluginType.servicebuilder);
-
- IProject project = base.createProject(op, op.getProjectName() + "-portlet");
-
- waitForBuildAndValidation(project);
-
- String projectName = project.getName();
-
- String finalProjectName = projectName.substring(0, projectName.lastIndexOf("-"));
-
- ElementList projectNames = op.getProjectNames();
-
- List finalProjectnames = new ArrayList<>();
-
- for (ProjectName expectedProjectName : projectNames) {
- finalProjectnames.add(expectedProjectName.getName().content());
- }
-
- Assert.assertEquals(true, finalProjectnames.contains(finalProjectName));
- Assert.assertEquals(true, finalProjectnames.contains(finalProjectName + "-portlet"));
- Assert.assertEquals(true, finalProjectnames.contains(finalProjectName + "-portlet-service"));
- }
-
- @Test
- public void testUseDefaultLocationEnablement() throws Exception {
- testUseDefaultLocationEnablement(true);
- }
-
- public void testUseDefaultLocationEnablement(boolean versionRestriction) throws Exception {
- NewLiferayPluginProjectOp op = newProjectOp("test-use-default-location-enablement");
-
- op.setProjectProvider("maven");
-
- Value useDefaultLocation = op.getUseDefaultLocation();
-
- Assert.assertEquals(true, useDefaultLocation.service(EnablementService.class).enablement());
- Assert.assertEquals(true, useDefaultLocation.enabled());
-
- if (versionRestriction) {
- op.setProjectProvider("ant");
-
- useDefaultLocation = op.getUseDefaultLocation();
-
- Assert.assertEquals(false, useDefaultLocation.service(EnablementService.class).enablement());
- Assert.assertEquals(false, useDefaultLocation.enabled());
- }
- }
-
- @Test
- public void testUseDefaultLocationListener() throws Exception {
- testUseDefaultLocationListener(false);
- }
-
- protected IProject createMavenProject(NewLiferayPluginProjectOp op) throws Exception {
- IProject project = createProject(op);
-
- waitForBuildAndValidation(project);
-
- Assert.assertEquals(true, project.getFolder("src").exists());
-
- return project;
- }
-
- protected void createMavenProjectName(String projectName) throws Exception {
- NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
-
- op.setProjectName(projectName);
- op.setProjectProvider("maven");
-
- createMavenProject(op);
- }
-
- protected void testUseDefaultLocationListener(boolean versionRestriction) throws Exception {
- NewLiferayPluginProjectOp op = newProjectOp("test-use-default-location-listener");
-
- String projectName = op.getProjectName().content();
-
- op.setProjectProvider("maven");
-
- IPath exceptedLocation = null;
-
- op.setUseDefaultLocation(true);
-
- exceptedLocation = CoreUtil.getWorkspaceRootLocation().append(projectName);
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
-
- op.setUseDefaultLocation(false);
-
- Assert.assertEquals(null, op.getLocation().content());
-
- if (versionRestriction) {
- op.setProjectProvider("ant");
- op.setPluginType("portlet");
- op.setUseDefaultLocation(true);
-
- SDK sdk = SDKUtil.createSDKFromLocation(getLiferayPluginsSdkDir());
-
- IPath location = sdk.getLocation();
-
- exceptedLocation = location.append("portlets").append(projectName + "-portlet");
-
- Assert.assertEquals(exceptedLocation, PathBridge.create(op.getLocation().content()));
-
- op.setUseDefaultLocation(false);
-
- Assert.assertEquals(null, op.getLocation().content());
- }
- }
-
- protected final ProjectCoreBase base = new ProjectCoreBase();
-
- private String _normalize(String val) {
- return val.replaceAll("\\\\", "/");
- }
-
-}
\ No newline at end of file
diff --git a/maven/tests/pom.xml b/maven/tests/pom.xml
index ea409f4a32..6d58e1cd04 100644
--- a/maven/tests/pom.xml
+++ b/maven/tests/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ide.mavenmaven
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.maven.tests
diff --git a/pom.xml b/pom.xml
index 9baad0c176..43800fe851 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
com.liferayliferay-ide
- 3.9.0-SNAPSHOT
+ 4.0.0-SNAPSHOTpomLiferay IDE
diff --git a/portal/features/com.liferay.ide.portal-feature/feature.xml b/portal/features/com.liferay.ide.portal-feature/feature.xml
index e199180884..a2759ee400 100644
--- a/portal/features/com.liferay.ide.portal-feature/feature.xml
+++ b/portal/features/com.liferay.ide.portal-feature/feature.xml
@@ -2,7 +2,7 @@
diff --git a/portal/features/com.liferay.ide.portal-feature/pom.xml b/portal/features/com.liferay.ide.portal-feature/pom.xml
index a874b3cd96..fabcb837f4 100644
--- a/portal/features/com.liferay.ide.portal-feature/pom.xml
+++ b/portal/features/com.liferay.ide.portal-feature/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.portalportal-features
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal-feature
diff --git a/portal/features/pom.xml b/portal/features/pom.xml
index 2122151131..171f058dc7 100644
--- a/portal/features/pom.xml
+++ b/portal/features/pom.xml
@@ -23,7 +23,7 @@
com.liferay.ide.portalportal
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal
diff --git a/portal/plugins/com.liferay.ide.freemarker/META-INF/MANIFEST.MF b/portal/plugins/com.liferay.ide.freemarker/META-INF/MANIFEST.MF
index 242a5f8c16..c0cd1a06eb 100644
--- a/portal/plugins/com.liferay.ide.freemarker/META-INF/MANIFEST.MF
+++ b/portal/plugins/com.liferay.ide.freemarker/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay IDE Freemarker
Bundle-SymbolicName: com.liferay.ide.freemarker;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: org.jboss.ide.eclipse.freemarker.Plugin
Bundle-Vendor: Liferay, Inc.
Require-Bundle: org.eclipse.ui,
diff --git a/portal/plugins/com.liferay.ide.freemarker/pom.xml b/portal/plugins/com.liferay.ide.freemarker/pom.xml
index adf61d00a2..db8fe09ebe 100644
--- a/portal/plugins/com.liferay.ide.freemarker/pom.xml
+++ b/portal/plugins/com.liferay.ide.freemarker/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.portal.pluginsportal-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.freemarker
diff --git a/portal/plugins/com.liferay.ide.portal.core/META-INF/MANIFEST.MF b/portal/plugins/com.liferay.ide.portal.core/META-INF/MANIFEST.MF
index d43e7117a8..f7eaf01914 100644
--- a/portal/plugins/com.liferay.ide.portal.core/META-INF/MANIFEST.MF
+++ b/portal/plugins/com.liferay.ide.portal.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.portal.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.portal.core.PortalCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: org.eclipse.core.runtime,
diff --git a/portal/plugins/com.liferay.ide.portal.core/pom.xml b/portal/plugins/com.liferay.ide.portal.core/pom.xml
index d0cc623cc3..03e62a8a71 100644
--- a/portal/plugins/com.liferay.ide.portal.core/pom.xml
+++ b/portal/plugins/com.liferay.ide.portal.core/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.portal.pluginsportal-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal.core
diff --git a/portal/plugins/com.liferay.ide.portal.ui/META-INF/MANIFEST.MF b/portal/plugins/com.liferay.ide.portal.ui/META-INF/MANIFEST.MF
index 6fd0e8f1c0..afb36fd516 100644
--- a/portal/plugins/com.liferay.ide.portal.ui/META-INF/MANIFEST.MF
+++ b/portal/plugins/com.liferay.ide.portal.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.portal.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.portal.ui.PortalUI
Bundle-Vendor: %bundle.vendor
Require-Bundle: org.eclipse.ui,
diff --git a/portal/plugins/com.liferay.ide.portal.ui/pom.xml b/portal/plugins/com.liferay.ide.portal.ui/pom.xml
index effa9bb7d6..8a67c6332b 100644
--- a/portal/plugins/com.liferay.ide.portal.ui/pom.xml
+++ b/portal/plugins/com.liferay.ide.portal.ui/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.portal.pluginsportal-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal.ui
diff --git a/portal/plugins/pom.xml b/portal/plugins/pom.xml
index 9b8f72d750..2b8fd09744 100644
--- a/portal/plugins/pom.xml
+++ b/portal/plugins/pom.xml
@@ -23,7 +23,7 @@
com.liferay.ide.portalportal
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal.plugins
diff --git a/portal/pom.xml b/portal/pom.xml
index 74280e97bb..9390dd085c 100644
--- a/portal/pom.xml
+++ b/portal/pom.xml
@@ -23,7 +23,7 @@
com.liferay.ideparent
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOT../build/parent/pom.xml
diff --git a/portal/tests/com.liferay.ide.portal.core.tests/META-INF/MANIFEST.MF b/portal/tests/com.liferay.ide.portal.core.tests/META-INF/MANIFEST.MF
index 0fb5a9b7ec..84fb22b84b 100644
--- a/portal/tests/com.liferay.ide.portal.core.tests/META-INF/MANIFEST.MF
+++ b/portal/tests/com.liferay.ide.portal.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Portal Core Tests
Bundle-SymbolicName: com.liferay.ide.portal.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: org.eclipse.core.runtime,
com.liferay.ide.portal.core;bundle-version="2.0.0",
diff --git a/portal/tests/com.liferay.ide.portal.core.tests/pom.xml b/portal/tests/com.liferay.ide.portal.core.tests/pom.xml
index 1f0952a4a3..31d2d11c28 100644
--- a/portal/tests/com.liferay.ide.portal.core.tests/pom.xml
+++ b/portal/tests/com.liferay.ide.portal.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.portal.testsportal-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal.core.tests
diff --git a/portal/tests/pom.xml b/portal/tests/pom.xml
index c6864584e4..ffedae715f 100644
--- a/portal/tests/pom.xml
+++ b/portal/tests/pom.xml
@@ -23,7 +23,7 @@
com.liferay.ide.portalportal
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portal.tests
diff --git a/source-formatter.properties b/source-formatter.properties
index 65c5060b85..73b98f23ed 100644
--- a/source-formatter.properties
+++ b/source-formatter.properties
@@ -1,7 +1,11 @@
java.parser.enabled=true
checkstyle.ChainingCheck.allowedMethodNames=chars,\
- parallelStream
+ connect,\
+ keySet,\
+ lines,\
+ parallelStream,\
+ stream
javaterm.sort.excludes=\
tools/plugins/com.liferay.ide.core/src/com/liferay/ide/core/properties/PluginPackageProperties.java@TYPE,\
@@ -208,6 +212,8 @@ source.formatter.excludes=\
functional-tests/tools/workspace/workspace.wizard/workspace.wizard.create.tomcat.70/src/com/liferay/ide/functional/workspace/tests/NewLiferayWorkspaceWizardGradleTests.java,\
integration-tests/tools/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/MavenModuleProjectTests.java,\
integration-tests/tools/com.liferay.ide.maven.core.tests/src/com/liferay/ide/maven/core/tests/NewModuleMavenTests.java,\
+ maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayArchetypeGenerator.java,\
+ maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/LiferayArchetypePlugin.java,\
maven/plugins/com.liferay.ide.maven.core/src/com/liferay/ide/maven/core/model/NewLiferayProfileOp.java,\
tools/plugins/com.liferay.ide.portlet.core/src/com/liferay/ide/portlet/core/lfportlet/model/LiferayPortlet.java,\
tools/plugins/com.liferay.ide.portlet.core/src/com/liferay/ide/portlet/core/model/Portlet.java,\
diff --git a/tools/features/com.liferay.ide.eclipse.tools/.project b/tools/features/com.liferay.ide.eclipse.tools/.project
index 8e193c410d..9f0ce6f40f 100644
--- a/tools/features/com.liferay.ide.eclipse.tools/.project
+++ b/tools/features/com.liferay.ide.eclipse.tools/.project
@@ -20,4 +20,15 @@
org.eclipse.m2e.core.maven2Natureorg.eclipse.pde.FeatureNature
+
+
+ 1700017524990
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/features/com.liferay.ide.eclipse.tools/feature.xml b/tools/features/com.liferay.ide.eclipse.tools/feature.xml
index 45cdd6c185..625441280f 100644
--- a/tools/features/com.liferay.ide.eclipse.tools/feature.xml
+++ b/tools/features/com.liferay.ide.eclipse.tools/feature.xml
@@ -4,7 +4,7 @@
label="Liferay IDE"
plugin="com.liferay.ide.ui"
provider-name="Liferay, Inc."
- version="3.9.9.qualifier"
+ version="4.0.0.qualifier"
>
@@ -33,9 +33,7 @@
-
-
-
+
@@ -83,13 +81,6 @@
version="0.0.0"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
com.liferay.ide.tools.featurestools-features
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.eclipse.tools
diff --git a/tools/features/com.liferay.ide.hidden/.project b/tools/features/com.liferay.ide.hidden/.project
index bf3cc8a6bc..867f0d5595 100644
--- a/tools/features/com.liferay.ide.hidden/.project
+++ b/tools/features/com.liferay.ide.hidden/.project
@@ -20,4 +20,15 @@
org.eclipse.m2e.core.maven2Natureorg.eclipse.pde.FeatureNature
+
+
+ 1700017524993
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/features/com.liferay.ide.hidden/feature.xml b/tools/features/com.liferay.ide.hidden/feature.xml
index d62e6bc43a..b092872e81 100644
--- a/tools/features/com.liferay.ide.hidden/feature.xml
+++ b/tools/features/com.liferay.ide.hidden/feature.xml
@@ -3,7 +3,7 @@
id="com.liferay.ide.hidden"
label="Liferay IDE Hidden"
provider-name="Liferay, Inc."
- version="3.9.9.qualifier"
+ version="4.0.0.qualifier"
>
@@ -31,6 +31,11 @@
Liferay IDE is free software distributed under the terms of the Lesser GNU Public License. See URL for full license text. http://www.gnu.org/licenses/lgpl-2.1.html
+
+
+
+
com.liferay.ide.tools.featurestools-features
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.hidden
diff --git a/tools/features/com.liferay.ide.upgrade.planner/.project b/tools/features/com.liferay.ide.upgrade.planner/.project
index 1e80951e29..78ae21f059 100644
--- a/tools/features/com.liferay.ide.upgrade.planner/.project
+++ b/tools/features/com.liferay.ide.upgrade.planner/.project
@@ -20,4 +20,15 @@
org.eclipse.m2e.core.maven2Natureorg.eclipse.pde.FeatureNature
+
+
+ 1700017525026
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/features/com.liferay.ide.upgrade.planner/feature.xml b/tools/features/com.liferay.ide.upgrade.planner/feature.xml
index 474c86d467..83752c17f7 100644
--- a/tools/features/com.liferay.ide.upgrade.planner/feature.xml
+++ b/tools/features/com.liferay.ide.upgrade.planner/feature.xml
@@ -3,7 +3,7 @@
id="com.liferay.ide.upgrade.planner"
label="Liferay Upgrade Planner"
provider-name="Liferay, Inc."
- version="3.9.9.qualifier"
+ version="4.0.0.qualifier"
>
@@ -37,8 +37,6 @@
/>
-
-
@@ -105,22 +103,6 @@
version="0.0.0"
/>
-
-
-
-
com.liferay.ide.tools.featurestools-features
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.planner
diff --git a/tools/features/pom.xml b/tools/features/pom.xml
index 41fceb88f5..05d90e10de 100644
--- a/tools/features/pom.xml
+++ b/tools/features/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ide.toolstools
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.tools.features
diff --git a/tools/plugins/com.liferay.ide.bndtools.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.bndtools.core/META-INF/MANIFEST.MF
index 35bef82dfa..ed1d4c5b11 100644
--- a/tools/plugins/com.liferay.ide.bndtools.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.bndtools.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay IDE Bndtools Core
Bundle-SymbolicName: com.liferay.ide.bndtools.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.bndtools.core.BndtoolsCore
Bundle-Vendor: Liferay, Inc.
Require-Bundle: org.eclipse.core.runtime,
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
bndtools.core,
com.liferay.ide.server.core,
org.apache.commons.lang
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.bndtools.core
Bundle-ClassPath: .
diff --git a/tools/plugins/com.liferay.ide.bndtools.core/pom.xml b/tools/plugins/com.liferay.ide.bndtools.core/pom.xml
index db9308920f..5449523ced 100644
--- a/tools/plugins/com.liferay.ide.bndtools.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.bndtools.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.bndtools.core
diff --git a/tools/plugins/com.liferay.ide.core/.classpath b/tools/plugins/com.liferay.ide.core/.classpath
index f8870c02be..46ff7e3df8 100644
--- a/tools/plugins/com.liferay.ide.core/.classpath
+++ b/tools/plugins/com.liferay.ide.core/.classpath
@@ -1,13 +1,32 @@
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.core/.project b/tools/plugins/com.liferay.ide.core/.project
index 3733f79ac6..00fa3540f4 100644
--- a/tools/plugins/com.liferay.ide.core/.project
+++ b/tools/plugins/com.liferay.ide.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524986
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.core/.settings/org.eclipse.jdt.core.prefs
index 94012e0abb..96619f2701 100644
--- a/tools/plugins/com.liferay.ide.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.core/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -22,6 +22,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -65,6 +66,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -96,5 +98,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.core/META-INF/MANIFEST.MF
index 75801e1e4f..3d47aa4614 100644
--- a/tools/plugins/com.liferay.ide.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.core/META-INF/MANIFEST.MF
@@ -1,14 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.core.LiferayCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.google.gson,
org.apache.commons.codec,
org.apache.commons.collections,
- org.apache.commons.io;bundle-version=2.6,
+ org.apache.commons.io,
org.apache.commons.lang,
org.apache.commons.logging,
org.apache.httpcomponents.httpcore,
@@ -23,9 +24,9 @@ Require-Bundle: com.google.gson,
org.eclipse.jdt.core,
org.eclipse.jdt.launching,
org.eclipse.jface.text,
- org.eclipse.sapphire.modeling;bundle-version="[9,10)",
+ org.eclipse.sapphire.modeling,
org.json
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.core,
com.liferay.ide.core.adapter,
diff --git a/tools/plugins/com.liferay.ide.core/pom.xml b/tools/plugins/com.liferay.ide.core/pom.xml
index 89c8afa9b5..e4663b491d 100644
--- a/tools/plugins/com.liferay.ide.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.core/pom.xml
@@ -27,7 +27,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.core
diff --git a/tools/plugins/com.liferay.ide.core/src/com/liferay/ide/core/workspace/WorkspaceConstants.java b/tools/plugins/com.liferay.ide.core/src/com/liferay/ide/core/workspace/WorkspaceConstants.java
index 7355a79464..050b4b315a 100644
--- a/tools/plugins/com.liferay.ide.core/src/com/liferay/ide/core/workspace/WorkspaceConstants.java
+++ b/tools/plugins/com.liferay.ide.core/src/com/liferay/ide/core/workspace/WorkspaceConstants.java
@@ -14,13 +14,9 @@
package com.liferay.ide.core.workspace;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* @author Terry Jia
*/
-@SuppressWarnings("serial")
public class WorkspaceConstants {
public static final String BUNDLE_ARTIFACT_NAME_PROPERTY = "liferay.workspace.bundle.artifact.name";
@@ -84,265 +80,4 @@ public class WorkspaceConstants {
public static final String WORKSPACE_PRODUCT_PROPERTY = "liferay.workspace.product";
- public static final Map liferayBundleUrlVersions = new HashMap() {
- {
- put("7.0.6-2", BUNDLE_URL_CE_7_0);
- put("7.1.0", LIFERAY_PORTAL_URL + "7.1.0-ga1/liferay-ce-portal-tomcat-7.1.0-ga1-20180703012531655.zip");
- put("7.1.1", LIFERAY_PORTAL_URL + "7.1.1-ga2/liferay-ce-portal-tomcat-7.1.1-ga2-20181112144637000.tar.gz");
- put("7.1.2", LIFERAY_PORTAL_URL + "7.1.2-ga3/liferay-ce-portal-tomcat-7.1.2-ga3-20190107144105508.tar.gz");
- put("7.1.3-1", BUNDLE_URL_CE_7_1);
- put("7.2.0", LIFERAY_PORTAL_URL + "7.2.0-ga1/liferay-ce-portal-tomcat-7.2.0-ga1-20190531153709761.tar.gz");
- put("7.2.1-1", BUNDLE_URL_CE_7_2);
- put(
- "7.3.0-1",
- LIFERAY_PORTAL_URL + "7.3.0-ga1/liferay-ce-portal-tomcat-7.3.0-ga1-20200127150653953.tar.gz");
- put(
- "7.3.1-1",
- LIFERAY_PORTAL_URL + "7.3.1-ga2/liferay-ce-portal-tomcat-7.3.1-ga2-20200327090859603.tar.gz");
- put("7.3.2-1", BUNDLE_URL_CE_7_3);
- put(
- "7.3.3-1",
- LIFERAY_PORTAL_URL + "7.3.3-ga4/liferay-ce-portal-tomcat-7.3.3-ga4-20200701015330959.tar.gz");
- put("7.3.4", LIFERAY_PORTAL_URL + "7.3.4-ga5/liferay-ce-portal-tomcat-7.3.4-ga5-20200811154319029.tar.gz");
- put("7.3.5", LIFERAY_PORTAL_URL + "7.3.5-ga6/liferay-ce-portal-tomcat-7.3.5-ga6-20200930172312275.tar.gz");
- put("7.3.6", LIFERAY_PORTAL_URL + "7.3.6-ga7/liferay-ce-portal-tomcat-7.3.6-ga7-20210301155526191.tar.gz");
- put("7.3.7", LIFERAY_PORTAL_URL + "7.3.7-ga8/liferay-ce-portal-tomcat-7.3.7-ga8-20210610183559721.tar.gz");
- put("7.4.0", LIFERAY_PORTAL_URL + "7.4.0-ga1/liferay-ce-portal-tomcat-7.4.0-ga1-20210419204607406.tar.gz");
- put(
- "7.4.1-1",
- LIFERAY_PORTAL_URL + "7.4.1-ga2/liferay-ce-portal-tomcat-7.4.1-ga2-20210609223456272.tar.gz");
- put(
- "7.4.2-1",
- LIFERAY_PORTAL_URL + "7.4.2-ga3/liferay-ce-portal-tomcat-7.4.2-ga3-20210728053338694.tar.gz");
- put(
- "7.4.3.4",
- LIFERAY_PORTAL_URL + "7.4.3.4-ga4/liferay-ce-portal-tomcat-7.4.3.4-ga4-20211020095956970.tar.gz");
- put(
- "7.4.3.5",
- LIFERAY_PORTAL_URL + "7.4.3.5-ga5/liferay-ce-portal-tomcat-7.4.3.5-ga5-20211221192828235.tar.gz");
- put(
- "7.4.3.6",
- LIFERAY_PORTAL_URL + "7.4.3.6-ga6/liferay-ce-portal-tomcat-7.4.3.6-ga6-20211227141428520.tar.gz");
- put(
- "7.4.3.7",
- LIFERAY_PORTAL_URL + "7.4.3.7-ga7/liferay-ce-portal-tomcat-7.4.3.7-ga7-20220107103529408.tar.gz");
- put(
- "7.4.3.8",
- LIFERAY_PORTAL_URL + "7.4.3.8-ga8/liferay-ce-portal-tomcat-7.4.3.8-ga8-20220117195955276.tar.gz");
- put(
- "7.4.3.9",
- LIFERAY_PORTAL_URL + "7.4.3.9-ga9/liferay-ce-portal-tomcat-7.4.3.9-ga9-20220125123415632.tar.gz");
- put(
- "7.4.3.10",
- LIFERAY_PORTAL_URL + "7.4.3.10-ga10/liferay-ce-portal-tomcat-7.4.3.10-ga10-20220130185310773.tar.gz");
- put(
- "7.4.3.11",
- LIFERAY_PORTAL_URL + "7.4.3.11-ga11/liferay-ce-portal-tomcat-7.4.3.11-ga11-20220207124232466.tar.gz");
- put(
- "7.4.3.12",
- LIFERAY_PORTAL_URL + "7.4.3.12-ga12/liferay-ce-portal-tomcat-7.4.3.12-ga12-20220215025828785.tar.gz");
- put(
- "7.4.3.13",
- LIFERAY_PORTAL_URL + "7.4.3.13-ga13/liferay-ce-portal-tomcat-7.4.3.13-ga13-20220223110450724.tar.gz");
- put(
- "7.4.3.14",
- LIFERAY_PORTAL_URL + "7.4.3.14-ga14/liferay-ce-portal-tomcat-7.4.3.14-ga14-20220302152058124.tar.gz");
- put(
- "7.4.3.15",
- LIFERAY_PORTAL_URL + "7.4.3.15-ga15/liferay-ce-portal-tomcat-7.4.3.15-ga15-20220308142134102.tar.gz");
- put(
- "7.4.3.16",
- LIFERAY_PORTAL_URL + "7.4.3.16-ga16/liferay-ce-portal-tomcat-7.4.3.16-ga16-20220314155405565.tar.gz");
- put(
- "7.4.3.17",
- LIFERAY_PORTAL_URL + "7.4.3.17-ga17/liferay-ce-portal-tomcat-7.4.3.17-ga17-20220322082755437.tar.gz");
- put(
- "7.4.3.18",
- LIFERAY_PORTAL_URL + "7.4.3.18-ga18/liferay-ce-portal-tomcat-7.4.3.18-ga18-20220329092001364.tar.gz");
- put(
- "7.4.3.19",
- LIFERAY_PORTAL_URL + "7.4.3.19-ga19/liferay-ce-portal-tomcat-7.4.3.19-ga19-20220404174529051.tar.gz");
- put(
- "7.4.3.20",
- LIFERAY_PORTAL_URL + "7.4.3.20-ga20/liferay-ce-portal-tomcat-7.4.3.20-ga20-20220408161249276.tar.gz");
- put(
- "7.4.3.21",
- LIFERAY_PORTAL_URL + "7.4.3.21-ga21/liferay-ce-portal-tomcat-7.4.3.21-ga21-20220418102345052.tar.gz");
- put(
- "7.4.3.22",
- LIFERAY_PORTAL_URL + "7.4.3.22-ga22/liferay-ce-portal-tomcat-7.4.3.22-ga22-20220427101210177.tar.gz");
- put(
- "7.4.3.23",
- LIFERAY_PORTAL_URL + "7.4.3.23-ga23/liferay-ce-portal-tomcat-7.4.3.23-ga23-20220504071803965.tar.gz");
- put(
- "7.4.3.24",
- LIFERAY_PORTAL_URL + "7.4.3.24-ga24/liferay-ce-portal-tomcat-7.4.3.24-ga24-20220510074512112.tar.gz");
- put(
- "7.4.3.25",
- LIFERAY_PORTAL_URL + "7.4.3.25-ga25/liferay-ce-portal-tomcat-7.4.3.25-ga25-20220517170439802.tar.gz");
- put(
- "7.4.3.26",
- LIFERAY_PORTAL_URL + "7.4.3.26-ga26/liferay-ce-portal-tomcat-7.4.3.26-ga26-20220520184751553.tar.gz");
- put(
- "7.4.3.27",
- LIFERAY_PORTAL_URL + "7.4.3.27-ga27/liferay-ce-portal-tomcat-7.4.3.27-ga27-20220531092132731.tar.gz");
- put(
- "7.4.3.28",
- LIFERAY_PORTAL_URL + "7.4.3.28-ga28/liferay-ce-portal-tomcat-7.4.3.28-ga28-20220607175240830.tar.gz");
- put(
- "7.4.3.29",
- LIFERAY_PORTAL_URL + "7.4.3.29-ga29/liferay-ce-portal-tomcat-7.4.3.29-ga29-20220615102224235.tar.gz");
- put(
- "7.4.3.30",
- LIFERAY_PORTAL_URL + "7.4.3.30-ga30/liferay-ce-portal-tomcat-7.4.3.30-ga30-20220622172832884.tar.gz");
- put(
- "7.4.3.31",
- LIFERAY_PORTAL_URL + "7.4.3.31-ga31/liferay-ce-portal-tomcat-7.4.3.31-ga31-20220628171544529.tar.gz");
- put(
- "7.4.3.32",
- LIFERAY_PORTAL_URL + "7.4.3.32-ga32/liferay-ce-portal-tomcat-7.4.3.32-ga32-20220704200951543.tar.gz");
- put(
- "7.4.3.33",
- LIFERAY_PORTAL_URL + "7.4.3.33-ga33/liferay-ce-portal-tomcat-7.4.3.33-ga33-20220711220434272.tar.gz");
- put(
- "7.4.3.34",
- LIFERAY_PORTAL_URL + "7.4.3.34-ga34/liferay-ce-portal-tomcat-7.4.3.34-ga34-20220719155007101.tar.gz");
- put(
- "7.4.3.35",
- LIFERAY_PORTAL_URL + "7.4.3.35-ga35/liferay-ce-portal-tomcat-7.4.3.35-ga35-20220726170951454.tar.gz");
- put(
- "7.4.3.36",
- LIFERAY_PORTAL_URL + "7.4.3.36-ga36/liferay-ce-portal-tomcat-7.4.3.36-ga36-20220802152002501.tar.gz");
- put(
- "7.4.3.37",
- LIFERAY_PORTAL_URL + "7.4.3.37-ga37/liferay-ce-portal-tomcat-7.4.3.37-ga37-20220810074517865.tar.gz");
- put(
- "7.4.3.38",
- LIFERAY_PORTAL_URL + "7.4.3.38-ga38/liferay-ce-portal-tomcat-7.4.3.38-ga38-20220816172522381.tar.gz");
- put(
- "7.4.3.39",
- LIFERAY_PORTAL_URL + "7.4.3.39-ga39/liferay-ce-portal-tomcat-7.4.3.39-ga39-20220824100312686.tar.gz");
- put(
- "7.4.3.40",
- LIFERAY_PORTAL_URL + "7.4.3.40-ga40/liferay-ce-portal-tomcat-7.4.3.40-ga40-20220901103436940.tar.gz");
- put(
- "7.4.3.41",
- LIFERAY_PORTAL_URL + "7.4.3.41-ga41/liferay-ce-portal-tomcat-7.4.3.41-ga41-20220902171954397.tar.gz");
- put(
- "7.4.3.42",
- LIFERAY_PORTAL_URL + "7.4.3.42-ga42/liferay-ce-portal-tomcat-7.4.3.42-ga42-20220913145951615.tar.gz");
- put(
- "7.4.3.43",
- LIFERAY_PORTAL_URL + "7.4.3.43-ga43/liferay-ce-portal-tomcat-7.4.3.43-ga43-20220921132136623.tar.gz");
- put(
- "7.4.3.44",
- LIFERAY_PORTAL_URL + "7.4.3.44-ga44/liferay-ce-portal-tomcat-7.4.3.44-ga44-20220928155119787.tar.gz");
- put(
- "7.4.3.45",
- LIFERAY_PORTAL_URL + "7.4.3.45-ga45/liferay-ce-portal-tomcat-7.4.3.45-ga45-20221005161655738.tar.gz");
- put(
- "7.4.3.46",
- LIFERAY_PORTAL_URL + "7.4.3.46-ga46/liferay-ce-portal-tomcat-7.4.3.46-ga46-20221012072050357.tar.gz");
- put(
- "7.4.3.47",
- LIFERAY_PORTAL_URL + "7.4.3.47-ga47/liferay-ce-portal-tomcat-7.4.3.47-ga47-20221020194008980.tar.gz");
- put(
- "7.4.3.48",
- LIFERAY_PORTAL_URL + "7.4.3.48-ga48/liferay-ce-portal-tomcat-7.4.3.48-ga48-20221024170919019.tar.gz");
- put(
- "7.4.3.49",
- LIFERAY_PORTAL_URL + "7.4.3.49-ga49/liferay-ce-portal-tomcat-7.4.3.49-ga49-20221101182812798.tar.gz");
- put(
- "7.4.3.50",
- LIFERAY_PORTAL_URL + "7.4.3.50-ga50/liferay-ce-portal-tomcat-7.4.3.50-ga50-20221109133624287.tar.gz");
- put(
- "7.4.3.51",
- LIFERAY_PORTAL_URL + "7.4.3.51-ga51/liferay-ce-portal-tomcat-7.4.3.51-ga51-20221116093040073.tar.gz");
- put(
- "7.4.3.52",
- LIFERAY_PORTAL_URL + "7.4.3.52-ga52/liferay-ce-portal-tomcat-7.4.3.52-ga52-20221123055420812.tar.gz");
- put(
- "7.4.3.53",
- LIFERAY_PORTAL_URL + "7.4.3.53-ga53/liferay-ce-portal-tomcat-7.4.3.53-ga53-20221128183114789.tar.gz");
- put(
- "7.4.3.54",
- LIFERAY_PORTAL_URL + "7.4.3.54-ga54/liferay-ce-portal-tomcat-7.4.3.54-ga54-20221208120838175.tar.gz");
- put(
- "7.4.3.55",
- LIFERAY_PORTAL_URL + "7.4.3.55-ga55/liferay-ce-portal-tomcat-7.4.3.55-ga55-20221214100304403.tar.gz");
- put(
- "7.4.3.56",
- LIFERAY_PORTAL_URL + "7.4.3.56-ga56/liferay-ce-portal-tomcat-7.4.3.56-ga56-20221222175515613.tar.gz");
- put(
- "7.4.3.57",
- LIFERAY_PORTAL_URL + "7.4.3.57-ga57/liferay-ce-portal-tomcat-7.4.3.57-ga57-20221227095707564.tar.gz");
- put(
- "7.4.3.58",
- LIFERAY_PORTAL_URL + "7.4.3.58-ga58/liferay-ce-portal-tomcat-7.4.3.58-ga58-20230106095040120.tar.gz");
- put(
- "7.4.3.59",
- LIFERAY_PORTAL_URL + "7.4.3.59-ga59/liferay-ce-portal-tomcat-7.4.3.59-ga59-20230112145006317.tar.gz");
- put(
- "7.4.3.60",
- LIFERAY_PORTAL_URL + "7.4.3.60-ga60/liferay-ce-portal-tomcat-7.4.3.60-ga60-20230119193525693.tar.gz");
- put(
- "7.4.3.61",
- LIFERAY_PORTAL_URL + "7.4.3.61-ga61/liferay-ce-portal-tomcat-7.4.3.61-ga61-20230126114009163.tar.gz");
- put(
- "7.4.3.62",
- LIFERAY_PORTAL_URL + "7.4.3.62-ga62/liferay-ce-portal-tomcat-7.4.3.62-ga62-20230201123036563.tar.gz");
- put(
- "7.4.3.63",
- LIFERAY_PORTAL_URL + "7.4.3.63-ga63/liferay-ce-portal-tomcat-7.4.3.63-ga63-20230208120248188.tar.gz");
- put(
- "7.4.3.64",
- LIFERAY_PORTAL_URL + "7.4.3.64-ga64/liferay-ce-portal-tomcat-7.4.3.64-ga64-20230215071142310.tar.gz");
- put(
- "7.4.3.65",
- LIFERAY_PORTAL_URL + "7.4.3.65-ga65/liferay-ce-portal-tomcat-7.4.3.65-ga65-20230223051553256.tar.gz");
- put(
- "7.4.3.66",
- LIFERAY_PORTAL_URL + "7.4.3.66-ga66/liferay-ce-portal-tomcat-7.4.3.66-ga66-20230302125637462.tar.gz");
- put(
- "7.4.3.67",
- LIFERAY_PORTAL_URL + "7.4.3.67-ga67/liferay-ce-portal-tomcat-7.4.3.67-ga67-20230308154142910.tar.gz");
- put(
- "7.4.3.68",
- LIFERAY_PORTAL_URL + "7.4.3.68-ga68/liferay-ce-portal-tomcat-7.4.3.68-ga68-20230316164622987.tar.gz");
- put(
- "7.4.3.69",
- LIFERAY_PORTAL_URL + "7.4.3.69-ga69/liferay-ce-portal-tomcat-7.4.3.69-ga69-20230322112106637.tar.gz");
- put(
- "7.4.3.70",
- LIFERAY_PORTAL_URL + "7.4.3.70-ga70/liferay-ce-portal-tomcat-7.4.3.70-ga70-20230329103135266.tar.gz");
- put(
- "7.4.3.71",
- LIFERAY_PORTAL_URL + "7.4.3.71-ga71/liferay-ce-portal-tomcat-7.4.3.71-ga71-20230405120344869.tar.gz");
- put(
- "7.4.3.72",
- LIFERAY_PORTAL_URL + "7.4.3.72-ga72/liferay-ce-portal-tomcat-7.4.3.72-ga72-20230411085137929.tar.gz");
- }
- };
- public static final Map liferayTargetPlatformVersions = new HashMap() {
- {
- put("7.0", new String[] {"7.0.6-2"});
- put("7.1", new String[] {"7.1.3-1", "7.1.2", "7.1.1", "7.1.0"});
- put("7.2", new String[] {"7.2.1-1", "7.2.0"});
- put("7.3", new String[] {"7.3.7", "7.3.6", "7.3.5", "7.3.4", "7.3.3-1", "7.3.2-1", "7.3.1-1", "7.3.0-1"});
- put(
- "7.4",
- new String[] {
- "7.4.3.72", "7.4.3.71", "7.4.3.70", "7.4.3.69", "7.4.3.68", "7.4.3.67", "7.4.3.66", "7.4.3.65",
- "7.4.3.64", "7.4.3.63", "7.4.3.62", "7.4.3.61", "7.4.3.60", "7.4.3.59", "7.4.3.58", "7.4.3.57",
- "7.4.3.56", "7.4.3.55", "7.4.3.54", "7.4.3.53", "7.4.3.52", "7.4.3.51", "7.4.3.50", "7.4.3.49",
- "7.4.3.48", "7.4.3.47", "7.4.3.46", "7.4.3.45", "7.4.3.44", "7.4.3.43", "7.4.3.42", "7.4.3.41",
- "7.4.3.40", "7.4.3.39", "7.4.3.38", "7.4.3.37", "7.4.3.36", "7.4.3.35", "7.4.3.34", "7.4.3.32",
- "7.4.3.31", "7.4.3.30", "7.4.3.29", "7.4.3.28", "7.4.3.27", "7.4.3.26", "7.4.3.25", "7.4.3.24",
- "7.4.3.23", "7.4.3.22", "7.4.3.21", "7.4.3.20", "7.4.3.19", "7.4.3.18", "7.4.3.17", "7.4.3.16",
- "7.4.3.15", "7.4.3.14", "7.4.3.13", "7.4.3.12", "7.4.3.11", "7.4.3.10", "7.4.3.9", "7.4.3.8",
- "7.4.3.7", "7.4.3.6", "7.4.3.5", "7.4.3.4", "7.4.2-1", "7.4.1-1", "7.4.0"
- });
- }
- };
-
}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.gradle.core/.classpath b/tools/plugins/com.liferay.ide.gradle.core/.classpath
index 0d494e100d..c94eae20d4 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/.classpath
+++ b/tools/plugins/com.liferay.ide.gradle.core/.classpath
@@ -1,9 +1,23 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.gradle.core/.project b/tools/plugins/com.liferay.ide.gradle.core/.project
index bf7a673e47..fe04802225 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/.project
+++ b/tools/plugins/com.liferay.ide.gradle.core/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524992
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.gradle.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.gradle.core/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.gradle.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.gradle.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.gradle.core/META-INF/MANIFEST.MF
index 5dbb4dfa5b..4d97e928cc 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.gradle.core/META-INF/MANIFEST.MF
@@ -5,21 +5,23 @@ Bundle-ClassPath: .,
lib/gradle-tooling.jar,
lib/groovy-4.0.7.jar
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.gradle.core
Bundle-Name: Liferay IDE Gradle Core
Bundle-SymbolicName: com.liferay.ide.gradle.core;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Version: 4.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: com.liferay.blade.gradle.tooling,
com.liferay.ide.gradle.core,
com.liferay.ide.gradle.core.model
-Require-Bundle: biz.aQute.bndlib;bundle-version="[5,6)",
+Import-Package: com.google.common.collect
+Require-Bundle: biz.aQute.bndlib,
com.liferay.ide.core,
com.liferay.ide.project.core,
com.liferay.ide.server.core,
org.apache.commons.io,
org.apache.commons.lang,
- org.eclipse.buildship.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.buildship.core,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.jdt.launching,
diff --git a/tools/plugins/com.liferay.ide.gradle.core/plugin.xml b/tools/plugins/com.liferay.ide.gradle.core/plugin.xml
index 8b0508ea6d..df3367069e 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/plugin.xml
+++ b/tools/plugins/com.liferay.ide.gradle.core/plugin.xml
@@ -109,4 +109,13 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.gradle.core/pom.xml b/tools/plugins/com.liferay.ide.gradle.core/pom.xml
index a783e2a787..2a6db292d3 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.gradle.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.gradle.core
diff --git a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/GradleUtil.java b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/GradleUtil.java
index 9bcbb0bfb5..fe0bbbcaf0 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/GradleUtil.java
+++ b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/GradleUtil.java
@@ -56,6 +56,8 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
import org.gradle.tooling.CancellationTokenSource;
import org.gradle.tooling.GradleConnector;
@@ -340,12 +342,18 @@ public static String runGradleTask(
GradleBuild gradleBuild = gradleBuildOpt.get();
try {
+ IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
+
+ File jvmInstallLocation = defaultVMInstall.getInstallLocation();
+
if (redirectOutput) {
OutputStream outputStream = new ByteArrayOutputStream();
gradleBuild.withConnection(
connection -> {
connection.newBuild(
+ ).setJavaHome(
+ jvmInstallLocation
).addArguments(
arguments
).forTasks(
@@ -366,6 +374,8 @@ public static String runGradleTask(
gradleBuild.withConnection(
connection -> {
connection.newBuild(
+ ).setJavaHome(
+ jvmInstallLocation
).addArguments(
arguments
).forTasks(
@@ -398,6 +408,10 @@ public static IStatus synchronizeProject(IPath dir, IProgressMonitor monitor) {
gradleBuilder.showConsoleView(true);
gradleBuilder.showExecutionsView(true);
+ gradleBuilder.javaHome(
+ JavaRuntime.getDefaultVMInstall(
+ ).getInstallLocation());
+
BuildConfiguration configuration = gradleBuilder.build();
GradleWorkspace workspace = GradleCore.getWorkspace();
diff --git a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleInvocationCustomizer.java b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleInvocationCustomizer.java
new file mode 100644
index 0000000000..042a2b3629
--- /dev/null
+++ b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleInvocationCustomizer.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.liferay.ide.gradle.core;
+
+import java.io.File;
+
+import java.nio.file.Path;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.buildship.core.invocation.InvocationCustomizer;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+
+/**
+ * @author Simon Jiang
+ */
+public class LiferayGradleInvocationCustomizer implements InvocationCustomizer {
+
+ @Override
+ public List getExtraArguments() {
+ IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
+
+ File vmInstallLocation = defaultVMInstall.getInstallLocation();
+
+ Path vmInstallPath = vmInstallLocation.toPath();
+
+ return Arrays.asList("-Dorg.gradle.java.home=" + vmInstallPath.toString());
+ }
+
+}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleWorkspaceProjectDeleteParticipant.java b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleWorkspaceProjectDeleteParticipant.java
index e8397bfa69..0e1c7305ba 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleWorkspaceProjectDeleteParticipant.java
+++ b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayGradleWorkspaceProjectDeleteParticipant.java
@@ -63,6 +63,10 @@ public Change createChange(IProgressMonitor pm) throws CoreException, OperationC
CompositeChange change = new CompositeChange(getName());
+ if (!GradleUtil.isGradleProject(workspaceProject)) {
+ return change;
+ }
+
ProjectInfo projectInfo = LiferayGradleCore.getToolingModel(ProjectInfo.class, _workspaceProject);
if (Objects.isNull(projectInfo)) {
diff --git a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayProjectConfigurator.java b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayProjectConfigurator.java
index 068c7b7ff9..4d6ace7d18 100644
--- a/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayProjectConfigurator.java
+++ b/tools/plugins/com.liferay.ide.gradle.core/src/com/liferay/ide/gradle/core/LiferayProjectConfigurator.java
@@ -14,6 +14,9 @@
package com.liferay.ide.gradle.core;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
import com.liferay.blade.gradle.tooling.ProjectInfo;
import com.liferay.ide.core.LiferayNature;
import com.liferay.ide.core.util.FileUtil;
@@ -25,6 +28,10 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
import java.util.Set;
import org.eclipse.buildship.core.InitializationContext;
@@ -33,8 +40,14 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
/**
* @author Simon Jiang
@@ -61,7 +74,39 @@ public void init(InitializationContext arg0, IProgressMonitor arg1) {
public void unconfigure(ProjectContext arg0, IProgressMonitor arg1) {
}
+ private static IClasspathEntry _createContainerEntry(IPath path) {
+ return JavaCore.newContainerEntry(path);
+ }
+
private void _configureIfLiferayProject(final IProject project) throws CoreException {
+ IJavaProject javaProject = JavaCore.create(project);
+
+ IProgressMonitor monitor = new NullProgressMonitor();
+
+ if (project.hasNature(JavaCore.NATURE_ID)) {
+ List classpath = Lists.newArrayList(javaProject.getRawClasspath());
+
+ Map oldContainers = _removeOldContainers(classpath);
+
+ Map containersToAdd = new HashMap<>();
+
+ IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
+
+ IPath newJREContainerPath = JavaRuntime.newJREContainerPath(defaultVMInstall);
+
+ IClasspathEntry jreEntry = _createContainerEntry(newJREContainerPath);
+
+ containersToAdd.put(jreEntry.getPath(), jreEntry);
+
+ containersToAdd.putAll(oldContainers);
+
+ classpath.addAll(_indexOfNewContainers(classpath), containersToAdd.values());
+
+ javaProject.setRawClasspath(classpath.toArray(new IClasspathEntry[0]), monitor);
+
+ ProjectUtil.updateComplianceSettings(javaProject, ProjectUtil.getVmCompliance(defaultVMInstall));
+ }
+
if (project.hasNature("org.eclipse.buildship.core.gradleprojectnature") && !LiferayNature.hasNature(project)) {
final boolean[] needAddNature = new boolean[1];
@@ -88,8 +133,6 @@ else if (ProjectUtil.isWorkspaceWars(project)) {
try {
gulpFileContent = new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8);
- // case 2: has gulpfile.js with some content
-
if (gulpFileContent.contains("require('liferay-theme-tasks')")) {
needAddNature[0] = true;
}
@@ -101,8 +144,6 @@ else if (ProjectUtil.isWorkspaceWars(project)) {
}
try {
- IProgressMonitor monitor = new NullProgressMonitor();
-
if (needAddNature[0]) {
LiferayNature.addLiferayNature(project, monitor);
@@ -130,4 +171,43 @@ else if (ProjectUtil.isWorkspaceWars(project)) {
}
}
+ private int _indexOfNewContainers(List classpath) {
+ int index = 0;
+
+ for (int i = 0; i < classpath.size(); i++) {
+ IClasspathEntry classpathEntry = classpath.get(i);
+
+ if (classpathEntry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+ index = i + 1;
+ }
+ }
+
+ return index;
+ }
+
+ private Map _removeOldContainers(List classpath) {
+ Map retainedEntries = Maps.newLinkedHashMap();
+ ListIterator iterator = classpath.listIterator();
+
+ while (iterator.hasNext()) {
+ IClasspathEntry entry = iterator.next();
+
+ if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+ if (_shouldRetainContainer(entry)) {
+ retainedEntries.put(entry.getPath(), entry);
+ }
+
+ iterator.remove();
+ }
+ }
+
+ return retainedEntries;
+ }
+
+ private boolean _shouldRetainContainer(IClasspathEntry entry) {
+ IPath newDefaultJREContainerPath = JavaRuntime.newDefaultJREContainerPath();
+
+ return !newDefaultJREContainerPath.isPrefixOf(entry.getPath());
+ }
+
}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.gradle.ui/.classpath b/tools/plugins/com.liferay.ide.gradle.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.gradle.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.gradle.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.gradle.ui/.project b/tools/plugins/com.liferay.ide.gradle.ui/.project
index f89313047e..e1d0a94883 100644
--- a/tools/plugins/com.liferay.ide.gradle.ui/.project
+++ b/tools/plugins/com.liferay.ide.gradle.ui/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524992
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.gradle.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.gradle.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.gradle.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.gradle.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.gradle.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.gradle.ui/META-INF/MANIFEST.MF
index 9c47eb93f5..fa0852e93b 100644
--- a/tools/plugins/com.liferay.ide.gradle.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.gradle.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.gradle.ui
Bundle-Name: Liferay IDE Gradle UI
Bundle-SymbolicName: com.liferay.ide.gradle.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.gradle.ui.LiferayGradleUI
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.google.guava,
@@ -16,7 +17,7 @@ Require-Bundle: com.google.guava,
com.liferay.ide.upgrade.plan.core,
org.apache.commons.io,
org.apache.commons.lang,
- org.eclipse.buildship.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.buildship.core,
org.eclipse.core.expressions,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
@@ -35,7 +36,7 @@ Require-Bundle: com.google.guava,
org.eclipse.wst.server.ui,
org.eclipse.debug.ui,
org.eclipse.jdt.debug.ui
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Export-Package: com.liferay.ide.gradle.ui
diff --git a/tools/plugins/com.liferay.ide.gradle.ui/pom.xml b/tools/plugins/com.liferay.ide.gradle.ui/pom.xml
index 4c5c869b50..0fbec27234 100644
--- a/tools/plugins/com.liferay.ide.gradle.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.gradle.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.gradle.ui
diff --git a/tools/plugins/com.liferay.ide.hook.core/.classpath b/tools/plugins/com.liferay.ide.hook.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.hook.core/.classpath
+++ b/tools/plugins/com.liferay.ide.hook.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.hook.core/.project b/tools/plugins/com.liferay.ide.hook.core/.project
index 4398d57ccc..28199b60da 100644
--- a/tools/plugins/com.liferay.ide.hook.core/.project
+++ b/tools/plugins/com.liferay.ide.hook.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524994
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.hook.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.hook.core/.settings/org.eclipse.jdt.core.prefs
index 3b3b2779e2..3585c6a605 100644
--- a/tools/plugins/com.liferay.ide.hook.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.hook.core/.settings/org.eclipse.jdt.core.prefs
@@ -6,8 +6,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -18,6 +18,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -61,6 +62,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -92,5 +94,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.hook.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.hook.core/META-INF/MANIFEST.MF
index 8c88ade856..6037efc416 100644
--- a/tools/plugins/com.liferay.ide.hook.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.hook.core/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.hook.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.hook.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.hook.core.HookCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -25,7 +26,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.sse.core,
org.eclipse.wst.validation,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.hook.core,
com.liferay.ide.hook.core.dd,
diff --git a/tools/plugins/com.liferay.ide.hook.core/pom.xml b/tools/plugins/com.liferay.ide.hook.core/pom.xml
index a7a2823118..b4c5ceac85 100644
--- a/tools/plugins/com.liferay.ide.hook.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.hook.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.hook.core
diff --git a/tools/plugins/com.liferay.ide.hook.ui/.classpath b/tools/plugins/com.liferay.ide.hook.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.hook.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.hook.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.hook.ui/.project b/tools/plugins/com.liferay.ide.hook.ui/.project
index a327d0a2e8..c801919b00 100644
--- a/tools/plugins/com.liferay.ide.hook.ui/.project
+++ b/tools/plugins/com.liferay.ide.hook.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524996
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.hook.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.hook.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.hook.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.hook.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.hook.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.hook.ui/META-INF/MANIFEST.MF
index 828c7bb963..9c84a9523e 100644
--- a/tools/plugins/com.liferay.ide.hook.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.hook.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.hook.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.hook.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.hook.ui.HookUI
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -26,7 +27,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.ui.ide,
org.eclipse.ui.views.properties.tabbed,
org.eclipse.wst.common.frameworks.ui
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.hook.ui,
com.liferay.ide.hook.ui.action,
diff --git a/tools/plugins/com.liferay.ide.hook.ui/plugin.xml b/tools/plugins/com.liferay.ide.hook.ui/plugin.xml
index 00decbd67e..0b05b5e691 100644
--- a/tools/plugins/com.liferay.ide.hook.ui/plugin.xml
+++ b/tools/plugins/com.liferay.ide.hook.ui/plugin.xml
@@ -37,31 +37,6 @@
-
-
-
-
-
-
-
-
-
-
- %wizard.description
-
-
-
-
diff --git a/tools/plugins/com.liferay.ide.hook.ui/pom.xml b/tools/plugins/com.liferay.ide.hook.ui/pom.xml
index f4291807dd..e745ba7a0c 100644
--- a/tools/plugins/com.liferay.ide.hook.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.hook.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.hook.ui
diff --git a/tools/plugins/com.liferay.ide.layouttpl.core/.classpath b/tools/plugins/com.liferay.ide.layouttpl.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.core/.classpath
+++ b/tools/plugins/com.liferay.ide.layouttpl.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.layouttpl.core/.project b/tools/plugins/com.liferay.ide.layouttpl.core/.project
index fe8bb9be6a..5ca3c7a38a 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.core/.project
+++ b/tools/plugins/com.liferay.ide.layouttpl.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524998
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.layouttpl.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.layouttpl.core/.settings/org.eclipse.jdt.core.prefs
index 3b3b2779e2..3585c6a605 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.layouttpl.core/.settings/org.eclipse.jdt.core.prefs
@@ -6,8 +6,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -18,6 +18,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -61,6 +62,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -92,5 +94,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.layouttpl.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.layouttpl.core/META-INF/MANIFEST.MF
index 26e1ba5738..2839a492c3 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.layouttpl.core/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.layouttpl.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.layouttpl.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.layouttpl.core.LayoutTplCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -20,7 +21,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.layouttpl.core,
com.liferay.ide.layouttpl.core.descriptor,
diff --git a/tools/plugins/com.liferay.ide.layouttpl.core/pom.xml b/tools/plugins/com.liferay.ide.layouttpl.core/pom.xml
index d929a02d75..1e68d2a4b2 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.layouttpl.core/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.layouttpl.core
diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath b/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/.project b/tools/plugins/com.liferay.ide.layouttpl.ui/.project
index 87f9be6d19..771abfd22c 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.ui/.project
+++ b/tools/plugins/com.liferay.ide.layouttpl.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525000
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.layouttpl.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.layouttpl.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF
index 6d6e8bfdf8..feff7a53a6 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.layouttpl.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.layouttpl.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.layouttpl.ui.LayoutTplUI
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -26,7 +27,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.sse.core,
org.eclipse.wst.sse.ui,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.layouttpl.ui,
com.liferay.ide.layouttpl.ui.draw2d,
diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/plugin.xml b/tools/plugins/com.liferay.ide.layouttpl.ui/plugin.xml
index 1072639663..81d13d0d11 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.ui/plugin.xml
+++ b/tools/plugins/com.liferay.ide.layouttpl.ui/plugin.xml
@@ -27,24 +27,4 @@
>
-
-
-
-
-
-
-
-
- %layout.wizard.description
-
-
-
-
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/pom.xml b/tools/plugins/com.liferay.ide.layouttpl.ui/pom.xml
index 08e2d53922..80f2b33fec 100644
--- a/tools/plugins/com.liferay.ide.layouttpl.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.layouttpl.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.layouttpl.ui
diff --git a/tools/plugins/com.liferay.ide.portlet.core/.classpath b/tools/plugins/com.liferay.ide.portlet.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.portlet.core/.classpath
+++ b/tools/plugins/com.liferay.ide.portlet.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.portlet.core/.project b/tools/plugins/com.liferay.ide.portlet.core/.project
index dea630459a..424e582f91 100644
--- a/tools/plugins/com.liferay.ide.portlet.core/.project
+++ b/tools/plugins/com.liferay.ide.portlet.core/.project
@@ -37,4 +37,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525004
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.portlet.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.portlet.core/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.portlet.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.portlet.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.portlet.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.portlet.core/META-INF/MANIFEST.MF
index 2cd0d17df7..853352e587 100644
--- a/tools/plugins/com.liferay.ide.portlet.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.portlet.core/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.portlet.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.portlet.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.portlet.core.PortletCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -28,7 +29,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.server.core,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.portlet.core,
com.liferay.ide.portlet.core.dd,
diff --git a/tools/plugins/com.liferay.ide.portlet.core/pom.xml b/tools/plugins/com.liferay.ide.portlet.core/pom.xml
index 411ff40a86..d2e82d3d81 100644
--- a/tools/plugins/com.liferay.ide.portlet.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.portlet.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portlet.core
diff --git a/tools/plugins/com.liferay.ide.portlet.ui/.classpath b/tools/plugins/com.liferay.ide.portlet.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.portlet.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.portlet.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.portlet.ui/.project b/tools/plugins/com.liferay.ide.portlet.ui/.project
index b0a953bf44..3dcc488c4e 100644
--- a/tools/plugins/com.liferay.ide.portlet.ui/.project
+++ b/tools/plugins/com.liferay.ide.portlet.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525006
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.portlet.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.portlet.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.portlet.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.portlet.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.portlet.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.portlet.ui/META-INF/MANIFEST.MF
index ee8795dde6..1eeee4688c 100644
--- a/tools/plugins/com.liferay.ide.portlet.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.portlet.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.portlet.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.portlet.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.portlet.ui.PortletUIPlugin
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -40,7 +41,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.sse.ui,
org.eclipse.wst.xml.core,
org.eclipse.wst.xml.search.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.portlet.ui,
com.liferay.ide.portlet.ui.action,
diff --git a/tools/plugins/com.liferay.ide.portlet.ui/plugin.xml b/tools/plugins/com.liferay.ide.portlet.ui/plugin.xml
index f80def9b3d..3deb2e2abf 100644
--- a/tools/plugins/com.liferay.ide.portlet.ui/plugin.xml
+++ b/tools/plugins/com.liferay.ide.portlet.ui/plugin.xml
@@ -1,62 +1,6 @@
-
-
-
-
-
-
-
-
-
-
- %wizard.description
-
-
-
-
-
-
-
-
-
- Create a new Liferay JSF Portlet
-
-
-
-
-
-
-
-
-
- %vaadin.wizard.description
-
-
-
diff --git a/tools/plugins/com.liferay.ide.portlet.ui/pom.xml b/tools/plugins/com.liferay.ide.portlet.ui/pom.xml
index f8b09eba6f..ad8b3fe008 100644
--- a/tools/plugins/com.liferay.ide.portlet.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.portlet.ui/pom.xml
@@ -24,7 +24,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portlet.ui
diff --git a/tools/plugins/com.liferay.ide.project.core/.classpath b/tools/plugins/com.liferay.ide.project.core/.classpath
index 61b8a3c54b..a4c7249972 100644
--- a/tools/plugins/com.liferay.ide.project.core/.classpath
+++ b/tools/plugins/com.liferay.ide.project.core/.classpath
@@ -1,14 +1,25 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.project.core/.project b/tools/plugins/com.liferay.ide.project.core/.project
index 93e173c937..bb65d533e8 100644
--- a/tools/plugins/com.liferay.ide.project.core/.project
+++ b/tools/plugins/com.liferay.ide.project.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525007
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.project.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.project.core/.settings/org.eclipse.jdt.core.prefs
index 94012e0abb..96619f2701 100644
--- a/tools/plugins/com.liferay.ide.project.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.project.core/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -22,6 +22,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -65,6 +66,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -96,5 +98,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.project.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.project.core/META-INF/MANIFEST.MF
index 39780087b5..dbb009420c 100644
--- a/tools/plugins/com.liferay.ide.project.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.project.core/META-INF/MANIFEST.MF
@@ -1,11 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.project.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.project.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.project.core.ProjectCore
Bundle-Vendor: %bundle.vendor
-Require-Bundle: biz.aQute.bndlib;bundle-version="[5,6)",
+Require-Bundle: biz.aQute.bndlib,
com.google.gson,
com.liferay.ide.core,
com.liferay.ide.sdk.core,
@@ -38,7 +39,7 @@ Require-Bundle: biz.aQute.bndlib;bundle-version="[5,6)",
org.eclipse.wst.validation,
org.eclipse.wst.xml.core,
org.jsoup
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.project.core,
com.liferay.ide.project.core.descriptor,
@@ -54,7 +55,10 @@ Export-Package: com.liferay.ide.project.core,
com.liferay.ide.project.core.util,
com.liferay.ide.project.core.workspace,
org.apache.commons.validator.routines
+Import-Package: org.eclipse.jdt.launching,
+ org.eclipse.wst.jsdt.launching
Bundle-ClassPath: lib/commons-validator-1.6.jar,
lib/jackson-core-asl-1.9.13.jar,
lib/jackson-mapper-asl-1.9.13.jar,
+ lib/com.liferay.workspace.bundle.url.codec-1.0.0.jar,
.
diff --git a/tools/plugins/com.liferay.ide.project.core/lib/com.liferay.workspace.bundle.url.codec-1.0.0.jar b/tools/plugins/com.liferay.ide.project.core/lib/com.liferay.workspace.bundle.url.codec-1.0.0.jar
new file mode 100644
index 0000000000..46fee49c1d
Binary files /dev/null and b/tools/plugins/com.liferay.ide.project.core/lib/com.liferay.workspace.bundle.url.codec-1.0.0.jar differ
diff --git a/tools/plugins/com.liferay.ide.project.core/pom.xml b/tools/plugins/com.liferay.ide.project.core/pom.xml
index 29d0a60a10..8d2d82f382 100644
--- a/tools/plugins/com.liferay.ide.project.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.project.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.project.core
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/jsf/JSFModuleProjectComponentSuitePossibleValues.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/jsf/JSFModuleProjectComponentSuitePossibleValues.java
index 4d40854119..abefe6d9f4 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/jsf/JSFModuleProjectComponentSuitePossibleValues.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/jsf/JSFModuleProjectComponentSuitePossibleValues.java
@@ -95,7 +95,7 @@ private List _getComponentSuiteFromURL(String liferayVersion) {
sb.append("+%28Portlet+3.0%29");
- sb.append("/jsf-version/2.3/component-suite/jsf/build-tool/maven");
+ sb.append("/jsf-version/2.3/component-suite/jsf/build-tool/maven/format/thick/cdi/disabled");
try {
Connection connection = Jsoup.connect(sb.toString());
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionDefaultValueService.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionDefaultValueService.java
index dcea51a003..c9dc242807 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionDefaultValueService.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionDefaultValueService.java
@@ -19,8 +19,6 @@
import com.liferay.ide.core.workspace.WorkspaceConstants;
import com.liferay.ide.project.core.ProjectCore;
-import java.util.Set;
-
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IPreferencesService;
@@ -44,9 +42,7 @@ protected String compute() {
return liferayWorkspaceProjectVersion;
}
- Set liferayTargetPlatformVersions = WorkspaceConstants.liferayTargetPlatformVersions.keySet();
-
- String[] versions = liferayTargetPlatformVersions.toArray(new String[0]);
+ String[] versions = WorkspaceConstants.LIFERAY_VERSIONS;
String defaultValue = versions[versions.length - 1];
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionPossibleValuesService.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionPossibleValuesService.java
index 1cb0c9794e..39f65bcf17 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionPossibleValuesService.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/service/TargetLiferayVersionPossibleValuesService.java
@@ -28,7 +28,9 @@ public class TargetLiferayVersionPossibleValuesService extends PossibleValuesSer
@Override
protected void compute(Set values) {
- values.addAll(WorkspaceConstants.liferayTargetPlatformVersions.keySet());
+ for (String version : WorkspaceConstants.LIFERAY_VERSIONS) {
+ values.add(version);
+ }
}
}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/util/ProjectUtil.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/util/ProjectUtil.java
index 441defee8b..618c207f03 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/util/ProjectUtil.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/util/ProjectUtil.java
@@ -34,6 +34,7 @@
import com.liferay.ide.core.util.StringPool;
import com.liferay.ide.core.util.StringUtil;
import com.liferay.ide.core.workspace.LiferayWorkspaceUtil;
+import com.liferay.ide.core.workspace.WorkspaceConstants;
import com.liferay.ide.project.core.IPortletFramework;
import com.liferay.ide.project.core.PluginClasspathContainerInitializer;
import com.liferay.ide.project.core.PluginsSDKBundleProject;
@@ -45,12 +46,14 @@
import com.liferay.ide.project.core.facet.PluginFacetProjectCreationDataModelProvider;
import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
import com.liferay.ide.project.core.model.PluginType;
+import com.liferay.ide.project.core.modules.BladeCLI;
import com.liferay.ide.project.core.modules.BndProperties;
import com.liferay.ide.project.core.modules.BndPropertiesValue;
import com.liferay.ide.sdk.core.ISDKConstants;
import com.liferay.ide.sdk.core.SDK;
import com.liferay.ide.sdk.core.SDKUtil;
import com.liferay.ide.server.util.ServerUtil;
+import com.liferay.workspace.bundle.url.codec.BundleURLCodec;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -62,9 +65,11 @@
import java.nio.file.Files;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -97,6 +102,8 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstall2;
import org.eclipse.jst.common.project.facet.core.JavaFacet;
import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
@@ -824,6 +831,17 @@ else if (projectName.endsWith(ISDKConstants.WEB_PLUGIN_PROJECT_SUFFIX)) {
return fpwc.getProject();
}
+ public static String decodeBundleUrl(ProductInfo productInfo) {
+ try {
+ return BundleURLCodec.decode(productInfo.getBundleUrl(), productInfo.getReleaseDate());
+ }
+ catch (Exception exception) {
+ ProjectCore.logError("Unable to determine bundle URL", exception);
+ }
+
+ return null;
+ }
+
public static void fixExtProjectSrcFolderLinks(IProject extProject) throws JavaModelException {
if (extProject == null) {
return;
@@ -1057,8 +1075,6 @@ public static Map getProductInfos() {
return null;
}
- // IDE-270
-
public static IProject getProject(IDataModel model) {
if (model == null) {
return null;
@@ -1097,6 +1113,8 @@ public static ProjectRecord getProjectRecordForDir(String dir) {
return projectRecord;
}
+ // IDE-270
+
public static String getRelativePathFromDocroot(IWebProject lrproject, String path) {
IFolder docroot = lrproject.getDefaultDocrootFolder();
@@ -1135,6 +1153,110 @@ else if (isThemeProject(project)) {
return requiredSuffix;
}
+ public static String getVmCompliance(IVMInstall defaultVMInstall) {
+ if (defaultVMInstall instanceof IVMInstall2) {
+ IVMInstall2 vmInstall2 = (IVMInstall2)defaultVMInstall;
+
+ String javaVersion = vmInstall2.getJavaVersion();
+
+ if (javaVersion != null) {
+ String compliance = null;
+
+ if (javaVersion.startsWith(JavaCore.VERSION_1_5)) {
+ compliance = JavaCore.VERSION_1_5;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_1_6)) {
+ compliance = JavaCore.VERSION_1_6;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_1_7)) {
+ compliance = JavaCore.VERSION_1_7;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_1_8)) {
+ compliance = JavaCore.VERSION_1_8;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_9) &&
+ ((javaVersion.length() == JavaCore.VERSION_9.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_9.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_9;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_10) &&
+ ((javaVersion.length() == JavaCore.VERSION_10.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_10.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_10;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_11) &&
+ ((javaVersion.length() == JavaCore.VERSION_11.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_11.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_11;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_12) &&
+ ((javaVersion.length() == JavaCore.VERSION_12.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_12.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_12;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_13) &&
+ ((javaVersion.length() == JavaCore.VERSION_13.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_13.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_13;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_14) &&
+ ((javaVersion.length() == JavaCore.VERSION_14.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_14.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_14;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_15) &&
+ ((javaVersion.length() == JavaCore.VERSION_15.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_15.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_15;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_16) &&
+ ((javaVersion.length() == JavaCore.VERSION_16.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_16.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_16;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_17) &&
+ ((javaVersion.length() == JavaCore.VERSION_17.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_17.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_17;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_18) &&
+ ((javaVersion.length() == JavaCore.VERSION_18.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_18.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_18;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_19) &&
+ ((javaVersion.length() == JavaCore.VERSION_19.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_19.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_19;
+ }
+ else if (javaVersion.startsWith(JavaCore.VERSION_20) &&
+ ((javaVersion.length() == JavaCore.VERSION_20.length()) ||
+ (javaVersion.charAt(JavaCore.VERSION_20.length()) == '.'))) {
+
+ compliance = JavaCore.VERSION_20;
+ }
+ else {
+ compliance = JavaCore.VERSION_20; // use latest by default
+ }
+
+ return compliance;
+ }
+ }
+
+ return JavaCore.VERSION_1_8;
+ }
+
public static String guessPluginType(IFacetedProjectWorkingCopy fpwc) {
String pluginType = null;
@@ -1229,6 +1351,51 @@ public static boolean hasProperty(IDataModel model, String propertyName) {
return retval;
}
+ public static Map initMavenTargetPlatform() {
+ Map targetPlatformVersionMap = new HashMap<>();
+
+ try {
+ String[] workspaceProducts = BladeCLI.getWorkspaceProducts(true);
+
+ if (Objects.isNull(workspaceProducts)) {
+ return targetPlatformVersionMap;
+ }
+
+ Map productInfos = getProductInfos();
+
+ if (Objects.isNull(productInfos)) {
+ return targetPlatformVersionMap;
+ }
+
+ for (String liferayVersion : WorkspaceConstants.LIFERAY_VERSIONS) {
+ String[] targetPlatformVersions = Arrays.stream(
+ workspaceProducts
+ ).unordered(
+ ).filter(
+ product -> product.startsWith("portal")
+ ).map(
+ productInfos::get
+ ).filter(
+ productInfo -> {
+ String targetPlatformVersion = productInfo.getTargetPlatformVersion();
+
+ return targetPlatformVersion.startsWith(liferayVersion);
+ }
+ ).map(
+ ProductInfo::getTargetPlatformVersion
+ ).toArray(
+ String[]::new
+ );
+
+ targetPlatformVersionMap.put(liferayVersion, targetPlatformVersions);
+ }
+ }
+ catch (Exception exception) {
+ }
+
+ return targetPlatformVersionMap;
+ }
+
public static boolean is7xServerDeployableProject(IProject project) {
ILiferayProject liferayProject = LiferayCore.create(ILiferayProject.class, project);
@@ -1710,6 +1877,22 @@ else if (hasProperty(model, IFacetProjectCreationDataModelProperties.FACET_DM_MA
}
}
+ public static void updateComplianceSettings(IJavaProject project, String compliance) {
+ HashMap defaultOptions = new HashMap<>();
+
+ JavaCore.setComplianceOptions(compliance, defaultOptions);
+
+ Set> entrySet = defaultOptions.entrySet();
+
+ Iterator> it = entrySet.iterator();
+
+ while (it.hasNext()) {
+ Map.Entry pair = it.next();
+
+ project.setOption(pair.getKey(), pair.getValue());
+ }
+ }
+
private static boolean _checkGradleThemePlugin(IProject project) {
IFile buildGradleFile = project.getFile("build.gradle");
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/BundleUrlDefaultValueService.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/BundleUrlDefaultValueService.java
index ffd18ce3a1..1b0d488b9b 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/BundleUrlDefaultValueService.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/BundleUrlDefaultValueService.java
@@ -14,11 +14,13 @@
package com.liferay.ide.project.core.workspace;
+import com.liferay.ide.core.ProductInfo;
import com.liferay.ide.core.util.SapphireContentAccessor;
import com.liferay.ide.core.util.SapphireUtil;
-import com.liferay.ide.core.workspace.WorkspaceConstants;
+import com.liferay.ide.project.core.util.ProjectUtil;
import java.util.Map;
+import java.util.Objects;
import org.eclipse.sapphire.DefaultValueService;
import org.eclipse.sapphire.Event;
@@ -57,9 +59,19 @@ protected String compute() {
String targetPlatform = get(op.getTargetPlatform());
- Map liferayBundleUrlVersions = WorkspaceConstants.liferayBundleUrlVersions;
+ Map productInfos = ProjectUtil.getProductInfos();
- return liferayBundleUrlVersions.get(targetPlatform);
+ for (ProductInfo productInfo : productInfos.values()) {
+ try {
+ if (Objects.equals(productInfo.getTargetPlatformVersion(), targetPlatform)) {
+ return ProjectUtil.decodeBundleUrl(productInfo);
+ }
+ }
+ catch (Exception exception) {
+ }
+ }
+
+ return null;
}
protected void initDefaultValueService() {
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/NewLiferayWorkspaceOp.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/NewLiferayWorkspaceOp.java
index 6b0b6461a6..1e5896c55d 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/NewLiferayWorkspaceOp.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/NewLiferayWorkspaceOp.java
@@ -95,8 +95,8 @@ public interface NewLiferayWorkspaceOp extends BaseLiferayWorkspaceOp, ProductVe
@Service(impl = NewLiferayWorkspaceServerNameService.class)
public ValueProperty PROP_SERVER_NAME = new ValueProperty(TYPE, BaseLiferayWorkspaceOp.PROP_SERVER_NAME);
- // @Enablement(expr = "${ EnableTargetPlatform == 'true' }")
@Label(standard = "target platform")
+ @Service(impl = TargetPlatformVersionValidationService.class)
@Service(impl = TargetPlatformDefaultValueService.class)
@Service(impl = TargetPlatformPossibleValuesService.class)
public ValueProperty PROP_TARGET_PLATFORM = new ValueProperty(TYPE, "TargetPlatform");
diff --git a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/TargetLiferayVersionListener.java b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/TargetLiferayVersionListener.java
index e7261a4f5a..834caa30f9 100644
--- a/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/TargetLiferayVersionListener.java
+++ b/tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/workspace/TargetLiferayVersionListener.java
@@ -15,12 +15,18 @@
package com.liferay.ide.project.core.workspace;
import com.liferay.ide.core.util.SapphireContentAccessor;
-import com.liferay.ide.core.workspace.WorkspaceConstants;
+import com.liferay.ide.project.core.util.ProjectUtil;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
import org.eclipse.sapphire.Element;
import org.eclipse.sapphire.FilteredListener;
import org.eclipse.sapphire.Property;
import org.eclipse.sapphire.PropertyContentEvent;
+import org.eclipse.sapphire.Value;
/**
* @author Haoyi Sun
@@ -39,7 +45,29 @@ protected void handleTypedEvent(PropertyContentEvent event) {
NewLiferayWorkspaceOp op = newLiferayWorkspaceOp.adapt(NewLiferayWorkspaceOp.class);
- op.setTargetPlatform(WorkspaceConstants.liferayTargetPlatformVersions.get(liferayVersion)[0]);
+ Value targetPlatform = op.getTargetPlatform();
+
+ targetPlatform.clear();
+
+ CompletableFuture
-
-
-
-
-
-
-
-
- %import.projects.sdk.wizard.description
-
-
-
-
- Liferay Plugins SDK Directory
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -716,39 +467,6 @@
-
-
@@ -756,27 +474,6 @@
id="com.liferay.ide.eclipse.ui.shortcuts.actionSet"
label="%ide.actions.label"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tools/plugins/com.liferay.ide.project.ui/pom.xml b/tools/plugins/com.liferay.ide.project.ui/pom.xml
index 56b79e9686..d97f26d5e6 100644
--- a/tools/plugins/com.liferay.ide.project.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.project.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.project.ui
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/IvyUtil.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/IvyUtil.java
deleted file mode 100644
index bcfa6a1711..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/IvyUtil.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui;
-
-import static org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil.getDefaultRuntimePath;
-import static org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil.modifyDependencyPath;
-
-import com.liferay.ide.core.ILiferayConstants;
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.sdk.core.ISDKConstants;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKUtil;
-import com.liferay.ide.server.util.ComponentUtil;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.ivyde.eclipse.cp.ClasspathSetup;
-import org.apache.ivyde.eclipse.cp.IvyClasspathContainer;
-import org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration;
-import org.apache.ivyde.eclipse.cp.IvyClasspathContainerHelper;
-import org.apache.ivyde.eclipse.cp.SettingsSetup;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-import org.osgi.framework.Version;
-
-/**
- * @author Gregory Amerson
- */
-public class IvyUtil {
-
- public static IvyClasspathContainer addIvyLibrary(IProject project, IProgressMonitor monitor) {
- final String projectName = project.getName();
-
- final IJavaProject javaProject = JavaCore.create(project);
-
- final IvyClasspathContainerConfiguration conf = new IvyClasspathContainerConfiguration(
- javaProject, ISDKConstants.IVY_XML_FILE, true);
-
- final ClasspathSetup classpathSetup = new ClasspathSetup();
-
- conf.setAdvancedProjectSpecific(false);
- conf.setClasspathSetup(classpathSetup);
- conf.setClassthProjectSpecific(false);
- conf.setConfs(Collections.singletonList("*"));
- conf.setMappingProjectSpecific(false);
- conf.setSettingsProjectSpecific(true);
-
- SDK sdk = SDKUtil.getSDK(project);
- final SettingsSetup settingsSetup = new SettingsSetup();
-
- IPath sdkLocation = sdk.getLocation();
-
- IPath ivyFilePath = sdkLocation.append(ISDKConstants.IVY_SETTINGS_XML_FILE);
-
- if (FileUtil.exists(ivyFilePath)) {
- StringBuilder builder = new StringBuilder();
-
- builder.append("${");
- builder.append(ISDKConstants.VAR_NAME_LIFERAY_SDK_DIR);
- builder.append(":");
- builder.append(projectName);
- builder.append("}/");
- builder.append(ISDKConstants.IVY_SETTINGS_XML_FILE);
-
- settingsSetup.setIvySettingsPath(builder.toString());
- }
-
- StringBuilder builder = new StringBuilder();
-
- builder.append("${");
- builder.append(ISDKConstants.VAR_NAME_LIFERAY_SDK_DIR);
- builder.append(":");
- builder.append(projectName);
- builder.append("}/.ivy");
-
- settingsSetup.setIvyUserDir(builder.toString());
-
- conf.setIvySettingsSetup(settingsSetup);
-
- final IPath path = conf.getPath();
- final IClasspathAttribute[] atts = conf.getAttributes();
-
- final IClasspathEntry ivyEntry = JavaCore.newContainerEntry(path, null, atts, false);
-
- final IVirtualComponent virtualComponent = ComponentCore.createComponent(project);
-
- try {
- IClasspathEntry[] entries = javaProject.getRawClasspath();
-
- List newEntries = new ArrayList<>(Arrays.asList(entries));
-
- IPath runtimePath = getDefaultRuntimePath(virtualComponent, ivyEntry);
-
- // add the deployment assembly config to deploy ivy container to /WEB-INF/lib
-
- final IClasspathEntry cpeTagged = modifyDependencyPath(ivyEntry, runtimePath);
-
- newEntries.add(cpeTagged);
-
- entries = (IClasspathEntry[])newEntries.toArray(new IClasspathEntry[0]);
-
- javaProject.setRawClasspath(entries, javaProject.getOutputLocation(), monitor);
-
- return IvyClasspathContainerHelper.getContainer(path, javaProject);
- }
- catch (JavaModelException jme) {
- ProjectUI.logError("Unable to add Ivy library container", jme);
- }
-
- return null;
- }
-
- public static void addIvyNature(IProject project, IProgressMonitor monitor) throws CoreException {
- CoreUtil.addNaturesToProject(project, new String[] {"org.apache.ivyde.eclipse.ivynature"}, monitor);
- }
-
- public static IStatus configureIvyProject(final IProject project, IProgressMonitor monitor) throws CoreException {
- SDK sdk = SDKUtil.getSDK(project);
-
- // check for 6.1.2 and greater but not 6.1.10 which is older EE release
- // and match 6.2.0 and greater
-
- final Version version = Version.parseVersion(sdk.getVersion());
-
- if (((CoreUtil.compareVersions(version, ILiferayConstants.V611) >= 0) &&
- (CoreUtil.compareVersions(version, ILiferayConstants.V6110) < 0)) ||
- (CoreUtil.compareVersions(version, ILiferayConstants.V620) >= 0)) {
-
- IFile ivyXmlFile = project.getFile(ISDKConstants.IVY_XML_FILE);
-
- if (ivyXmlFile.exists()) {
-
- // IDE-1044
-
- addIvyNature(project, monitor);
-
- IvyClasspathContainer ivycp = addIvyLibrary(project, monitor);
-
- if (ivycp != null) {
- IStatus status = ivycp.launchResolve(false, monitor);
-
- if (status.isOK()) {
- IWebProject webproject = LiferayCore.create(IWebProject.class, project);
-
- if (webproject != null) {
- IFolder docrootFolder = webproject.getDefaultDocrootFolder();
-
- IFolder webinfFolder = docrootFolder.getFolder("WEB-INF");
-
- if (webinfFolder != null) {
- ComponentUtil.validateFolder(webinfFolder, monitor);
- }
- }
- }
- else {
- return status;
- }
- }
- }
- }
-
- return Status.OK_STATUS;
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/SDKFolderProjectPropertyTester.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/SDKFolderProjectPropertyTester.java
deleted file mode 100644
index 8a1ca07f1e..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/SDKFolderProjectPropertyTester.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui;
-
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * @author Gregory Amerson
- */
-public class SDKFolderProjectPropertyTester extends PropertyTester {
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof IProject) {
- final IProject project = (IProject)receiver;
-
- final IPath location = project.getLocation();
-
- if (location != null) {
- return SDKUtil.isValidSDKLocation(location.toOSString());
- }
- }
-
- return false;
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/ServiceFilePropertyTester.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/ServiceFilePropertyTester.java
deleted file mode 100644
index df45a94702..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/ServiceFilePropertyTester.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui;
-
-import java.util.Objects;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-
-/**
- * @author Gregory Amerson
- */
-public class ServiceFilePropertyTester extends PropertyTester {
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof IFile) {
- IFile file = (IFile)receiver;
-
- try {
- IContentDescription description = file.getContentDescription();
-
- if (description != null) {
- IContentType contentType = description.getContentType();
-
- if (Objects.equals("com.liferay.ide.portlet.core.servicebuildercontent", contentType.getId())) {
- return true;
- }
- }
- }
- catch (Throwable t) {
-
- // ignore
-
- }
- }
-
- return false;
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/ConvertProjectAction.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/ConvertProjectAction.java
deleted file mode 100644
index 92b7cd58e9..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/ConvertProjectAction.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.action;
-
-import com.liferay.ide.project.ui.wizard.SDKProjectConvertWizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @author Gregory Amerson
- */
-public class ConvertProjectAction implements IObjectActionDelegate {
-
- public ConvertProjectAction() {
- }
-
- public Display getDisplay() {
- Display display = Display.getCurrent();
-
- if (display == null) {
- display = Display.getDefault();
- }
-
- return display;
- }
-
- public void run(IAction action) {
- if (_fSelection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection)_fSelection;
-
- Object[] elems = structuredSelection.toArray();
-
- IProject project = null;
-
- Object elem = elems[0];
-
- if (elem instanceof IProject) {
- project = (IProject)elem;
- }
-
- SDKProjectConvertWizard wizard = new SDKProjectConvertWizard(project);
-
- final Display display = getDisplay();
-
- final WizardDialog dialog = new WizardDialog(display.getActiveShell(), wizard);
-
- BusyIndicator.showWhile(
- display,
- new Runnable() {
-
- public void run() {
- dialog.open();
- }
-
- });
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- _fSelection = selection;
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- private ISelection _fSelection;
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/ImportLiferayProjectsWizardAction.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/ImportLiferayProjectsWizardAction.java
deleted file mode 100644
index 75ad1ef1bf..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/ImportLiferayProjectsWizardAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.action;
-
-import com.liferay.ide.core.util.StringPool;
-import com.liferay.ide.project.ui.ProjectUI;
-import com.liferay.ide.project.ui.wizard.ImportSDKProjectsWizard;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Gregory Amerson
- * @author Simon Jiang
- */
-public class ImportLiferayProjectsWizardAction extends NewWizardAction {
-
- public ImportLiferayProjectsWizardAction() {
- super(new ImportLiferayProjectElement());
-
- setText(Msgs.newLiferayProject);
- }
-
- private static class ImportLiferayProjectElement extends AbstractNewProjectWizardProjectElement {
-
- @Override
- protected Object createNewWizard() {
- return new ImportSDKProjectsWizard("New Liferay Plugin Projects from Existing Source (Legacy)");
- }
-
- @Override
- protected String getContributorID() {
- return ProjectUI.PLUGIN_ID;
- }
-
- @Override
- protected String getProjectElementAttribute(String attr) {
- if (NewWizardAction.ATT_NAME.equals(attr)) {
- return StringPool.EMPTY;
- }
- else if (NewWizardAction.ATT_ICON.equals(attr)) {
- return "/icons/n16/plugin_new.png";
- }
-
- return null;
- }
-
- @Override
- protected String getProjectParameterElementAttribute(String name) {
- if (NewWizardAction.TAG_NAME.equals(name)) {
- return NewWizardAction.ATT_MENUINDEX;
- }
- else if (NewWizardAction.TAG_VALUE.equals(name)) {
- return "100";
- }
-
- return null;
- }
-
- }
-
- private static class Msgs extends NLS {
-
- public static String newLiferayProject;
-
- static {
- initializeMessages(ImportLiferayProjectsWizardAction.class.getName(), Msgs.class);
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewLiferayProfileActionHandler.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewLiferayProfileActionHandler.java
deleted file mode 100644
index 588678741c..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewLiferayProfileActionHandler.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.action;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.SapphireContentAccessor;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.NewLiferayProfile;
-import com.liferay.ide.project.ui.wizard.NewLiferayPluginProjectWizard;
-
-import org.eclipse.sapphire.Element;
-import org.eclipse.sapphire.ElementList;
-import org.eclipse.sapphire.ui.Presentation;
-import org.eclipse.sapphire.ui.SapphirePart;
-import org.eclipse.sapphire.ui.def.DefinitionLoader;
-import org.eclipse.sapphire.ui.forms.PropertyEditorActionHandler;
-import org.eclipse.sapphire.ui.forms.swt.SapphireDialog;
-import org.eclipse.sapphire.ui.forms.swt.SwtPresentation;
-
-/**
- * @author Gregory Amerson
- */
-public class NewLiferayProfileActionHandler extends PropertyEditorActionHandler implements SapphireContentAccessor {
-
- @Override
- protected Object run(Presentation context) {
- if (context instanceof SwtPresentation) {
- SwtPresentation swt = (SwtPresentation)context;
-
- NewLiferayPluginProjectOp op = _op(context);
-
- ElementList profiles = op.getNewLiferayProfiles();
-
- NewLiferayProfile newLiferayProfile = profiles.insert();
-
- DefinitionLoader loader = DefinitionLoader.sdef(NewLiferayPluginProjectWizard.class);
-
- SapphireDialog dialog = new SapphireDialog(
- swt.shell(), newLiferayProfile, loader.dialog("NewLiferayProfile"));
-
- dialog.setBlockOnOpen(true);
-
- int result = dialog.open();
-
- if (result == SapphireDialog.OK) {
- _addToActiveProfiles(op, newLiferayProfile);
- }
- else {
- profiles.remove(newLiferayProfile);
- }
- }
-
- return null;
- }
-
- private void _addToActiveProfiles(final NewLiferayPluginProjectOp op, final NewLiferayProfile newLiferayProfile) {
-
- // should append to current list
-
- String activeProfilesValue = get(op.getActiveProfilesValue());
-
- StringBuilder sb = new StringBuilder();
-
- if (CoreUtil.isNotNullOrEmpty(activeProfilesValue)) {
- sb.append(activeProfilesValue);
- sb.append(',');
- }
-
- sb.append(get(newLiferayProfile.getId()));
-
- op.setActiveProfilesValue(sb.toString());
- }
-
- private NewLiferayPluginProjectOp _op(Presentation context) {
- SapphirePart sapphirePart = context.part();
-
- Element localModelElement = sapphirePart.getLocalModelElement();
-
- return localModelElement.nearest(NewLiferayPluginProjectOp.class);
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewProjectDropDownAction.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewProjectDropDownAction.java
index 09a6a59031..0932c5343d 100644
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewProjectDropDownAction.java
+++ b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/NewProjectDropDownAction.java
@@ -16,7 +16,6 @@
import com.liferay.ide.core.util.CoreUtil;
import com.liferay.ide.core.util.ListUtil;
-import com.liferay.ide.ui.LiferayPerspectiveFactory;
import com.liferay.ide.ui.LiferayWorkspacePerspectiveFactory;
import com.liferay.ide.ui.util.UIUtil;
@@ -175,64 +174,6 @@ public Menu getMenu(Control parent) {
projectItem.fill(fMenu, -1);
}
- break;
-
- case LiferayPerspectiveFactory.ID:
-
- NewWizardAction[] pluginProjectActions = getActionFromDescriptors(_getPluginProjectTypeAttribute());
-
- for (NewWizardAction action : pluginProjectActions) {
- action.setShell(fWizardShell);
-
- ActionContributionItem pluginProjectitem = new ActionContributionItem(action);
-
- pluginProjectitem.fill(fMenu, -1);
- }
-
- NewWizardAction importAction = new ImportLiferayProjectsWizardAction();
-
- importAction.setShell(fWizardShell);
-
- ActionContributionItem item = new ActionContributionItem(importAction);
-
- item.fill(fMenu, -1);
-
- new Separator().fill(fMenu, -1);
-
- NewWizardAction[] pluginNonProjectActions = getActionFromDescriptors(
- getPluginNonprojectTypeAttribute());
-
- for (NewWizardAction action : pluginNonProjectActions) {
- action.setShell(fWizardShell);
-
- ActionContributionItem pluginNonProjectItem = new ActionContributionItem(action);
-
- pluginNonProjectItem.fill(fMenu, -1);
- }
-
- new Separator().fill(fMenu, -1);
-
- NewWizardAction[] noProjectExtraActions = getActionFromDescriptors(getNonprojectExtraTypeAttribute());
-
- for (NewWizardAction action : noProjectExtraActions) {
- action.setShell(fWizardShell);
-
- ActionContributionItem noProjectExtraItem = new ActionContributionItem(action);
-
- noProjectExtraItem.fill(fMenu, -1);
- }
-
- //None Project Right Now!
- NewWizardAction[] projectExtraActions = getExtraProjectActions();
-
- for (NewWizardAction extraAction : projectExtraActions) {
- extraAction.setShell(fWizardShell);
-
- ActionContributionItem extraItem = new ActionContributionItem(extraAction);
-
- extraItem.fill(fMenu, -1);
- }
-
break;
}
@@ -268,12 +209,7 @@ public void init(IWorkbenchWindow window) {
}
public void run(IAction action) {
- if (LiferayPerspectiveFactory.ID.equals(_getPerspectiveID())) {
- getPluginProjectAction().run();
- }
- else {
- getDefaultAction().run();
- }
+ getDefaultAction().run();
}
public void selectionChanged(IAction action, ISelection selection) {
@@ -319,10 +255,6 @@ protected Action[] getServerActions(Shell shell) {
protected Shell fWizardShell;
private static String _getAttribute() {
- if (LiferayPerspectiveFactory.ID.equals(_getPerspectiveID())) {
- return _getPluginProjectTypeAttribute();
- }
-
return _getTypeAttribute();
}
@@ -338,10 +270,6 @@ private static String _getPerspectiveID() {
return perspective.getId();
}
- private static String _getPluginProjectTypeAttribute() {
- return "liferay_plugin_project";
- }
-
private static String _getTypeAttribute() {
return "liferay_project";
}
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/OpenPluginTypeDescriptionDialogAction.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/OpenPluginTypeDescriptionDialogAction.java
deleted file mode 100644
index 89d7681f43..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/OpenPluginTypeDescriptionDialogAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.action;
-
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.ui.dialog.PluginTypeDescriptionDialog;
-import com.liferay.ide.project.ui.wizard.NewLiferayPluginProjectWizard;
-
-import org.eclipse.sapphire.ui.Presentation;
-import org.eclipse.sapphire.ui.SapphireActionHandler;
-import org.eclipse.sapphire.ui.def.DefinitionLoader;
-import org.eclipse.sapphire.ui.forms.swt.SwtPresentation;
-
-/**
- * @author Kuo Zhang
- */
-public class OpenPluginTypeDescriptionDialogAction extends SapphireActionHandler {
-
- @Override
- protected Object run(Presentation context) {
- if (context instanceof SwtPresentation) {
- SwtPresentation swt = (SwtPresentation)context;
-
- NewLiferayPluginProjectOp op = getModelElement().nearest(NewLiferayPluginProjectOp.class);
-
- DefinitionLoader loader = DefinitionLoader.sdef(NewLiferayPluginProjectWizard.class);
-
- final PluginTypeDescriptionDialog dialog = new PluginTypeDescriptionDialog(
- swt.shell(), op, loader.dialog("PluginTypeDescription"));
-
- dialog.setBlockOnOpen(false);
-
- dialog.open();
- }
-
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/SDKProjectsImportAction.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/SDKProjectsImportAction.java
deleted file mode 100644
index 4f6cb97687..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/SDKProjectsImportAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.action;
-
-import com.liferay.ide.project.ui.wizard.ImportSDKProjectsWizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @author Gregory Amerson
- * @author Simon Jiang
- */
-public class SDKProjectsImportAction implements IObjectActionDelegate {
-
- public SDKProjectsImportAction() {
- }
-
- public Display getDisplay() {
- Display display = Display.getCurrent();
-
- if (display == null) {
- display = Display.getDefault();
- }
-
- return display;
- }
-
- @Override
- public void run(IAction action) {
- if (_fSelection instanceof IStructuredSelection) {
- IStructuredSelection fStructureSelection = (IStructuredSelection)_fSelection;
-
- Object[] elems = fStructureSelection.toArray();
-
- IProject project = null;
-
- Object elem = elems[0];
-
- if (elem instanceof IProject) {
- project = (IProject)elem;
- }
-
- ImportSDKProjectsWizard wizard = new ImportSDKProjectsWizard(project.getLocation());
-
- final Display display = getDisplay();
-
- final WizardDialog dialog = new WizardDialog(display.getActiveShell(), wizard);
-
- BusyIndicator.showWhile(
- display,
- new Runnable() {
-
- @Override
- public void run() {
- dialog.open();
- }
-
- });
- }
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- _fSelection = selection;
- }
-
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- private ISelection _fSelection;
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/SelectActiveProfilesActionHandler.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/SelectActiveProfilesActionHandler.java
deleted file mode 100644
index 5d9db41d55..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/action/SelectActiveProfilesActionHandler.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.action;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.ListUtil;
-import com.liferay.ide.core.util.SapphireContentAccessor;
-import com.liferay.ide.core.util.SapphireUtil;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOpMethods;
-import com.liferay.ide.project.core.model.Profile;
-import com.liferay.ide.project.ui.wizard.NewLiferayPluginProjectWizard;
-
-import org.eclipse.sapphire.Element;
-import org.eclipse.sapphire.ElementList;
-import org.eclipse.sapphire.ui.Presentation;
-import org.eclipse.sapphire.ui.def.DefinitionLoader;
-import org.eclipse.sapphire.ui.forms.DialogDef;
-import org.eclipse.sapphire.ui.forms.PropertyEditorActionHandler;
-import org.eclipse.sapphire.ui.forms.swt.SapphireDialog;
-import org.eclipse.sapphire.ui.forms.swt.SwtPresentation;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Gregory Amerson
- */
-public class SelectActiveProfilesActionHandler extends PropertyEditorActionHandler implements SapphireContentAccessor {
-
- @Override
- protected Object run(Presentation context) {
- if (context instanceof SwtPresentation) {
- final SwtPresentation swt = (SwtPresentation)context;
-
- final NewLiferayPluginProjectOp op = getModelElement().nearest(NewLiferayPluginProjectOp.class);
-
- final String previousActiveProfilesValue = get(op.getActiveProfilesValue());
-
- // we need to rebuild the 'selected' list from what is specified in the
- // 'activeProfiles' property
-
- SapphireUtil.clear(op.getSelectedProfiles());
-
- String activeProfiles = get(op.getActiveProfilesValue());
-
- if (CoreUtil.isNotNullOrEmpty(activeProfiles)) {
- final String[] profileIds = activeProfiles.split(",");
-
- if (ListUtil.isNotEmpty(profileIds)) {
- for (String profileId : profileIds) {
- if (!CoreUtil.isNullOrEmpty(profileId)) {
- boolean foundExistingProfile = false;
-
- for (Profile profile : op.getSelectedProfiles()) {
- if (profileId.equals(get(profile.getId()))) {
- foundExistingProfile = true;
-
- break;
- }
- }
-
- if (!foundExistingProfile) {
- ElementList profiles = op.getSelectedProfiles();
-
- Profile newlySelectedProfile = profiles.insert();
-
- newlySelectedProfile.setId(profileId);
- }
- }
- }
- }
- }
-
- DefinitionLoader loader = DefinitionLoader.sdef(NewLiferayPluginProjectWizard.class);
-
- final CustomSapphireDialog dialog = new CustomSapphireDialog(
- swt.shell(), op, loader.dialog("SelectActiveProfiles"));
-
- dialog.setBlockOnOpen(true);
-
- int result = dialog.open();
-
- if (result == SapphireDialog.CANCEL) {
-
- // restore previous value
-
- op.setActiveProfilesValue(previousActiveProfilesValue);
- }
- else {
- NewLiferayPluginProjectOpMethods.updateActiveProfilesValue(op, op.getSelectedProfiles());
- }
- }
-
- return null;
- }
-
- private static class CustomSapphireDialog extends SapphireDialog {
-
- public CustomSapphireDialog(Shell shell, Element element, DefinitionLoader.Reference definition) {
- super(shell, element, definition);
- }
-
- @Override
- protected boolean performOkOperation() {
- return true;
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/pref/PropertyPreferencePage.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/pref/PropertyPreferencePage.java
index 2c2f1ecc26..a9357ac023 100644
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/pref/PropertyPreferencePage.java
+++ b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/pref/PropertyPreferencePage.java
@@ -52,8 +52,8 @@
import org.eclipse.ui.dialogs.ListDialog;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.internal.ide.dialogs.ResourceComparator;
import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
@@ -281,7 +281,7 @@ private void _openProjectSettings() {
@Override
protected Control createDialogArea(Composite container) {
Control area = super.createDialogArea(container);
- getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
+ getTableViewer().setComparator(new ResourceComparator(ResourceComparator.NAME));
return area;
}
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizard.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizard.java
deleted file mode 100644
index 491b3c3818..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizard.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.wizard;
-
-import com.liferay.ide.project.core.BinaryProjectImportDataModelProvider;
-import com.liferay.ide.project.core.SDKProjectsImportDataModelProvider;
-import com.liferay.ide.project.ui.ProjectUI;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.ui.LiferayPerspectiveFactory;
-import com.liferay.ide.ui.util.UIUtil;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-/**
- * @author Kamesh Sampath
- * @author Cindy Li
- */
-@SuppressWarnings("restriction")
-public class BinaryProjectImportWizard extends DataModelWizard implements IWorkbenchWizard {
-
- public BinaryProjectImportWizard() {
- this((IDataModel)null);
- }
-
- public BinaryProjectImportWizard(IDataModel dataModel) {
- super(dataModel);
-
- setWindowTitle(Msgs.importProject);
- setDefaultPageImageDescriptor(
- ProjectUI.imageDescriptorFromPlugin(ProjectUI.PLUGIN_ID, "/icons/wizban/import_wiz.png"));
- }
-
- public BinaryProjectImportWizard(SDK sdk) {
- this((IDataModel)null);
-
- this.sdk = sdk;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- protected void doAddPages() {
- if (sdk != null) {
- IDataModel model = getDataModel();
-
- model.setStringProperty(SDKProjectsImportDataModelProvider.LIFERAY_SDK_NAME, sdk.getName());
- }
-
- pluginBinaryProjectImportWizardPage = new BinaryProjectImportWizardPage(getDataModel(), "pageOne");
-
- addPage(pluginBinaryProjectImportWizardPage);
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new BinaryProjectImportDataModelProvider();
- }
-
- @Override
- protected void postPerformFinish() throws InvocationTargetException {
- UIUtil.switchToLiferayPerspective(LiferayPerspectiveFactory.ID, true);
-
- super.postPerformFinish();
- }
-
- protected BinaryProjectImportWizardPage pluginBinaryProjectImportWizardPage;
- protected SDK sdk;
-
- private static class Msgs extends NLS {
-
- public static String importProject;
-
- static {
- initializeMessages(BinaryProjectImportWizard.class.getName(), Msgs.class);
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizard.properties b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizard.properties
deleted file mode 100644
index 49536b20c8..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizard.properties
+++ /dev/null
@@ -1 +0,0 @@
-importProject=Import Project
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizardPage.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizardPage.java
deleted file mode 100644
index e2854b200d..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizardPage.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.wizard;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.core.util.StringPool;
-import com.liferay.ide.project.core.BinaryProjectRecord;
-import com.liferay.ide.project.core.ISDKProjectsImportDataModelProperties;
-import com.liferay.ide.project.core.util.ProjectImportUtil;
-import com.liferay.ide.sdk.core.ISDKConstants;
-import com.liferay.ide.ui.util.SWTUtil;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.server.ui.ServerUIUtil;
-import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
-
-/**
- * @author Kamesh Sampath
- */
-@SuppressWarnings("restriction")
-public class BinaryProjectImportWizardPage
- extends DataModelFacetCreationWizardPage implements ISDKProjectsImportDataModelProperties {
-
- public BinaryProjectImportWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
-
- setTitle(Msgs.importLiferayBinaryPlugin);
- setDescription(Msgs.selectBinaryPlugin);
- }
-
- protected void createBinaryLocationField(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
-
- label.setText(Msgs.binaryPluginFile);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- binariesLocation = SWTUtil.createSingleText(parent, 1);
-
- binariesLocation.addModifyListener(
- new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- if (binariesLocation.isFocusControl() && CoreUtil.isNullOrEmpty(binariesLocation.getText())) {
- setErrorMessage("Select a binary to import.");
- getDataModel().setProperty(SELECTED_PROJECTS, null);
- }
- else {
- File binaryFile = new File(binariesLocation.getText());
-
- if (ProjectImportUtil.isValidLiferayPlugin(binaryFile)) {
- selectedBinary = new BinaryProjectRecord(new File(binariesLocation.getText()));
-
- getDataModel().setProperty(SELECTED_PROJECTS, new Object[] {selectedBinary});
- }
- else {
- setErrorMessage(Msgs.selectValidLiferayPluginBinary);
- getDataModel().setProperty(SELECTED_PROJECTS, null);
- }
- }
- }
-
- });
-
- Button browse = SWTUtil.createButton(parent, Msgs.browse);
-
- browse.addSelectionListener(
- new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- doBrowse();
- }
-
- });
- }
-
- protected void createPluginsSDKField(Composite parent) {
- SelectionAdapter selectionAdapter = new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- synchHelper.synchAllUIWithModel();
- validatePage(true);
- }
-
- };
-
- new LiferaySDKField(
- parent, getDataModel(), selectionAdapter, LIFERAY_SDK_NAME, synchHelper, Msgs.selectSDKLabel);
- }
-
- protected void createSDKLocationField(Composite topComposite) {
- SWTUtil.createLabel(topComposite, SWT.LEAD, Msgs.liferayPluginSDKLocationLabel, 1);
-
- sdkLocation = SWTUtil.createText(topComposite, 1);
-
- GridData sdkLocationLayoutData = (GridData)sdkLocation.getLayoutData();
-
- sdkLocationLayoutData.widthHint = 300;
-
- synchHelper.synchText(sdkLocation, SDK_LOCATION, null);
-
- SWTUtil.createLabel(topComposite, SWT.LEAD, StringPool.EMPTY, 1);
- }
-
- protected void createSDKVersionField(Composite topComposite) {
- SWTUtil.createLabel(topComposite, SWT.LEAD, Msgs.liferayPluginSDKVersionLabel, 1);
-
- sdkVersion = SWTUtil.createText(topComposite, 1);
-
- synchHelper.synchText(sdkVersion, SDK_VERSION, null);
-
- SWTUtil.createLabel(topComposite, StringPool.EMPTY, 1);
- }
-
- protected void createTargetRuntimeGroup(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
-
- label.setText(Msgs.liferayTargetRuntimeLabel);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- serverTargetCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
-
- serverTargetCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-
- Button newServerTargetButton = new Button(parent, SWT.NONE);
-
- newServerTargetButton.setText(Msgs.newButton);
- newServerTargetButton.addSelectionListener(
- new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- final DataModelPropertyDescriptor[] preAdditionDescriptors = model.getValidPropertyDescriptors(
- FACET_RUNTIME);
-
- boolean oK = ServerUIUtil.showNewRuntimeWizard(getShell(), getModuleTypeID(), null, "com.liferay.");
-
- if (oK) {
- DataModelPropertyDescriptor[] postAdditionDescriptors = model.getValidPropertyDescriptors(
- FACET_RUNTIME);
-
- Object[] preAddition = new Object[preAdditionDescriptors.length];
-
- for (int i = 0; i < preAddition.length; i++) {
- preAddition[i] = preAdditionDescriptors[i].getPropertyValue();
- }
-
- Object[] postAddition = new Object[postAdditionDescriptors.length];
-
- for (int i = 0; i < postAddition.length; i++) {
- postAddition[i] = postAdditionDescriptors[i].getPropertyValue();
- }
-
- Object newAddition = CoreUtil.getNewObject(preAddition, postAddition);
-
- if (newAddition != null) {
- model.setProperty(FACET_RUNTIME, newAddition);
- }
- }
- }
-
- });
-
- Control[] deps = {newServerTargetButton};
-
- synchHelper.synchCombo(serverTargetCombo, FACET_RUNTIME, deps);
-
- if ((serverTargetCombo.getSelectionIndex() == -1) && (serverTargetCombo.getVisibleItemCount() != 0)) {
- serverTargetCombo.select(0);
- }
- }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- Composite topComposite = SWTUtil.createTopComposite(parent, 3);
-
- GridLayout gl = new GridLayout(3, false);
-
- // gl.marginLeft = 5;
-
- topComposite.setLayout(gl);
-
- topComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
-
- createBinaryLocationField(topComposite);
-
- createPluginsSDKField(topComposite);
-
- SWTUtil.createVerticalSpacer(topComposite, 1, 3);
-
- createSDKLocationField(topComposite);
- createSDKVersionField(topComposite);
-
- SWTUtil.createVerticalSpacer(topComposite, 1, 3);
-
- createTargetRuntimeGroup(topComposite);
-
- return topComposite;
- }
-
- protected void doBrowse() {
- FileDialog fd = new FileDialog(getShell(), SWT.OPEN);
-
- fd.setFilterExtensions(ISDKConstants.BINARY_PLUGIN_EXTENSIONS);
-
- String filterPath = binariesLocation.getText();
-
- if (filterPath != null) {
- fd.setFilterPath(filterPath);
- fd.setText(NLS.bind(Msgs.selectLiferayPluginBinaryFolderPath, filterPath));
- }
- else {
- fd.setText(Msgs.selectLiferayPluginBinaryFolder);
- }
-
- if (CoreUtil.isNullOrEmpty(binariesLocation.getText())) {
- fd.setFilterPath(binariesLocation.getText());
- }
-
- String binaryfile = fd.open();
-
- if (!CoreUtil.isNullOrEmpty(binaryfile)) {
- binariesLocation.setText(binaryfile);
- File binaryFile = new File(binaryfile);
-
- if (ProjectImportUtil.isValidLiferayPlugin(binaryFile)) {
- selectedBinary = new BinaryProjectRecord(new File(binaryfile));
-
- getDataModel().setProperty(SELECTED_PROJECTS, new Object[] {selectedBinary});
- }
- else {
- setErrorMessage(Msgs.selectValidLiferayPluginBinary);
- }
- }
- }
-
- protected IProject[] getProjectsInWorkspace() {
- if (wsProjects == null) {
- IWorkspace pluginWorkspace = IDEWorkbenchPlugin.getPluginWorkspace();
-
- IWorkspaceRoot root = pluginWorkspace.getRoot();
-
- wsProjects = root.getProjects();
- }
-
- return wsProjects;
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[] {SDK_LOCATION, SDK_VERSION, SELECTED_PROJECTS, FACET_RUNTIME};
- }
-
- protected void handleFileBrowseButton(final Text text) {
- DirectoryDialog dd = new DirectoryDialog(getShell(), SWT.OPEN);
-
- dd.setText(Msgs.selectLiferayPluginSDKFolder);
-
- if (!CoreUtil.isNullOrEmpty(sdkLocation.getText())) {
- dd.setFilterPath(sdkLocation.getText());
- }
-
- String dir = dd.open();
-
- if (!CoreUtil.isNullOrEmpty(dir)) {
- sdkLocation.setText(dir);
-
- synchHelper.synchAllUIWithModel();
-
- validatePage();
- }
- }
-
- protected boolean isProjectInWorkspace(String projectName) {
- if (projectName == null) {
- return false;
- }
-
- IProject[] workspaceProjects = getProjectsInWorkspace();
-
- for (IProject project : workspaceProjects) {
- if (FileUtil.nameEquals(project, projectName)) {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- protected boolean showValidationErrorsOnEnter() {
- return true;
- }
-
- protected Text binariesLocation;
- protected long lastModified;
- protected String lastPath;
- protected Text sdkLocation;
- protected Text sdkVersion;
- protected BinaryProjectRecord selectedBinary;
- protected Combo serverTargetCombo;
- protected IProject[] wsProjects;
-
- private static class Msgs extends NLS {
-
- public static String binaryPluginFile;
- public static String browse;
- public static String importLiferayBinaryPlugin;
- public static String liferayPluginSDKLocationLabel;
- public static String liferayPluginSDKVersionLabel;
- public static String liferayTargetRuntimeLabel;
- public static String newButton;
- public static String selectBinaryPlugin;
- public static String selectLiferayPluginBinaryFolder;
- public static String selectLiferayPluginBinaryFolderPath;
- public static String selectLiferayPluginSDKFolder;
- public static String selectSDKLabel;
- public static String selectValidLiferayPluginBinary;
-
- static {
- initializeMessages(BinaryProjectImportWizardPage.class.getName(), Msgs.class);
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizardPage.properties b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizardPage.properties
deleted file mode 100644
index 5a5c5d9485..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectImportWizardPage.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-binaryPluginFile=Binary plugin file (war)
-browse=Browse...
-importLiferayBinaryPlugin=Import a Liferay Binary Plugin
-liferayPluginSDKLocationLabel=Liferay Plugin SDK Location:
-liferayPluginSDKVersionLabel=Liferay Plugin SDK Version:
-liferayTargetRuntimeLabel=Liferay target runtime:
-newButton=New...
-selectBinaryPlugin=Select a binary plugin (war)to import as new Liferay Plugin Project
-selectLiferayPluginBinaryFolder=Select Liferay Plugin binary folder -
-selectLiferayPluginBinaryFolderPath=Select Liferay Plugin binary folder - {0}
-selectLiferayPluginSDKFolder=Select Liferay Plugin SDK folder
-selectSDKLabel=Select SDK to copy into:
-selectValidLiferayPluginBinary=Select a valid Liferay Plugin Binary
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizard.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizard.java
deleted file mode 100644
index 9368ac095f..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizard.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.wizard;
-
-import com.liferay.ide.project.core.BinaryProjectsImportDataModelProvider;
-import com.liferay.ide.project.core.SDKProjectsImportDataModelProvider;
-import com.liferay.ide.project.ui.ProjectUI;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.ui.LiferayPerspectiveFactory;
-import com.liferay.ide.ui.util.UIUtil;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-/**
- * @author Kamesh Sampath
- * @author Cindy Li
- */
-@SuppressWarnings("restriction")
-public class BinaryProjectsImportWizard extends DataModelWizard implements IWorkbenchWizard {
-
- public BinaryProjectsImportWizard() {
- this((IDataModel)null);
-
- dataModelProvider = new BinaryProjectsImportDataModelProvider();
- }
-
- public BinaryProjectsImportWizard(IDataModel dataModel) {
- super(dataModel);
-
- setWindowTitle(Msgs.importProjects);
-
- setDefaultPageImageDescriptor(
- ProjectUI.imageDescriptorFromPlugin(ProjectUI.PLUGIN_ID, "/icons/wizban/import_wiz.png"));
- }
-
- public BinaryProjectsImportWizard(SDK sdk) {
- this((IDataModel)null);
-
- this.sdk = sdk;
- }
-
- @Override
- public boolean canFinish() {
- return getDataModel().isValid();
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- protected void doAddPages() {
- if (sdk != null) {
- IDataModel model = getDataModel();
-
- model.setStringProperty(SDKProjectsImportDataModelProvider.LIFERAY_SDK_NAME, sdk.getName());
- }
-
- pluginBinaryProjectsImportWizardPage = new BinaryProjectsImportWizardPage(getDataModel(), "pageOne");
-
- addPage(pluginBinaryProjectsImportWizardPage);
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return dataModelProvider;
- }
-
- @Override
- protected void postPerformFinish() throws InvocationTargetException {
- UIUtil.switchToLiferayPerspective(LiferayPerspectiveFactory.ID, true);
-
- super.postPerformFinish();
- }
-
- /**
- * (non-Javadoc)
- * @see DataModelWizard#runForked()
- */
- @Override
- protected boolean runForked() {
- return false;
- }
-
- protected BinaryProjectsImportDataModelProvider dataModelProvider;
- protected BinaryProjectsImportWizardPage pluginBinaryProjectsImportWizardPage;
- protected SDK sdk;
-
- private static class Msgs extends NLS {
-
- public static String importProjects;
-
- static {
- initializeMessages(BinaryProjectsImportWizard.class.getName(), Msgs.class);
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizard.properties b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizard.properties
deleted file mode 100644
index edf537228d..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizard.properties
+++ /dev/null
@@ -1 +0,0 @@
-importProjects=Import Projects
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizardPage.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizardPage.java
deleted file mode 100644
index 4b9eeaa321..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizardPage.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.wizard;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.ListUtil;
-import com.liferay.ide.core.util.StringPool;
-import com.liferay.ide.project.core.BinaryProjectRecord;
-import com.liferay.ide.project.core.ISDKProjectsImportDataModelProperties;
-import com.liferay.ide.project.core.util.ProjectImportUtil;
-import com.liferay.ide.project.ui.ProjectUI;
-import com.liferay.ide.ui.util.SWTUtil;
-
-import java.io.File;
-
-import java.lang.reflect.InvocationTargetException;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.JFacePreferences;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.StyledCellLabelProvider;
-import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @author Kamesh Sampath
- */
-@SuppressWarnings("restriction")
-public class BinaryProjectsImportWizardPage
- extends SDKProjectsImportWizardPage implements ISDKProjectsImportDataModelProperties {
-
- public BinaryProjectsImportWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
-
- setTitle(Msgs.importLiferayBinaryPlugins);
- setDescription(Msgs.selectBinaryPlugins);
- }
-
- @Override
- public Object[] getProjectRecords() {
- List binaryProjectRecords = new ArrayList<>();
-
- for (Object project : selectedProjects) {
- BinaryProjectRecord binaryProjectRecord = (BinaryProjectRecord)project;
-
- if (isProjectInWorkspace(binaryProjectRecord.getLiferayPluginName())) {
- binaryProjectRecord.setConflicts(true);
- }
-
- binaryProjectRecords.add(binaryProjectRecord);
- }
-
- return binaryProjectRecords.toArray(new BinaryProjectRecord[0]);
- }
-
- public void updateBinariesList() {
- String path = binariesLocation.getText();
-
- if (path != null) {
- updateProjectsList(path);
- }
- }
-
- @Override
- public void updateProjectsList(String path) {
-
- // on an empty path empty selectedProjects
-
- if ((path == null) || (path.length() == 0)) {
- setMessage(StringPool.EMPTY);
-
- selectedProjects = new BinaryProjectRecord[0];
-
- projectsList.refresh(true);
-
- projectsList.setCheckedElements(selectedProjects);
-
- setPageComplete(ListUtil.isNotEmpty(projectsList.getCheckedElements()));
-
- lastPath = path;
-
- return;
- }
-
- // Check if the direcotry is the Plugins SDK folder
-
- String sdkLocationPath = sdkLocation.getText();
-
- if ((sdkLocationPath != null) && sdkLocationPath.equals(path)) {
- path = sdkLocationPath + "/dist";
- }
-
- final File directory = new File(path);
-
- long modified = directory.lastModified();
-
- if (path.equals(lastPath) && (lastModified == modified)) {
-
- // since the file/folder was not modified and the path did not
- // change, no refreshing is required
-
- if (selectedProjects.length == 0) {
- setMessage(StringPool.EMPTY, WARNING);
- }
-
- return;
- }
-
- lastPath = path;
-
- lastModified = modified;
-
- final boolean dirSelected = true;
-
- try {
- getContainer().run(
- true, true,
- new IRunnableWithProgress() {
-
- /**
- * (non-Javadoc)
- *
- * @see IRunnableWithProgress#run(org .eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(StringPool.EMPTY, 100);
-
- selectedProjects = new BinaryProjectRecord[0];
-
- Collection projectBinaries = new ArrayList<>();
-
- monitor.worked(10);
-
- if (dirSelected && directory.isDirectory()) {
- if (!ProjectImportUtil.collectBinariesFromDirectory(
- projectBinaries, directory, true, monitor)) {
-
- return;
- }
-
- selectedProjects = new BinaryProjectRecord[projectBinaries.size()];
-
- int index = 0;
-
- monitor.worked(50);
-
- monitor.subTask(StringPool.EMPTY);
-
- for (File binaryFile : projectBinaries) {
- selectedProjects[index++] = new BinaryProjectRecord(binaryFile);
- }
-
- // for ( File liferayProjectDir : liferayProjectDirs ) {
- // selectedProjects[index++] = new ProjectRecord( liferayProjectDir );
- // }
-
- }
- else {
- monitor.worked(60);
- }
-
- monitor.done();
- }
-
- });
- }
- catch (InvocationTargetException ite) {
- ProjectUI.logError(ite);
- }
- catch (InterruptedException ie) {
-
- // Nothing to do if the user interrupts.
-
- }
-
- projectsList.refresh(true);
-
- setPageComplete(ListUtil.isNotEmpty(projectsList.getCheckedElements()));
-
- if (selectedProjects.length == 0) {
- setMessage(StringPool.EMPTY, WARNING);
- }
-
- Object[] checkedBinaries = projectsList.getCheckedElements();
-
- if (ListUtil.isNotEmpty(checkedBinaries)) {
- selectedProjects = new BinaryProjectRecord[checkedBinaries.length];
-
- for (int i = 0; i < checkedBinaries.length; i++) {
- selectedProjects[i] = (BinaryProjectRecord)checkedBinaries[i];
- }
-
- getDataModel().setProperty(SELECTED_PROJECTS, selectedProjects);
- }
- }
-
- protected void createBinaryLocationField(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
-
- label.setText(Msgs.selectPluginsRootDirectoryLabel);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- binariesLocation = SWTUtil.createSingleText(parent, 1);
-
- binariesLocation.addModifyListener(
- new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- if (binariesLocation.isFocusControl() && CoreUtil.isNullOrEmpty(binariesLocation.getText())) {
- setMessage(null);
- }
- }
-
- });
-
- Button browse = SWTUtil.createButton(parent, Msgs.browse);
-
- browse.addSelectionListener(
- new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- doBrowse();
- }
-
- });
- }
-
- @Override
- protected void createPluginsSDKField(Composite parent) {
- createBinaryLocationField(parent);
-
- SelectionAdapter selectionAdapter = new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- synchHelper.synchAllUIWithModel();
- validatePage(true);
- updateBinariesList();
- }
-
- };
-
- new LiferaySDKField(
- parent, getDataModel(), selectionAdapter, LIFERAY_SDK_NAME, synchHelper, Msgs.selectSDKLabel);
- }
-
- @Override
- protected void createProjectsList(Composite workArea) {
- super.createProjectsList(workArea);
-
- labelProjectsList.setText(Msgs.binaryPluginsLabel);
- }
-
- @Override
- protected IBaseLabelProvider createProjectsListLabelProvider() {
- return new BinaryLabelProvider();
- }
-
- protected void doBrowse() {
- DirectoryDialog dd = new DirectoryDialog(getShell(), SWT.OPEN);
-
- String filterPath = binariesLocation.getText();
-
- if (filterPath != null) {
- dd.setFilterPath(filterPath);
- dd.setText(NLS.bind(Msgs.selectRootDirectoryPath, filterPath));
- }
- else {
- dd.setText(Msgs.selectRootDirectory);
- }
-
- if (CoreUtil.isNullOrEmpty(binariesLocation.getText())) {
- dd.setFilterPath(binariesLocation.getText());
- }
-
- String dir = dd.open();
-
- if (!CoreUtil.isNullOrEmpty(dir)) {
- binariesLocation.setText(dir);
- updateProjectsList(dir);
- }
- }
-
- @Override
- protected void enter() {
- }
-
- @Override
- protected void handleCheckStateChangedEvent(CheckStateChangedEvent event) {
- getDataModel().setProperty(SELECTED_PROJECTS, projectsList.getCheckedElements());
-
- setPageComplete(ListUtil.isNotEmpty(projectsList.getCheckedElements()));
- }
-
- @Override
- protected void handleDeselectAll(SelectionEvent e) {
- projectsList.setCheckedElements(new Object[0]);
-
- getDataModel().setProperty(SELECTED_PROJECTS, projectsList.getCheckedElements());
-
- validatePage(true);
-
- setPageComplete(false);
- }
-
- @Override
- protected void handleRefresh(SelectionEvent e) {
-
- // force a project refresh
-
- lastModified = -1;
-
- updateProjectsList(binariesLocation.getText());
-
- projectsList.setCheckedElements(new Object[0]);
-
- getDataModel().setProperty(SELECTED_PROJECTS, projectsList.getCheckedElements());
-
- validatePage(true);
-
- setPageComplete(false);
- }
-
- @Override
- protected void handleSelectAll(SelectionEvent e) {
- for (Object project : selectedProjects) {
- BinaryProjectRecord binaryProject = (BinaryProjectRecord)project;
-
- if (binaryProject.isConflicts()) {
- projectsList.setChecked(binaryProject, false);
- }
- else {
- projectsList.setChecked(binaryProject, true);
- }
- }
-
- getDataModel().setProperty(SELECTED_PROJECTS, projectsList.getCheckedElements());
-
- validatePage(true);
- }
-
- protected Text binariesLocation;
-
- protected final class BinaryLabelProvider extends StyledCellLabelProvider {
-
- public BinaryLabelProvider() {
- _colorRegistry.put(_GREY_COLOR, new RGB(128, 128, 128));
- _greyedStyler = StyledString.createColorRegistryStyler(_GREY_COLOR, null);
- }
-
- public Image getImage() {
- ProjectUI projectUI = ProjectUI.getDefault();
-
- ImageRegistry imageRegistry = projectUI.getImageRegistry();
-
- return imageRegistry.get(ProjectUI.WAR_IMAGE_ID);
- }
-
- /**
- * (non-Javadoc)
- *
- * @see StyledCellLabelProvider#update(ViewerCell)
- */
- @Override
- public void update(ViewerCell cell) {
- Object obj = cell.getElement();
-
- BinaryProjectRecord binaryProjectRecord = null;
-
- if (obj instanceof BinaryProjectRecord) {
- binaryProjectRecord = (BinaryProjectRecord)obj;
- }
-
- StyledString styledString = null;
-
- if (binaryProjectRecord.isConflicts()) {
-
- // TODO:show warning that some project exists, similar to what we get when
- // importing projects with
- // standard import existing project into workspace
-
- styledString = new StyledString(binaryProjectRecord.getBinaryName(), _greyedStyler);
-
- styledString.append(" (" + binaryProjectRecord.getFilePath() + ") ", _greyedStyler);
- }
- else {
- styledString = new StyledString(
- binaryProjectRecord.getBinaryName(),
- StyledString.createColorRegistryStyler(
- JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR,
- JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR));
-
- styledString.append(" (" + binaryProjectRecord.getFilePath() + ") ", _greyedStyler);
- }
-
- cell.setImage(getImage());
- cell.setText(styledString.getString());
- cell.setStyleRanges(styledString.getStyleRanges());
-
- super.update(cell);
- }
-
- private static final String _GREY_COLOR = "already_exist_element_color";
-
- private final ColorRegistry _colorRegistry = JFaceResources.getColorRegistry();
- private final StyledString.Styler _greyedStyler;
-
- }
-
- private static class Msgs extends NLS {
-
- public static String binaryPluginsLabel;
- public static String browse;
- public static String importLiferayBinaryPlugins;
- public static String selectBinaryPlugins;
- public static String selectPluginsRootDirectoryLabel;
- public static String selectRootDirectory;
- public static String selectRootDirectoryPath;
- public static String selectSDKLabel;
-
- static {
- initializeMessages(BinaryProjectsImportWizardPage.class.getName(), Msgs.class);
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizardPage.properties b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizardPage.properties
deleted file mode 100644
index a02519b6a1..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/BinaryProjectsImportWizardPage.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-binaryPluginsLabel=Binary plugins:
-browse=Browse...
-importLiferayBinaryPlugins=Import Liferay Binary Plugins
-selectBinaryPlugins=Select binary plugins (wars) to import as new Liferay Plugin Projects
-selectPluginsRootDirectoryLabel=Select plugins root directory:
-selectRootDirectory=Select root directory
-selectRootDirectoryPath=Select root directory - {0}
-selectSDKLabel=Select SDK to copy into:
diff --git a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/ImportSDKProjectsCheckboxCustomPart.java b/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/ImportSDKProjectsCheckboxCustomPart.java
deleted file mode 100644
index 8407c8512a..0000000000
--- a/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/ImportSDKProjectsCheckboxCustomPart.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.project.ui.wizard;
-
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.core.util.SapphireUtil;
-import com.liferay.ide.project.core.ProjectRecord;
-import com.liferay.ide.project.core.model.ProjectNamedItem;
-import com.liferay.ide.project.core.model.SDKProjectsImportOp;
-import com.liferay.ide.project.core.util.ProjectImportUtil;
-import com.liferay.ide.project.core.util.ProjectUtil;
-import com.liferay.ide.project.ui.ProjectUI;
-
-import java.io.File;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
-import org.eclipse.sapphire.ElementList;
-import org.eclipse.sapphire.FilteredListener;
-import org.eclipse.sapphire.PropertyContentEvent;
-import org.eclipse.sapphire.PropertyDef;
-import org.eclipse.sapphire.Value;
-import org.eclipse.sapphire.modeling.Path;
-import org.eclipse.sapphire.modeling.Status;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * @author Simon Jiang
- */
-public class ImportSDKProjectsCheckboxCustomPart extends ProjectsCheckboxCustomPart {
-
- @Override
- public void dispose() {
- if (_listener != null) {
- Value
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.server.core/pom.xml b/tools/plugins/com.liferay.ide.server.core/pom.xml
index 04cf4685fc..044d40665e 100644
--- a/tools/plugins/com.liferay.ide.server.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.server.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.server.core
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalContext.java b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/PortalContext.java
similarity index 97%
rename from tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalContext.java
rename to tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/PortalContext.java
index 04b25dd23a..7aba4e3334 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalContext.java
+++ b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/PortalContext.java
@@ -12,7 +12,7 @@
* details.
*/
-package com.liferay.ide.server.tomcat.core;
+package com.liferay.ide.server.core;
import java.util.Locale;
diff --git a/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java
index 0b97b4eb8b..83b66e0189 100644
--- a/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java
+++ b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java
@@ -493,8 +493,26 @@ public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy launch, IPr
launchEnvrionment.put("JAVA_HOME", vmInstallLocation.getAbsolutePath());
+ DebugPlugin debugplugin = DebugPlugin.getDefault();
+
+ ILaunchManager launchManager = debugplugin.getLaunchManager();
+
+ Map nativeEnvrionment = launchManager.getNativeEnvironmentCasePreserved();
+
+ String pathEnvironment = nativeEnvrionment.get("PATH");
+
+ if (Objects.nonNull(pathEnvironment)) {
+ try {
+ launchEnvrionment.put("PATH", jrePath.toOSString() + ":" + pathEnvironment);
+ }
+ catch (Exception exception) {
+ }
+ }
+
launch.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, launchEnvrionment);
+ launch.setAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, Boolean.FALSE);
+
if (jrePath != null) {
IPath toolsPath = jrePath.append("lib/tools.jar");
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalTomcatBundle.java b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalTomcatBundle.java
similarity index 97%
rename from tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalTomcatBundle.java
rename to tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalTomcatBundle.java
index 2759eb4238..ec83aaef13 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalTomcatBundle.java
+++ b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalTomcatBundle.java
@@ -12,14 +12,14 @@
* details.
*/
-package com.liferay.ide.server.tomcat.core;
+package com.liferay.ide.server.core.portal;
import com.liferay.ide.core.util.CoreUtil;
import com.liferay.ide.core.util.FileListing;
import com.liferay.ide.core.util.FileUtil;
import com.liferay.ide.server.core.LiferayServerCore;
-import com.liferay.ide.server.core.portal.AbstractPortalBundle;
-import com.liferay.ide.server.tomcat.core.util.LiferayTomcatUtil;
+import com.liferay.ide.server.core.PortalContext;
+import com.liferay.ide.server.util.ServerUtil;
import java.io.File;
import java.io.FileNotFoundException;
@@ -102,7 +102,7 @@ public IPath getAppServerPortalDir() {
_appServerPortalDir = Stream.of(
files
).filter(
- LiferayTomcatUtil::isLiferayPortal
+ ServerUtil::isLiferayPortal
).map(
File::getName
).map(
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalTomcatBundleFactory.java b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalTomcatBundleFactory.java
similarity index 89%
rename from tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalTomcatBundleFactory.java
rename to tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalTomcatBundleFactory.java
index 503939faa0..58a13f81f7 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/PortalTomcatBundleFactory.java
+++ b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalTomcatBundleFactory.java
@@ -12,11 +12,9 @@
* details.
*/
-package com.liferay.ide.server.tomcat.core;
+package com.liferay.ide.server.core.portal;
import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.server.core.portal.AbstractPortalBundleFactory;
-import com.liferay.ide.server.core.portal.PortalBundle;
import java.util.Map;
diff --git a/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/util/ServerUtil.java b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/util/ServerUtil.java
index 359321bea8..94019e1a36 100644
--- a/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/util/ServerUtil.java
+++ b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/util/ServerUtil.java
@@ -1199,6 +1199,22 @@ public static boolean isLiferayFacet(IProjectFacet projectFacet) {
return false;
}
+ public static boolean isLiferayPortal(File file) {
+ File webXMLFile = new File(file, "WEB-INF/web.xml");
+
+ if (FileUtil.notExists(webXMLFile)) {
+ return false;
+ }
+
+ String fileContents = FileUtil.readContents(webXMLFile);
+
+ if (fileContents.contains("id=\"Liferay_Portal\"")) {
+ return true;
+ }
+
+ return false;
+ }
+
public static boolean isLiferayRuntime(BridgedRuntime bridgedRuntime) {
if (bridgedRuntime != null) {
String id = bridgedRuntime.getProperty("id");
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/.classpath b/tools/plugins/com.liferay.ide.server.tomcat.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/.classpath
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/.project b/tools/plugins/com.liferay.ide.server.tomcat.core/.project
index 172a5a4536..4b152ca3bb 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/.project
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525012
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.server.tomcat.core/.settings/org.eclipse.jdt.core.prefs
index ec1937b3f3..43c8d716b1 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,15 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.server.tomcat.core/META-INF/MANIFEST.MF
index 97f3b02a5e..a5bd310e69 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.server.tomcat.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.server.tomcat.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.server.tomcat.core.LiferayTomcatPlugin
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -19,7 +20,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.jst.server.tomcat.core,
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.server.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.server.tomcat.core,
com.liferay.ide.server.tomcat.core.job,
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/plugin.xml b/tools/plugins/com.liferay.ide.server.tomcat.core/plugin.xml
index 152bcead96..0663797327 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/plugin.xml
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/plugin.xml
@@ -291,13 +291,4 @@
>
-
-
-
-
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/pom.xml b/tools/plugins/com.liferay.ide.server.tomcat.core/pom.xml
index 93d7bb2ae7..6e31d2c972 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.server.tomcat.core
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/util/LiferayTomcatUtil.java b/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/util/LiferayTomcatUtil.java
index d2c4cf75bf..817feb2a4c 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/util/LiferayTomcatUtil.java
+++ b/tools/plugins/com.liferay.ide.server.tomcat.core/src/com/liferay/ide/server/tomcat/core/util/LiferayTomcatUtil.java
@@ -23,13 +23,13 @@
import com.liferay.ide.server.core.ILiferayRuntime;
import com.liferay.ide.server.core.IPluginPublisher;
import com.liferay.ide.server.core.LiferayServerCore;
+import com.liferay.ide.server.core.PortalContext;
import com.liferay.ide.server.tomcat.core.ILiferayTomcatConstants;
import com.liferay.ide.server.tomcat.core.ILiferayTomcatRuntime;
import com.liferay.ide.server.tomcat.core.ILiferayTomcatServer;
import com.liferay.ide.server.tomcat.core.LiferayTomcatPlugin;
import com.liferay.ide.server.tomcat.core.LiferayTomcatRuntime70;
import com.liferay.ide.server.tomcat.core.LiferayTomcatServerBehavior;
-import com.liferay.ide.server.tomcat.core.PortalContext;
import com.liferay.ide.server.util.LiferayPortalValueLoader;
import com.liferay.ide.server.util.ServerUtil;
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.ui/.classpath b/tools/plugins/com.liferay.ide.server.tomcat.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.server.tomcat.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.ui/.project b/tools/plugins/com.liferay.ide.server.tomcat.ui/.project
index ecb3e3a5a8..5b67d736c1 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.ui/.project
+++ b/tools/plugins/com.liferay.ide.server.tomcat.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525013
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.server.tomcat.ui/.settings/org.eclipse.jdt.core.prefs
index 45c7895355..2e7b789d3e 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.server.tomcat.ui/.settings/org.eclipse.jdt.core.prefs
@@ -5,8 +5,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -59,6 +60,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -88,5 +90,5 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.server.tomcat.ui/META-INF/MANIFEST.MF
index e17df78520..b494c692d1 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.server.tomcat.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.server.tomcat.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.server.tomcat.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.server.tomcat.ui.LiferayTomcatUIPlugin
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -23,7 +24,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.common.project.facet.ui,
org.eclipse.wst.server.core,
org.eclipse.wst.server.ui
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.server.tomcat.ui,
com.liferay.ide.server.tomcat.ui.command,
diff --git a/tools/plugins/com.liferay.ide.server.tomcat.ui/pom.xml b/tools/plugins/com.liferay.ide.server.tomcat.ui/pom.xml
index c6d173f644..22a831091f 100644
--- a/tools/plugins/com.liferay.ide.server.tomcat.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.server.tomcat.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.server.tomcat.ui
diff --git a/tools/plugins/com.liferay.ide.server.ui/.classpath b/tools/plugins/com.liferay.ide.server.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.server.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.server.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.server.ui/.project b/tools/plugins/com.liferay.ide.server.ui/.project
index d28d91197f..7cf87eb62a 100644
--- a/tools/plugins/com.liferay.ide.server.ui/.project
+++ b/tools/plugins/com.liferay.ide.server.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525014
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.server.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.server.ui/.settings/org.eclipse.jdt.core.prefs
index 4414146a1f..2a09a28dca 100644
--- a/tools/plugins/com.liferay.ide.server.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.server.ui/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -23,6 +23,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -66,6 +67,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -97,5 +99,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.server.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.server.ui/META-INF/MANIFEST.MF
index fa12bae4ac..91bf42af2a 100644
--- a/tools/plugins/com.liferay.ide.server.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.server.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.server.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.server.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.server.ui.LiferayServerUI
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -40,7 +41,7 @@ Require-Bundle: com.liferay.ide.core,
org.apache.commons.logging,
com.google.guava,
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.server.ui,
com.liferay.ide.server.ui.action,
diff --git a/tools/plugins/com.liferay.ide.server.ui/pom.xml b/tools/plugins/com.liferay.ide.server.ui/pom.xml
index a3b5085cf6..37602dae75 100644
--- a/tools/plugins/com.liferay.ide.server.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.server.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.server.ui
diff --git a/tools/plugins/com.liferay.ide.service.core/.classpath b/tools/plugins/com.liferay.ide.service.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.service.core/.classpath
+++ b/tools/plugins/com.liferay.ide.service.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.service.core/.project b/tools/plugins/com.liferay.ide.service.core/.project
index 78ed183778..a156309980 100644
--- a/tools/plugins/com.liferay.ide.service.core/.project
+++ b/tools/plugins/com.liferay.ide.service.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525015
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.service.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.service.core/.settings/org.eclipse.jdt.core.prefs
index 3b3b2779e2..3585c6a605 100644
--- a/tools/plugins/com.liferay.ide.service.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.service.core/.settings/org.eclipse.jdt.core.prefs
@@ -6,8 +6,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -18,6 +18,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -61,6 +62,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -92,5 +94,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.service.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.service.core/META-INF/MANIFEST.MF
index fe6e5019a3..fbdb029f8f 100644
--- a/tools/plugins/com.liferay.ide.service.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.service.core/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.service.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.service.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.service.core.ServiceCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -20,7 +21,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.common.frameworks,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.service.core,
com.liferay.ide.service.core.job,
diff --git a/tools/plugins/com.liferay.ide.service.core/pom.xml b/tools/plugins/com.liferay.ide.service.core/pom.xml
index 9c6fd1e57c..e8e5bf95d2 100644
--- a/tools/plugins/com.liferay.ide.service.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.service.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.service.core
diff --git a/tools/plugins/com.liferay.ide.service.ui/.classpath b/tools/plugins/com.liferay.ide.service.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.service.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.service.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.service.ui/.project b/tools/plugins/com.liferay.ide.service.ui/.project
index a56191349c..0ae15b91a2 100644
--- a/tools/plugins/com.liferay.ide.service.ui/.project
+++ b/tools/plugins/com.liferay.ide.service.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525017
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.service.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.service.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.service.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.service.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.service.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.service.ui/META-INF/MANIFEST.MF
index b248d12a24..bd81913d02 100644
--- a/tools/plugins/com.liferay.ide.service.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.service.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.service.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.service.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.service.ui.ServiceUI
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -30,7 +31,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.ui.views.properties.tabbed,
org.eclipse.wst.common.frameworks.ui,
org.eclipse.wst.common.modulecore
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.service.ui,
com.liferay.ide.service.ui.actions,
diff --git a/tools/plugins/com.liferay.ide.service.ui/plugin.xml b/tools/plugins/com.liferay.ide.service.ui/plugin.xml
index 9ba3668a37..05074c5c99 100644
--- a/tools/plugins/com.liferay.ide.service.ui/plugin.xml
+++ b/tools/plugins/com.liferay.ide.service.ui/plugin.xml
@@ -2,30 +2,6 @@
-
-
-
-
-
-
-
-
-
-
- %service.wizard.description
-
-
-
diff --git a/tools/plugins/com.liferay.ide.service.ui/pom.xml b/tools/plugins/com.liferay.ide.service.ui/pom.xml
index 8affcd24a0..787d296439 100644
--- a/tools/plugins/com.liferay.ide.service.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.service.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.service.ui
diff --git a/tools/plugins/com.liferay.ide.theme.core/.classpath b/tools/plugins/com.liferay.ide.theme.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.theme.core/.classpath
+++ b/tools/plugins/com.liferay.ide.theme.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.theme.core/.project b/tools/plugins/com.liferay.ide.theme.core/.project
index 59847a1a0b..390630ee89 100644
--- a/tools/plugins/com.liferay.ide.theme.core/.project
+++ b/tools/plugins/com.liferay.ide.theme.core/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525019
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.theme.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.theme.core/.settings/org.eclipse.jdt.core.prefs
index 94012e0abb..96619f2701 100644
--- a/tools/plugins/com.liferay.ide.theme.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.theme.core/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -22,6 +22,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -65,6 +66,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -96,5 +98,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.theme.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.theme.core/META-INF/MANIFEST.MF
index 0ad2974f90..4cb70cdfaf 100644
--- a/tools/plugins/com.liferay.ide.theme.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.theme.core/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.theme.core
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.theme.core;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.theme.core.ThemeCore
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -20,7 +21,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.server.core,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.theme.core,
com.liferay.ide.theme.core.facet,
diff --git a/tools/plugins/com.liferay.ide.theme.core/pom.xml b/tools/plugins/com.liferay.ide.theme.core/pom.xml
index ee7e08e3b8..55a2d25ed7 100644
--- a/tools/plugins/com.liferay.ide.theme.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.theme.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.theme.core
diff --git a/tools/plugins/com.liferay.ide.ui.snippets/.classpath b/tools/plugins/com.liferay.ide.ui.snippets/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.ui.snippets/.classpath
+++ b/tools/plugins/com.liferay.ide.ui.snippets/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.ui.snippets/.project b/tools/plugins/com.liferay.ide.ui.snippets/.project
index a76413cc48..b36bb6f322 100644
--- a/tools/plugins/com.liferay.ide.ui.snippets/.project
+++ b/tools/plugins/com.liferay.ide.ui.snippets/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525021
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.ui.snippets/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.ui.snippets/.settings/org.eclipse.jdt.core.prefs
index bb826bc1d8..e95a01e489 100644
--- a/tools/plugins/com.liferay.ide.ui.snippets/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.ui.snippets/.settings/org.eclipse.jdt.core.prefs
@@ -9,8 +9,8 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -21,6 +21,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -66,6 +67,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -101,5 +103,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.ui.snippets/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.ui.snippets/META-INF/MANIFEST.MF
index f2edff9130..adb45b7cf1 100644
--- a/tools/plugins/com.liferay.ide.ui.snippets/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.ui.snippets/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.ui.snippets
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.ui.snippets;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.ui.snippets.SnippetsUIPlugin
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -16,7 +17,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.ui,
org.eclipse.ui.ide,
org.eclipse.wst.common.snippets
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.ui.snippets,
com.liferay.ide.ui.snippets.util,
diff --git a/tools/plugins/com.liferay.ide.ui.snippets/pom.xml b/tools/plugins/com.liferay.ide.ui.snippets/pom.xml
index 73b576375c..41d067d21f 100644
--- a/tools/plugins/com.liferay.ide.ui.snippets/pom.xml
+++ b/tools/plugins/com.liferay.ide.ui.snippets/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.ui.snippets
diff --git a/tools/plugins/com.liferay.ide.ui.snippets/src/com/liferay/ide/ui/snippets/wizard/AbstractModelWizardPage.java b/tools/plugins/com.liferay.ide.ui.snippets/src/com/liferay/ide/ui/snippets/wizard/AbstractModelWizardPage.java
index b5326017fe..52d16a0886 100644
--- a/tools/plugins/com.liferay.ide.ui.snippets/src/com/liferay/ide/ui/snippets/wizard/AbstractModelWizardPage.java
+++ b/tools/plugins/com.liferay.ide.ui.snippets/src/com/liferay/ide/ui/snippets/wizard/AbstractModelWizardPage.java
@@ -72,7 +72,7 @@ public static Object[] getTypeProperties(IType type) {
return new Object[0];
}
- JDTBeanIntrospector beanIntrospector = new JDTBeanIntrospector(type);
+ JDTBeanIntrospector beanIntrospector = JDTBeanIntrospector.forType(type);
Map properties = beanIntrospector.getProperties();
diff --git a/tools/plugins/com.liferay.ide.ui/.classpath b/tools/plugins/com.liferay.ide.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.ui/.project b/tools/plugins/com.liferay.ide.ui/.project
index f7e7948715..c6a2e0b54a 100644
--- a/tools/plugins/com.liferay.ide.ui/.project
+++ b/tools/plugins/com.liferay.ide.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525020
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.ui/.settings/org.eclipse.jdt.core.prefs
index 45c7895355..2e7b789d3e 100644
--- a/tools/plugins/com.liferay.ide.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.ui/.settings/org.eclipse.jdt.core.prefs
@@ -5,8 +5,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -59,6 +60,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -88,5 +90,5 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.ui/META-INF/MANIFEST.MF
index 81d527230f..3fc1233bb2 100644
--- a/tools/plugins/com.liferay.ide.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.ui
Bundle-Name: %bundle.name
Bundle-SymbolicName: com.liferay.ide.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.ui.LiferayUIPlugin
Bundle-Vendor: %bundle.vendor
Require-Bundle: com.liferay.ide.core,
@@ -23,7 +24,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.ui.navigator,
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.server.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.ui,
com.liferay.ide.ui.action,
diff --git a/tools/plugins/com.liferay.ide.ui/plugin.xml b/tools/plugins/com.liferay.ide.ui/plugin.xml
index e9f21988d8..359405b1f6 100644
--- a/tools/plugins/com.liferay.ide.ui/plugin.xml
+++ b/tools/plugins/com.liferay.ide.ui/plugin.xml
@@ -47,13 +47,6 @@
name="Liferay Workspace"
>
-
-
-
-
@@ -97,10 +86,6 @@
id="com.liferay.ide.eclipse.ui.shortcuts.actionSet"
>
-
-
diff --git a/tools/plugins/com.liferay.ide.ui/pom.xml b/tools/plugins/com.liferay.ide.ui/pom.xml
index 86bb3a9751..be68747bab 100644
--- a/tools/plugins/com.liferay.ide.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.ui/pom.xml
@@ -27,7 +27,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.ui
diff --git a/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/AbstractPerspectiveFactory.java b/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/AbstractPerspectiveFactory.java
index 28bf034144..f7f7450568 100644
--- a/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/AbstractPerspectiveFactory.java
+++ b/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/AbstractPerspectiveFactory.java
@@ -147,7 +147,6 @@ protected void setupActions(IPageLayout layout) {
layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
layout.addShowViewShortcut(ID_WST_SNIPPETS_VIEW);
layout.addShowViewShortcut(ID_MARKERS_VIEW);
layout.addShowViewShortcut(ID_SEARCH_VIEW);
diff --git a/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/LiferayPerspectiveFactory.java b/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/LiferayPerspectiveFactory.java
deleted file mode 100644
index 095552d61c..0000000000
--- a/tools/plugins/com.liferay.ide.ui/src/com/liferay/ide/ui/LiferayPerspectiveFactory.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-package com.liferay.ide.ui;
-
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * @author Gregory Amerson
- * @author Lovett Li
- */
-@SuppressWarnings("deprecation")
-public class LiferayPerspectiveFactory extends AbstractPerspectiveFactory {
-
- public static final String ID = "com.liferay.ide.eclipse.ui.perspective.liferay";
-
- public void createInitialLayout(IPageLayout layout) {
- createLayout(layout);
- setupActions(layout);
- addShortcuts(layout);
- }
-
- protected void addShortcuts(IPageLayout layout) {
- layout.addNewWizardShortcut(ID_NEW_PLUGIN_PROJECT_WIZARD);
- layout.addNewWizardShortcut(ID_NEW_PLUGIN_PROJECT_WIZARD_EXISTING_SOURCE);
-
- layout.addNewWizardShortcut(ID_NEW_PORTLET_WIZARD);
- layout.addNewWizardShortcut(ID_NEW_JSF_PORTLET_WIZARD);
- layout.addNewWizardShortcut(ID_NEW_VAADIN_PORTLET_WIZARD);
- layout.addNewWizardShortcut(ID_NEW_HOOK_WIZARD);
- layout.addNewWizardShortcut(ID_NEW_LAYOUT_TEMPLATE_WIZARD);
- layout.addNewWizardShortcut(ID_NEW_SERVICE_BUILDER_WIZARD);
-
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");
- layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");
- layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard");
- layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard");
- layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard");
- }
-
- protected void createLayout(IPageLayout layout) {
-
- // Editors are placed for free.
-
- String editorArea = layout.getEditorArea();
-
- // Top left.
-
- IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.20F, editorArea);
-
- topLeft.addView(ID_PACKAGE_EXPLORER_VIEW);
-
- topLeft.addPlaceholder(ID_J2EE_HIERARCHY_VIEW);
- topLeft.addPlaceholder(IPageLayout.ID_RES_NAV);
- topLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
- topLeft.addPlaceholder(JavaUI.ID_PACKAGES_VIEW);
-
- // Top right.
-
- IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, 0.68F, editorArea);
-
- topRight.addView(IPageLayout.ID_OUTLINE);
- topRight.addView(ID_WST_SNIPPETS_VIEW);
-
- // IViewDescriptor tlView =
- // PlatformUI.getWorkbench().getViewRegistry().find(ID_TASKLIST_VIEW);
-
- // if (tlView != null) {
- // topRight.addView(ID_TASKLIST_VIEW);
- // }
-
- topRight.addPlaceholder(IPageLayout.ID_BOOKMARKS);
-
- IFolderLayout topRightBottom = layout.createFolder("topRightBottom", IPageLayout.BOTTOM, 0.7F, "topRight");
-
- topRightBottom.addView(ANT_VIEW_ID);
- topRightBottom.addView(IPageLayout.ID_PROP_SHEET);
-
- IFolderLayout bottomTopLeft = layout.createFolder("bottomTopLeft", IPageLayout.BOTTOM, 0.7F, "topLeft");
-
- bottomTopLeft.addView(ID_SERVERS_VIEW);
-
- // Bottom
-
- IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.7F, editorArea);
-
- bottom.addView(ID_MARKERS_VIEW);
- bottom.addView(ID_CONSOLE_VIEW);
- bottom.addView(ID_JAVADOC_VIEW);
-
- addViewIfExist(layout, bottom, ID_DATA_VIEW);
-
- bottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
- bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
- bottom.addPlaceholder(ID_SEARCH_VIEW);
- }
-
- protected void setupActions(IPageLayout layout) {
- layout.addActionSet("com.liferay.ide.eclipse.ui.shortcuts.plugin.actionSet");
- }
-
-}
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.core/.classpath b/tools/plugins/com.liferay.ide.upgrade.commands.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.core/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.core/.project b/tools/plugins/com.liferay.ide.upgrade.commands.core/.project
index 67e25c9e6c..58bf3b372e 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.core/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.core/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525022
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.upgrade.commands.core/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.commands.core/META-INF/MANIFEST.MF
index 9c4d8b7176..99dae2c4c6 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.core/META-INF/MANIFEST.MF
@@ -3,11 +3,12 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: com.liferay.ide.upgrade.commands.core.UpgradeCommandsCorePlugin
Bundle-ClassPath: .
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.commands.core
Bundle-Name: Liferay IDE Upgrade Plan Commands Core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: com.liferay.ide.upgrade.commands.core;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Export-Package: com.liferay.ide.upgrade.commands.core,
com.liferay.ide.upgrade.commands.core.buildservice,
com.liferay.ide.upgrade.commands.core.code,
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.core/pom.xml b/tools/plugins/com.liferay.ide.upgrade.commands.core/pom.xml
index fd04c71977..42a30a2c92 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.commands.core
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.ui/.classpath b/tools/plugins/com.liferay.ide.upgrade.commands.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.ui/.project b/tools/plugins/com.liferay.ide.upgrade.commands.ui/.project
index b0f38fe491..8995e13257 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.ui/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.ui/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525023
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.upgrade.commands.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.commands.ui/META-INF/MANIFEST.MF
index 3af5cb7046..e08eed3784 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.ui/META-INF/MANIFEST.MF
@@ -3,11 +3,12 @@ Bundle-Activator: com.liferay.ide.upgrade.commands.ui.internal.UpgradeCommandsUI
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.commands.ui
Bundle-Name: Liferay IDE Upgrade Plan Commands UI
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: com.liferay.ide.upgrade.commands.ui;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.project.core,
com.liferay.ide.project.ui,
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.ui/pom.xml b/tools/plugins/com.liferay.ide.upgrade.commands.ui/pom.xml
index fc7eed8449..745225f019 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.commands.ui
diff --git a/tools/plugins/com.liferay.ide.upgrade.commands.ui/src/com/liferay/ide/upgrade/commands/ui/internal/code/ConfigureTargetPlatformVersionCommand.java b/tools/plugins/com.liferay.ide.upgrade.commands.ui/src/com/liferay/ide/upgrade/commands/ui/internal/code/ConfigureTargetPlatformVersionCommand.java
index de27a28ba0..9e3b137e11 100644
--- a/tools/plugins/com.liferay.ide.upgrade.commands.ui/src/com/liferay/ide/upgrade/commands/ui/internal/code/ConfigureTargetPlatformVersionCommand.java
+++ b/tools/plugins/com.liferay.ide.upgrade.commands.ui/src/com/liferay/ide/upgrade/commands/ui/internal/code/ConfigureTargetPlatformVersionCommand.java
@@ -16,9 +16,9 @@
import com.liferay.ide.core.util.FileUtil;
import com.liferay.ide.core.workspace.WorkspaceConstants;
+import com.liferay.ide.project.core.util.ProjectUtil;
import com.liferay.ide.ui.util.UIUtil;
import com.liferay.ide.upgrade.commands.core.code.ConfigureTargetPlatformVersionCommandKeys;
-import com.liferay.ide.upgrade.commands.ui.internal.UpgradeCommandsUIPlugin;
import com.liferay.ide.upgrade.plan.core.ResourceSelection;
import com.liferay.ide.upgrade.plan.core.UpgradeCommand;
import com.liferay.ide.upgrade.plan.core.UpgradeCommandPerformedEvent;
@@ -30,8 +30,12 @@
import java.io.File;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
@@ -108,34 +112,51 @@ private File _getGradlePropertiesFile() {
}
private IStatus _updateTargetPlatformValue(File gradeProperties) {
- UpgradePlan upgradePlan = _upgradePlanner.getCurrentUpgradePlan();
-
- String targetPlatformVersion = WorkspaceConstants.liferayTargetPlatformVersions.get("7.1")[0];
-
- String targetVersion = upgradePlan.getTargetVersion();
-
- if (Objects.equals(targetVersion, "7.0")) {
- targetPlatformVersion = WorkspaceConstants.liferayTargetPlatformVersions.get("7.0")[0];
- }
- else if (Objects.equals(targetVersion, "7.1")) {
- targetPlatformVersion = WorkspaceConstants.liferayTargetPlatformVersions.get("7.1")[0];
- }
- else if (Objects.equals(targetVersion, "7.2")) {
- targetPlatformVersion = WorkspaceConstants.liferayTargetPlatformVersions.get("7.2")[0];
- }
-
- try {
- PropertiesConfiguration config = new PropertiesConfiguration(gradeProperties);
-
- config.setProperty(WorkspaceConstants.TARGET_PLATFORM_VERSION_PROPERTY, targetPlatformVersion);
-
- config.save();
-
- return Status.OK_STATUS;
- }
- catch (ConfigurationException ce) {
- return UpgradeCommandsUIPlugin.createErrorStatus("Unable to configure target platform", ce);
- }
+ CompletableFuture> future = CompletableFuture.supplyAsync(
+ () -> {
+ try {
+ return ProjectUtil.initMavenTargetPlatform();
+ }
+ catch (Exception exception) {
+ return new HashMap<>();
+ }
+ });
+
+ future.thenAccept(
+ new Consumer>() {
+
+ @Override
+ public void accept(Map mavenTargetPlatform) {
+ UpgradePlan upgradePlan = _upgradePlanner.getCurrentUpgradePlan();
+
+ String targetPlatformVersion = mavenTargetPlatform.get("7.1")[0];
+
+ String targetVersion = upgradePlan.getTargetVersion();
+
+ if (Objects.equals(targetVersion, "7.0")) {
+ targetPlatformVersion = mavenTargetPlatform.get("7.0")[0];
+ }
+ else if (Objects.equals(targetVersion, "7.1")) {
+ targetPlatformVersion = mavenTargetPlatform.get("7.1")[0];
+ }
+ else if (Objects.equals(targetVersion, "7.2")) {
+ targetPlatformVersion = mavenTargetPlatform.get("7.2")[0];
+ }
+
+ try {
+ PropertiesConfiguration config = new PropertiesConfiguration(gradeProperties);
+
+ config.setProperty(WorkspaceConstants.TARGET_PLATFORM_VERSION_PROPERTY, targetPlatformVersion);
+
+ config.save();
+ }
+ catch (ConfigurationException ce) {
+ }
+ }
+
+ });
+
+ return Status.OK_STATUS;
}
@Reference
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.core/.classpath b/tools/plugins/com.liferay.ide.upgrade.plan.core/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.core/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.core/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.core/.project b/tools/plugins/com.liferay.ide.upgrade.plan.core/.project
index 6579bdde5f..8999ea960f 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.core/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.core/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525024
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.upgrade.plan.core/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.plan.core/META-INF/MANIFEST.MF
index 0e88da1c0e..76a51e52e2 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.core/META-INF/MANIFEST.MF
@@ -2,11 +2,12 @@ Manifest-Version: 1.0
Bundle-ActivationPolicy: lazy
Bundle-Activator: com.liferay.ide.upgrade.plan.core.UpgradePlanCorePlugin
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.plan.core
Bundle-Name: Liferay IDE Upgrade Plan Core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: com.liferay.ide.upgrade.plan.core;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Export-Package: com.liferay.ide.upgrade.plan.core,
com.liferay.ide.upgrade.plan.core.util
Require-Bundle: com.liferay.ide.core,
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.core/pom.xml b/tools/plugins/com.liferay.ide.upgrade.plan.core/pom.xml
index 108ad383cf..239254066a 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.plan.core
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.ui/.classpath b/tools/plugins/com.liferay.ide.upgrade.plan.ui/.classpath
index e9eccefd10..a00e6d435f 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.ui/.classpath
@@ -1,9 +1,23 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.ui/.project b/tools/plugins/com.liferay.ide.upgrade.plan.ui/.project
index 4383c497d2..b015c44d53 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.ui/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.ui/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525025
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.upgrade.plan.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.plan.ui/META-INF/MANIFEST.MF
index bd309caab0..2757f02aa3 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.ui/META-INF/MANIFEST.MF
@@ -3,14 +3,14 @@ Bundle-Activator: com.liferay.ide.upgrade.plan.ui.internal.UpgradePlanUIPlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/flexmark-0.34.48.jar,
- lib/flexmark-util-0.34.48.jar,
- lib/com.liferay.markdown.parser.jar
+ lib/flexmark-util-0.34.48.jar
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.plan.ui
Bundle-Name: Liferay IDE Upgrade Plan UI
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: com.liferay.ide.upgrade.plan.ui;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Export-Package: com.liferay.ide.upgrade.plan.ui,
com.liferay.ide.upgrade.plan.ui.navigator,
com.liferay.ide.upgrade.plan.ui.util
diff --git a/tools/plugins/com.liferay.ide.upgrade.plan.ui/pom.xml b/tools/plugins/com.liferay.ide.upgrade.plan.ui/pom.xml
index 2a52d94837..77b92c4c52 100644
--- a/tools/plugins/com.liferay.ide.upgrade.plan.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.plan.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.plan.ui
diff --git a/tools/plugins/com.liferay.ide.upgrade.planner.ui/.classpath b/tools/plugins/com.liferay.ide.upgrade.planner.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.upgrade.planner.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.planner.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.planner.ui/.project b/tools/plugins/com.liferay.ide.upgrade.planner.ui/.project
index d753ae46b1..2d75aeae50 100644
--- a/tools/plugins/com.liferay.ide.upgrade.planner.ui/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.planner.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525027
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.planner.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.planner.ui/META-INF/MANIFEST.MF
index 33d3fd7b1d..3f7c67b999 100644
--- a/tools/plugins/com.liferay.ide.upgrade.planner.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.planner.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.planner.ui
Bundle-Name: Liferay Upgrade Planner UI
Bundle-SymbolicName: com.liferay.ide.upgrade.planner.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.upgrade.planner.ui.UpgradePlannerPlugin
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
@@ -11,7 +12,7 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.core.runtime,
org.eclipse.ui,
org.eclipse.ui.intro
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: com.liferay.ide.upgrade.planner.ui
diff --git a/tools/plugins/com.liferay.ide.upgrade.planner.ui/pom.xml b/tools/plugins/com.liferay.ide.upgrade.planner.ui/pom.xml
index ebe41b675a..6d7c0797db 100644
--- a/tools/plugins/com.liferay.ide.upgrade.planner.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.planner.ui/pom.xml
@@ -21,7 +21,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.planner.ui
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/.classpath b/tools/plugins/com.liferay.ide.upgrade.problems.core/.classpath
index a3d8434f85..396cccb175 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/.classpath
@@ -1,8 +1,23 @@
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/.project b/tools/plugins/com.liferay.ide.upgrade.problems.core/.project
index c6f1fdcc8c..3ac428cc0a 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525028
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.upgrade.problems.core/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.problems.core/META-INF/MANIFEST.MF
index a3e2236075..152f517b26 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/META-INF/MANIFEST.MF
@@ -2,13 +2,15 @@ Manifest-Version: 1.0
Bundle-ActivationPolicy: lazy
Bundle-Activator: com.liferay.ide.upgrade.problems.core.internal.UpgradeProblemsCorePlugin
Bundle-ClassPath: .,
- libs/com.liferay.markdown.parser.jar
+ libs/flexmark-0.34.48.jar,
+ libs/flexmark-util-0.34.48.jar
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.problems.core
Bundle-Name: Liferay IDE Upgrade Problems Core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: com.liferay.ide.upgrade.problems.core;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Export-Package: com.liferay.ide.upgrade.problems.core,
com.liferay.ide.upgrade.problems.core.commands
Require-Bundle: com.google.guava,
@@ -26,7 +28,8 @@ Require-Bundle: com.google.guava,
org.eclipse.osgi.services,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core,
- org.json
+ org.json,
+ org.jsoup
Service-Component: OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.SSEXMLFile.xml,
OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.JSPFileWTP.xml,
OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.JSPFFileWTP.xml,
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.DeprecatedClayIconTagAttributes.xml b/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.DeprecatedClayIconTagAttributes.xml
index c61854027a..50a7549066 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.DeprecatedClayIconTagAttributes.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.DeprecatedClayIconTagAttributes.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveSanitizedServletResponseStaticMethods.xml b/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveSanitizedServletResponseStaticMethods.xml
index 40ec84d374..61a7f3078c 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveSanitizedServletResponseStaticMethods.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveSanitizedServletResponseStaticMethods.xml
@@ -1,13 +1,13 @@
+
-
-
+
-
+
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveXXssProtectionProperty.xml b/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveXXssProtectionProperty.xml
index 2fd07640ce..37408d1e19 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveXXssProtectionProperty.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/OSGI-INF/com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveXXssProtectionProperty.xml
@@ -1,13 +1,13 @@
+
-
-
+
\ No newline at end of file
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/com.liferay.markdown.parser.jar b/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/com.liferay.markdown.parser.jar
deleted file mode 100644
index 34e6797d98..0000000000
Binary files a/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/com.liferay.markdown.parser.jar and /dev/null differ
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/flexmark-0.34.48.jar b/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/flexmark-0.34.48.jar
new file mode 100644
index 0000000000..64307fc567
Binary files /dev/null and b/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/flexmark-0.34.48.jar differ
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/flexmark-util-0.34.48.jar b/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/flexmark-util-0.34.48.jar
new file mode 100644
index 0000000000..76619ef5ba
Binary files /dev/null and b/tools/plugins/com.liferay.ide.upgrade.problems.core/libs/flexmark-util-0.34.48.jar differ
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/pom.xml b/tools/plugins/com.liferay.ide.upgrade.problems.core/pom.xml
index 1e1b7606f2..56c29cae25 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.problems.core
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/FileMigrationService.java b/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/FileMigrationService.java
index a76e86426c..60340788e0 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/FileMigrationService.java
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/FileMigrationService.java
@@ -248,6 +248,7 @@ protected FileVisitResult analyzeFile(
));
}
catch (Exception e) {
+ e.printStackTrace();
}
}
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/MarkdownParser.java b/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/MarkdownParser.java
index 4527a24d2f..a8dcd3f0de 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/MarkdownParser.java
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.core/src/com/liferay/ide/upgrade/problems/core/internal/MarkdownParser.java
@@ -14,8 +14,8 @@
package com.liferay.ide.upgrade.problems.core.internal;
-import com.liferay.knowledge.base.markdown.converter.MarkdownConverter;
-import com.liferay.knowledge.base.markdown.converter.factory.MarkdownConverterFactoryUtil;
+import com.vladsch.flexmark.html.HtmlRenderer;
+import com.vladsch.flexmark.parser.Parser;
import java.io.IOException;
import java.io.InputStream;
@@ -68,9 +68,15 @@ public static Map parse(String fileName) throws IOException {
if (retval == null) {
String markdown = _readStreamToString(MarkdownParser.class.getResourceAsStream(fileName), true);
- MarkdownConverter markdownConverter = MarkdownConverterFactoryUtil.create();
+ Parser parser = Parser.builder(
+ ).build();
- String html = markdownConverter.convert(markdown);
+ com.vladsch.flexmark.ast.Node document = parser.parse(markdown);
+
+ HtmlRenderer renderer = HtmlRenderer.builder(
+ ).build();
+
+ String html = renderer.render(document);
Map sections = _parseHtml(html);
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.ui/.classpath b/tools/plugins/com.liferay.ide.upgrade.problems.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.ui/.project b/tools/plugins/com.liferay.ide.upgrade.problems.ui/.project
index 0e6bbf2832..55ffe628c9 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.ui/.project
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.ui/.project
@@ -36,4 +36,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525030
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.upgrade.problems.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.upgrade.problems.ui/META-INF/MANIFEST.MF
index c487836044..835601ec28 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.ui/META-INF/MANIFEST.MF
@@ -1,13 +1,13 @@
Manifest-Version: 1.0
Bundle-Activator: com.liferay.ide.upgrade.problems.ui.internal.UpgradeProblemsUIPlugin
Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.upgrade.problems.ui
Bundle-Name: Liferay IDE Upgrade Problems UI
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: com.liferay.ide.upgrade.problems.ui;singleton:=true
Bundle-Vendor: Liferay, Inc.
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.upgrade.plan.core,
com.liferay.ide.upgrade.plan.ui,
diff --git a/tools/plugins/com.liferay.ide.upgrade.problems.ui/pom.xml b/tools/plugins/com.liferay.ide.upgrade.problems.ui/pom.xml
index 4236f11e23..b8b94b7b04 100644
--- a/tools/plugins/com.liferay.ide.upgrade.problems.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.upgrade.problems.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.problems.ui
diff --git a/tools/plugins/com.liferay.ide.xml.search.ui/.classpath b/tools/plugins/com.liferay.ide.xml.search.ui/.classpath
index cf36b56119..7931ec26b9 100644
--- a/tools/plugins/com.liferay.ide.xml.search.ui/.classpath
+++ b/tools/plugins/com.liferay.ide.xml.search.ui/.classpath
@@ -1,7 +1,21 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/plugins/com.liferay.ide.xml.search.ui/.project b/tools/plugins/com.liferay.ide.xml.search.ui/.project
index 9613f7607b..b0e7c6baa1 100644
--- a/tools/plugins/com.liferay.ide.xml.search.ui/.project
+++ b/tools/plugins/com.liferay.ide.xml.search.ui/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525031
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/plugins/com.liferay.ide.xml.search.ui/.settings/org.eclipse.jdt.core.prefs b/tools/plugins/com.liferay.ide.xml.search.ui/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d089a9b734 100644
--- a/tools/plugins/com.liferay.ide.xml.search.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/plugins/com.liferay.ide.xml.search.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/plugins/com.liferay.ide.xml.search.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.xml.search.ui/META-INF/MANIFEST.MF
index 4585f3675d..65e1847ce9 100644
--- a/tools/plugins/com.liferay.ide.xml.search.ui/META-INF/MANIFEST.MF
+++ b/tools/plugins/com.liferay.ide.xml.search.ui/META-INF/MANIFEST.MF
@@ -1,10 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
+Automatic-Module-Name: com.liferay.ide.xml.search.ui
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: com.liferay.ide.xml.search.ui;singleton:=true
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: com.liferay.ide.xml.search.ui.LiferayXMLSearchUI
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.wst.xml.search.core,
@@ -35,7 +36,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.wst.jsdt.web.support.jsp,
org.eclipse.jst.j2ee
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: com.liferay.ide.xml.search.ui,
com.liferay.ide.xml.search.ui.editor,
com.liferay.ide.xml.search.ui.markerResolutions,
diff --git a/tools/plugins/com.liferay.ide.xml.search.ui/pom.xml b/tools/plugins/com.liferay.ide.xml.search.ui/pom.xml
index 5f0f0f19d3..9a1cb94158 100644
--- a/tools/plugins/com.liferay.ide.xml.search.ui/pom.xml
+++ b/tools/plugins/com.liferay.ide.xml.search.ui/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.pluginstools-plugins
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.xml.search.ui
diff --git a/tools/plugins/pom.xml b/tools/plugins/pom.xml
index beef3a45d8..1147213343 100644
--- a/tools/plugins/pom.xml
+++ b/tools/plugins/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ide.toolstools
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.tools.plugins
@@ -50,14 +50,11 @@
com.liferay.ide.project.uicom.liferay.ide.sdk.corecom.liferay.ide.server.core
- com.liferay.ide.server.tomcat.core
- com.liferay.ide.server.tomcat.uicom.liferay.ide.server.uicom.liferay.ide.service.corecom.liferay.ide.service.uicom.liferay.ide.theme.corecom.liferay.ide.ui
- com.liferay.ide.ui.snippetscom.liferay.ide.upgrade.plan.corecom.liferay.ide.upgrade.plan.uicom.liferay.ide.upgrade.planner.ui
diff --git a/tools/pom.xml b/tools/pom.xml
index d255058fc1..6b1e91635f 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -26,7 +26,7 @@
com.liferay.ideparent
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOT../build/parent/pom.xml
diff --git a/tools/tests/com.liferay.ide.core.tests/.classpath b/tools/tests/com.liferay.ide.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.core.tests/.project b/tools/tests/com.liferay.ide.core.tests/.project
index 366acd346a..4f2f3d497f 100644
--- a/tools/tests/com.liferay.ide.core.tests/.project
+++ b/tools/tests/com.liferay.ide.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524988
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.core.tests/META-INF/MANIFEST.MF
index 950a0aa983..cd5f1ec740 100644
--- a/tools/tests/com.liferay.ide.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Core Tests
Bundle-SymbolicName: com.liferay.ide.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
org.eclipse.core.resources,
@@ -11,6 +11,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.sapphire.modeling;bundle-version="[9,10)",
org.eclipse.wst.validation,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.core.tests
diff --git a/tools/tests/com.liferay.ide.core.tests/pom.xml b/tools/tests/com.liferay.ide.core.tests/pom.xml
index aeb364a8f7..2382c58bf4 100644
--- a/tools/tests/com.liferay.ide.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.core.tests/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.core.tests
diff --git a/tools/tests/com.liferay.ide.core.tests/src/com/liferay/ide/core/tests/TestUtil.java b/tools/tests/com.liferay.ide.core.tests/src/com/liferay/ide/core/tests/TestUtil.java
index 8f8ec357cd..585164391f 100644
--- a/tools/tests/com.liferay.ide.core.tests/src/com/liferay/ide/core/tests/TestUtil.java
+++ b/tools/tests/com.liferay.ide.core.tests/src/com/liferay/ide/core/tests/TestUtil.java
@@ -72,7 +72,7 @@ public static void waitForBuildAndValidation() throws Exception {
manager.join(ValidatorManager.VALIDATOR_JOB_FAMILY, new NullProgressMonitor());
manager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, new NullProgressMonitor());
JobUtil.waitForLiferayProjectJob();
- Thread.sleep(200);
+ Thread.sleep(500);
manager.beginRule(root = workspace.getRoot(), null);
}
catch (InterruptedException ie) {
diff --git a/tools/tests/com.liferay.ide.hook.core.tests/.classpath b/tools/tests/com.liferay.ide.hook.core.tests/.classpath
index cc5ee2dc8c..7f87f1ffe7 100644
--- a/tools/tests/com.liferay.ide.hook.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.hook.core.tests/.classpath
@@ -1,6 +1,6 @@
-
+
diff --git a/tools/tests/com.liferay.ide.hook.core.tests/.project b/tools/tests/com.liferay.ide.hook.core.tests/.project
index 0602897578..7770191bc3 100644
--- a/tools/tests/com.liferay.ide.hook.core.tests/.project
+++ b/tools/tests/com.liferay.ide.hook.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524995
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.hook.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.hook.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.hook.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.hook.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.hook.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.hook.core.tests/META-INF/MANIFEST.MF
index a3f605acca..e10ee3f6fe 100644
--- a/tools/tests/com.liferay.ide.hook.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.hook.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Hook Core Tests
Bundle-SymbolicName: com.liferay.ide.hook.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.core.tests,
@@ -10,12 +10,12 @@ Require-Bundle: com.liferay.ide.core,
com.liferay.ide.project.core,
com.liferay.ide.project.core.tests,
com.liferay.ide.server.core.tests,
- org.apache.commons.lang;bundle-version="2.6.0",
+ org.apache.commons.lang,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.sapphire.modeling;bundle-version="[9,10)",
org.eclipse.sapphire.modeling.xml;bundle-version="[9,10)",
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.hook.core.tests
diff --git a/tools/tests/com.liferay.ide.hook.core.tests/pom.xml b/tools/tests/com.liferay.ide.hook.core.tests/pom.xml
index 4d578e0469..999a60f2e5 100644
--- a/tools/tests/com.liferay.ide.hook.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.hook.core.tests/pom.xml
@@ -25,7 +25,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.hook.core.tests
diff --git a/tools/tests/com.liferay.ide.layouttpl.core.tests/.classpath b/tools/tests/com.liferay.ide.layouttpl.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.layouttpl.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.layouttpl.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.layouttpl.core.tests/.project b/tools/tests/com.liferay.ide.layouttpl.core.tests/.project
index 24ffdc189b..6e615004a1 100644
--- a/tools/tests/com.liferay.ide.layouttpl.core.tests/.project
+++ b/tools/tests/com.liferay.ide.layouttpl.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017524999
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.layouttpl.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.layouttpl.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.layouttpl.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.layouttpl.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.layouttpl.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.layouttpl.core.tests/META-INF/MANIFEST.MF
index 233b9a1b60..f64ea1b44d 100644
--- a/tools/tests/com.liferay.ide.layouttpl.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.layouttpl.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Layout Templates Core Tests
Bundle-SymbolicName: com.liferay.ide.layouttpl.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.core.tests,
@@ -11,6 +11,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.core.runtime,
org.eclipse.sapphire.modeling;bundle-version="[9,10)",
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.layouttpl.core.tests
diff --git a/tools/tests/com.liferay.ide.layouttpl.core.tests/pom.xml b/tools/tests/com.liferay.ide.layouttpl.core.tests/pom.xml
index ba61aaec2f..5f389e54ff 100644
--- a/tools/tests/com.liferay.ide.layouttpl.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.layouttpl.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.layouttpl.core.tests
diff --git a/tools/tests/com.liferay.ide.portlet.core.tests/.classpath b/tools/tests/com.liferay.ide.portlet.core.tests/.classpath
index cc5ee2dc8c..7f87f1ffe7 100644
--- a/tools/tests/com.liferay.ide.portlet.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.portlet.core.tests/.classpath
@@ -1,6 +1,6 @@
-
+
diff --git a/tools/tests/com.liferay.ide.portlet.core.tests/.project b/tools/tests/com.liferay.ide.portlet.core.tests/.project
index de172855e0..dfcc996e20 100644
--- a/tools/tests/com.liferay.ide.portlet.core.tests/.project
+++ b/tools/tests/com.liferay.ide.portlet.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525005
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.portlet.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.portlet.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.portlet.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.portlet.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.portlet.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.portlet.core.tests/META-INF/MANIFEST.MF
index 8c1c9b56c7..6f55c91e7b 100644
--- a/tools/tests/com.liferay.ide.portlet.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.portlet.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Portlet Core Tests
Bundle-SymbolicName: com.liferay.ide.portlet.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
org.eclipse.core.runtime,
@@ -19,6 +19,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.sapphire.java;bundle-version="[9,10)",
com.liferay.ide.server.core.tests,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.portlet.core.tests
diff --git a/tools/tests/com.liferay.ide.portlet.core.tests/pom.xml b/tools/tests/com.liferay.ide.portlet.core.tests/pom.xml
index 9346d882bb..3a694f2c8e 100644
--- a/tools/tests/com.liferay.ide.portlet.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.portlet.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.portlet.core.tests
diff --git a/tools/tests/com.liferay.ide.project.core.tests/.classpath b/tools/tests/com.liferay.ide.project.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.project.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.project.core.tests/.project b/tools/tests/com.liferay.ide.project.core.tests/.project
index 058a81e048..e228f786b3 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/.project
+++ b/tools/tests/com.liferay.ide.project.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525007
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.project.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.project.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.project.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.project.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.project.core.tests/META-INF/MANIFEST.MF
index 1a74952368..a8466e5c69 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.project.core.tests/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Project Core Tests
Bundle-SymbolicName: com.liferay.ide.project.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
-Require-Bundle: biz.aQute.bndlib;bundle-version="[5,6)",
+Require-Bundle: biz.aQute.bndlib,
com.liferay.ide.core,
com.liferay.ide.core.tests,
com.liferay.ide.layouttpl.core,
@@ -28,6 +28,6 @@ Require-Bundle: biz.aQute.bndlib;bundle-version="[5,6)",
org.eclipse.wst.validation,
org.eclipse.wst.xml.core,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.project.core.tests
diff --git a/tools/tests/com.liferay.ide.project.core.tests/pom.xml b/tools/tests/com.liferay.ide.project.core.tests/pom.xml
index b1c5562a9d..1d3084c5d5 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.project.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.project.core.tests
@@ -50,48 +50,6 @@
download-maven-plugin1.3.0
-
- download-plugins-sdk-1.0.16
- generate-resources
-
- wget
-
-
- https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/com.liferay.portal.plugins.sdk/1.0.16/com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip
- ${liferay.bundles.dir}
- com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip
- 74498e30292fcde3f007a159ba283ed2
- true
-
-
-
- download-plugins-sdk-6.2.5-ga6
- generate-resources
-
- wget
-
-
- https://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.2.5%20GA6/liferay-plugins-sdk-6.2-ce-ga6-20171101150212422.zip
- ${liferay.bundles.dir}
- liferay-plugins-sdk-6.2-ce-ga6-20171101150212422.zip
- f021052bd71d72043c830a1fbe2b2c36
- true
-
-
-
- download-portal-tomcat-6.2-ga6
- generate-resources
-
- wget
-
-
- https://releases-cdn.liferay.com/portal/6.2.5-ga6/liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip
- ${liferay.bundles.dir}
- liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip
- 22d4846a10b17e93c9729e909ccffda8
- true
-
- download-portal-tomcat-7.0-ga5generate-resources
@@ -106,20 +64,6 @@
true
-
- download-ivy-cache-70
- generate-resources
-
- wget
-
-
- http://us-east-1.linodeobjects.com/devtools-s3.liferay.com/liferay-ide-files/zips/ivy-cache-7.0.zip
- ${liferay.bundles.dir}
- ivy-cache-7.0.zip
- 22625f72b6daa86f68ae0e06fc4c1f12
- true
-
-
diff --git a/tools/tests/com.liferay.ide.project.core.tests/projects/existingProject.zip b/tools/tests/com.liferay.ide.project.core.tests/projects/existingProject.zip
index 4776348f63..99aba129f6 100644
Binary files a/tools/tests/com.liferay.ide.project.core.tests/projects/existingProject.zip and b/tools/tests/com.liferay.ide.project.core.tests/projects/existingProject.zip differ
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ImportPluginsSDKProjectTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ImportPluginsSDKProjectTests.java
deleted file mode 100644
index 1afe9f0876..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ImportPluginsSDKProjectTests.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.core.util.ZipUtil;
-import com.liferay.ide.project.core.PluginClasspathContainerInitializer;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.SDKClasspathContainer;
-import com.liferay.ide.project.core.util.ProjectImportUtil;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-/**
- * @author Simon Jiang
- */
-
-public class ImportPluginsSDKProjectTests extends ProjectCoreBase
-{
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- private boolean isLiferayRuntimePluginClassPath( List entries, final String entryPath )
- {
- boolean retval = false;
- for( Iterator iterator = entries.iterator(); iterator.hasNext(); )
- {
- IClasspathEntry entry = iterator.next();
-
- if( entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER )
- {
- for( String path : entry.getPath().segments() )
- {
- if( path.equals( entryPath ) )
- {
- retval = true;
- break;
- }
- }
- }
- }
- return retval;
- }
-
- @Override
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
- }
-
- @Override
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip" );
- }
-
- @Override
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "com.liferay.portal.plugins.sdk-1.0.16-withdependencies/";
- }
-
- private IPath importProject( String pluginType, String name ) throws Exception
- {
- SDK sdk = SDKUtil.getWorkspaceSDK();
- final IPath pluginTypeFolder = sdk.getLocation().append( pluginType );
-
- final URL projectZipUrl =
- Platform.getBundle( "com.liferay.ide.project.core.tests" ).getEntry( "projects/" + name + ".zip" );
-
- final File projectZipFile = new File( FileLocator.toFileURL( projectZipUrl ).getFile() );
-
- ZipUtil.unzip( projectZipFile, pluginTypeFolder.toFile() );
-
- final IPath projectFolder = pluginTypeFolder.append( name );
-
- assertEquals( true, projectFolder.toFile().exists() );
-
- return projectFolder;
- }
-
- @Test
- public void testSDKSetting() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- SDK sdk = SDKUtil.getWorkspaceSDK();
- Map sdkProperties = sdk.getBuildProperties( true );
-
- assertNotNull( sdkProperties.get( "app.server.type" ) );
- assertNotNull( sdkProperties.get( "app.server.dir" ) );
- assertNotNull( sdkProperties.get( "app.server.deploy.dir" ) );
- assertNotNull( sdkProperties.get( "app.server.lib.global.dir" ) );
- assertNotNull( sdkProperties.get( "app.server.parent.dir" ) );
- assertNotNull( sdkProperties.get( "app.server.portal.dir" ) );
-
- assertEquals( sdkProperties.get( "app.server.type" ), "tomcat" );
- assertEquals( sdkProperties.get( "app.server.dir" ), getLiferayRuntimeDir().toPortableString() );
- assertEquals(
- sdkProperties.get( "app.server.deploy.dir" ),
- getLiferayRuntimeDir().append( "webapps" ).toPortableString() );
- assertEquals(
- sdkProperties.get( "app.server.lib.global.dir" ),
- getLiferayRuntimeDir().append( "lib/ext" ).toPortableString() );
- assertEquals(
- sdkProperties.get( "app.server.parent.dir" ),
- getLiferayRuntimeDir().removeLastSegments( 1 ).toPortableString() );
- assertEquals(
- sdkProperties.get( "app.server.portal.dir" ),
- getLiferayRuntimeDir().append( "webapps/ROOT" ).toPortableString() );
-
- }
-
- @Test
- public void testImportBasicHookProject() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- final IPath projectPath = importProject( "hooks", "Import-IDE3.0-hook" );
- IProject hookProjectForIDE3 = ProjectImportUtil.importProject( projectPath, new NullProgressMonitor(), null );
-
- assertNotNull( hookProjectForIDE3 );
-
- IJavaProject javaProject = JavaCore.create( hookProjectForIDE3 );
- IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();
- List rawClasspaths = Arrays.asList( rawClasspath );
- final boolean hasPluginClasspathDependencyContainer =
- isLiferayRuntimePluginClassPath( rawClasspaths, SDKClasspathContainer.ID );
-
- assertEquals( hasPluginClasspathDependencyContainer, true );
- }
-
- @Test
- public void testImportConfiguredPortletProject() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- final IPath projectPath = importProject( "portlets", "Import-Old-Configured-portlet" );
- IProject portletProjectForIDE3 =
- ProjectImportUtil.importProject( projectPath, new NullProgressMonitor(), null );
-
- assertNotNull( portletProjectForIDE3 );
-
- IJavaProject javaProject = JavaCore.create( portletProjectForIDE3 );
- IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();
- List rawClasspaths = Arrays.asList( rawClasspath );
-
- final boolean hasOldPluginClasspathContainer =
- isLiferayRuntimePluginClassPath( rawClasspaths, PluginClasspathContainerInitializer.ID );
- final boolean hasPluginClasspathDependencyContainer =
- isLiferayRuntimePluginClassPath( rawClasspaths, SDKClasspathContainer.ID );
- final boolean hasOldRuntimeClasspathContainer = isLiferayRuntimePluginClassPath(
- rawClasspaths, "com.liferay.studio.server.tomcat.runtimeClasspathProvider" );
-
- assertEquals( hasOldPluginClasspathContainer, false );
- assertEquals( hasOldRuntimeClasspathContainer, false );
- assertEquals( hasPluginClasspathDependencyContainer, true );
- }
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/LiferayPortalValueLoaderTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/LiferayPortalValueLoaderTests.java
deleted file mode 100644
index aa738f8fa5..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/LiferayPortalValueLoaderTests.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.server.core.ILiferayRuntime;
-import com.liferay.ide.server.util.LiferayPortalValueLoader;
-import com.liferay.ide.server.util.ServerUtil;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Version;
-
-/**
- * @author Gregory Amerson
- */
-public class LiferayPortalValueLoaderTests extends ProjectCoreBase
-{
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- private LiferayPortalValueLoader loader( final IRuntime runtime )
- {
- ILiferayRuntime liferayRutime = ServerUtil.getLiferayRuntime( runtime );
- return new LiferayPortalValueLoader( liferayRutime.getUserLibs() );
- }
-
- @Before
- public void removeRuntimes() throws Exception
- {
- super.removeAllRuntimes();
- }
-
- @Test
- public void loadHookPropertiesFromClass() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- setupPluginsSDKAndRuntime();
-
- final IRuntime runtime = ServerCore.getRuntimes()[0];
-
- final String[] props = loader( runtime ).loadHookPropertiesFromClass();
-
- assertNotNull( props );
-
- assertEquals( 142, props.length );
- }
-
- @Test
- public void loadServerInfoFromClass() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- setupPluginsSDKAndRuntime();
-
- final IRuntime runtime = ServerCore.getRuntimes()[0];
-
- final String info = loader( runtime ).loadServerInfoFromClass();
-
- assertNotNull( info );
-
- assertEquals( "Liferay Portal Community Edition / 6.2.5", info );
- }
-
- @Test
- public void loadVersionFromClass() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- setupPluginsSDKAndRuntime();
-
- final IRuntime runtime = ServerCore.getRuntimes()[0];
-
- final Version version = loader( runtime ).loadVersionFromClass();
-
- assertNotNull( version );
-
- assertEquals( "6.2.5", version.toString() );
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/LiferaySDKValidationTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/LiferaySDKValidationTests.java
deleted file mode 100644
index 36117a6e8e..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/LiferaySDKValidationTests.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.sapphire.modeling.ProgressMonitor;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-/**
- * @author Simon Jiang
- */
-public class LiferaySDKValidationTests extends ProjectCoreBase
-{
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
-
- IPath sdkPath = ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
-
- if( sdkPath != null && sdkPath.toFile() != null )
- {
- sdkPath.toFile().delete();
- }
- }
-
- @Test
- public void testSDKLocationValidation() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- NewLiferayPluginProjectOp op = newProjectOp( "test-sdk" );
-
- op.setProjectProvider( "ant" );
-
- op.execute( new ProgressMonitor() );
-
- SDK sdk = SDKUtil.getWorkspaceSDK();
-
- IPath sdkLocation = sdk.getLocation();
-
- if( sdk != null )
- {
- CoreUtil.getWorkspaceRoot().getProject( sdk.getName() ).delete( false, true, null );
- }
-
- CoreUtil.getWorkspaceRoot().getProject( "test-sdk" ).delete( false, true, null );
-
- // set existed project name
- op.setSdkLocation( sdkLocation.toOSString() );
- assertTrue( op.validation().message().contains( "A project with that name already exists." ) );
-
- op = newProjectOp( "test2-sdk" );
- op.setSdkLocation( "" );
- assertEquals( "This sdk location is empty.", op.validation().message() );
-
- op.setSdkLocation( sdkLocation.getDevice() + "/" );
- assertEquals( "This sdk location is not correct.", op.validation().message() );
-
- // sdk has no build.USERNAME.properties file
- sdkLocation.append( "build." + System.getProperty( "user.name" ) + ".properties" ).toFile().delete();
- IStatus validateStatus = sdk.validate( true );
- assertEquals( false, validateStatus.isOK() );
-
- }
-
- @Override
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
- }
-
- @Override
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip" );
- }
-
- @Override
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "com.liferay.portal.plugins.sdk-1.0.16-withdependencies/";
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp625Tests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp625Tests.java
deleted file mode 100644
index 8c857d8807..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp625Tests.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.layouttpl.core.operation.INewLayoutTplDataModelProperties;
-import com.liferay.ide.layouttpl.core.operation.LayoutTplDescriptorHelper;
-import com.liferay.ide.layouttpl.core.operation.NewLayoutTplDataModelProvider;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.sapphire.modeling.Status;
-import org.eclipse.sapphire.platform.PathBridge;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.junit.AfterClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Terry Jia
- */
-public class NewLiferayPluginProjectOp625Tests extends NewLiferayPluginProjectOpBase
-{
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- @Override
- protected String getServiceXmlDoctype()
- {
- return "service-builder PUBLIC \"-//Liferay//DTD Service Builder 6.2.0//EN\" \"http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd";
- }
-
- @Override
- @Test
- @Ignore
- public void testLocationListener() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- super.testLocationListener();
- }
-
- @Override
- @Test
- @Ignore
- public void testNewJsfRichfacesProjects() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- super.testNewJsfRichfacesProjects();
- }
-
- @Override
- @Test
- public void testNewLayoutAntProject() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- String projectName = "test-layouttpl-project-sdk";
- NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPluginType( PluginType.layouttpl );
-
- IProject layouttplProject = createAntProject( op );
-
- IFolder webappRoot = LiferayCore.create( IWebProject.class, layouttplProject ).getDefaultDocrootFolder();
-
- assertNotNull( webappRoot );
-
- IFile layoutXml = webappRoot.getFile( "WEB-INF/liferay-layout-templates.xml" );
-
- assertEquals( true, layoutXml.exists() );
-
- IFile wapTpl = webappRoot.getFile("test_layouttpl_project_sdk_6.2.5.wap.tpl");
-
- assertTrue(wapTpl.exists());
-
- IDataModel model = DataModelFactory.createDataModel( new NewLayoutTplDataModelProvider() );
-
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_ID, "newtemplate");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_NAME, "New Template");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_THUMBNAIL_FILE, "/newtemplate.png");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_WAP_TEMPLATE_FILE, "/newtemplate.wap.tpl");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_FILE, "/newtemplate.tpl");
-
- LayoutTplDescriptorHelper layoutHelper = new LayoutTplDescriptorHelper(layouttplProject);
-
- layoutHelper.addNewLayoutTemplate(model);
-
- String contents = CoreUtil.readStreamToString( layoutXml.getContents( true ) );
-
- assertTrue(contents.contains(""));
- }
-
- @Test
- @Ignore
- public void testNewProjectCustomLocationPortlet() throws Exception
- {
- // not supported in 6.2.3
- }
-
- @Test
- @Ignore
- public void testNewProjectCustomLocationWrongSuffix() throws Exception
- {
- // not supported in 6.2.3
- }
-
- @Test
- @Ignore
- public void testNewSDKProjectCustomLocation() throws Exception
- {
- // not supported in 6.2.3
- }
-
- @Test
- @Ignore
- public void testNewSDKProjectEclipseWorkspace() throws Exception
- {
- // not supported in 6.2.3
- }
-
- @Override
- @Test
- public void testNewSDKProjectInSDK() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- super.testNewSDKProjectInSDK();
- }
-
- @Override
- @Test
- public void testNewThemeProjects() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- super.testNewThemeProjects();
- }
-
- @Override
- @Test
- public void testPluginTypeListener() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- super.testPluginTypeListener( true );
- }
-
- @Test
- public void testProjectNameValidation() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- super.testProjectNameValidation( "project-name-validation-623" );
- }
-
- @Override
- @Test
- public void testNewSDKProjects() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- createAntProject( newProjectOp( "test-name-1" ) );
- createAntProject( newProjectOp( "test_name_1" ) );
- createAntProject( newProjectOp( "-portlet-portlet" ) );
- createAntProject( newProjectOp( "-portlet-hook" ) );
-
- final NewLiferayPluginProjectOp op = newProjectOp( "-hook-hook" );
- op.setPluginType( PluginType.hook );
- createAntProject( op );
- }
-
- @Test
- public void testNewWebAntProjectValidation() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final String projectName = "test-web-project-sdk";
-
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
-
- op.setPluginType( PluginType.web );
-
- op.setSdkLocation( PathBridge.create( getLiferayPluginsSdkDir() ) );
-
- assertEquals(
- "The selected Plugins SDK does not support creating new web type plugins. Please configure version 7.0 or greater.",
- op.getSdkLocation().validation().message() );
- }
-
- @Test
- public void testProjectNameValidationServiceAfterProjectCreated() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- // test service-builder project
- NewLiferayPluginProjectOp opCreateProjectA = newProjectOp("test-project-name");
-
- opCreateProjectA.setIncludeSampleCode( false );
- opCreateProjectA.setPluginType( PluginType.portlet );
-
- createAntProject( opCreateProjectA );
-
- Status projectNameAValidationResult = opCreateProjectA.getProjectName().validation();
-
- assertEquals(true, projectNameAValidationResult.ok());
-
- NewLiferayPluginProjectOp opCreateProjectB = newProjectOp("test-project-name");
- Status projectNameBValidationResult = opCreateProjectB.getProjectName().validation();
- assertEquals(false, projectNameBValidationResult.ok());
- }
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp701Tests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp701Tests.java
deleted file mode 100644
index da8056c43c..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp701Tests.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.layouttpl.core.operation.INewLayoutTplDataModelProperties;
-import com.liferay.ide.layouttpl.core.operation.LayoutTplDescriptorHelper;
-import com.liferay.ide.layouttpl.core.operation.NewLayoutTplDataModelProvider;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Terry Jia
- */
-public class NewLiferayPluginProjectOp701Tests extends NewLiferayPluginProjectOpBase
-{
-
- @Override
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
- }
-
- @Override
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip" );
- }
-
- @Override
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "com.liferay.portal.plugins.sdk-1.0.16-withdependencies/";
- }
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- @Override
- protected IPath getLiferayRuntimeDir()
- {
- return ProjectCore.getDefault().getStateLocation().append( "liferay-ce-portal-7.0-ga5/tomcat-8.0.32" );
- }
-
- @Override
- protected IPath getLiferayRuntimeZip()
- {
- return getLiferayBundlesPath().append( "liferay-ce-portal-tomcat-7.0-ga5-20171018150113838.zip" );
- }
-
- @Override
- public String getRuntimeVersion()
- {
- return "7.0.2";
- }
-
- @Override
- protected String getServiceXmlDoctype()
- {
- return "service-builder PUBLIC \"-//Liferay//DTD Service Builder 7.0.0//EN\" \"http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd";
- }
-
- @Override
- @Test
- @Ignore
- public void testLocationListener() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testNewJsfRichfacesProjects() throws Exception
- {
- }
-
- @Override
- @Test
- public void testNewLayoutAntProject() throws Exception
- {
- String projectName = "test-layouttpl-project-sdk";
- NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPluginType( PluginType.layouttpl );
-
- IProject layouttplProject = createAntProject( op );
-
- IFolder webappRoot = LiferayCore.create( IWebProject.class, layouttplProject ).getDefaultDocrootFolder();
-
- assertNotNull( webappRoot );
-
- IFile layoutXml = webappRoot.getFile( "WEB-INF/liferay-layout-templates.xml" );
-
- assertEquals( true, layoutXml.exists() );
-
- IFile wapTpl = webappRoot.getFile("test_layouttpl_project_sdk_7.0.2.wap.tpl");
-
- assertFalse(wapTpl.exists());
-
- IDataModel model = DataModelFactory.createDataModel( new NewLayoutTplDataModelProvider() );
-
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_ID, "newtemplate");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_NAME, "New Template");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_THUMBNAIL_FILE, "/newtemplate.png");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_WAP_TEMPLATE_FILE, "/newtemplate.wap.tpl");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_FILE, "/newtemplate.tpl");
-
- LayoutTplDescriptorHelper layoutHelper = new LayoutTplDescriptorHelper(layouttplProject);
-
- layoutHelper.addNewLayoutTemplate(model);
-
- String contents = CoreUtil.readStreamToString( layoutXml.getContents( true ) );
-
- assertFalse(contents.contains(""));
- }
-
- @Test
- @Ignore
- public void testNewProjectCustomLocationPortlet() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewProjectCustomLocationWrongSuffix() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewSDKProjectCustomLocation() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewSDKProjectEclipseWorkspace() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testNewSDKProjectInSDK() throws Exception
- {
- }
-
- @Override
- @Test
- public void testNewThemeProjects() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- super.testNewThemeProjects();
- }
-
- @Override
- @Test
- @Ignore
- public void testNewJsfAntProjects() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testPluginTypeListener() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testProjectNameValidation() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testNewSDKProjects() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewWebAntProjectValidation() throws Exception
- {
- }
-
- @BeforeClass
- public static void removeAllProjects() throws Exception
- {
- IProgressMonitor monitor = new NullProgressMonitor();
-
- for( IProject project : CoreUtil.getAllProjects() )
- {
- project.delete( true, monitor );
-
- assertFalse( project.exists() );
- }
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp7sp3Tests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp7sp3Tests.java
deleted file mode 100644
index 2d1b0510a0..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOp7sp3Tests.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.layouttpl.core.operation.INewLayoutTplDataModelProperties;
-import com.liferay.ide.layouttpl.core.operation.LayoutTplDescriptorHelper;
-import com.liferay.ide.layouttpl.core.operation.NewLayoutTplDataModelProvider;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.sapphire.modeling.Status;
-import org.eclipse.sapphire.platform.PathBridge;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Terry Jia
- */
-public class NewLiferayPluginProjectOp7sp3Tests extends NewLiferayPluginProjectOpBase
-{
-
- @Override
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
- }
-
- @Override
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip" );
- }
-
- @Override
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "com.liferay.portal.plugins.sdk-1.0.16-withdependencies/";
- }
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- @Override
- protected IPath getLiferayRuntimeDir()
- {
- return ProjectCore.getDefault().getStateLocation().append( "liferay-ce-portal-7.0-ga5/tomcat-8.0.32" );
- }
-
- @Override
- protected IPath getLiferayRuntimeZip()
- {
- return getLiferayBundlesPath().append( "liferay-ce-portal-tomcat-7.0-ga5-20171018150113838.zip" );
- }
-
- @Override
- public String getRuntimeVersion()
- {
- return "7.0.2";
- }
-
- @Override
- protected String getServiceXmlDoctype()
- {
- return "service-builder PUBLIC \"-//Liferay//DTD Service Builder 7.0.0//EN\" \"http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd";
- }
-
- @Override
- @Test
- @Ignore
- public void testLocationListener() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testNewJsfRichfacesProjects() throws Exception
- {
- }
-
- @Override
- @Test
- public void testNewLayoutAntProject() throws Exception
- {
- String projectName = "test-layouttpl-project-sdk";
- NewLiferayPluginProjectOp op = newProjectOp(projectName);
- op.setPluginType(PluginType.layouttpl);
-
- IProject layouttplProject = createAntProject(op);
-
- IFolder webappRoot = LiferayCore.create(IWebProject.class, layouttplProject).getDefaultDocrootFolder();
-
- assertNotNull(webappRoot);
-
- IFile layoutXml = webappRoot.getFile("WEB-INF/liferay-layout-templates.xml");
-
- assertEquals(true, layoutXml.exists());
-
- IFile wapTpl = webappRoot.getFile("test_layouttpl_project_sdk_7.0.2.wap.tpl");
-
- assertFalse(wapTpl.exists());
-
- IDataModel model = DataModelFactory.createDataModel(new NewLayoutTplDataModelProvider());
-
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_ID, "newtemplate");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_NAME, "New Template");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_THUMBNAIL_FILE, "/newtemplate.png");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_WAP_TEMPLATE_FILE, "/newtemplate.wap.tpl");
- model.setProperty(INewLayoutTplDataModelProperties.LAYOUT_TEMPLATE_FILE, "/newtemplate.tpl");
-
- LayoutTplDescriptorHelper layoutHelper = new LayoutTplDescriptorHelper(layouttplProject);
-
- layoutHelper.addNewLayoutTemplate(model);
-
- String contents = CoreUtil.readStreamToString(layoutXml.getContents(true));
-
- assertFalse(contents.contains(""));
- }
-
- @Test
- @Ignore
- public void testNewProjectCustomLocationPortlet() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewProjectCustomLocationWrongSuffix() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewSDKProjectCustomLocation() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewSDKProjectEclipseWorkspace() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testNewSDKProjectInSDK() throws Exception
- {
- }
-
- @Ignore
- @Override
- @Test
- public void testNewThemeProjects() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- super.testNewThemeProjects();
- }
-
- @Override
- @Test
- @Ignore
- public void testNewJsfAntProjects() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testPluginTypeListener() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testProjectNameValidation() throws Exception
- {
- }
-
- @Override
- @Test
- @Ignore
- public void testNewSDKProjects() throws Exception
- {
- }
-
- @Test
- @Ignore
- public void testNewWebAntProjectValidation() throws Exception
- {
- }
-
- @Test
- public void testNewExtAntProjectNotSupportedWithWorkspaceSDK() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- final String projectName = "test-ext-project-sdk";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
-
- op.setPluginType( PluginType.ext );
- op.setSdkLocation( PathBridge.create( getLiferayPluginsSdkDir() ) );
- Status validation = op.validation();
- assertEquals( true, validation.ok() );
-
- final IProject extProject = createAntProject( op );
-
- assertNotNull( extProject );
- }
-
- @BeforeClass
- public static void removeAllProjects() throws Exception
- {
- IProgressMonitor monitor = new NullProgressMonitor();
-
- for( IProject project : CoreUtil.getAllProjects() )
- {
- project.delete( true, monitor );
-
- assertFalse( project.exists() );
- }
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOpBase.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOpBase.java
deleted file mode 100644
index 164cba37b9..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectOpBase.java
+++ /dev/null
@@ -1,915 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import com.liferay.ide.core.ILiferayConstants;
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.project.core.IPortletFramework;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.sapphire.DefaultValueService;
-import org.eclipse.sapphire.PossibleValuesService;
-import org.eclipse.sapphire.modeling.ProgressMonitor;
-import org.eclipse.sapphire.modeling.Status;
-import org.eclipse.sapphire.platform.PathBridge;
-import org.eclipse.sapphire.services.ValidationService;
-import org.eclipse.sapphire.services.ValueLabelService;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Gregory Amerson
- * @author Kuo Zhang
- * @author Terry Jia
- */
-@SuppressWarnings( "restriction" )
-public abstract class NewLiferayPluginProjectOpBase extends ProjectCoreBase
-{
- protected IProject checkNewJsfAntProjectIvyFile( IProject jsfProject, String jsfSuite ) throws Exception
- {
- final IFile ivyXml = jsfProject.getFile( "ivy.xml" );
-
- final String ivyXmlContent = CoreUtil.readStreamToString( ivyXml.getContents() );
-
- final String expectedIvyXmlContent =
- CoreUtil.readStreamToString( this.getClass().getResourceAsStream(
- "files/" + getRuntimeVersion() + "/ivy-" + jsfSuite + ".xml" ) );
-
- assertEquals( stripCarriageReturns( expectedIvyXmlContent ), stripCarriageReturns( ivyXmlContent ) );
-
- return jsfProject;
- }
-
- protected void checkNewJsfAntProjectXHtmlPagesLocation( IProject jsfProject ) throws Exception
- {
- final IFolder docroot = CoreUtil.getDefaultDocrootFolder( jsfProject );
- final IFolder views = docroot.getFolder( "/WEB-INF/views" );
-
- assertEquals( true, views.exists() );
-
- final IFolder oldViews = docroot.getFolder( "/views" );
-
- assertEquals( false, oldViews.exists() );
-
- final String contents =
- CoreUtil.readStreamToString( docroot.getFile( "/WEB-INF/portlet.xml" ).getContents( true ) );
-
- if( contents.contains( "init-param" ) )
- {
- assertEquals( true, contents.contains( "/WEB-INF/views/view.xhtml" ) );
- }
- }
-
- protected IProject checkNewThemeAntProject( NewLiferayPluginProjectOp op, IProject project, String expectedBuildFile )
- throws Exception
- {
- final String themeParent = op.getThemeParent().content();
- final String themeFramework = op.getThemeFramework().content();
- final IFolder defaultDocroot = LiferayCore.create( IWebProject.class, project ).getDefaultDocrootFolder();
- final IFile readme = defaultDocroot.getFile( "WEB-INF/src/resources-importer/readme.txt" );
-
- assertEquals( true, readme.exists() );
-
- final IFile buildXml = project.getFile( "build.xml" );
-
- final String buildXmlContent = CoreUtil.readStreamToString( buildXml.getContents() );
-
- if( expectedBuildFile == null )
- {
- expectedBuildFile = "build-theme-" + themeParent + "-" + themeFramework + ".xml";
- }
-
- final String expectedbuildXmlContent =
- CoreUtil.readStreamToString(
- this.getClass().getResourceAsStream( "files/" + getRuntimeVersion() + "/" + expectedBuildFile ) ).replaceAll(
- "RUNTIMEVERSION", getRuntimeVersion() );
-
- assertEquals( stripCarriageReturns( expectedbuildXmlContent ), stripCarriageReturns( buildXmlContent ) );
-
- return project;
- }
-
- protected IProject createNewJsfAntProject( String jsfSuite, String suffix ) throws Exception
- {
- final String projectName = jsfSuite + suffix;
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPortletFramework( "jsf-2.x" );
- op.setPortletFrameworkAdvanced( jsfSuite );
-
- final IProject jsfProject = createAntProject( op );
-
- final IFolder defaultDocroot =
- LiferayCore.create( IWebProject.class, jsfProject ).getDefaultDocrootFolder();
-
- assertNotNull( defaultDocroot );
-
- final IFile config = defaultDocroot.getFile( "WEB-INF/faces-config.xml" );
-
- assertEquals( true, config.exists() );
-
- checkNewJsfAntProjectXHtmlPagesLocation( jsfProject );
-
- return checkNewJsfAntProjectIvyFile( jsfProject, jsfSuite );
- }
-
- protected IProject createNewSDKProjectCustomLocation(
- final NewLiferayPluginProjectOp newProjectOp, IPath customLocation ) throws Exception
- {
- newProjectOp.setUseDefaultLocation( false );
-
- newProjectOp.setLocation( PathBridge.create( customLocation ) );
-
- return createAntProject( newProjectOp );
- }
-
- protected IProject createNewThemeAntProject( final NewLiferayPluginProjectOp op ) throws Exception
- {
- final IProject themeProject = createAntProject( op );
-
- final IFolder defaultDocroot =
- LiferayCore.create( IWebProject.class, themeProject ).getDefaultDocrootFolder();
-
- assertNotNull( defaultDocroot );
-
- return themeProject;
- }
-
- protected IProject createNewThemeAntProject( String themeParent, String themeFramework ) throws Exception
- {
- final String projectName = "test-theme-project-sdk-" + themeParent + "-" + themeFramework;
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPluginType( PluginType.theme );
- op.setThemeParent( themeParent );
- op.setThemeFramework( themeFramework );
-
- final IProject project = createNewThemeAntProject( op );
-
- return checkNewThemeAntProject( op, project, null );
- }
-
- protected IProject createNewThemeAntProjectDefaults() throws Exception
- {
- final String projectName = "test-theme-project-sdk-defaults";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPluginType( PluginType.theme );
-
- IProject project = createNewThemeAntProject( op );
-
- return checkNewThemeAntProject( op, project, "build-theme-defaults.xml" );
- }
-
- protected abstract String getServiceXmlDoctype();
-
- @Test
- public void testDisplayNameDefaultValue() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "display-name-default-value" );
-
- final DefaultValueService dvs = op.getDisplayName().service( DefaultValueService.class );
-
- final String exceptedDisplayName = "Test Display Name Default Value";
-
- op.setProjectName( "test display name default value" );
- assertEquals( exceptedDisplayName, op.getDisplayName().content() );
- assertEquals( exceptedDisplayName, dvs.value() );
-
- op.setProjectName( "Test-Display-Name-Default-Value" );
- assertEquals( exceptedDisplayName, op.getDisplayName().content() );
- assertEquals( exceptedDisplayName, dvs.value() );
-
- op.setProjectName( "Test_Display_Name_Default_Value" );
- assertEquals( exceptedDisplayName, op.getDisplayName().content() );
- assertEquals( exceptedDisplayName, dvs.value() );
-
- op.setProjectName( "test-Display_name Default-value" );
- assertEquals( exceptedDisplayName, op.getDisplayName().content() );
- assertEquals( exceptedDisplayName, dvs.value() );
-
- final String projectName = "test-display_name default value";
-
- final String[] suffixs = { "-portlet", "-hook", "-theme", "-layouttpl", "-ext" };
-
- for( String suffix : suffixs )
- {
- op.setProjectName( projectName + suffix );
- assertEquals( exceptedDisplayName, op.getDisplayName().content() );
- assertEquals( exceptedDisplayName, dvs.value() );
- }
- }
-
- protected void testLocationListener() throws Exception
- {
- final NewLiferayPluginProjectOp op = newProjectOp( "location-listener" );
- op.setProjectProvider( "ant" );
- op.setUseDefaultLocation( false );
-
- final String projectNameWithoutSuffix = "project-name-without-suffix";
- final String locationWithoutSuffix = "location-without-suffix";
-
- op.setPluginType( "portlet" );
- final String suffix = "-portlet";
-
- // Both of project name and location are without type suffix.
- op.setProjectName( projectNameWithoutSuffix );
- op.setLocation( locationWithoutSuffix );
- assertEquals(
- locationWithoutSuffix + "/" + projectNameWithoutSuffix + suffix, op.getLocation().content().toString() );
-
- // Location does't have a type suffix, project name has one.
- op.setProjectName( projectNameWithoutSuffix + suffix );
- op.setLocation( locationWithoutSuffix );
- assertEquals( locationWithoutSuffix , op.getLocation().content().toString() );
-
- // Location has a type suffix.
- op.setLocation( locationWithoutSuffix + suffix );
- assertEquals( locationWithoutSuffix + suffix, op.getLocation().content().toString() );
- }
-
- @Test
- @Ignore
- public void testNewExtAntProject() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "ext" );
- op.setPluginType( PluginType.ext );
-
- IProject extProject = null;
-
- try
- {
- extProject = createAntProject( op );
- }
- catch( Throwable e )
- {
- }
-
- assertNotNull( extProject );
-
- final IFolder defaultDocroot =
- LiferayCore.create( IWebProject.class, extProject ).getDefaultDocrootFolder();
-
- assertNotNull( defaultDocroot );
-
- final IFile extFile = defaultDocroot.getFile( "WEB-INF/liferay-portlet-ext.xml" );
-
- assertEquals( true, extFile.exists() );
- }
-
- @Test
- public void testNewHookAntProject() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "test-hook-project-sdk" );
- op.setPluginType( PluginType.hook );
-
- final IProject hookProject = createAntProject( op );
-
- final IFolder webappRoot = LiferayCore.create( IWebProject.class, hookProject ).getDefaultDocrootFolder();
-
- assertNotNull( webappRoot );
-
- final IFile hookXml = webappRoot.getFile( "WEB-INF/liferay-hook.xml" );
-
- assertEquals( true, hookXml.exists() );
- }
-
- @Test
- public void testNewJsfAntProjects() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- createNewJsfAntProject( "jsf", "" );
- createNewJsfAntProject( "liferay_faces_alloy", "" );
- createNewJsfAntProject( "icefaces", "" );
- createNewJsfAntProject( "primefaces", "" );
- }
-
- private void testNewJsfRichfacesProject( String framework, boolean richfacesEnabled ) throws Exception
- {
- final IProject project = createNewJsfAntProject( framework, "rf" );
-
- final String contents =
- CoreUtil.readStreamToString( project.getFile( "docroot/WEB-INF/web.xml" ).getContents( true ) );
-
- assertEquals( richfacesEnabled, contents.contains( "org.richfaces.resourceMapping.enabled" ) );
-
- assertEquals( richfacesEnabled, contents.contains( "org.richfaces.webapp.ResourceServlet" ) );
- }
-
- protected void testNewJsfRichfacesProjects() throws Exception
- {
- testNewJsfRichfacesProject( "primefaces", false );
- testNewJsfRichfacesProject( "richfaces", true );
- }
-
- protected void testNewLayoutAntProject() throws Exception
- {
- final String projectName = "test-layouttpl-project-sdk";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPluginType( PluginType.layouttpl );
-
- IProject layouttplProject = createAntProject( op );
-
- final IFolder webappRoot = LiferayCore.create( IWebProject.class, layouttplProject ).getDefaultDocrootFolder();
-
- assertNotNull( webappRoot );
-
- final IFile layoutXml = webappRoot.getFile( "WEB-INF/liferay-layout-templates.xml" );
-
- assertEquals( true, layoutXml.exists() );
- }
-
- @Test
- public void testNewPortletAntProject() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "portlet-without-servicexml" );
- op.setPluginType( PluginType.portlet );
-
- final IProject portletProject = createAntProject( op );
-
- final IFolder webappRoot = LiferayCore.create( IWebProject.class, portletProject ).getDefaultDocrootFolder();
-
- assertNotNull( webappRoot );
-
- final IFile serviceXml = webappRoot.getFile( "WEB-INF/service.xml" );
-
- assertEquals( false, serviceXml.exists() );
- }
-
- protected void testNewSDKProjectInSDK() throws Exception
- {
- final IProject projectInSDK = createAntProject( newProjectOp( "test-project-in-sdk" ) );
-
- assertNotNull( projectInSDK );
-
- assertEquals( true, projectInSDK.exists() );
-
- final SDK sdk = SDKUtil.getWorkspaceSDK();
-
- assertEquals( true, sdk.getLocation().isPrefixOf( projectInSDK.getLocation() ) );
-
- final IFile buildXml = projectInSDK.getFile( "build.xml" );
-
- assertNotNull( buildXml );
-
- assertEquals( true, buildXml.exists() );
-
- final String buildXmlContent = CoreUtil.readStreamToString( buildXml.getContents( true ) );
-
- final Pattern p =
- Pattern.compile( ".* acturalFrameworks =
- op.getPortletFrameworkAdvanced().service( PossibleValuesService.class ).values();
-
- assertNotNull( acturalFrameworks );
-
- Set exceptedFrameworks = new HashSet();
- exceptedFrameworks.add( "jsf" );
- exceptedFrameworks.add( "icefaces" );
- exceptedFrameworks.add( "liferay_faces_alloy" );
- exceptedFrameworks.add( "primefaces" );
- exceptedFrameworks.add( "richfaces" );
-
- assertNotNull( exceptedFrameworks );
-
- assertEquals( true, exceptedFrameworks.containsAll( acturalFrameworks ) );
- assertEquals( true, acturalFrameworks.containsAll( exceptedFrameworks ) );
-
- }
-
- @Test
- public void testPortletFrameworkPossibleValues() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "test-portlet-framework-possible-values" );
- op.setProjectProvider( "ant" );
- op.setPluginType( "portlet" );
-
- final Set acturalFrameworks = op.getPortletFramework().service( PossibleValuesService.class ).values();
-
- assertNotNull( acturalFrameworks );
-
- Set exceptedFrameworks = new HashSet();
- exceptedFrameworks.add( "mvc" );
- exceptedFrameworks.add( "jsf-2.x" );
- exceptedFrameworks.add( "vaadin" );
- exceptedFrameworks.add( "spring_mvc" );
-
- assertNotNull( exceptedFrameworks );
-
- assertEquals( true, exceptedFrameworks.containsAll( acturalFrameworks ) );
- assertEquals( true, acturalFrameworks.containsAll( exceptedFrameworks ) );
- }
-
- @Test
- public void testPortletFrameworkValueLabel() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "test-portlet-framework-value-label" );
-
- final ValueLabelService vls = op.getPortletFramework().service( ValueLabelService.class );
-
- Set acturalLables = new HashSet();
-
- for( IPortletFramework pf : ProjectCore.getPortletFrameworks() )
- {
- acturalLables.add( vls.provide( pf.getShortName() ) );
- }
-
- assertNotNull( acturalLables );
-
- Set exceptedLables = new HashSet();
- exceptedLables.add( "Liferay MVC" );
- exceptedLables.add( "JSF 2.x" );
- exceptedLables.add( "Vaadin" );
- exceptedLables.add( "JSF standard" );
- exceptedLables.add( "ICEfaces" );
- exceptedLables.add( "Liferay Faces Alloy" );
- exceptedLables.add( "PrimeFaces" );
- exceptedLables.add( "RichFaces" );
- exceptedLables.add( "Spring MVC" );
-
- assertEquals( true, exceptedLables.containsAll( acturalLables ) );
- assertEquals( true, acturalLables.containsAll( exceptedLables ) );
- }
-
- @Test
- public void testServiceBuilderProjectName() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "test-sb" );
-
- op.setPluginType( PluginType.servicebuilder );
- op.setUseDefaultLocation( true );
-
- final IProject expectedProject = createAntProject( op );
-
- String expectedProjectName = expectedProject.getName();
-
- String actualProjectName = op.getProjectNames().get(0).getName().content();
-
- assertEquals( expectedProjectName, actualProjectName );
- }
-
- @Test
- public void testSDKLocationValidation() throws Exception
- {
- if( shouldSkipBundleTests() )return;
-
- NewLiferayPluginProjectOp op = newProjectOp( "test-sdk" );
-
- op.setProjectProvider( "ant" );
-
- Status status = op.execute( new ProgressMonitor() );
-
- if( !status.ok() )
- {
- throw new Exception( status.exception() );
- }
-
- SDK sdk = SDKUtil.getWorkspaceSDK();
-
- IPath sdkLocation = sdk.getLocation();
-
- if( sdk != null )
- {
- CoreUtil.getWorkspaceRoot().getProject( sdk.getName() ).delete( false, false, null );
- }
-
- // set existed project name
- IProject project = getProject( "portlets", "test-sdk-" + getRuntimeVersion() + "-portlet" );
- project.delete( false, false, null );
- op.setSdkLocation( sdkLocation.toOSString() );
- assertTrue( op.validation().message().contains( "is not valid because a project already exists at that location." ) );
-
- op = newProjectOp( "test2-sdk" );
-
- op.setSdkLocation( "" );
- assertEquals( "This sdk location is empty.", op.validation().message() );
-
- op.setSdkLocation( sdk.getLocation().getDevice() + "/" );
- assertEquals( "This sdk location is not correct.", op.validation().message() );
-
- // sdk has no build.USERNAME.properties file
- sdkLocation.append( "build." + System.getenv().get( "USER" ) + ".properties" ).toFile().delete();
- sdkLocation.append( "build." + System.getenv().get( "USERNAME" ) + ".properties" ).toFile().delete();
- op.setSdkLocation( sdkLocation.toOSString() );
-
- String expectedMessageRegx = ".*app.server.*";
- assertTrue( op.validation().message().matches( expectedMessageRegx ) );
-
- assertEquals( false, op.validation().ok() );
- }
-
- protected void testProjectNameValidation( final String initialProjectName ) throws Exception
- {
- final NewLiferayPluginProjectOp op1 = newProjectOp( "" );
- op1.setUseDefaultLocation( true );
-
- ValidationService vs = op1.getProjectName().service( ValidationService.class );
-
- final String validProjectName = initialProjectName;
-
- op1.setProjectName( validProjectName );
- assertEquals( "ok", vs.validation().message() );
- assertEquals( "ok", op1.getProjectName().validation().message() );
-
- op1.setProjectName( validProjectName + "-portlet" );
- assertEquals( "ok", vs.validation().message() );
- assertEquals( "ok", op1.getProjectName().validation().message() );
-
- final IProject proj = createProject( op1 );
-
- op1.dispose();
-
- final NewLiferayPluginProjectOp op2 = newProjectOp( "" );
- vs = op2.getProjectName().service( ValidationService.class );
-
- op2.setProjectName( validProjectName + "-portlet" );
- assertEquals( "A project with that name already exists.", vs.validation().message() );
- assertEquals( "A project with that name already exists.", op2.getProjectName().validation().message() );
-
- op2.setProjectName( validProjectName );
- assertEquals( "A project with that name already exists.", vs.validation().message() );
- assertEquals( "A project with that name already exists.", op2.getProjectName().validation().message() );
-
- final IPath dotProjectLocation = proj.getLocation().append( ".project" );
-
- if( dotProjectLocation.toFile().exists() )
- {
- dotProjectLocation.toFile().delete();
- }
-
- op2.dispose();
-
- final NewLiferayPluginProjectOp op3 = newProjectOp( "" );
- vs = op3.getProjectName().service( ValidationService.class );
-
- op3.setProjectName( validProjectName );
- assertEquals( "A project with that name already exists.", vs.validation().message() );
- assertEquals( "A project with that name already exists.", op3.getProjectName().validation().message() );
-
- String invalidProjectName = validProjectName + "/";
- op3.setProjectName( invalidProjectName );
- assertEquals(
- "/ is an invalid character in resource name '" + invalidProjectName + "'.", vs.validation().message() );
-
- op3.dispose();
-// invalidProjectName = validProjectName + ".";
-// op3.setProjectName( invalidProjectName );
-// assertEquals( "'" + invalidProjectName + "' is an invalid name on this platform.", vs.validation().message() );
-// assertEquals(
-// "'" + invalidProjectName + "' is an invalid name on this platform.",
-// op3.getProjectName().validation().message() );
- }
-
- @Test
- public void testProjectProviderValueLabel() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "test-project-provider-value-label" );
-
- final ValueLabelService vls = op.getProjectProvider().service( ValueLabelService.class );
-
- final Set actualProviderShortNames =
- op.getProjectProvider().service( PossibleValuesService.class ).values();
-
- Set actualLabels = new HashSet();
-
- for( String shortName : actualProviderShortNames )
- {
- actualLabels.add( vls.provide( shortName ) );
- }
-
- assertNotNull( actualLabels );
-
- Set exceptedLabels = new HashSet();
- exceptedLabels.add( "Ant (liferay-plugins-sdk)" );
- exceptedLabels.add( "Maven (liferay-maven-plugin)" );
-
- assertEquals( true, exceptedLabels.containsAll( actualLabels ) );
- }
-
- @Test
- public void testHookProjectName() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NewLiferayPluginProjectOp op = newProjectOp( "test-hook" );
-
- op.setPluginType( PluginType.hook );
- op.setUseDefaultLocation( true );
-
- final IProject expectedProject = createAntProject( op );
-
- String expectedProjectName = expectedProject.getName();
-
- String actualProjectName = op.getProjectNames().get(0).getName().content();
-
- assertEquals( expectedProjectName, actualProjectName );
- }
-
- @Test
- public void testIncludeSampleCode() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- // test portlet project
- NewLiferayPluginProjectOp op = newProjectOp("test-include-sample-code-portlet");
-
- op.setIncludeSampleCode( true );
- op.setPluginType( PluginType.portlet );
-
- IProject project = createAntProject( op );
-
- IWebProject webProject = LiferayCore.create(IWebProject.class, project);
-
- IFile portletXml = webProject.getDescriptorFile( ILiferayConstants.PORTLET_XML_FILE );
- IFile liferayPortletXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_PORTLET_XML_FILE );
- IFile liferayDisplayXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_DISPLAY_XML_FILE );
-
- assertNotNull( portletXml );
- assertNotNull( liferayPortletXml );
- assertNotNull( liferayDisplayXml );
-
- assertEquals( 1, countElements( portletXml, "portlet" ) );
- assertEquals( 1, countElements( liferayPortletXml, "portlet" ) );
- assertEquals( 1, countElements( liferayDisplayXml, "category" ) );
- }
-
- @Test
- public void testIncludeSampleCodeServiceBuilder() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- // test service-builder project
- NewLiferayPluginProjectOp op = newProjectOp("test-include-sample-code-service-builder");
-
- op.setIncludeSampleCode( true );
- op.setPluginType( PluginType.servicebuilder );
-
- IProject project = createAntProject( op );
- IWebProject webProject = LiferayCore.create(IWebProject.class, project);
-
- IFile portletXml = webProject.getDescriptorFile( ILiferayConstants.PORTLET_XML_FILE );
- IFile liferayPortletXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_PORTLET_XML_FILE );
- IFile liferayDisplayXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_DISPLAY_XML_FILE );
- IFile serviceXml = webProject.getDescriptorFile( ILiferayConstants.SERVICE_XML_FILE );
-
- assertNotNull( portletXml );
- assertNotNull( liferayPortletXml );
- assertNotNull( liferayDisplayXml );
- assertNotNull( serviceXml );
-
- assertEquals( 1, countElements( portletXml, "portlet" ) );
- assertEquals( 1, countElements( liferayPortletXml, "portlet" ) );
- assertEquals( 1, countElements( liferayDisplayXml, "category" ) );
- assertEquals( 1, countElements( serviceXml, "entity" ) );
- }
-
- @Test
- public void testDontIncludeSampleCode() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- // test portlet project
- NewLiferayPluginProjectOp op = newProjectOp("test-dont-include-sample-code-portlet");
-
- op.setIncludeSampleCode( false );
- op.setPluginType( PluginType.portlet );
-
- IProject project = createAntProject( op );
-
- IWebProject webProject = LiferayCore.create(IWebProject.class, project);
-
- IFile portletXml = webProject.getDescriptorFile( ILiferayConstants.PORTLET_XML_FILE );
- IFile liferayPortletXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_PORTLET_XML_FILE );
- IFile liferayDisplayXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_DISPLAY_XML_FILE );
-
- assertNotNull( portletXml );
- assertNotNull( liferayPortletXml );
- assertNotNull( liferayDisplayXml );
-
- assertEquals( 0, countElements( portletXml, "portlet" ) );
- assertEquals( 0, countElements( liferayPortletXml, "portlet" ) );
- assertEquals( 0, countElements( liferayDisplayXml, "category" ) );
- }
-
- @Test
- public void testDontIncludeSampleCodeServiceBuilder() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- // test service-builder project
- NewLiferayPluginProjectOp op = newProjectOp("test-dont-include-sample-code-service-builder");
-
- op.setIncludeSampleCode( false );
- op.setPluginType( PluginType.servicebuilder );
-
- IProject project = createAntProject( op );
-
- IWebProject webProject = LiferayCore.create(IWebProject.class, project);
-
- IFile portletXml = webProject.getDescriptorFile( ILiferayConstants.PORTLET_XML_FILE );
- IFile liferayPortletXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_PORTLET_XML_FILE );
- IFile liferayDisplayXml = webProject.getDescriptorFile( ILiferayConstants.LIFERAY_DISPLAY_XML_FILE );
- IFile serviceXml = webProject.getDescriptorFile( ILiferayConstants.SERVICE_XML_FILE );
-
- assertNotNull( portletXml );
- assertNotNull( liferayPortletXml );
- assertNotNull( liferayDisplayXml );
- assertNotNull( serviceXml );
-
- assertEquals( 0, countElements( portletXml, "portlet" ) );
- assertEquals( 0, countElements( liferayPortletXml, "portlet" ) );
- assertEquals( 0, countElements( liferayDisplayXml, "category" ) );
- assertEquals( 0, countElements( serviceXml, "entity" ) );
- }
-
- protected int countElements( IFile file, String elementName ) throws Exception
- {
- final IDOMModel domModel = (IDOMModel) StructuredModelManager.getModelManager().getModelForRead( file );
- final IDOMDocument document = domModel.getDocument();
-
- final int count = document.getElementsByTagName( elementName ).getLength();
-
- domModel.releaseFromRead();
-
- return count;
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectPortletNameOpTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectPortletNameOpTests.java
deleted file mode 100644
index 498f747d58..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayPluginProjectPortletNameOpTests.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-
-import org.eclipse.core.internal.resources.ResourceException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-/**
- * @author Simon Jiang
- */
-@SuppressWarnings("restriction")
-public class NewLiferayPluginProjectPortletNameOpTests extends ProjectCoreBase
-{
-
- @Override
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
- }
-
- @Override
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip" );
- }
-
- @Override
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "com.liferay.portal.plugins.sdk-1.0.16-withdependencies/";
- }
-
- @AfterClass
- public static void removePluginsSDK() throws CoreException {
- IProject[] projects = CoreUtil.getAllProjects();
-
- for (IProject project : projects) {
- if (project != null && project.isAccessible() && project.exists()) {
- try {
- project.close(new NullProgressMonitor());
- project.delete(true, new NullProgressMonitor());
- }
- catch (ResourceException re) {
- project.close(new NullProgressMonitor());
- project.delete(true, new NullProgressMonitor());
- }
- }
- }
- }
-
- protected IProject createNewJSFPortletProjectCustomPortletName(
- final String jsfSuite, String suffix, String customPortletName ) throws Exception
- {
- final String projectName = "test-" + jsfSuite + suffix + "-sdk-project";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setIncludeSampleCode( true );
- op.setPortletFramework( "jsf-2.x" );
- op.setPortletFrameworkAdvanced( "liferay_faces_alloy" );
- op.setPortletName( customPortletName );
- final IProject jsfProject = createAntProject( op );
-
- final IFolder webappRoot = LiferayCore.create( IWebProject.class, jsfProject ).getDefaultDocrootFolder();
-
- assertNotNull( webappRoot );
-
- final IFile config = webappRoot.getFile( "WEB-INF/faces-config.xml" );
-
- assertEquals( true, config.exists() );
-
- return jsfProject;
- }
-
- protected IProject createNewMVCPortletProjectCustomPortletName( String customPortletName ) throws Exception
- {
- final String projectName = "test-mvc-sdk-project";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setIncludeSampleCode( true );
- op.setPortletFramework( "mvc" );
- op.setPortletName( customPortletName );
-
- final IProject mvcProject = createAntProject( op );
-
- assertNotNull( LiferayCore.create( IWebProject.class, mvcProject ).getDefaultDocrootFolder() );
-
- return mvcProject;
- }
-
- @Test
- public void testNewJSFPortletProjectPortletName() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- final String jsfSuite = "jsf-2.x";
- final String suffix = "";
- final String customPortletName = "test111";
-
- IProject jsfProject = createNewJSFPortletProjectCustomPortletName( jsfSuite, suffix, customPortletName );
-
- final IFolder defaultDocroot = LiferayCore.create( IWebProject.class, jsfProject ).getDefaultDocrootFolder();
-
- final IFile portletXml = defaultDocroot.getFile( "WEB-INF/portlet.xml" );
-
- assertEquals( true, portletXml.exists() );
-
- final String portletXmlContent = CoreUtil.readStreamToString( portletXml.getContents() );
-
- assertEquals( true, portletXmlContent.contains( customPortletName ) );
-
- final IFile liferayPortletXml = defaultDocroot.getFile( "WEB-INF/liferay-portlet.xml" );
-
- assertEquals( true, liferayPortletXml.exists() );
-
- final String liferayPortletXmlContent = CoreUtil.readStreamToString( liferayPortletXml.getContents() );
-
- assertEquals( true, liferayPortletXmlContent.contains( customPortletName ) );
-
- final IFile liferayDisplayXml = defaultDocroot.getFile( "WEB-INF/liferay-display.xml" );
-
- assertEquals( true, liferayDisplayXml.exists() );
-
- final String liferayDisplayXmlContent = CoreUtil.readStreamToString( liferayDisplayXml.getContents() );
-
- assertEquals( true, liferayDisplayXmlContent.contains( customPortletName ) );
- }
-
- @Test
- public void testNewMVCPortletProjectCustomPortletName() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- final String customPortletName = "test111";
-
- IProject jsfProject = createNewMVCPortletProjectCustomPortletName( customPortletName );
-
- final IFolder docroot = LiferayCore.create( IWebProject.class, jsfProject ).getDefaultDocrootFolder();
-
- final IFile portletXml = docroot.getFile( "WEB-INF/portlet.xml" );
-
- assertEquals( true, portletXml.exists() );
-
- final String portletXmlContent = CoreUtil.readStreamToString( portletXml.getContents() );
-
- assertEquals( true, portletXmlContent.contains( customPortletName ) );
-
- final IFile liferayPortletXml = docroot.getFile( "WEB-INF/liferay-portlet.xml" );
-
- assertEquals( true, liferayPortletXml.exists() );
-
- final String liferayPortletXmlContent = CoreUtil.readStreamToString( liferayPortletXml.getContents() );
-
- assertEquals( true, liferayPortletXmlContent.contains( customPortletName ) );
-
- final IFile liferayDisplayXml = docroot.getFile( "WEB-INF/liferay-display.xml" );
-
- assertEquals( true, liferayDisplayXml.exists() );
-
- final String liferayDisplayXmlContent = CoreUtil.readStreamToString( liferayDisplayXml.getContents() );
-
- assertEquals( true, liferayDisplayXmlContent.contains( customPortletName ) );
- }
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayWebPluginProjectTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayWebPluginProjectTests.java
deleted file mode 100644
index f7e81edbea..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/NewLiferayWebPluginProjectTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.core.IWebProject;
-import com.liferay.ide.core.LiferayCore;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-/**
- * @author Terry Jia
- */
-public class NewLiferayWebPluginProjectTests extends ProjectCoreBase
-{
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- @Override
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies" );
- }
-
- @Override
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append(
- "com.liferay.portal.plugins.sdk-1.0.16-withdependencies.zip" );
- }
-
- @Override
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "com.liferay.portal.plugins.sdk-1.0.16-withdependencies/";
- }
-
- @Test
- public void testNewWebAntProject() throws Exception
- {
- if( shouldSkipBundleTests() )
- return;
-
- final String projectName = "test-web-project-sdk";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
-
- op.setPluginType( PluginType.web );
-
- final IProject webProject = createAntProject( op );
-
- assertNotNull( LiferayCore.create( IWebProject.class, webProject ).getDefaultDocrootFolder() );
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/PluginsSDKNameValidatorTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/PluginsSDKNameValidatorTests.java
deleted file mode 100644
index a8f93cacc3..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/PluginsSDKNameValidatorTests.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.project.core.tests;
-
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import com.liferay.ide.project.core.PluginsSDKProjectRuntimeValidator;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.PluginType;
-import com.liferay.ide.project.core.util.ProjectUtil;
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import org.eclipse.core.internal.resources.ProjectDescription;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.junit.AfterClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Gregory Amerson
- * @author Kuo Zhang
- * @author Simon Jiang
- */
-@SuppressWarnings( "restriction" )
-public class PluginsSDKNameValidatorTests extends ProjectCoreBase
-{
-
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- @Test
- @Ignore
- public void testSDKProjectsValidator() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final String projectName = "Test2";
- final NewLiferayPluginProjectOp op = newProjectOp( projectName );
- op.setPluginType( PluginType.portlet );
-
- final IProject portletProject = createAntProject( op );
-
- final PluginsSDKProjectRuntimeValidator validator = new PluginsSDKProjectRuntimeValidator();
- validator.validate( ProjectUtil.getFacetedProject( portletProject ) );
-
- final IMarker sdkMarker =
- getProjectMarkers(
- portletProject, ProjectCore.LIFERAY_PROJECT_MARKER_TYPE,
- PluginsSDKProjectRuntimeValidator.ID_PLUGINS_SDK_NOT_SET );
-
- assertNull( sdkMarker );
-
- final String sdkName = SDKUtil.getSDK( portletProject ).getName();
- final IProjectDescription oldDescription = portletProject.getDescription();
- final ProjectDescription newDescripton = new ProjectDescription();
-
- newDescripton.setName( oldDescription.getName() );
- newDescripton.setLocation( ProjectCore.getDefault().getStateLocation().append( projectName ) );
- newDescripton.setBuildSpec( oldDescription.getBuildSpec() );
- newDescripton.setNatureIds( oldDescription.getNatureIds() );
-
- portletProject.move( newDescripton, true, new NullProgressMonitor() );
- portletProject.open( IResource.FORCE, new NullProgressMonitor() );
-
- validator.validate( ProjectUtil.getFacetedProject( portletProject ) );
-
- final IMarker newSdkMarker =
- getProjectMarkers(
- portletProject, ProjectCore.LIFERAY_PROJECT_MARKER_TYPE,
- PluginsSDKProjectRuntimeValidator.ID_PLUGINS_SDK_NOT_SET );
-
- assertNotNull( newSdkMarker );
-
- SDKUtil.saveSDKNameSetting( portletProject, sdkName );
-
- validator.validate( ProjectUtil.getFacetedProject( portletProject ) );
-
- final IMarker resolutionSdkMarker =
- getProjectMarkers(
- portletProject, ProjectCore.LIFERAY_PROJECT_MARKER_TYPE,
- PluginsSDKProjectRuntimeValidator.ID_PLUGINS_SDK_NOT_SET );
-
- assertNull( resolutionSdkMarker );
- }
-
- private IMarker getProjectMarkers( IProject proj, String markerType, String markerSourceId ) throws Exception
- {
- if( proj.isOpen() )
- {
- IMarker[] markers = proj.findMarkers( markerType, true, IResource.DEPTH_INFINITE );
-
- for( IMarker marker : markers )
- {
- if( markerSourceId.equals( marker.getAttribute( IMarker.SOURCE_ID ) ) )
- {
- return marker;
- }
- }
- }
-
- return null;
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ProjectCoreBase.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ProjectCoreBase.java
index ddb92c8ab5..58cbb88093 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ProjectCoreBase.java
+++ b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/ProjectCoreBase.java
@@ -19,39 +19,10 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.core.util.JobUtil;
-import com.liferay.ide.core.util.StringPool;
-import com.liferay.ide.core.util.ZipUtil;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.project.core.ProjectRecord;
-import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
-import com.liferay.ide.project.core.model.NewLiferayProfile;
-import com.liferay.ide.project.core.model.PluginType;
-import com.liferay.ide.project.core.model.ProfileLocation;
-import com.liferay.ide.project.core.util.ProjectImportUtil;
-import com.liferay.ide.project.core.util.ProjectUtil;
-import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp;
-import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOpMethods;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKCorePlugin;
-import com.liferay.ide.sdk.core.SDKManager;
-import com.liferay.ide.sdk.core.SDKUtil;
-import com.liferay.ide.server.core.tests.ServerCoreBase;
-import com.liferay.ide.server.util.ServerUtil;
-
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.OutputStream;
import java.net.URL;
-import java.nio.file.Files;
-import java.util.Properties;
-import java.util.stream.Stream;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.io.FileUtils;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -61,26 +32,32 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.internal.launching.StandardVMType;
import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.VMStandin;
-import org.eclipse.sapphire.modeling.Status;
import org.eclipse.sapphire.platform.ProgressMonitorBridge;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
-import org.junit.Before;
+
+import com.liferay.ide.core.util.CoreUtil;
+import com.liferay.ide.core.util.JobUtil;
+import com.liferay.ide.core.util.ZipUtil;
+import com.liferay.ide.project.core.ProjectRecord;
+import com.liferay.ide.project.core.model.NewLiferayPluginProjectOp;
+import com.liferay.ide.project.core.util.ProjectImportUtil;
+import com.liferay.ide.project.core.util.ProjectUtil;
+import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp;
+import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOpMethods;
+import com.liferay.ide.sdk.core.SDKCorePlugin;
+import com.liferay.ide.sdk.core.SDKManager;
+import com.liferay.ide.server.core.tests.ServerCoreBase;
+import com.liferay.ide.server.util.ServerUtil;
/**
* @author Gregory Amerson
@@ -184,83 +161,7 @@ protected void waitForBuildAndValidation(IProject project) throws Exception
waitForBuildAndValidation();
}
- protected IProject createAntProject( NewLiferayPluginProjectOp op ) throws Exception
- {
- op.setProjectProvider( "ant" );
-
- final IProject project = createProject( op );
-
- /*
- assertEquals(
- "SDK project layout is not standard, /src folder exists.", false, project.getFolder( "src" ).exists() );
-
- switch( op.getPluginType().content() )
- {
- case ext:
- break;
- case hook:
- case portlet:
- case web:
-
- assertEquals(
- "java source folder docroot/WEB-INF/src doesn't exist.", true,
- project.getFolder( "docroot/WEB-INF/src" ).exists() );
-
- break;
- case layouttpl:
- break;
- case theme:
- break;
- default:
- break;
- }
- */
-
- project.refreshLocal( IResource.DEPTH_INFINITE, null );
-
- return project;
- }
-
- public NewLiferayPluginProjectOp setMavenProfile( NewLiferayPluginProjectOp op ) throws Exception
- {
- NewLiferayProfile profile = op.getNewLiferayProfiles().insert();
- profile.setId( "Liferay-v6.2-CE-(Tomcat-7)" );
- profile.setLiferayVersion( "6.2.2" );
- profile.setRuntimeName( getRuntimeVersion() );
- profile.setProfileLocation( ProfileLocation.projectPom );
-
- op.setActiveProfilesValue( "Liferay-v6.2-CE-(Tomcat-7)" );
-
- return op;
- }
-
- protected IProject createMavenProject( NewLiferayPluginProjectOp op ) throws Exception
- {
- op.setProjectProvider( "maven" );
-
- op = setMavenProfile( op );
-
- IProject project = createProject( op );
-
- switch( op.getPluginType().content() )
- {
- case ext:
- case hook:
- case portlet:
- case web:
- assertEquals( "java source folder src/main/webapp doesn't exist.", true, project.getFolder( "src/main/webapp" ).exists() );
- case layouttpl:
- case theme:
- case servicebuilder:
- default:
- break;
- }
-
- Thread.sleep( 3000 );
-
- return project;
- }
-
+
protected IRuntime createNewRuntime( final String name ) throws Exception
{
final IPath newRuntimeLocation = new Path( getLiferayRuntimeDir().toString() + "-new" );
@@ -293,89 +194,6 @@ protected IRuntime createNewRuntime( final String name ) throws Exception
return runtime;
}
- protected SDK createNewSDK() throws Exception
- {
- final IPath newSDKLocation = new Path( getLiferayPluginsSdkDir().toString() + "-new" );
-
- if( ! newSDKLocation.toFile().exists() )
- {
- FileUtils.copyDirectory( getLiferayPluginsSdkDir().toFile(), newSDKLocation.toFile() );
- }
-
- assertEquals( true, newSDKLocation.toFile().exists() );
-
- SDK newSDK = SDKUtil.createSDKFromLocation( newSDKLocation );
-
- if( newSDK == null )
- {
- FileUtils.copyDirectory( getLiferayPluginsSdkDir().toFile(), newSDKLocation.toFile() );
- newSDK = SDKUtil.createSDKFromLocation( newSDKLocation );
- }
-
- SDKManager.getInstance().addSDK( newSDK );
-
- return newSDK;
- }
-
- public IProject createProject( NewLiferayPluginProjectOp op )
- {
- return createProject( op, null );
- }
-
- public IProject createProject( NewLiferayPluginProjectOp op, String projectName )
- {
- Status status = op.execute( ProgressMonitorBridge.create( new NullProgressMonitor() ) );
-
- assertNotNull( status );
-
- assertEquals(
- status.toString(), Status.createOkStatus().message().toLowerCase(), status.message().toLowerCase() );
-
- if( projectName == null || op.getProjectProvider().content().getShortName().equalsIgnoreCase( "ant" ) )
- {
- projectName = op.getFinalProjectName().content();
- }
-
-// if( op.getProjectProvider().content().getShortName().equalsIgnoreCase( "maven" ) )
-// {
-// if( op.getPluginType().content().equals( PluginType.ext ) )
-// {
-// projectName = projectName + "-ext";
-// }
-// else if( op.getPluginType().content().equals( PluginType.servicebuilder ) )
-// {
-// projectName = projectName + "-portlet";
-// }
-// }
-
- final IProject newLiferayPluginProject = project( projectName );
-
- assertNotNull( newLiferayPluginProject );
-
- assertEquals( true, newLiferayPluginProject.exists() );
-
- final IFacetedProject facetedProject = ProjectUtil.getFacetedProject( newLiferayPluginProject );
-
- assertNotNull( facetedProject );
-
- final IProjectFacet liferayFacet = ProjectUtil.getLiferayFacet( facetedProject );
-
- assertNotNull( liferayFacet );
-
- final PluginType pluginTypeValue = op.getPluginType().content( true );
-
- if( pluginTypeValue.equals( PluginType.servicebuilder ) )
- {
- assertEquals( "liferay.portlet", liferayFacet.getId() );
- }
- else
- {
- assertEquals( "liferay." + pluginTypeValue, liferayFacet.getId() );
- }
-
- return newLiferayPluginProject;
- }
-
protected String getBundleId()
{
return BUNDLE_ID;
@@ -390,26 +208,6 @@ protected IPath getCustomLocationBase()
return customLocationBase;
}
- protected IPath getIvyCacheZip()
- {
- return getLiferayBundlesPath().append( "ivy-cache-7.0.zip" );
- }
-
- protected IPath getLiferayPluginsSdkDir()
- {
- return ProjectCore.getDefault().getStateLocation().append( "liferay-plugins-sdk-6.2" );
- }
-
- protected IPath getLiferayPluginsSDKZip()
- {
- return getLiferayBundlesPath().append( "liferay-plugins-sdk-6.2-ce-ga6-20171101150212422.zip" );
- }
-
- protected String getLiferayPluginsSdkZipFolder()
- {
- return "liferay-plugins-sdk-6.2/";
- }
-
protected IProject getProject( String path, String projectName ) throws Exception
{
IProject project = CoreUtil.getWorkspaceRoot().getProject( projectName );
@@ -474,69 +272,6 @@ protected NewLiferayPluginProjectOp newProjectOp( final String projectName ) thr
return op;
}
- private void ensureDefaultVMInstallExists() throws CoreException
- {
- IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
-
- if( vmInstall != null )
- {
- return;
- }
-
- final IVMInstallType vmInstallType = JavaRuntime.getVMInstallType( StandardVMType.ID_STANDARD_VM_TYPE );
- String id = null;
-
- do
- {
- id = String.valueOf( System .currentTimeMillis() );
- }
- while( vmInstallType.findVMInstall( id ) != null );
-
- VMStandin newVm = new VMStandin( vmInstallType, id );
- newVm.setName( "Default-VM" );
- String jrePath = System.getProperty( "java.home" );
- File installLocation = new File( jrePath );
- newVm.setInstallLocation( installLocation );
- IVMInstall realVm = newVm.convertToRealVM();
- JavaRuntime.setDefaultVMInstall( realVm, new NullProgressMonitor() );
- }
-
- private void persistAppServerProperties() throws FileNotFoundException, IOException, ConfigurationException
- {
- Properties initProps = new Properties();
- initProps.put( "app.server.type", "tomcat" );
- initProps.put( "app.server.tomcat.dir", getLiferayRuntimeDir().toPortableString() );
- initProps.put( "app.server.tomcat.deploy.dir", getLiferayRuntimeDir().append( "webapps" ).toPortableString() );
- initProps.put( "app.server.tomcat.lib.global.dir", getLiferayRuntimeDir().append( "lib/ext" ).toPortableString() );
- initProps.put( "app.server.parent.dir", getLiferayRuntimeDir().removeLastSegments( 1 ).toPortableString() );
- initProps.put( "app.server.tomcat.portal.dir", getLiferayRuntimeDir().append( "webapps/ROOT" ).toPortableString() );
-
- IPath loc = getLiferayPluginsSdkDir();
- String userName = System.getProperty( "user.name" ); //$NON-NLS-1$
- File userBuildFile = loc.append( "build." + userName + ".properties" ).toFile(); //$NON-NLS-1$ //$NON-NLS-2$
-
- try(OutputStream fileOutput = Files.newOutputStream( userBuildFile.toPath() ))
- {
- if( userBuildFile.exists() )
- {
- PropertiesConfiguration propsConfig = new PropertiesConfiguration( userBuildFile );
- for( Object key : initProps.keySet() )
- {
- propsConfig.setProperty( (String) key, initProps.get( key ) );
- }
- propsConfig.setHeader( "" );
- propsConfig.save( fileOutput );
-
- }
- else
- {
- Properties props = new Properties();
- props.putAll( initProps );
- props.store( fileOutput, StringPool.EMPTY );
- }
- }
- }
-
protected void removeAllRuntimes() throws Exception
{
for( IRuntime r : ServerCore.getRuntimes() )
@@ -545,122 +280,6 @@ protected void removeAllRuntimes() throws Exception
}
}
- /**
- * @throws Exception
- */
- @Before
- public void setupPluginsSDK() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final SDK existingSdk = SDKManager.getInstance().getSDK( getLiferayPluginsSdkDir() );
-
- if( existingSdk == null )
- {
- FileUtil.deleteDir( getLiferayPluginsSdkDir().toFile(), true );
- }
-
- final File liferayPluginsSdkDirFile = getLiferayPluginsSdkDir().toFile();
-
- if( ! liferayPluginsSdkDirFile.exists() )
- {
- final File liferayPluginsSdkZipFile = getLiferayPluginsSDKZip().toFile();
-
- assertEquals(
- "Expected file to exist: " + liferayPluginsSdkZipFile.getAbsolutePath(), true,
- liferayPluginsSdkZipFile.exists() );
-
- liferayPluginsSdkDirFile.mkdirs();
-
- final String liferayPluginsSdkZipFolder = getLiferayPluginsSdkZipFolder();
-
- if( CoreUtil.isNullOrEmpty( liferayPluginsSdkZipFolder ) )
- {
- ZipUtil.unzip( liferayPluginsSdkZipFile, liferayPluginsSdkDirFile );
- }
- else
- {
- ZipUtil.unzip(
- liferayPluginsSdkZipFile, liferayPluginsSdkZipFolder, liferayPluginsSdkDirFile,
- new NullProgressMonitor() );
- }
- }
-
- assertEquals( true, liferayPluginsSdkDirFile.exists() );
-
- final File ivyCacheDir = new File( liferayPluginsSdkDirFile, ".ivy" );
-
- if( ! ivyCacheDir.exists() )
- {
- // setup ivy cache
-
- final File ivyCacheZipFile = getIvyCacheZip().toFile();
-
- assertEquals( "Expected ivy-cache.zip to be here: " + ivyCacheZipFile.getAbsolutePath(), true, ivyCacheZipFile.exists() );
-
- ZipUtil.unzip( ivyCacheZipFile, liferayPluginsSdkDirFile );
- }
-
- assertEquals( "Expected .ivy folder to be here: " + ivyCacheDir.getAbsolutePath(), true, ivyCacheDir.exists() );
-
- SDK sdk = null;
-
- if( existingSdk == null )
- {
- sdk = SDKUtil.createSDKFromLocation( getLiferayPluginsSdkDir() );
- }
- else
- {
- sdk = existingSdk;
- }
-
- assertNotNull( sdk );
-
- sdk.setDefault( true );
-
- SDKManager.getInstance().setSDKs( new SDK[] { sdk } );
-
- final IPath customLocationBase = getCustomLocationBase();
-
- final File customBaseDir = customLocationBase.toFile();
-
- if( customBaseDir.exists() )
- {
- FileUtil.deleteDir( customBaseDir, true );
-
- if( customBaseDir.exists() )
- {
- for( File f : customBaseDir.listFiles() )
- {
- System.out.println(f.getAbsolutePath());
- }
- }
-
- assertEquals( "Unable to delete pre-existing customBaseDir", false, customBaseDir.exists() );
- }
-
- SDK workspaceSdk = SDKUtil.getWorkspaceSDK();
-
- if ( workspaceSdk == null)
- {
- persistAppServerProperties();
-
- IStatus validationStatus = sdk.validate( true );
-
- StringBuilder sb = new StringBuilder();
-
- Stream.of(validationStatus.getChildren()).map(IStatus::getMessage).forEach(sb::append);
-
- PrintDirectoryTree.print(sdk.getLocation().toFile(), sb);
-
- assertTrue(sb.toString(), validationStatus.isOK());
-
- SDKUtil.openAsProject( sdk );
- }
-
- ensureDefaultVMInstallExists();
- }
-
@Override
public void setupRuntime() throws Exception
{
@@ -669,12 +288,4 @@ public void setupRuntime() throws Exception
super.setupRuntime();
}
- public void setupPluginsSDKAndRuntime() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- setupPluginsSDK();
- setupRuntime();
- }
-
}
\ No newline at end of file
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/SDKUtilTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/SDKUtilTests.java
deleted file mode 100644
index 07d1508c9a..0000000000
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/SDKUtilTests.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-package com.liferay.ide.project.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.ZipUtil;
-import com.liferay.ide.sdk.core.SDK;
-import com.liferay.ide.sdk.core.SDKUtil;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * @author Lovett Li
- */
-public class SDKUtilTests extends ProjectCoreBase
-{
- @AfterClass
- public static void removePluginsSDK() throws Exception
- {
- deleteAllWorkspaceProjects();
- }
-
- @Override
- @Before
- public void setupPluginsSDK() throws Exception
- {
- }
-
- @Test
- public void nullWorkSpaceSDKProject() throws Exception
- {
- deleteAllWorkspaceProjects();
-
- IProject project = SDKUtil.getWorkspaceSDKProject();
-
- assertNull( project );
- }
-
- @Test
- public void singleWorkSpaceProject() throws Exception
- {
-
- if( shouldSkipBundleTests() ) return;
-
- final File liferayPluginsSdkDirFile = getLiferayPluginsSdkDir().toFile();
-
- if( ! liferayPluginsSdkDirFile.exists() )
- {
- final File liferayPluginsSdkZipFile = getLiferayPluginsSDKZip().toFile();
-
- assertEquals(
- "Expected file to exist: " + liferayPluginsSdkZipFile.getAbsolutePath(), true,
- liferayPluginsSdkZipFile.exists() );
-
- liferayPluginsSdkDirFile.mkdirs();
-
- final String liferayPluginsSdkZipFolder = getLiferayPluginsSdkZipFolder();
-
- if( CoreUtil.isNullOrEmpty( liferayPluginsSdkZipFolder ) )
- {
- ZipUtil.unzip( liferayPluginsSdkZipFile, liferayPluginsSdkDirFile );
- }
- else
- {
- ZipUtil.unzip(
- liferayPluginsSdkZipFile, liferayPluginsSdkZipFolder, liferayPluginsSdkDirFile,
- new NullProgressMonitor() );
- }
- }
-
- assertEquals( true, liferayPluginsSdkDirFile.exists() );
-
- SDK sdk = SDKUtil.createSDKFromLocation( getLiferayPluginsSdkDir() );
-
- SDKUtil.openAsProject( sdk );
-
- IProject project = SDKUtil.getWorkspaceSDKProject();
-
- assertNotNull( project );
- }
-
-}
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayComponentOpTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayComponentOpTests.java
index 27bed38d11..88d55fcb32 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayComponentOpTests.java
+++ b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayComponentOpTests.java
@@ -17,6 +17,17 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.sapphire.modeling.Status;
+import org.eclipse.sapphire.platform.ProgressMonitorBridge;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
import com.liferay.ide.core.tests.BaseTests;
import com.liferay.ide.core.tests.TestUtil;
import com.liferay.ide.core.util.CoreUtil;
@@ -28,20 +39,11 @@
import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp;
import com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOpMethods;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.sapphire.modeling.Status;
-import org.eclipse.sapphire.platform.ProgressMonitorBridge;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
/**
* @author Gregory Amerson
* @author Simon Jiang
*/
+@Ignore
public class NewLiferayComponentOpTests extends BaseTests
{
@AfterClass
@@ -239,7 +241,7 @@ public void testNewLiferayComponentActionCommandPortlet() throws Exception{
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName( "action-command-test" );
- op.setProjectTemplateName( "api" );
+ op.setProjectTemplateName( "mvc-portlet" );
op.setProjectProvider( "gradle-module" );
Status moduleProjectStatus = NewLiferayModuleProjectOpMethods.execute( op, ProgressMonitorBridge.create( new NullProgressMonitor() ) );
diff --git a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayModuleProjectOpTests.java b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayModuleProjectOpTests.java
index f7d15f021d..de422f3945 100644
--- a/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayModuleProjectOpTests.java
+++ b/tools/tests/com.liferay.ide.project.core.tests/src/com/liferay/ide/project/core/tests/modules/NewLiferayModuleProjectOpTests.java
@@ -183,7 +183,7 @@ public void testNewLiferayModuleProjectNameValidataionService() throws Exception
{
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
- op.setProjectName( "my-test-project" );
+ op.setProjectName( "my-test-project-validataionService" );
assertTrue( op.validation().ok() );
@@ -229,7 +229,7 @@ public void testNewLiferayModuleProjectNewProperties() throws Exception
Status exStatus =
NewLiferayModuleProjectOpMethods.execute( op, ProgressMonitorBridge.create( new NullProgressMonitor() ) );
-
+
assertEquals( "OK", exStatus.message() );
TestUtil.waitForBuildAndValidation();
@@ -265,6 +265,8 @@ public void testNewLiferayPanelAppNewProperties() throws Exception
Status exStatus =
NewLiferayModuleProjectOpMethods.execute( op, ProgressMonitorBridge.create( new NullProgressMonitor() ) );
+ TestUtil.waitForBuildAndValidation();
+
assertTrue( exStatus.message(), exStatus.ok() );
IProject modPorject = CoreUtil.getProject( op.getProjectName().content() );
diff --git a/tools/tests/com.liferay.ide.server.core.tests/.classpath b/tools/tests/com.liferay.ide.server.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.server.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.server.core.tests/.project b/tools/tests/com.liferay.ide.server.core.tests/.project
index e2ca9fb9a1..afd48506be 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/.project
+++ b/tools/tests/com.liferay.ide.server.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525011
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.server.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.server.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.server.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.server.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.server.core.tests/META-INF/MANIFEST.MF
index 20a25c68b5..9431dccabd 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.server.core.tests/META-INF/MANIFEST.MF
@@ -2,13 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Server Core Tests
Bundle-SymbolicName: com.liferay.ide.server.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.core.tests,
com.liferay.ide.project.core,
com.liferay.ide.server.core,
- com.liferay.ide.server.tomcat.core,
org.eclipse.core.runtime,
org.eclipse.debug.core,
org.eclipse.jdt.launching,
@@ -18,6 +17,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.server.core,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.server.core.tests
diff --git a/tools/tests/com.liferay.ide.server.core.tests/pom.xml b/tools/tests/com.liferay.ide.server.core.tests/pom.xml
index 14833bb0b5..b51cb2a81b 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.server.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.server.core.tests
@@ -43,20 +43,6 @@
download-maven-plugin1.3.0
-
- download-portal-tomcat-6.2-ga6
- generate-resources
-
- wget
-
-
- https://releases-cdn.liferay.com/portal/6.2.5-ga6/liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip
- ${liferay.bundles.dir}
- liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip
- 22d4846a10b17e93c9729e909ccffda8
- true
-
- download-portal-tomcat-7.0-ga5generate-resources
diff --git a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/PortalContextTests.java b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/PortalContextTests.java
index 0e611ac6e1..6f018e15fc 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/PortalContextTests.java
+++ b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/PortalContextTests.java
@@ -16,9 +16,11 @@
package com.liferay.ide.server.core.tests;
import org.junit.Test;
+
+import com.liferay.ide.server.core.PortalContext;
+
import org.junit.Assert;
-import com.liferay.ide.server.tomcat.core.PortalContext;
/**
* @author Seiphon Wang
diff --git a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCoreBase.java b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCoreBase.java
index 47531ea1f5..5e1037f45b 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCoreBase.java
+++ b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCoreBase.java
@@ -18,14 +18,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import com.liferay.ide.core.tests.BaseTests;
-import com.liferay.ide.core.util.CoreUtil;
-import com.liferay.ide.core.util.FileUtil;
-import com.liferay.ide.core.util.ZipUtil;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.server.tomcat.core.ILiferayTomcatRuntime;
-import com.liferay.ide.server.util.LiferayPublishHelper;
-
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -49,6 +41,14 @@
import org.junit.AfterClass;
import org.junit.Before;
+import com.liferay.ide.core.tests.BaseTests;
+import com.liferay.ide.core.util.CoreUtil;
+import com.liferay.ide.core.util.FileUtil;
+import com.liferay.ide.core.util.ZipUtil;
+import com.liferay.ide.project.core.ProjectCore;
+import com.liferay.ide.server.core.portal.PortalRuntime;
+import com.liferay.ide.server.util.LiferayPublishHelper;
+
/**
* @author Terry Jia
* @author Gregory Amerson
@@ -186,17 +186,17 @@ protected IPath getLiferayBundlesPath()
protected IPath getLiferayRuntimeDir()
{
- return ProjectCore.getDefault().getStateLocation().append( "liferay-portal-6.2-ce-ga6/tomcat-7.0.62" );
+ return ProjectCore.getDefault().getStateLocation().append( "liferay-ce-portal-7.0-ga5/tomcat-8.0.32" );
}
protected IPath getLiferayRuntimeZip()
{
- return getLiferayBundlesPath().append( "liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip" );
+ return getLiferayBundlesPath().append( "liferay-ce-portal-tomcat-7.0-ga5-20171018150113838.zip" );
}
protected String getRuntimeId()
{
- return "com.liferay.ide.server.62.tomcat.runtime.70";
+ return "com.liferay.ide.server.portal.runtime";
}
public String getRuntimeVersion()
@@ -269,8 +269,8 @@ public void setupRuntime() throws Exception
assertNotNull( runtime );
- final ILiferayTomcatRuntime liferayRuntime =
- (ILiferayTomcatRuntime) ServerCore.findRuntime( runtimeName ).loadAdapter( ILiferayTomcatRuntime.class, npm );
+ final PortalRuntime liferayRuntime =
+ (PortalRuntime) ServerCore.findRuntime( runtimeName ).loadAdapter( PortalRuntime.class, npm );
assertNotNull( liferayRuntime );
diff --git a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCustomSettingTests.java b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCustomSettingTests.java
deleted file mode 100644
index 7d14311e00..0000000000
--- a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerCustomSettingTests.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved./
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- *******************************************************************************/
-
-package com.liferay.ide.server.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import com.liferay.ide.server.tomcat.core.ILiferayTomcatServer;
-import com.liferay.ide.server.tomcat.core.ILiferayTomcatServerWC;
-import com.liferay.ide.server.tomcat.core.LiferayTomcatServer;
-import com.liferay.ide.server.tomcat.core.LiferayTomcatServerBehavior;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Simon Jiang
- */
-@Ignore
-public class ServerCustomSettingTests extends ServerCoreBase
-{
-
- @Test
- public void testDefaultValueOfUseDefaultPortalSetting() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NullProgressMonitor npm = new NullProgressMonitor();
-
- if( runtime == null )
- {
- setupRuntime();
- }
-
- assertNotNull( runtime );
-
- final IServerWorkingCopy serverWC = createServerForRuntime( "testdefault", runtime );
-
- IServer newServer = serverWC.save( true, npm );
-
- IServer findServer = ServerCore.findServer( newServer.getId() );
-
- assertNotNull( findServer );
-
- ILiferayTomcatServer portalServer =
- (ILiferayTomcatServer) findServer.loadAdapter( ILiferayTomcatServer.class, null );
-
- final boolean useDefaultPortalServerSettings =
- ( (LiferayTomcatServer) portalServer ).getUseDefaultPortalServerSettings();
-
- assertEquals( false, useDefaultPortalServerSettings );
- }
-
- @Test
- public void testSettingValueOfUseDefaultPortalSetting() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NullProgressMonitor npm = new NullProgressMonitor();
-
- if( runtime == null )
- {
- setupRuntime();
- }
-
- assertNotNull( runtime );
-
- final IServerWorkingCopy serverWC = createServerForRuntime( "testdefault2", runtime );
-
- serverWC.setAttribute(
- ILiferayTomcatServer.PROPERTY_USE_DEFAULT_PORTAL_SERVER_SETTINGS, true );
-
- IServer newServer = serverWC.save( true, npm );
-
- IServer findServer = ServerCore.findServer( newServer.getId() );
-
- ILiferayTomcatServer portalServer =
- (ILiferayTomcatServer) findServer.loadAdapter( ILiferayTomcatServer.class, npm );
-
- final boolean useDefaultPortalServerSettings =
- ( (LiferayTomcatServer) portalServer ).getUseDefaultPortalServerSettings();
-
- assertEquals( true, useDefaultPortalServerSettings );
- }
-
- @Test
- public void testVMArgsWithDefaultUseDefaultPortalSettings() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NullProgressMonitor npm = new NullProgressMonitor();
-
- if( runtime == null )
- {
- setupRuntime();
- }
-
- assertNotNull( runtime );
-
- final IServerWorkingCopy serverWC = createServerForRuntime( "testvmargs", runtime );
-
- final IServer newServer = serverWC.save( true, npm );
-
- final LiferayTomcatServerBehavior behavior =
- (LiferayTomcatServerBehavior) newServer.loadAdapter( LiferayTomcatServerBehavior.class, npm );
-
- assertEquals( "-Xmx2560m", behavior.getRuntimeVMArguments()[6] );
- }
-
- @Test
- public void testVMArgsWithCustomMemoryArgs() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NullProgressMonitor npm = new NullProgressMonitor();
-
- if( runtime == null )
- {
- setupRuntime();
- }
-
- assertNotNull( runtime );
-
- final IServerWorkingCopy serverWC = createServerForRuntime( "testvmargs", runtime );
-
- ILiferayTomcatServerWC wc = (ILiferayTomcatServerWC) serverWC.loadAdapter( ILiferayTomcatServerWC.class, npm );
- wc.setMemoryArgs( "-Xmx2048m" );
-
- final IServer newServer = serverWC.save( true, npm );
-
- final LiferayTomcatServerBehavior behavior =
- (LiferayTomcatServerBehavior) newServer.loadAdapter( LiferayTomcatServerBehavior.class, npm );
-
- assertEquals( "-Xmx2048m", behavior.getRuntimeVMArguments()[6] );
- }
-
- @Test
- public void testVMArgsWithCustomMemoryArgsAndUseDefaultSetting() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- final NullProgressMonitor npm = new NullProgressMonitor();
-
- if( runtime == null )
- {
- setupRuntime();
- }
-
- assertNotNull( runtime );
-
- final IServerWorkingCopy serverWC = createServerForRuntime( "testvmargs", runtime );
-
- LiferayTomcatServer wc = (LiferayTomcatServer) serverWC.loadAdapter( LiferayTomcatServer.class, npm );
- wc.setMemoryArgs( "-Xmx2048m" );
- wc.setUseDefaultPortalServerSettings( true );
-
- final IServer newServer = serverWC.save( true, npm );
-
- final LiferayTomcatServerBehavior behavior =
- (LiferayTomcatServerBehavior) newServer.loadAdapter( LiferayTomcatServerBehavior.class, npm );
-
- assertEquals( "-Xmx2560m", behavior.getRuntimeVMArguments()[6] );
- }
-
-}
-
diff --git a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerNameChangeTests.java b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerNameChangeTests.java
index 56d9166a2f..e007b0ac72 100644
--- a/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerNameChangeTests.java
+++ b/tools/tests/com.liferay.ide.server.core.tests/src/com/liferay/ide/server/core/tests/ServerNameChangeTests.java
@@ -18,13 +18,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import com.liferay.ide.core.util.ZipUtil;
-import com.liferay.ide.project.core.ProjectCore;
-import com.liferay.ide.server.core.portal.PortalRuntime;
-import com.liferay.ide.server.core.portal.PortalServer;
-import com.liferay.ide.server.tomcat.core.LiferayTomcatRuntime;
-import com.liferay.ide.server.util.ServerUtil;
-
import java.io.File;
import org.eclipse.core.runtime.IPath;
@@ -39,6 +32,12 @@
import org.junit.Before;
import org.junit.Test;
+import com.liferay.ide.core.util.ZipUtil;
+import com.liferay.ide.project.core.ProjectCore;
+import com.liferay.ide.server.core.portal.PortalRuntime;
+import com.liferay.ide.server.core.portal.PortalServer;
+import com.liferay.ide.server.util.ServerUtil;
+
/**
* @author Simon Jiang
*/
@@ -180,37 +179,7 @@ private String setupRuntime( IPath runtimeZipPath, IPath runitmeDirPath, String
return findRuntime.getId();
}
- private String setup62Runtime( IPath runtimeZipPath, IPath runitmeDirPath, String runtimeName, IPath runtimUnzipDir, String runtimeId ) throws Exception
- {
- assertEquals( "Expected liferayBundlesPath to exist: " + runtimeZipPath.toOSString(), true,
- runtimeZipPath.toFile().exists() );
-
- extractLiferayRuntime( runtimeZipPath, runtimUnzipDir );
-
- final NullProgressMonitor npm = new NullProgressMonitor();
-
- IRuntime findRuntime = ServerCore.findRuntime( runtimeName );
-
- if( findRuntime == null )
- {
- final IRuntimeWorkingCopy runtimeWC =
- ServerCore.findRuntimeType( runtimeId ).createRuntime( runtimeName, npm );
-
- runtimeWC.setName( runtimeName );
- runtimeWC.setLocation( runitmeDirPath );
-
- findRuntime = runtimeWC.save( true, npm );
- }
-
- assertNotNull( findRuntime );
- final LiferayTomcatRuntime liferayRuntime =
- (LiferayTomcatRuntime) ServerCore.findRuntime( runtimeName ).loadAdapter( LiferayTomcatRuntime.class, npm );
-
- assertNotNull( liferayRuntime );
-
- return findRuntime.getId();
- }
-
+
@Before
public void setupRuntime() throws Exception
{
@@ -219,8 +188,6 @@ public void setupRuntime() throws Exception
setupRuntime( getLiferayTomcatRuntimeZip(), getLiferayTomcatRuntimeDir(), getTomcatRuntimeName(), getLiferayTomcatUnzipRuntimeDir(),getRuntimeId() );
setupRuntime( getLiferayWildflyRuntimeZip(), getLiferayWildflyRuntimeDir(), getWildflyRuntimeName(), getLiferayWildflyUnzipRuntimeDir(), getRuntimeId() );
- setup62Runtime( getLiferayTomcat62RuntimeZip(), getLiferayTomcat62RuntimeDir(), getTomcat62RuntimeName(), getLiferayTomcat62UnzipRuntimeDir(), get62RuntimeId() );
- setup62Runtime( getLiferayTomcat62RuntimeZip(), getLiferayTomcat62RuntimeDir(), getTomcat62DumyRuntimeName(), getLiferayTomcat62DumyUnzipRuntimeDir(), get62RuntimeId() );
}
@Test
@@ -246,28 +213,4 @@ public void testPortalServiceDelegateName() throws Exception
((ServerWorkingCopy)newServer).setDefaults(null);
assertEquals( "Liferay CE GA5 Wildfly at localhost", newServer.getName() );
}
-
- @Test
- public void testPortalServiceDelegate62Name() throws Exception
- {
- if( shouldSkipBundleTests() ) return;
-
- IServerType portalServer62Type = ServerCore.findServerType( "com.liferay.ide.eclipse.server.tomcat.7062" );
-
- assertNotNull( portalServer62Type );
-
- IProgressMonitor monitor = new NullProgressMonitor();
-
- IServerWorkingCopy newServer = portalServer62Type.createServer( null, null, monitor );
-
- assertNotNull( newServer );
-
- newServer.setRuntime( ServerUtil.getRuntime( getTomcat62RuntimeName() ) );
- ((ServerWorkingCopy)newServer).setDefaults(null);
- assertEquals( "Liferay CE Tomcat62 at localhost", newServer.getName() );
-
- newServer.setRuntime( ServerUtil.getRuntime( getTomcat62DumyRuntimeName() ) );
- ((ServerWorkingCopy)newServer).setDefaults(null);
- assertEquals( "Liferay CE Tomcat62 Dumy at localhost", newServer.getName() );
- }
}
\ No newline at end of file
diff --git a/tools/tests/com.liferay.ide.service.core.tests/.classpath b/tools/tests/com.liferay.ide.service.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.service.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.service.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.service.core.tests/.project b/tools/tests/com.liferay.ide.service.core.tests/.project
index fa85248e42..8b6b630b4c 100644
--- a/tools/tests/com.liferay.ide.service.core.tests/.project
+++ b/tools/tests/com.liferay.ide.service.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525016
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.service.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.service.core.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.service.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.service.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.service.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.service.core.tests/META-INF/MANIFEST.MF
index 65596003e5..826a6f2a79 100644
--- a/tools/tests/com.liferay.ide.service.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.service.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Service Core Tests
Bundle-SymbolicName: com.liferay.ide.service.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.core.tests,
@@ -17,6 +17,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.sapphire.modeling.xml;bundle-version="[9,10)",
org.eclipse.wst.common.frameworks,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.service.core.tests
diff --git a/tools/tests/com.liferay.ide.service.core.tests/pom.xml b/tools/tests/com.liferay.ide.service.core.tests/pom.xml
index fd8ba0361e..a7f1d9edce 100644
--- a/tools/tests/com.liferay.ide.service.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.service.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.service.core.tests
diff --git a/tools/tests/com.liferay.ide.ui.tests/.classpath b/tools/tests/com.liferay.ide.ui.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.ui.tests/.classpath
+++ b/tools/tests/com.liferay.ide.ui.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.ui.tests/.project b/tools/tests/com.liferay.ide.ui.tests/.project
index c9ab0b7a4b..5086a61a36 100644
--- a/tools/tests/com.liferay.ide.ui.tests/.project
+++ b/tools/tests/com.liferay.ide.ui.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525022
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.ui.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.ui.tests/.settings/org.eclipse.jdt.core.prefs
index 9f6ece88bd..d4540a53f9 100644
--- a/tools/tests/com.liferay.ide.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.ui.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.ui.tests/META-INF/MANIFEST.MF
index 89e303d5a5..38822b3b9c 100644
--- a/tools/tests/com.liferay.ide.ui.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.ui.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Core UI Tests
Bundle-SymbolicName: com.liferay.ide.ui.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.sdk.core,
@@ -19,6 +19,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.xml.core,
org.eclipse.wst.xml.ui,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.ui.tests
diff --git a/tools/tests/com.liferay.ide.ui.tests/pom.xml b/tools/tests/com.liferay.ide.ui.tests/pom.xml
index 8dc279c141..67c40dbb2e 100644
--- a/tools/tests/com.liferay.ide.ui.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.ui.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.ui.tests
diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.classpath b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.classpath
index cc5ee2dc8c..7931ec26b9 100644
--- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.classpath
+++ b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.classpath
@@ -1,10 +1,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.project b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.project
index 69cf4cbc50..254257221f 100644
--- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.project
+++ b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525029
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.settings/org.eclipse.jdt.core.prefs
index 5f5bc6aea9..5deca244ff 100644
--- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,13 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.groovy.buildGroovyFiles=disabled
org.eclipse.jdt.core.compiler.groovy.groovyProjectName=com.liferay.ide.upgrade.problems.core.tests
org.eclipse.jdt.core.compiler.groovy.projectFlags=0
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/META-INF/MANIFEST.MF
index fa532cd1e4..ce68fb2fb7 100644
--- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay Upgrade Problems Core Tests
Bundle-SymbolicName: com.liferay.ide.upgrade.problems.core.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Liferay, Inc.
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
@@ -10,5 +10,5 @@ Require-Bundle: org.eclipse.core.runtime,
org.junit;bundle-version="4.12.0",
com.liferay.ide.upgrade.plan.core,
com.liferay.ide.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml
index cbc6a51df6..1618c42fd3 100644
--- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.upgrade.problems.core.tests
diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath b/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath
index cc5ee2dc8c..7f87f1ffe7 100644
--- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath
+++ b/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath
@@ -1,6 +1,6 @@
-
+
diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.project b/tools/tests/com.liferay.ide.xml.search.ui.tests/.project
index 5613f438c3..912fdc6260 100644
--- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.project
+++ b/tools/tests/com.liferay.ide.xml.search.ui.tests/.project
@@ -31,4 +31,15 @@
org.eclipse.pde.PluginNatureorg.eclipse.jdt.core.javanature
+
+
+ 1700017525031
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs
index 4e4a3ada9a..d089a9b734 100644
--- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF
index 80d87c3ef6..cf011aa7b4 100644
--- a/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF
+++ b/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: com.liferay.ide.xml.search.ui.tests
-Bundle-Version: 3.9.9.qualifier
+Bundle-Version: 4.0.0.qualifier
Require-Bundle: com.liferay.ide.core,
com.liferay.ide.core.tests,
com.liferay.ide.project.core,
@@ -22,6 +22,6 @@ Require-Bundle: com.liferay.ide.core,
org.eclipse.wst.xml.core,
org.eclipse.wst.xml.search.editor,
org.junit
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: com.liferay.ide.xml.search.ui.tests
diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml b/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml
index 720b5218c9..45d831499d 100644
--- a/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml
+++ b/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml
@@ -22,7 +22,7 @@
com.liferay.ide.tools.teststools-tests
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.xml.search.ui.tests
diff --git a/tools/tests/pom.xml b/tools/tests/pom.xml
index 9c6e8670ee..5469871249 100644
--- a/tools/tests/pom.xml
+++ b/tools/tests/pom.xml
@@ -23,7 +23,7 @@
com.liferay.ide.toolstools
- 3.9.9-SNAPSHOT
+ 4.0.0-SNAPSHOTcom.liferay.ide.tools.tests
@@ -35,11 +35,7 @@
com.liferay.ide.core.tests
- com.liferay.ide.hook.core.tests
- com.liferay.ide.layouttpl.core.tests
- com.liferay.ide.portlet.core.testscom.liferay.ide.server.core.tests
- com.liferay.ide.service.core.testscom.liferay.ide.project.core.testscom.liferay.ide.upgrade.problems.core.testscom.liferay.ide.xml.search.ui.tests