Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-07-16 09:39:01 +0000
committerAlexander Kurtakov2019-07-16 09:39:01 +0000
commita77a119ab811a6b37b191738dea96d2931d6449c (patch)
treed58c4c66024a6e01418263dd1c1cb7b9ac84d162
parent072ed9510ac277f407decf6d17b00ad6a2b54ac3 (diff)
downloadrt.equinox.p2-a77a119ab811a6b37b191738dea96d2931d6449c.tar.gz
rt.equinox.p2-a77a119ab811a6b37b191738dea96d2931d6449c.tar.xz
rt.equinox.p2-a77a119ab811a6b37b191738dea96d2931d6449c.zip
Remove useless non-javadoc comments.
Change-Id: Ifc2500a2a4cafd13addc6ebc50fda66ba82e2a1a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582b.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582c.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java116
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java9
47 files changed, 393 insertions, 674 deletions
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
index 475f9341b..09eb6decd 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -80,8 +80,10 @@ public class ExtensionLocationMetadataRepositoryFactory extends MetadataReposito
}
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
+ /*
+ * @see
+ * org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#
+ * validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
*/
public IStatus validate(URI location, IProgressMonitor monitor) {
try {
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
index af080a0a8..6ac588359 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
@@ -96,9 +96,6 @@ public class LocalMetadataRepository extends AbstractMetadataRepository implemen
save();
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
- */
@Override
public synchronized void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
if (installableUnits == null || installableUnits.isEmpty())
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
index b95cf36e6..76fb8378f 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
@@ -162,7 +162,7 @@ public class ResolvedInstallableUnit implements IInstallableUnit, IMemberProvide
@Override
public boolean equals(Object obj) {
- //TODO This is pretty ugly....
+ // TODO This is pretty ugly....
boolean result = original.equals(obj);
if (result)
return true;
@@ -234,9 +234,6 @@ public class ResolvedInstallableUnit implements IInstallableUnit, IMemberProvide
return candidate.isMatch(this);
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.expression.IMemberProvider#getMember(java.lang.String)
- */
@Override
public Object getMember(String memberName) {
if (MEMBER_FRAGMENTS == memberName)
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
index faba5e08e..ec76842e1 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
@@ -44,9 +44,6 @@ public class PublisherTask extends AbstractPublishTask {
private boolean start;
private String[] nonRootFiles;
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
@Override
public void execute() throws BuildException {
try {
@@ -56,7 +53,7 @@ public class PublisherTask extends AbstractPublishTask {
}
createVersionAdvice();
IPublisherAction[] actions = createActions();
- //TODO Do something with publisher result
+ // TODO Do something with publisher result
new Publisher(getInfo()).publish(actions, new NullProgressMonitor());
}
@@ -65,12 +62,14 @@ public class PublisherTask extends AbstractPublishTask {
// TODO what to do in this case?
return new IPublisherAction[] {};
if (operation.equals("-update")) //$NON-NLS-1$
- // TODO fix this up. watch for circularities
- // return new IPublishingAction[] {new LocalUpdateSiteAction(operationValue)};
+ // TODO fix this up. watch for circularities
+ // return new IPublishingAction[] {new LocalUpdateSiteAction(operationValue)};
return new IPublisherAction[] {};
if (operation.equals("-source")) //$NON-NLS-1$
// TODO what to do in this case?
- return new IPublisherAction[] {new EclipseInstallAction(operationValue, root, Version.parseVersion(rootVersion), rootName, executableName, flavor, topLevel, nonRootFiles, start)};
+ return new IPublisherAction[] {
+ new EclipseInstallAction(operationValue, root, Version.parseVersion(rootVersion), rootName,
+ executableName, flavor, topLevel, nonRootFiles, start) };
// TODO what to do in this case?
return new IPublisherAction[] {};
}
@@ -90,7 +89,8 @@ public class PublisherTask extends AbstractPublishTask {
artifactLocation = sourceLocation.toURI();
info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
} else
- info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH | IPublisherInfo.A_OVERWRITE);
+ info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH
+ | IPublisherInfo.A_OVERWRITE);
initializeRepositories(info);
}
@@ -99,7 +99,7 @@ public class PublisherTask extends AbstractPublishTask {
}
public void setBundles(String value) {
- //TODO Remove - currently exists for compatibility with generator task
+ // TODO Remove - currently exists for compatibility with generator task
}
public void setConfig(String value) {
@@ -132,7 +132,7 @@ public class PublisherTask extends AbstractPublishTask {
}
public void setFeatures(String value) {
- //TODO Remove - currently exists for compatibility with generator task
+ // TODO Remove - currently exists for compatibility with generator task
}
public void setFlavor(String value) {
@@ -144,11 +144,11 @@ public class PublisherTask extends AbstractPublishTask {
*/
@Deprecated
public void setLauncherConfig(String value) {
- //TODO Remove - currently exists for compatibility with generator task
+ // TODO Remove - currently exists for compatibility with generator task
}
public void setNoDefaultIUs(String value) {
- //TODO Remove - currently exists for compatibility with generator task
+ // TODO Remove - currently exists for compatibility with generator task
}
/**
@@ -156,11 +156,11 @@ public class PublisherTask extends AbstractPublishTask {
*/
@Deprecated
public void setP2OS(String value) {
- //TODO Remove - currently exists for compatibility with generator task
+ // TODO Remove - currently exists for compatibility with generator task
}
public void setProductFile(String file) {
- //TODO Remove - currently exists for compatibility with generator task
+ // TODO Remove - currently exists for compatibility with generator task
}
public void setPublishArtifactRepository(String value) {
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
index 32ce41d39..06a338c2a 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
@@ -257,8 +257,10 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
}
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager#createRepository(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
+ /*
+ * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.
+ * IMetadataRepositoryManager#createRepository(java.net.URL, java.lang.String,
+ * java.lang.String, java.util.Map)
*/
protected IRepository<T> doCreateRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
checkValidLocation(location);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
index 4ff52e2d8..fb499fe5e 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
@@ -67,9 +67,6 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider
this.key = key;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor#getArtifactKey()
- */
@Override
public IArtifactKey getArtifactKey() {
return key;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java
index 336946456..666563b79 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java
@@ -41,9 +41,6 @@ public class Bug252308 extends AbstractProvisioningTest {
private Method transferSingle;
private Method extractRootCause;
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
@Override
protected void setUp() throws Exception {
super.setUp();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java
index 8ff602c4c..ef69bc853 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java
@@ -16,10 +16,19 @@ package org.eclipse.equinox.p2.tests.planner;
import java.io.File;
import java.lang.reflect.Field;
import java.net.URI;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
@@ -79,9 +88,6 @@ public abstract class AbstractPlannerTest extends AbstractProvisioningTest {
return result;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.tests.AbstractProvisioningTest#setUp()
- */
@Override
protected void setUp() throws Exception {
super.setUp();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java
index 4cf5b0a47..d17b03a60 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java
@@ -14,7 +14,9 @@
package org.eclipse.equinox.p2.tests.planner;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.query.IQueryResult;
@@ -26,17 +28,11 @@ import org.junit.Assert;
*/
public class Bug302580 extends AbstractPlannerTest {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.tests.planner.AbstractPlannerTest#getTestDataPath()
- */
@Override
protected String getTestDataPath() {
return "testData/bug302580";
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.tests.planner.AbstractPlannerTest#getProfileId()
- */
@Override
protected String getProfileId() {
return "bootProfile";
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582b.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582b.java
index 00469359a..1248d7156 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582b.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582b.java
@@ -20,9 +20,6 @@ package org.eclipse.equinox.p2.tests.planner;
*/
public class Bug302582b extends Bug302582 {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.tests.planner.Bug302582#getProfileId()
- */
@Override
protected String getProfileId() {
return "SDKProfile";
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582c.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582c.java
index e320b6950..8461e7c01 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582c.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582c.java
@@ -36,9 +36,6 @@ public class Bug302582c extends Bug302582 {
/*
* Profile already contains a single optional singleton IU. Try to install 3 versions of that IU into it. (including the lower
* version which is already installed)
- *
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.tests.planner.Bug302582#testInstall()
*/
@Override
public void testInstall() {
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java
index c53cdff30..30a597086 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java
@@ -25,7 +25,7 @@ import org.eclipse.osgi.util.NLS;
public class AddProgramPropertyAction extends ProvisioningAction {
public static final String ID = "addProgramProperty"; //$NON-NLS-1$
- // treat the given string as a comma-separated list and parse and
+ // treat the given string as a comma-separated list and parse and
// convert it to a real list
protected static List<String> convertToList(String value) {
List<String> result = new ArrayList<>();
@@ -45,9 +45,6 @@ public class AddProgramPropertyAction extends ProvisioningAction {
return buffer.toString();
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#execute(java.util.Map)
- */
public IStatus execute(Map<String, Object> parameters) {
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
@@ -64,11 +61,12 @@ public class AddProgramPropertyAction extends ProvisioningAction {
}
}
- // if there was no value previously, then just set our key/value pair and return.
- // otherwise we have to merge.
+ // if there was no value previously, then just set our key/value pair and
+ // return.
+ // otherwise we have to merge.
ConfigData data = manipulator.getConfigData();
String previous = data.getProperty(propName);
- // make a backup - even if it is null
+ // make a backup - even if it is null
getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous);
// assume the value is a comma-separated list and just add ourselves to the end
if (previous != null)
@@ -77,9 +75,6 @@ public class AddProgramPropertyAction extends ProvisioningAction {
return Status.OK_STATUS;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#undo(java.util.Map)
- */
public IStatus undo(Map<String, Object> parameters) {
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
index 6d27eb497..0860dd56f 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
@@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
import java.io.File;
import java.util.Collection;
import java.util.Map;
@@ -27,25 +25,24 @@ import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
/**
- * This action collects the set of bundle files on which the signature trust check
- * should be performed. The actual trust checking is done by the CheckTrust phase.
+ * This action collects the set of bundle files on which the signature trust
+ * check should be performed. The actual trust checking is done by the
+ * CheckTrust phase.
*/
public class CheckTrustAction extends ProvisioningAction {
public static final String ID = "checkTrust"; //$NON-NLS-1$
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#execute(java.util.Map)
- */
public IStatus execute(Map<String, Object> parameters) {
IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
if (iu == null)
return null;
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- //if the IU is already in the profile there is nothing to do
+ // if the IU is already in the profile there is nothing to do
if (!profile.available(QueryUtil.createIUQuery(iu), null).isEmpty())
return null;
@SuppressWarnings("unchecked")
@@ -61,9 +58,6 @@ public class CheckTrustAction extends ProvisioningAction {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#undo(java.util.Map)
- */
public IStatus undo(Map<String, Object> parameters) {
return Status.OK_STATUS;
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java
index b4e5a730e..ae46ce101 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java
@@ -27,9 +27,6 @@ import org.eclipse.osgi.util.NLS;
public class RemoveProgramPropertyAction extends ProvisioningAction {
public static final String ID = "removeProgramProperty"; //$NON-NLS-1$
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#execute(java.util.Map)
- */
public IStatus execute(Map<String, Object> parameters) {
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
@@ -41,14 +38,14 @@ public class RemoveProgramPropertyAction extends ProvisioningAction {
String previous = data.getProperty(propName);
if (previous == null)
return Status.OK_STATUS;
- // make a backup - even if it is null
+ // make a backup - even if it is null
getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous);
- // if the value is null, remove the key/value pair.
+ // if the value is null, remove the key/value pair.
if (propValue == null) {
data.setProperty(propName, null);
return Status.OK_STATUS;
}
- // Otherwise treat the current value as a comma-separated list and remove
+ // Otherwise treat the current value as a comma-separated list and remove
// just the one value that was specified.
List<String> list = AddProgramPropertyAction.convertToList(previous);
// if the value wasn't in the list, then just return
@@ -60,9 +57,6 @@ public class RemoveProgramPropertyAction extends ProvisioningAction {
return Status.OK_STATUS;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#undo(java.util.Map)
- */
public IStatus undo(Map<String, Object> parameters) {
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java
index d413e4a1a..9a682eb1e 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java
@@ -26,39 +26,35 @@ import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.osgi.util.NLS;
/**
- * Touchpoint action which allows the user to set the -vm parameter in the
+ * Touchpoint action which allows the user to set the -vm parameter in the
* eclipse.ini file.
*
*/
public class SetJvmAction extends ProvisioningAction {
public static final String ID = "setJvm"; //$NON-NLS-1$
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#execute(java.util.Map)
- */
public IStatus execute(Map<String, Object> parameters) {
String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM);
if (jvmArg == null)
return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID));
- LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
+ LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR))
+ .getLauncherData();
File previous = launcherData.getJvm();
File jvm = "null".equals(jvmArg) ? null : new File(jvmArg); //$NON-NLS-1$
- // make a backup - even if it is null
+ // make a backup - even if it is null
getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous == null ? null : previous.getPath());
launcherData.setJvm(jvm);
return Status.OK_STATUS;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#undo(java.util.Map)
- */
public IStatus undo(Map<String, Object> parameters) {
String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM);
if (jvmArg == null)
return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID));
- // make a backup - even if it is null
+ // make a backup - even if it is null
String previous = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE);
- LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
+ LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR))
+ .getLauncherData();
launcherData.setJvm(previous == null ? null : new File(previous));
return Status.OK_STATUS;
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
index 702dbf73f..82abd4668 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
@@ -105,9 +105,6 @@ public class Feature {
this.version = version;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Feature))
@@ -129,9 +126,6 @@ public class Feature {
return one == null ? two == null : one.equals(two);
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
return id.hashCode() + version.hashCode();
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
index c2ef681b3..78c9e1cd9 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
@@ -57,8 +57,8 @@ public class Site {
}
/*
- * Return the feature object with the specific id and version. Return null
- * if there is no match or the id is null. If the version is null then return the
+ * Return the feature object with the specific id and version. Return null if
+ * there is no match or the id is null. If the version is null then return the
* first feature with a matching id.
*/
public Feature getFeature(String id, String version) {
@@ -132,17 +132,11 @@ public class Site {
this.url = url;
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
return getUrl().hashCode();
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Site))
@@ -166,16 +160,16 @@ public class Site {
}
/*
- * Return a boolean value indicating whether or not the given
- * objects are considered equal.
+ * Return a boolean value indicating whether or not the given objects are
+ * considered equal.
*/
public static boolean equals(Object one, Object two) {
return one == null ? two == null : one.equals(two);
}
/*
- * Return a boolean value indicating whether or not the given
- * lists are considered equal.
+ * Return a boolean value indicating whether or not the given lists are
+ * considered equal.
*/
public static boolean equals(Object[] one, Object[] two) {
if (one == null && two == null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
index 5a8d09093..43674157d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -48,10 +48,8 @@ public abstract class ProvisioningAction extends SelectionProviderAction {
}
/*
- * Overridden to use the selection from the selection provider, not the one
- * from the triggering event. Some selection providers reinterpret the raw selections
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
+ * Overridden to use the selection from the selection provider, not the one from
+ * the triggering event. Some selection providers reinterpret the raw selections
*/
@Override
public final void selectionChanged(IStructuredSelection selection) {
@@ -59,7 +57,8 @@ public abstract class ProvisioningAction extends SelectionProviderAction {
if (providerSelection instanceof IStructuredSelection) {
checkEnablement(((IStructuredSelection) providerSelection).toArray());
} else {
- // shouldn't really happen, but a provider could decide to de-structure the selection
+ // shouldn't really happen, but a provider could decide to de-structure the
+ // selection
selectionChanged(providerSelection);
}
}
@@ -69,8 +68,8 @@ public abstract class ProvisioningAction extends SelectionProviderAction {
}
/**
- * Recheck the enablement. Called by clients when some condition outside of
- * the action that may effect its enablement should be changed.
+ * Recheck the enablement. Called by clients when some condition outside of the
+ * action that may effect its enablement should be changed.
*/
public final void checkEnablement() {
ISelection selection = getSelection();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
index e1f8d718d..473c55cfe 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Sonatype, Inc. - ongoing development
@@ -36,25 +36,16 @@ public class UninstallAction extends ExistingIUInProfileAction {
return ProvUIMessages.UninstallIUProgress;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
- */
@Override
protected int getLockConstant() {
return IProfile.LOCK_UNINSTALL;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
- */
@Override
protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
return ui.getUninstallOperation(ius, null);
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
- */
@Override
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
return ui.openUninstallWizard(ius, (UninstallOperation) operation, null);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
index cf62da98b..0faa48ad7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
@@ -21,9 +21,8 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.dialogs.PatternFilter;
/**
- * A class that handles filtering IU's based on a supplied
- * matching string.
- *
+ * A class that handles filtering IU's based on a supplied matching string.
+ *
* @since 3.4
*
*/
@@ -33,46 +32,40 @@ public class AvailableIUPatternFilter extends PatternFilter {
String patternString;
/**
- * Create a new instance of a AvailableIUPatternFilter
+ * Create a new instance of a AvailableIUPatternFilter
*/
public AvailableIUPatternFilter(IUColumnConfig[] columnConfig) {
super();
- for (int i = 0; i < columnConfig.length; i++) {
- int field = columnConfig[i].getColumnType();
+ for (IUColumnConfig element : columnConfig) {
+ int field = element.getColumnType();
switch (field) {
- case IUColumnConfig.COLUMN_ID:
- checkId = true;
- break;
- case IUColumnConfig.COLUMN_NAME:
- checkName = true;
- break;
- case IUColumnConfig.COLUMN_DESCRIPTION:
- checkDescription = true;
- break;
- case IUColumnConfig.COLUMN_VERSION:
- checkVersion = true;
- break;
- default:
- break;
+ case IUColumnConfig.COLUMN_ID:
+ checkId = true;
+ break;
+ case IUColumnConfig.COLUMN_NAME:
+ checkName = true;
+ break;
+ case IUColumnConfig.COLUMN_DESCRIPTION:
+ checkDescription = true;
+ break;
+ case IUColumnConfig.COLUMN_VERSION:
+ checkVersion = true;
+ break;
+ default:
+ break;
}
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.internal.dialogs.PatternFilter#isElementSelectable(java.lang.Object)
- */
@Override
public boolean isElementSelectable(Object element) {
return element instanceof IIUElement && !(element instanceof CategoryElement);
}
/*
- * Overridden to remember the pattern string for an optimization
- * in isParentMatch
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#setPattern(java.lang.String)
+ * Overridden to remember the pattern string for an optimization in
+ * isParentMatch
*/
@Override
public void setPattern(String patternString) {
@@ -81,10 +74,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
}
/*
- * Overridden to avoid getting children unless there is actually
- * a filter.
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isParentMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
+ * Overridden to avoid getting children unless there is actually a filter.
*/
@Override
protected boolean isParentMatch(Viewer viewer, Object element) {
@@ -93,9 +83,6 @@ public class AvailableIUPatternFilter extends PatternFilter {
return super.isParentMatch(viewer, element);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isElementMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
- */
@Override
protected boolean isLeafMatch(Viewer viewer, Object element) {
if (element instanceof CategoryElement) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
index 10fe22e20..a5c55a570 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
@@ -20,37 +20,34 @@ import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.*;
/**
- * Copy of ContainerCheckedTreeViewer which is specialized for use
- * with DeferredFetchFilteredTree. Originally copied from
- * org.eclipse.ui.dialogs and altered to achieve the following:
+ * Copy of ContainerCheckedTreeViewer which is specialized for use with
+ * DeferredFetchFilteredTree. Originally copied from org.eclipse.ui.dialogs and
+ * altered to achieve the following:
+ *
+ * (1)checking a parent will expand it when we know it's a long running
+ * operation that involves a placeholder. The modified method is
+ * doCheckStateChanged().
*
- * (1)checking a parent will expand it when we know it's a long
- * running operation that involves a placeholder.
-* The modified method is doCheckStateChanged().
-*
- * (2)when preserving selection, we do not want the check state
- * to be rippled through the child and parent nodes.
- * Since we know that preservingSelection(Runnable) isn't working
- * properly, no need to do a bunch of work here.
- * The added methods is preservingSelection(Runnable).
- * Modified methods are updateChildrenItems(TreeItem parent) and
+ * (2)when preserving selection, we do not want the check state to be rippled
+ * through the child and parent nodes. Since we know that
+ * preservingSelection(Runnable) isn't working properly, no need to do a bunch
+ * of work here. The added methods is preservingSelection(Runnable). Modified
+ * methods are updateChildrenItems(TreeItem parent) and
* updateParentItems(TreeItem parent).
- *
- * (3)we correct the problem with preservingSelection(Runnable) by
- * remembering the check state and restoring it after a refresh. We
- * fire a check state event so clients monitoring the selection will know
- * what's going on. Added methods are internalRefresh(Object, boolean),
- * saveCheckedState(), restoreCheckedState(), and
- * fireCheckStateChanged(Object, boolean). That last method is public
- * so that DeferredFetchFilteredTree can do the same thing when it
- * remembers selections.
- *
+ *
+ * (3)we correct the problem with preservingSelection(Runnable) by remembering
+ * the check state and restoring it after a refresh. We fire a check state event
+ * so clients monitoring the selection will know what's going on. Added methods
+ * are internalRefresh(Object, boolean), saveCheckedState(),
+ * restoreCheckedState(), and fireCheckStateChanged(Object, boolean). That last
+ * method is public so that DeferredFetchFilteredTree can do the same thing when
+ * it remembers selections.
+ *
* This class does not correct the general problem reported in
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=170521
- * That is handled by preserving selections additively in
- * DeferredFetchFilteredTree. This class simply provides the API
- * needed by that class and manages the parent state according to the
- * children.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=170521 That is handled by
+ * preserving selections additively in DeferredFetchFilteredTree. This class
+ * simply provides the API needed by that class and manages the parent state
+ * according to the children.
*/
public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
@@ -59,6 +56,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/**
* Constructor for ContainerCheckedTreeViewer.
+ *
* @see CheckboxTreeViewer#CheckboxTreeViewer(Composite)
*/
public ContainerCheckedTreeViewer(Composite parent) {
@@ -68,6 +66,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/**
* Constructor for ContainerCheckedTreeViewer.
+ *
* @see CheckboxTreeViewer#CheckboxTreeViewer(Composite,int)
*/
public ContainerCheckedTreeViewer(Composite parent, int style) {
@@ -77,6 +76,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/**
* Constructor for ContainerCheckedTreeViewer.
+ *
* @see CheckboxTreeViewer#CheckboxTreeViewer(Tree)
*/
public ContainerCheckedTreeViewer(Tree tree) {
@@ -104,6 +104,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/**
* Update element after a checkstate change.
+ *
* @param element
*/
protected void doCheckStateChanged(Object element) {
@@ -115,9 +116,9 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
if (element instanceof QueriedElement && treeItem.getChecked()) {
if (!((QueriedElement) element).hasQueryable()) {
// We have checked an element that will take some time
- // to get its children. Use this opportunity to auto-expand
- // the tree so that the check mark is not misleading. Don't
- // update the check state because it will just be a pending
+ // to get its children. Use this opportunity to auto-expand
+ // the tree so that the check mark is not misleading. Don't
+ // update the check state because it will just be a pending
// placeholder.
expandToLevel(element, 1);
return;
@@ -130,7 +131,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
}
/**
- * The item has expanded. Updates the checked state of its children.
+ * The item has expanded. Updates the checked state of its children.
*/
private void initializeItem(TreeItem item) {
if (item.getChecked() && !item.getGrayed()) {
@@ -141,8 +142,8 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/**
* Updates the check state of all created children
*/
- // MODIFIED to ignore parent state when in the middle of a
- // selection preserving refresh.
+ // MODIFIED to ignore parent state when in the middle of a
+ // selection preserving refresh.
private void updateChildrenItems(TreeItem parent) {
// We are in the middle of preserving selections, don't
// update any children according to parent
@@ -150,8 +151,8 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
return;
Item[] children = getChildren(parent);
boolean state = parent.getChecked();
- for (int i = 0; i < children.length; i++) {
- TreeItem curr = (TreeItem) children[i];
+ for (Item element : children) {
+ TreeItem curr = (TreeItem) element;
if (curr.getData() != null && ((curr.getChecked() != state) || curr.getGrayed())) {
curr.setChecked(state);
curr.setGrayed(false);
@@ -172,8 +173,8 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
Item[] children = getChildren(item);
boolean containsChecked = false;
boolean containsUnchecked = false;
- for (int i = 0; i < children.length; i++) {
- TreeItem curr = (TreeItem) children[i];
+ for (Item element : children) {
+ TreeItem curr = (TreeItem) element;
containsChecked |= curr.getChecked();
containsUnchecked |= (!curr.getChecked() || curr.getGrayed());
}
@@ -183,9 +184,6 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICheckable#setChecked(java.lang.Object, boolean)
- */
@Override
public boolean setChecked(Object element, boolean state) {
if (super.setChecked(element, state)) {
@@ -195,20 +193,14 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.CheckboxTreeViewer#setCheckedElements(java.lang.Object[])
- */
@Override
public void setCheckedElements(Object[] elements) {
super.setCheckedElements(elements);
- for (int i = 0; i < elements.length; i++) {
- doCheckStateChanged(elements[i]);
+ for (Object element : elements) {
+ doCheckStateChanged(element);
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#setExpanded(org.eclipse.swt.widgets.Item, boolean)
- */
@Override
protected void setExpanded(Item item, boolean expand) {
super.setExpanded(item, expand);
@@ -217,16 +209,12 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.CheckboxTreeViewer#getCheckedElements()
- */
@Override
public Object[] getCheckedElements() {
Object[] checked = super.getCheckedElements();
// add all items that are children of a checked node but not created yet
ArrayList<Object> result = new ArrayList<>();
- for (int i = 0; i < checked.length; i++) {
- Object curr = checked[i];
+ for (Object curr : checked) {
result.add(curr);
Widget item = findItem(curr);
if (item != null) {
@@ -243,25 +231,25 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/**
* Recursively add the filtered children of element to the result.
+ *
* @param element
* @param result
*/
private void collectChildren(Object element, ArrayList<Object> result) {
Object[] filteredChildren = getFilteredChildren(element);
- for (int i = 0; i < filteredChildren.length; i++) {
- Object curr = filteredChildren[i];
+ for (Object curr : filteredChildren) {
result.add(curr);
collectChildren(curr, result);
}
}
// The super implementation doesn't really work because the
- // non-expanded items are not holding their real elements yet.
- // Yet the code that records the checked state uses the
+ // non-expanded items are not holding their real elements yet.
+ // Yet the code that records the checked state uses the
// elements to remember what checkmarks should be restored.
// The result is that non-expanded elements are not up to date
// and if anything in there should have been checked, it
- // won't be. The best we can do is at least turn off all the
+ // won't be. The best we can do is at least turn off all the
// rippling checks that happen during this method since we are going
// to reset all the checkmarks anyway.
@Override
@@ -278,18 +266,18 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
restoreCheckedState();
}
- // We only remember the leaves. This is specific to our
+ // We only remember the leaves. This is specific to our
// use case, not necessarily a good idea for fixing the general
// problem.
private void saveCheckedState() {
Object[] checked = getCheckedElements();
savedCheckState = new ArrayList<>(checked.length);
- for (int i = 0; i < checked.length; i++)
- if (!isExpandable(checked[i]) && !getGrayed(checked[i]))
- savedCheckState.add(checked[i]);
+ for (Object element : checked)
+ if (!isExpandable(element) && !getGrayed(element))
+ savedCheckState.add(element);
}
- // Now we restore checked state.
+ // Now we restore checked state.
private void restoreCheckedState() {
setCheckedElements(new Object[0]);
setGrayedElements(new Object[0]);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
index d5ba1bedd..8fbfcfc61 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
@@ -30,9 +30,6 @@ public class CopyHandler extends AbstractHandler {
this.copySource = copyable;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) {
Object control = HandlerUtil.getVariable(event, ISources.ACTIVE_FOCUS_CONTROL_NAME);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
index 57944f731..ea24c8ece 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Sonatype, Inc. - ongoing development
@@ -34,9 +34,8 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.statushandlers.StatusManager;
/**
- * Common superclass for a wizard that performs a provisioning
- * operation.
- *
+ * Common superclass for a wizard that performs a provisioning operation.
+ *
* @since 3.5
*/
public abstract class ProvisioningOperationWizard extends Wizard {
@@ -57,7 +56,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
boolean waitingForOtherJobs = false;
protected RemediationOperation remediationOperation;
- public ProvisioningOperationWizard(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob job) {
+ public ProvisioningOperationWizard(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections,
+ LoadMetadataRepositoryJob job) {
super();
this.ui = ui;
this.operation = operation;
@@ -119,7 +119,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
@Override
public IWizardPage getNextPage(IWizardPage page) {
- // If we are moving from the main page or error page, we may need to resolve before
+ // If we are moving from the main page or error page, we may need to resolve
+ // before
// advancing.
if (page == remediationPage) {
@@ -135,7 +136,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
couldNotResolve(null);
}
operation = remediationOperation;
- initializeResolutionModelElements(ElementUtils.requestToElement(((RemediationOperation) operation).getCurrentRemedy(), !(this instanceof UpdateWizard)));
+ initializeResolutionModelElements(ElementUtils.requestToElement(
+ ((RemediationOperation) operation).getCurrentRemedy(), !(this instanceof UpdateWizard)));
planChanged();
return resolutionPage;
} else if (page == mainPage || page == errorPage) {
@@ -152,11 +154,13 @@ public abstract class ProvisioningOperationWizard extends Wizard {
IStatus status = operation.getResolutionResult();
if (status == null || status.getSeverity() == IStatus.ERROR) {
if (page == mainPage) {
- if (remediationOperation != null && remediationOperation.getResolutionResult() == Status.OK_STATUS && remediationOperation.getRemedyConfigs().length == 1) {
+ if (remediationOperation != null && remediationOperation.getResolutionResult() == Status.OK_STATUS
+ && remediationOperation.getRemedyConfigs().length == 1) {
planChanged();
return getNextPage(remediationPage);
}
- if (remediationOperation != null && remediationOperation.getResolutionResult() == Status.OK_STATUS) {
+ if (remediationOperation != null
+ && remediationOperation.getResolutionResult() == Status.OK_STATUS) {
planChanged();
return remediationPage;
}
@@ -174,15 +178,16 @@ public abstract class ProvisioningOperationWizard extends Wizard {
}
/**
- * The selections that drive the provisioning operation have changed. We might need to
- * change the completion state of the resolution page.
+ * The selections that drive the provisioning operation have changed. We might
+ * need to change the completion state of the resolution page.
*/
public void operationSelectionsChanged(ISelectableIUsPage page) {
if (resolutionPage != null) {
// If the page selections are different than what we may have resolved
// against, then this page is not complete.
boolean old = resolutionPage.isPageComplete();
- resolutionPage.setPageComplete(page.getCheckedIUElements() != null && page.getCheckedIUElements().length > 0);
+ resolutionPage
+ .setPageComplete(page.getCheckedIUElements() != null && page.getCheckedIUElements().length > 0);
// If the state has truly changed, update the buttons.
if (old != resolutionPage.isPageComplete()) {
IWizardContainer container = getContainer();
@@ -196,7 +201,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
boolean previouslyWaiting = waitingForOtherJobs;
boolean previouslyCanceled = getCurrentStatus().getSeverity() == IStatus.CANCEL;
waitingForOtherJobs = ui.hasScheduledOperations();
- return waitingForOtherJobs || previouslyWaiting || previouslyCanceled || pageSelectionsHaveChanged(page) || provisioningContextChanged();
+ return waitingForOtherJobs || previouslyWaiting || previouslyCanceled || pageSelectionsHaveChanged(page)
+ || provisioningContextChanged();
}
protected boolean pageSelectionsHaveChanged(ISelectableIUsPage page) {
@@ -221,7 +227,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
protected void planChanged() {
IWizardPage currentPage = getContainer().getCurrentPage();
- if ((currentPage == null || currentPage == mainPage) && remediationPage != null && remediationOperation != null && remediationOperation.getResolutionResult() == Status.OK_STATUS) {
+ if ((currentPage == null || currentPage == mainPage) && remediationPage != null && remediationOperation != null
+ && remediationOperation.getResolutionResult() == Status.OK_STATUS) {
remediationPage.updateStatus(root, operation, planSelections);
}
resolutionPage.updateStatus(root, operation);
@@ -249,7 +256,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
}
public void computeRemediationOperation(ProfileChangeOperation op, ProvisioningUI ui, IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProvisioningOperationWizard_Remediation_Operation, RemedyConfig.getAllRemedyConfigs().length);
+ SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProvisioningOperationWizard_Remediation_Operation,
+ RemedyConfig.getAllRemedyConfigs().length);
monitor.setTaskName(ProvUIMessages.ProvisioningOperationWizard_Remediation_Operation);
remediationOperation = new RemediationOperation(ui.getSession(), op.getProfileChangeRequest());
remediationOperation.resolveModal(monitor);
@@ -257,9 +265,10 @@ public abstract class ProvisioningOperationWizard extends Wizard {
}
/**
- * Recompute the provisioning plan based on the items in the IUElementListRoot and the given provisioning context.
- * Report progress using the specified runnable context. This method may be called before the page is created.
- *
+ * Recompute the provisioning plan based on the items in the IUElementListRoot
+ * and the given provisioning context. Report progress using the specified
+ * runnable context. This method may be called before the page is created.
+ *
* @param runnableContext
*/
public void recomputePlan(IRunnableContext runnableContext, final boolean withRemediation) {
@@ -314,7 +323,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
if (message != null) {
couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, message, null);
} else {
- couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningOperationWizard_UnexpectedFailureToResolve, null);
+ couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID,
+ ProvUIMessages.ProvisioningOperationWizard_UnexpectedFailureToResolve, null);
}
StatusManager.getManager().handle(couldNotResolveStatus, StatusManager.LOG);
}
@@ -333,9 +343,9 @@ public abstract class ProvisioningOperationWizard extends Wizard {
public void saveBoundsRelatedSettings() {
IWizardPage[] pages = getPages();
- for (int i = 0; i < pages.length; i++) {
- if (pages[i] instanceof ProvisioningWizardPage)
- ((ProvisioningWizardPage) pages[i]).saveBoundsRelatedSettings();
+ for (IWizardPage page : pages) {
+ if (page instanceof ProvisioningWizardPage)
+ ((ProvisioningWizardPage) page).saveBoundsRelatedSettings();
}
}
@@ -352,28 +362,30 @@ public abstract class ProvisioningOperationWizard extends Wizard {
}
/*
- * Overridden to start the preload job after page control creation.
- * This allows any listeners on repo events to be set up before a
- * batch load occurs. The job creator uses a property to indicate if
- * the job needs scheduling (the client may have already completed the job
- * before the UI was opened).
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
+ * Overridden to start the preload job after page control creation. This allows
+ * any listeners on repo events to be set up before a batch load occurs. The job
+ * creator uses a property to indicate if the job needs scheduling (the client
+ * may have already completed the job before the UI was opened).
*/
@Override
public void createPageControls(Composite pageContainer) {
- // We call this so that wizards ignore all repository eventing that occurs while the wizard is
- // open. Otherwise, we can get an add event when a repository loads its references that we
- // don't want to respond to. Since repo discovery events can be received asynchronously by the
- // manager, the subsequent add events generated by the manager aren't guaranteed to be synchronous,
- // even if our listener is synchronous. Thus, we can't fine-tune
+ // We call this so that wizards ignore all repository eventing that occurs while
+ // the wizard is
+ // open. Otherwise, we can get an add event when a repository loads its
+ // references that we
+ // don't want to respond to. Since repo discovery events can be received
+ // asynchronously by the
+ // manager, the subsequent add events generated by the manager aren't guaranteed
+ // to be synchronous,
+ // even if our listener is synchronous. Thus, we can't fine-tune
// the "ignore" window to a specific operation.
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277265#c38
ui.signalRepositoryOperationStart();
super.createPageControls(pageContainer);
if (repoPreloadJob != null) {
if (repoPreloadJob.getProperty(LoadMetadataRepositoryJob.WIZARD_CLIENT_SHOULD_SCHEDULE) != null) {
- // job has not been scheduled. Set a listener so we can report accumulated errors and
+ // job has not been scheduled. Set a listener so we can report accumulated
+ // errors and
// schedule it.
repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
@Override
@@ -419,8 +431,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
}
/*
- * Return a boolean indicating whether the wizard's current status should override any detail
- * reported by the operation.
+ * Return a boolean indicating whether the wizard's current status should
+ * override any detail reported by the operation.
*/
public boolean statusOverridesOperation() {
return false;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
index 222b944d9..7a66fe517 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
@@ -35,11 +35,11 @@ import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
/**
- * A wizard page that presents a check box list of IUs and allows the user
- * to select and deselect them. Typically the first page in a provisioning
+ * A wizard page that presents a check box list of IUs and allows the user to
+ * select and deselect them. Typically the first page in a provisioning
* operation wizard, and usually it is the page used to report resolution errors
* before advancing to resolution detail.
- *
+ *
* @since 3.5
*
*/
@@ -58,7 +58,8 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
protected Policy policy;
SashForm sashForm;
- public SelectableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, Object[] initialSelections) {
+ public SelectableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root,
+ Object[] initialSelections) {
super("IUSelectionPage", ui, wizard); //$NON-NLS-1$
this.root = root;
if (root == null)
@@ -126,7 +127,8 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
updateSelection();
});
- // Filters and sorters before establishing content, so we don't refresh unnecessarily.
+ // Filters and sorters before establishing content, so we don't refresh
+ // unnecessarily.
IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
comparator.useColumnConfig(ProvUI.getIUColumnConfig());
tableViewer.setComparator(comparator);
@@ -154,8 +156,10 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
controlsComposite.setLayoutData(gd);
- // The text area shows a description of the selected IU, or error detail if applicable.
- iuDetailsGroup = new IUDetailsGroup(sashForm, tableViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
+ // The text area shows a description of the selected IU, or error detail if
+ // applicable.
+ iuDetailsGroup = new IUDetailsGroup(sashForm, tableViewer,
+ convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
updateStatus(root, resolvedOperation);
setControl(sashForm);
@@ -240,25 +244,23 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
ArrayList<Object> selections = new ArrayList<>(initialSelections.length);
- for (int i = 0; i < initialSelections.length; i++) {
- if (initialSelections[i] instanceof AvailableUpdateElement) {
- AvailableUpdateElement element = (AvailableUpdateElement) initialSelections[i];
+ for (Object initialSelection : initialSelections) {
+ if (initialSelection instanceof AvailableUpdateElement) {
+ AvailableUpdateElement element = (AvailableUpdateElement) initialSelection;
if (element.isLockedForUpdate()) {
continue;
}
}
- selections.add(initialSelections[i]);
+ selections.add(initialSelection);
}
tableViewer.setCheckedElements(selections.toArray(new Object[selections.size()]));
}
/*
- * Overridden so that we don't call getNextPage().
- * We use getNextPage() to start resolving the operation so
- * we only want to do that when the next button is pressed.
- *
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
+ * Overridden so that we don't call getNextPage(). We use getNextPage() to start
+ * resolving the operation so we only want to do that when the next button is
+ * pressed.
+ *
*/
@Override
public boolean canFlipToNextPage() {
@@ -266,11 +268,9 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
}
/*
- * Overridden to null out any cached page so that the wizard
- * is always consulted. This allows wizards to do things like
- * synchronize previous page selections with this page.
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getPreviousPage()
+ * Overridden to null out any cached page so that the wizard is always
+ * consulted. This allows wizards to do things like synchronize previous page
+ * selections with this page.
*/
@Override
public IWizardPage getPreviousPage() {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
index 01c30a08c..32768462a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
@@ -14,7 +14,6 @@
package org.eclipse.equinox.internal.p2.ui.dialogs;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.widgets.Text;
@@ -32,9 +31,6 @@ public class TextURLDropAdapter extends URLDropAdapter {
this.text = text;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
- */
@Override
protected void handleDrop(String urlText, DropTargetEvent event) {
text.setText(urlText);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
index 99aa0b2bc..0729baba8 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Sonatype, Inc. - ongoing development
@@ -32,7 +32,8 @@ import org.eclipse.jface.wizard.IWizardPage;
*/
public class UninstallWizard extends ProvisioningOperationWizard {
- public UninstallWizard(ProvisioningUI ui, UninstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob job) {
+ public UninstallWizard(ProvisioningUI ui, UninstallOperation operation,
+ Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob job) {
super(ui, operation, initialSelections.toArray(), job);
setWindowTitle(ProvUIMessages.UninstallIUOperationLabel);
setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL));
@@ -57,8 +58,8 @@ public class UninstallWizard extends ProvisioningOperationWizard {
root = new IUElementListRoot(ui);
ArrayList<InstalledIUElement> list = new ArrayList<>(selectedElements.length);
ArrayList<InstalledIUElement> selections = new ArrayList<>(selectedElements.length);
- for (int i = 0; i < selectedElements.length; i++) {
- IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
+ for (Object selectedElement : selectedElements) {
+ IInstallableUnit iu = ElementUtils.getIU(selectedElement);
if (iu != null) {
InstalledIUElement element = new InstalledIUElement(root, getProfileId(), iu);
list.add(element);
@@ -74,10 +75,6 @@ public class UninstallWizard extends ProvisioningOperationWizard {
return (SelectableIUsPage) mainPage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getStartingPage()
- */
@Override
public IWizardPage getStartingPage() {
if (getCurrentStatus().isOK()) {
@@ -87,14 +84,11 @@ public class UninstallWizard extends ProvisioningOperationWizard {
return super.getStartingPage();
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
- */
@Override
protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
UninstallOperation op = new UninstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
op.setProfileId(getProfileId());
- // op.setRootMarkerKey(getRootMarkerKey());
+ // op.setRootMarkerKey(getRootMarkerKey());
op.setProvisioningContext(getProvisioningContext());
return op;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
index 9a55a5495..106110449 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
@@ -34,7 +34,8 @@ public class UpdateSingleIUWizard extends Wizard {
UpdateOperation operation;
public static boolean validFor(UpdateOperation operation) {
- return operation.hasResolved() && operation.getResolutionResult().isOK() && operation.getSelectedUpdates().length == 1;
+ return operation.hasResolved() && operation.getResolutionResult().isOK()
+ && operation.getSelectedUpdates().length == 1;
}
public UpdateSingleIUWizard(ProvisioningUI ui, UpdateOperation operation) {
@@ -50,10 +51,6 @@ public class UpdateSingleIUWizard extends Wizard {
return mainPage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
@Override
public void addPages() {
mainPage = createMainPage();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
index 1b0ded316..a2e9d9f5f 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
@@ -173,12 +173,6 @@ public class UpdateWizard extends WizardWithLicenses {
return mainPage;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#
- * getProfileChangeOperation(java.lang.Object[])
- */
@Override
protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
if (operation == null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
index 96cce4f94..1004e3ede 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
@@ -27,6 +27,7 @@ import org.eclipse.jface.wizard.IWizardPage;
/**
* Common superclass for wizards that need to show licenses.
+ *
* @since 3.5
*/
public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
@@ -36,11 +37,6 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
AcceptLicensesWizardPage licensePage;
boolean bypassLicensePage;
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
-
public boolean isBypassLicensePage() {
return bypassLicensePage;
}
@@ -59,7 +55,8 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
}
}
- public WizardWithLicenses(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob job) {
+ public WizardWithLicenses(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections,
+ LoadMetadataRepositoryJob job) {
super(ui, operation, initialSelections, job);
this.bypassLicensePage = canBypassLicensePage();
}
@@ -73,8 +70,6 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
/*
* Overridden to determine whether the license page should be shown.
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
*/
@Override
public IWizardPage getNextPage(IWizardPage page) {
@@ -103,10 +98,6 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#performFinish()
- */
@Override
public boolean performFinish() {
@@ -118,8 +109,10 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
}
public static boolean canBypassLicensePage() {
- IScopeContext[] contexts = new IScopeContext[] {InstanceScope.INSTANCE, DefaultScope.INSTANCE, BundleDefaultsScope.INSTANCE, ConfigurationScope.INSTANCE};
- boolean bypass = Platform.getPreferencesService().getBoolean(ProvUIActivator.PLUGIN_ID, BYPASS_LICENSE_PAGE, false, contexts);
+ IScopeContext[] contexts = new IScopeContext[] { InstanceScope.INSTANCE, DefaultScope.INSTANCE,
+ BundleDefaultsScope.INSTANCE, ConfigurationScope.INSTANCE };
+ boolean bypass = Platform.getPreferencesService().getBoolean(ProvUIActivator.PLUGIN_ID, BYPASS_LICENSE_PAGE,
+ false, contexts);
return bypass;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
index 428c81594..aac045f07 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
@@ -19,7 +19,7 @@ import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
/**
* Element wrapper class for an artifact key and its repository
- *
+ *
* @since 3.4
*/
public class ArtifactElement extends ProvElement {
@@ -33,11 +33,6 @@ public class ArtifactElement extends ProvElement {
this.repo = repo;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
return null;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
index f04f653d7..5670de599 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,10 +17,10 @@ import org.eclipse.equinox.internal.p2.ui.*;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Element class that represents the root of an artifact
- * repository viewer. Its children are the artifact repositories
- * obtained using the query installed in the content provider.
- *
+ * Element class that represents the root of an artifact repository viewer. Its
+ * children are the artifact repositories obtained using the query installed in
+ * the content provider.
+ *
* @since 3.4
*
*/
@@ -36,10 +36,6 @@ public class ArtifactRepositories extends RootElement {
return QueryProvider.ARTIFACT_REPOS;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
@Override
public String getLabel(Object o) {
return ProvUIMessages.Label_Repositories;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
index 45be8ac29..67a8d8118 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Red Hat Inc. - Fix compiler problems from generified IAdaptable#getAdapter
@@ -25,9 +25,9 @@ import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
/**
- * Element wrapper class for a artifact repository that gets its
- * contents in a deferred manner.
- *
+ * Element wrapper class for a artifact repository that gets its contents in a
+ * deferred manner.
+ *
* @since 3.4
*/
public class ArtifactRepositoryElement extends RemoteQueriedElement implements IRepositoryElement<IArtifactKey> {
@@ -83,18 +83,11 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
return repo;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
- */
@Override
public URI getLocation() {
return location;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
- */
@Override
public String getName() {
String name = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
@@ -105,49 +98,32 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
return name;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
- */
@Override
public String getDescription() {
if (getProvisioningUI().getRepositoryTracker().hasNotFoundStatusBeenReported(location))
return ProvUIMessages.RepositoryElement_NotFound;
- String description = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
+ String description = getArtifactRepositoryManager().getRepositoryProperty(location,
+ IRepository.PROP_DESCRIPTION);
if (description == null)
return ""; //$NON-NLS-1$
return description;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#isEnabled()
- */
@Override
public boolean isEnabled() {
return isEnabled;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement#setEnabled(boolean)
- */
@Override
public void setEnabled(boolean enabled) {
isEnabled = enabled;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
@Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_ARTIFACTS;
}
- /*
- * overridden to lazily fetch repository
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
- */
@Override
public IQueryable<?> getQueryable() {
if (queryable == null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
index 5b004785b..6a75620ab 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
@@ -67,13 +67,6 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
this.isPatch = iu == null ? false : Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_PATCH));
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(
- * java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
if (imageId != null)
@@ -168,32 +161,16 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
@Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_IUS;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
- */
@Override
public Collection<IRequirement> getRequirements() {
return iu.getRequirements();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
- */
@Override
public boolean shouldShowChildren() {
return shouldShowChildren;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
index ffea879db..5d7a19aba 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
@@ -21,9 +21,8 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.IRequirement;
/**
- * Element wrapper class for IU's that represent categories of
- * available IU's
- *
+ * Element wrapper class for IU's that represent categories of available IU's
+ *
* @since 3.4
*/
public class CategoryElement extends RemoteQueriedElement implements IIUElement {
@@ -37,11 +36,6 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
ius.add(iu);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_CATEGORY;
@@ -139,9 +133,6 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return cache;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
- */
@Override
public boolean shouldShowChildren() {
return true;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
index 5a5d44245..412dc2e69 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
@@ -17,9 +17,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.Dialog;
/**
- * Element class representing an explanation for no children appearing
- * beneath an element.
- *
+ * Element class representing an explanation for no children appearing beneath
+ * an element.
+ *
* @since 3.5
*/
public class EmptyElementExplanation extends ProvElement {
@@ -30,8 +30,9 @@ public class EmptyElementExplanation extends ProvElement {
/**
* Create an empty element explanation
- * @param parent the parent of this element
- * @param severity the severity of the explanation {@link IStatus#INFO},
+ *
+ * @param parent the parent of this element
+ * @param severity the severity of the explanation {@link IStatus#INFO},
* @param explanation
*/
public EmptyElementExplanation(Object parent, int severity, String explanation, String description) {
@@ -41,11 +42,6 @@ public class EmptyElementExplanation extends ProvElement {
this.description = description;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
if (severity == IStatus.ERROR)
@@ -60,9 +56,6 @@ public class EmptyElementExplanation extends ProvElement {
return explanation;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
@Override
public Object[] getChildren(Object o) {
return new Object[0];
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
index e60fb5b4d..971d8346c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,9 +17,9 @@ import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Element class representing a fixed set of IU's. This element should
- * never appear in a list, but can be used as a parent in a list.
- *
+ * Element class representing a fixed set of IU's. This element should never
+ * appear in a list, but can be used as a parent in a list.
+ *
* @since 3.5
*/
public class IUElementListRoot extends QueriedElement {
@@ -44,11 +44,6 @@ public class IUElementListRoot extends QueriedElement {
this.children = children;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
return null;
@@ -59,9 +54,6 @@ public class IUElementListRoot extends QueriedElement {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
@Override
public Object[] getChildren(Object o) {
return children;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
index 01db29213..615480202 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
@@ -24,7 +24,7 @@ import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescriptio
/**
* Element wrapper class for installed IU's. Used instead of the plain IU when
* there should be a parent profile available for operations.
- *
+ *
* @since 3.4
*/
public class InstalledIUElement extends QueriedElement implements IIUElement {
@@ -40,11 +40,6 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
this.isPatch = iu == null ? false : Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_PATCH));
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
return isPatch ? ProvUIImages.IMG_PATCH_IU : ProvUIImages.IMG_IU;
@@ -94,25 +89,16 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
return true;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
- */
@Override
public Collection<IRequirement> getRequirements() {
return iu.getRequirements();
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
@Override
protected int getDefaultQueryType() {
return QueryProvider.INSTALLED_IUS;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
- */
@Override
public boolean shouldShowChildren() {
return true;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
index ea871b6a6..f684537b2 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,12 +18,12 @@ import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Element class that represents some collection of metadata repositories.
- * It can be configured so that it retrieves its children in different ways.
- * The default query type will return the metadata repositories specified in
- * this element. Other query types can be used to query each repository and
- * aggregate the children.
- *
+ * Element class that represents some collection of metadata repositories. It
+ * can be configured so that it retrieves its children in different ways. The
+ * default query type will return the metadata repositories specified in this
+ * element. Other query types can be used to query each repository and aggregate
+ * the children.
+ *
* @since 3.4
*
*/
@@ -35,43 +35,44 @@ public class MetadataRepositories extends RootElement {
this(ProvUI.getQueryContext(ui.getPolicy()), ui, null);
}
- public MetadataRepositories(IUViewQueryContext queryContext, ProvisioningUI ui, QueryableMetadataRepositoryManager queryable) {
+ public MetadataRepositories(IUViewQueryContext queryContext, ProvisioningUI ui,
+ QueryableMetadataRepositoryManager queryable) {
super(queryContext, ui);
this.queryable = queryable;
}
/**
- * Get whether disabled repositories should be included in queries when no repositories
- * have been specified. This boolean is used because the flags specified when getting
- * repositories from a repository manager are treated as an AND, and we want to permit
- * aggregating disabled repositories along with other flags.
- *
- * @return includeDisabled <code>true</code> if disabled repositories should be included and
- * <code>false</code> if they should not be included.
+ * Get whether disabled repositories should be included in queries when no
+ * repositories have been specified. This boolean is used because the flags
+ * specified when getting repositories from a repository manager are treated as
+ * an AND, and we want to permit aggregating disabled repositories along with
+ * other flags.
+ *
+ * @return includeDisabled <code>true</code> if disabled repositories should be
+ * included and <code>false</code> if they should not be included.
*/
public boolean getIncludeDisabledRepositories() {
return includeDisabled;
}
/**
- * Set whether disabled repositories should be included in queries when no repositories
- * have been specified. This boolean is used because the flags specified when getting
- * repositories from a repository manager are treated as an AND, and we want to permit
- * aggregating disabled repositories along with other flags.
- *
- * @param includeDisabled <code>true</code> if disabled repositories should be included and
- * <code>false</code> if they should not be included.
+ * Set whether disabled repositories should be included in queries when no
+ * repositories have been specified. This boolean is used because the flags
+ * specified when getting repositories from a repository manager are treated as
+ * an AND, and we want to permit aggregating disabled repositories along with
+ * other flags.
+ *
+ * @param includeDisabled <code>true</code> if disabled repositories should be
+ * included and <code>false</code> if they should not be
+ * included.
*/
public void setIncludeDisabledRepositories(boolean includeDisabled) {
this.includeDisabled = includeDisabled;
}
/*
- * Overridden to check the query context. We might
- * be showing repositories, or we might be flattening the
- * view to some other element
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryType()
+ * Overridden to check the query context. We might be showing repositories, or
+ * we might be flattening the view to some other element
*/
@Override
public int getQueryType() {
@@ -85,19 +86,15 @@ public class MetadataRepositories extends RootElement {
return QueryProvider.METADATA_REPOS;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
@Override
public String getLabel(Object o) {
return ProvUIMessages.Label_Repositories;
}
/*
- * Overridden because we might be iterating sites
- * (type = METADATA_REPOSITORIES) rather than loading repos. If this
- * is the case, we only care whether we have a queryable or not.
+ * Overridden because we might be iterating sites (type = METADATA_REPOSITORIES)
+ * rather than loading repos. If this is the case, we only care whether we have
+ * a queryable or not.
*/
@Override
public boolean hasQueryable() {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
index 9b148e5e0..a1a9295e8 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
@@ -29,11 +29,11 @@ import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Element wrapper class for a metadata repository that gets its
- * contents in a deferred manner. A metadata repository can be the root
- * (input) of a viewer, when the view is filtered by repo, or a child of
- * an input, when the view is showing many repos.
- *
+ * Element wrapper class for a metadata repository that gets its contents in a
+ * deferred manner. A metadata repository can be the root (input) of a viewer,
+ * when the view is filtered by repo, or a child of an input, when the view is
+ * showing many repos.
+ *
* @since 3.4
*/
public class MetadataRepositoryElement extends RootElement implements IRepositoryElement<IInstallableUnit> {
@@ -47,11 +47,13 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
this(parent, null, null, location, isEnabled);
}
- public MetadataRepositoryElement(IUViewQueryContext queryContext, ProvisioningUI ui, URI location, boolean isEnabled) {
+ public MetadataRepositoryElement(IUViewQueryContext queryContext, ProvisioningUI ui, URI location,
+ boolean isEnabled) {
this(null, queryContext, ui, location, isEnabled);
}
- public MetadataRepositoryElement(Object parent, IUViewQueryContext queryContext, ProvisioningUI ui, URI location, boolean isEnabled) {
+ public MetadataRepositoryElement(Object parent, IUViewQueryContext queryContext, ProvisioningUI ui, URI location,
+ boolean isEnabled) {
super(parent, queryContext, ui);
this.location = location;
this.isEnabled = isEnabled;
@@ -73,17 +75,19 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
return cache;
SubMonitor sub = SubMonitor.convert(monitor, 200);
- // Ensure the repository is loaded using the monitor, so we respond to cancelation.
- // Otherwise, a non-loaded repository could be loaded in the query provider without a monitor.
+ // Ensure the repository is loaded using the monitor, so we respond to
+ // cancelation.
+ // Otherwise, a non-loaded repository could be loaded in the query provider
+ // without a monitor.
// If the load fails, return an explanation element.
try {
getMetadataRepository(sub.newChild(100));
- //only invoke super if we successfully loaded the repository
+ // only invoke super if we successfully loaded the repository
cache = super.fetchChildren(o, sub.newChild(100));
} catch (ProvisionException e) {
getProvisioningUI().getRepositoryTracker().reportLoadFailure(location, e);
// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276784
- cache = new Object[] {new EmptyElementExplanation(this, IStatus.ERROR, e.getLocalizedMessage(), "")}; //$NON-NLS-1$
+ cache = new Object[] { new EmptyElementExplanation(this, IStatus.ERROR, e.getLocalizedMessage(), "") }; //$NON-NLS-1$
}
return cache;
}
@@ -109,8 +113,6 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
/*
* overridden to lazily fetch repository
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
*/
@Override
public IQueryable<?> getQueryable() {
@@ -140,28 +142,19 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
}
/*
- * overridden to check whether url is specified rather
- * than loading the repo via getQueryable()
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
+ * overridden to check whether url is specified rather than loading the repo via
+ * getQueryable()
*/
@Override
public boolean knowsQueryable() {
return location != null;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
- */
@Override
public URI getLocation() {
return location;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
- */
@Override
public String getName() {
if (name == null) {
@@ -183,31 +176,22 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
setQueryable(null);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
- */
@Override
public String getDescription() {
if (getProvisioningUI().getRepositoryTracker().hasNotFoundStatusBeenReported(location))
return ProvUIMessages.RepositoryElement_NotFound;
- String description = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
+ String description = getMetadataRepositoryManager().getRepositoryProperty(location,
+ IRepository.PROP_DESCRIPTION);
if (description == null)
return ""; //$NON-NLS-1$
return description;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#isEnabled()
- */
@Override
public boolean isEnabled() {
return isEnabled;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement#setEnabled(boolean)
- */
@Override
public void setEnabled(boolean enabled) {
isEnabled = enabled;
@@ -215,13 +199,12 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
/*
* Overridden to check whether a repository instance has already been loaded.
- * This is necessary to prevent background loading of an already loaded repository
- * by the DeferredTreeContentManager, which will add redundant children to the
- * viewer.
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
+ * This is necessary to prevent background loading of an already loaded
+ * repository by the DeferredTreeContentManager, which will add redundant
+ * children to the viewer. see
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069 see
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
+ *
*/
@Override
public boolean hasQueryable() {
@@ -267,8 +250,8 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
/**
* MetadataRepositoryElements can sometimes be roots and sometimes children.
- * When they are roots the should have a ui set directly. As children they should
- * defer to the parent to get the ui.
+ * When they are roots the should have a ui set directly. As children they
+ * should defer to the parent to get the ui.
*/
@Override
public ProvisioningUI getProvisioningUI() {
@@ -278,7 +261,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
Object parent = getParent(this);
if (parent != null && parent instanceof QueriedElement)
return ((QueriedElement) parent).getProvisioningUI();
- // if all else fails get the global UI. This should not really happen but
+ // if all else fails get the global UI. This should not really happen but
// we need to account for some possible historical cases.
return ProvisioningUI.getDefaultUI();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
index 4ba2d5949..2935fb17f 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
@@ -19,9 +19,9 @@ import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.query.IQueryable;
/**
- * Element wrapper class for a profile that uses the query
- * mechanism to obtain its contents.
- *
+ * Element wrapper class for a profile that uses the query mechanism to obtain
+ * its contents.
+ *
* @since 3.4
*/
public class ProfileElement extends RemoteQueriedElement {
@@ -65,10 +65,8 @@ public class ProfileElement extends RemoteQueriedElement {
}
/*
- * Overridden to check whether we know the profile id rather
- * than fetch the profile from the registry using getQueryable()
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
+ * Overridden to check whether we know the profile id rather than fetch the
+ * profile from the registry using getQueryable()
*/
@Override
public boolean knowsQueryable() {
@@ -76,14 +74,10 @@ public class ProfileElement extends RemoteQueriedElement {
}
/*
- * Overridden to check the children so that profiles
- * showing in profile views accurately reflect if they
- * are empty. We do not cache the children because often
- * this element is the input of a view and when the view
- * is refreshed we want to refetch the children.
- *
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement#isContainer()
+ * Overridden to check the children so that profiles showing in profile views
+ * accurately reflect if they are empty. We do not cache the children because
+ * often this element is the input of a view and when the view is refreshed we
+ * want to refetch the children.
*/
@Override
public boolean isContainer() {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
index c9cb75b59..9eb44057d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ import org.eclipse.ui.progress.IElementCollector;
/**
* Element class for profile snapshots
- *
+ *
* @since 3.5
*/
public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchAdapter {
@@ -44,9 +44,6 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
return profileId;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
@Override
public Object[] getChildren(Object o) {
IProfileRegistry registry = ProvUI.getProfileRegistry(session);
@@ -70,7 +67,8 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
elements.add(element);
// Eliminate the first in the list (earliest) if there was no content at all.
- // This doesn't always happen, but can, and we don't want to offer the user an empty profile to
+ // This doesn't always happen, but can, and we don't want to offer the user an
+ // empty profile to
// revert to. Just reset the list since it only has one element.
if (i == 0 && element.getChildren(element).length == 0)
elements.clear();
@@ -81,34 +79,22 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
return elements.toArray(new RollbackProfileElement[elements.size()]);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
@Override
public String getLabel(Object o) {
return ProvUIMessages.ProfileSnapshots_Label;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
Object[] children = getChildren(object);
collector.add(children, monitor);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#getRule(java.lang.Object)
- */
@Override
public ISchedulingRule getRule(Object object) {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
- */
@Override
public boolean isContainer() {
return false;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
index 734484fe2..eab9bba59 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
@@ -18,10 +18,9 @@ import org.eclipse.equinox.internal.p2.ui.QueryProvider;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Element class that represents the root of a profile
- * viewer. Its children are the profiles that match the
- * specified query for profiles.
- *
+ * Element class that represents the root of a profile viewer. Its children are
+ * the profiles that match the specified query for profiles.
+ *
* @since 3.4
*
*/
@@ -31,18 +30,11 @@ public class Profiles extends RootElement {
super(ui);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
@Override
public String getLabel(Object o) {
return ProvUIMessages.Label_Profiles;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
- */
@Override
protected int getDefaultQueryType() {
return QueryProvider.PROFILES;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
index 102663ee3..5aa32f2c0 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Red Hat Inc. - Fix compiler problems from generified IAdaptable#getAdapter
@@ -26,9 +26,8 @@ import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
import org.eclipse.ui.statushandlers.StatusManager;
/**
- * Generic element that represents a provisioning element in
- * a viewer.
- *
+ * Generic element that represents a provisioning element in a viewer.
+ *
* @since 3.4
*
*/
@@ -53,9 +52,8 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
/**
* Return a string id of the image that should be used to show the specified
* object. Returning null indicates that no image should be used.
- *
- * @param obj
- * the object whose image id is requested
+ *
+ * @param obj the object whose image id is requested
* @return the string id of the image in the provisioning image registry, or
* <code>null</code> if no image should be shown.
*/
@@ -67,11 +65,6 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
@Override
public ImageDescriptor getImageDescriptor(Object object) {
String id = getImageId(object);
@@ -85,13 +78,12 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
}
/**
- * Return the image that should be used to show the specfied object. The
- * image is managed by an image registry and should not be freed.
- *
- * @param object
- * the object whose image id is requested
+ * Return the image that should be used to show the specfied object. The image
+ * is managed by an image registry and should not be freed.
+ *
+ * @param object the object whose image id is requested
* @return the string id of the image in the provisioning image registry
- *
+ *
*/
public Image getImage(Object object) {
String id = getImageId(object);
@@ -134,10 +126,6 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
return children.length > 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
@Override
public Object getParent(Object o) {
return parent;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
index a23dad182..4b31689e3 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,9 +24,9 @@ import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Element class that represents an element that gets its children
- * by using a query.
- *
+ * Element class that represents an element that gets its children by using a
+ * query.
+ *
* @since 3.4
*
*/
@@ -37,8 +37,8 @@ public abstract class QueriedElement extends ProvElement {
// that want to eliminate duplicates from the parent hierarchy.
// This cache is *not* used as a general purpose child cache.
private Collection<?> cachedChildren;
- private static final Object[] EMPTY= new Object[0];
-
+ private static final Object[] EMPTY = new Object[0];
+
protected QueriedElement(Object parent) {
super(parent);
}
@@ -55,7 +55,7 @@ public abstract class QueriedElement extends ProvElement {
if (parent instanceof QueriedElement)
return ((QueriedElement) parent).getProvisioningUI();
// if we really can't find a UI then get the default. In general this should
- // not happen though. Turn on tracing in getDefaultUI() to see places where
+ // not happen though. Turn on tracing in getDefaultUI() to see places where
// it is happening.
return ProvisioningUI.getDefaultUI();
@@ -73,27 +73,25 @@ public abstract class QueriedElement extends ProvElement {
return fetchChildren(o, new NullProgressMonitor());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
@Override
public String getLabel(Object o) {
return null;
}
/**
- * Return the query type that is appropriate for this element when there
- * is no query context.
- * @return The integer query type
+ * Return the query type that is appropriate for this element when there is no
+ * query context.
+ *
+ * @return The integer query type
*/
protected abstract int getDefaultQueryType();
/**
- * Return the query type that should be used for this element.
- * Depending on the element, the query type may take the query context
- * into account. Subclasses should override this method if there are
- * context-dependent decisions to be made to determine the query.
+ * Return the query type that should be used for this element. Depending on the
+ * element, the query type may take the query context into account. Subclasses
+ * should override this method if there are context-dependent decisions to be
+ * made to determine the query.
+ *
* @return The integer query type
*/
public int getQueryType() {
@@ -112,8 +110,8 @@ public abstract class QueriedElement extends ProvElement {
Collection<Object> returnedChildren = new HashSet<>();
returnedChildren.addAll(results);
Object[] siblings = getSiblings();
- for (int i = 0; i < siblings.length; i++) {
- returnedChildren.remove(siblings[i]);
+ for (Object sibling : siblings) {
+ returnedChildren.remove(sibling);
}
return returnedChildren.toArray();
}
@@ -129,35 +127,29 @@ public abstract class QueriedElement extends ProvElement {
}
/**
- * Return a boolean indicating whether the receiver
- * has enough information to get its queryable. This is used in lieu
- * of {{@link #getQueryable()} when lazy initialization
- * of the queryable is not desired, and a client wishes
- * to know whether the queryable could be obtained. Subclasses
- * that cache information needed to retrieve the queryable rather
- * than the queryable itself should
- * override this.
- *
- * @return <code>true</code> if the receiver has enough
- * information to retrieve its queryable, <code>false</code>
- * if it does not.
+ * Return a boolean indicating whether the receiver has enough information to
+ * get its queryable. This is used in lieu of {{@link #getQueryable()} when lazy
+ * initialization of the queryable is not desired, and a client wishes to know
+ * whether the queryable could be obtained. Subclasses that cache information
+ * needed to retrieve the queryable rather than the queryable itself should
+ * override this.
+ *
+ * @return <code>true</code> if the receiver has enough information to retrieve
+ * its queryable, <code>false</code> if it does not.
*/
public boolean knowsQueryable() {
return queryable != null;
}
/**
- * Return a boolean indicating whether the receiver
- * actually has its queryable. This is used in lieu
- * of {{@link #getQueryable()} when lazy initialization
- * of the queryable is not desired. For example, when
- * working with an element whose queryable may be
- * expensive to obtain, clients may check this before
- * actually getting the queryable. Subclasses
- * should typically not need to override this.
- *
- * @return <code>true</code> if the receiver has its
- * queryable, <code>false</code> if it does not yet.
+ * Return a boolean indicating whether the receiver actually has its queryable.
+ * This is used in lieu of {{@link #getQueryable()} when lazy initialization of
+ * the queryable is not desired. For example, when working with an element whose
+ * queryable may be expensive to obtain, clients may check this before actually
+ * getting the queryable. Subclasses should typically not need to override this.
+ *
+ * @return <code>true</code> if the receiver has its queryable,
+ * <code>false</code> if it does not yet.
*/
public boolean hasQueryable() {
return queryable != null;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
index 1e663f6b0..cfbbc02de 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,9 +21,9 @@ import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
import org.eclipse.ui.progress.IElementCollector;
/**
- * Element wrapper class for objects that gets their children using
- * a deferred query.
- *
+ * Element wrapper class for objects that gets their children using a deferred
+ * query.
+ *
* @since 3.4
*/
public abstract class RemoteQueriedElement extends QueriedElement implements IDeferredWorkbenchAdapter {
@@ -62,17 +62,15 @@ public abstract class RemoteQueriedElement extends QueriedElement implements IDe
/*
* Overridden to ensure that we check whether we are using a
- * QueryableMetadataRepositoryManager as our queryable. If so,
- * we must find out if it is up to date with the real manager.
+ * QueryableMetadataRepositoryManager as our queryable. If so, we must find out
+ * if it is up to date with the real manager.
*
- * This is necessary to prevent background loading of already loaded repositories
- * by the DeferredTreeContentManager, which will add redundant children to the
- * viewer.
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=275235
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
+ * This is necessary to prevent background loading of already loaded
+ * repositories by the DeferredTreeContentManager, which will add redundant
+ * children to the viewer. see
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069 see
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343 see
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=275235
*/
@Override
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
index ff9271150..e4a8ffb3a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Red Hat Inc. - Fix compiler problems from generified IAdaptable#getAdapter
@@ -24,7 +24,7 @@ import org.eclipse.equinox.p2.query.IQueryable;
/**
* Element class for a profile snapshot
- *
+ *
* @since 3.4
*/
public class RollbackProfileElement extends RemoteQueriedElement {
@@ -46,11 +46,6 @@ public class RollbackProfileElement extends RemoteQueriedElement {
this.profileTag = profileTag;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
@Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_PROFILE;
@@ -103,19 +98,11 @@ public class RollbackProfileElement extends RemoteQueriedElement {
this.profileTag = profileTag;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
@Override
protected int getDefaultQueryType() {
return QueryProvider.INSTALLED_IUS;
}
- /*
- * The queryable is the profile snapshot
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getQueryable()
- */
@Override
public IQueryable<?> getQueryable() {
return getProfileSnapshot(new NullProgressMonitor());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
index 18811c589..3e9306f12 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
@@ -19,7 +19,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit;
/**
* Element class that represents available updates.
- *
+ *
* @since 3.4
*
*/
@@ -38,18 +38,11 @@ public class Updates extends QueriedElement {
this.iusToBeUpdated = iusToBeUpdated;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
@Override
public String getLabel(Object o) {
return ProvUIMessages.Updates_Label;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
- */
@Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_UPDATES;

Back to the top