Skip to content

Commit

Permalink
IDE-5116 fix mainfest.mf import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjhy committed Dec 4, 2023
1 parent 8f27f3b commit 2d9165a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: com.liferay.blade.gradle.tooling,
com.liferay.ide.gradle.core,
com.liferay.ide.gradle.core.model
Import-Package: com.google.common.collect
Require-Bundle: biz.aQute.bndlib,
com.liferay.ide.core,
com.liferay.ide.project.core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

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;
Expand All @@ -28,6 +25,8 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.ListIterator;
Expand Down Expand Up @@ -84,7 +83,7 @@ private void _configureIfLiferayProject(final IProject project) throws CoreExcep
IProgressMonitor monitor = new NullProgressMonitor();

if (project.hasNature(JavaCore.NATURE_ID)) {
List<IClasspathEntry> classpath = Lists.newArrayList(javaProject.getRawClasspath());
List<IClasspathEntry> classpath = new ArrayList<>(Arrays.asList(javaProject.getRawClasspath()));

Map<IPath, IClasspathEntry> oldContainers = _removeOldContainers(classpath);

Expand Down Expand Up @@ -186,7 +185,7 @@ private int _indexOfNewContainers(List<IClasspathEntry> classpath) {
}

private Map<IPath, IClasspathEntry> _removeOldContainers(List<IClasspathEntry> classpath) {
Map<IPath, IClasspathEntry> retainedEntries = Maps.newLinkedHashMap();
Map<IPath, IClasspathEntry> retainedEntries = new HashMap<>();
ListIterator<IClasspathEntry> iterator = classpath.listIterator();

while (iterator.hasNext()) {
Expand Down
6 changes: 3 additions & 3 deletions tools/plugins/com.liferay.ide.gradle.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ Require-Bundle: com.google.guava,
org.eclipse.buildship.core,
org.eclipse.core.expressions,
org.eclipse.core.runtime,
org.eclipse.debug.ui,
org.eclipse.jdt.core,
org.eclipse.jdt.core.manipulation,
org.eclipse.jdt.debug.ui,
org.eclipse.jdt.launching,
org.eclipse.jdt.ui,
org.eclipse.jface.text,
Expand All @@ -34,12 +36,10 @@ Require-Bundle: com.google.guava,
org.eclipse.wst.common.project.facet.ui,
org.eclipse.wst.server.core,
org.eclipse.wst.server.ui,
org.eclipse.debug.ui,
org.eclipse.jdt.debug.ui
org.json
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Export-Package: com.liferay.ide.gradle.ui
Service-Component: OSGI-INF/com.liferay.ide.gradle.ui.upgrade.UpdateWorkspacePluginVersionCommand.xml,
OSGI-INF/com.liferay.ide.gradle.ui.upgrade.RemoveDependencyVersionCommand.xml
Import-Package: org.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Require-Bundle: biz.aQute.bndlib,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.emf.ecore,
org.eclipse.jdt.launching,
org.eclipse.jdt.core,
org.eclipse.jst.common.frameworks,
org.eclipse.jst.common.project.facet.core,
Expand Down Expand Up @@ -55,8 +56,6 @@ 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,
Expand Down

0 comments on commit 2d9165a

Please sign in to comment.