Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-10-05 04:55:21 -0400
committerAlexander Kurtakov2017-10-05 04:55:21 -0400
commit54f9c77dda57a5588fb8c1595a60db34eab5738c (patch)
tree3fd524c6f9f0a01551dc8479b266a28ce3ff03c7
parentbd3528e84c08e849f893e78ea1051b55c7c9e943 (diff)
downloadrt.equinox.p2-54f9c77dda57a5588fb8c1595a60db34eab5738c.tar.gz
rt.equinox.p2-54f9c77dda57a5588fb8c1595a60db34eab5738c.tar.xz
rt.equinox.p2-54f9c77dda57a5588fb8c1595a60db34eab5738c.zip
Bug 525599 - Move p2 ui.admin bundles to Java 8I20171005-2000
* Bump BREEs * Bump minor versions * Enable warnings for newer Java versions features * Remove redundant type arguments * Add missing override annotations * Convert to lambdas Change-Id: I22c34216df3004d11b7fbe64104a8674db8f4712 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.classpath2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs64
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.classpath2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs64
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java14
41 files changed, 310 insertions, 221 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.classpath b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.classpath
index 64c5e31b7..eca7bdba8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.classpath
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs
index 0a67bc6f0..77b87aeb0 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs
@@ -6,29 +6,45 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
@@ -36,42 +52,80 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
index 4d8670510..c00481d3b 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
@@ -4,9 +4,9 @@ Bundle-Name: %bundleName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin.rcp; singleton:=true
-Bundle-Version: 1.0.300.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.rcp.Activator
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
index 60fb0af38..149b3d3dc 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.ui.admin.rcp</artifactId>
- <version>1.0.300-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java
index 05fb82d29..ba6210e77 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,19 +29,13 @@ public class Activator extends AbstractUIPlugin {
// contstructor
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
+ @Override
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
plugin = this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
+ @Override
public void stop(BundleContext bundleContext) throws Exception {
plugin = null;
super.stop(bundleContext);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java
index 901a884df..a3a7adcd9 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,9 +21,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class Application implements IApplication {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
+ @Override
public Object start(IApplicationContext context) throws Exception {
Display display = PlatformUI.createDisplay();
try {
@@ -37,19 +35,15 @@ public class Application implements IApplication {
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
+ @Override
public void stop() {
final IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench == null)
return;
final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
+ display.syncExec(() -> {
+ if (!display.isDisposed())
+ workbench.close();
});
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java
index 43b317519..5f5229648 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,12 +25,14 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
super(configurer);
}
+ @Override
protected void makeActions(IWorkbenchWindow window) {
quitAction = ActionFactory.QUIT.create(window);
prefsAction = ActionFactory.PREFERENCES.create(window);
aboutAction = ActionFactory.ABOUT.create(window);
}
+ @Override
protected void fillMenuBar(IMenuManager menuBar) {
IMenuManager fileMenu = new MenuManager(ProvAdminUIMessages.ApplicationActionBarAdvisor_FileMenuName, "file"); //$NON-NLS-1$
menuBar.add(fileMenu);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
index 6c2efc4f4..4ddb998c3 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,14 +14,17 @@ import org.eclipse.ui.application.*;
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
+ @Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
+ @Override
public String getInitialWindowPerspectiveId() {
return "org.eclipse.equinox.p2.ui.admin.rcp.ProvisioningRCPPerspective"; //$NON-NLS-1$
}
+ @Override
public void initialize(IWorkbenchConfigurer configurer) {
configurer.setSaveAndRestore(true);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java
index 14d223631..9dea4e649 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -20,10 +20,12 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
super(configurer);
}
+ @Override
public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
return new ApplicationActionBarAdvisor(configurer);
}
+ @Override
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
// The workbench progress manager won't get initialized until I refer to it.
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java
index 0a2e0cbb0..dbe4920c8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@ public class ProvisioningRCPPerspective implements IPerspectiveFactory {
super();
}
+ @Override
public void createInitialLayout(IPageLayout layout) {
this.factory = layout;
addViews();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.classpath b/bundles/org.eclipse.equinox.p2.ui.admin/.classpath
index 64c5e31b7..eca7bdba8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.classpath
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
index 449cf187f..397710173 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
@@ -6,29 +6,45 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
@@ -36,41 +52,79 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
index d23b8c41e..c55b05575 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin;singleton:=true
-Bundle-Version: 1.0.300.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -11,7 +11,7 @@ Export-Package: org.eclipse.equinox.internal.p2.ui.admin;x-friends:="org.eclipse
org.eclipse.equinox.internal.p2.ui.admin.preferences;x-internal:=true
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
org.eclipse.equinox.internal.p2.ui,
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml b/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
index 479955cec..05f0bd92d 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.ui.admin</artifactId>
- <version>1.0.300-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
index 120f0d366..13591428b 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ public class AddProfileJob extends ProvisioningJob {
this.profileProperties = profileProperties;
}
+ @Override
public IStatus runModal(IProgressMonitor monitor) {
IStatus status = Status.OK_STATUS;
try {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
index dcd0d1cea..69aedc749 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -33,37 +33,37 @@ public class ArtifactRepositoriesView extends RepositoriesView {
// constructor
}
+ @Override
protected Object getInput() {
return new ArtifactRepositories(getProvisioningUI(), new QueryableArtifactRepositoryManager(getProvisioningUI(), false));
}
+ @Override
protected String getAddCommandLabel() {
return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryLabel;
}
+ @Override
protected String getAddCommandTooltip() {
return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryTooltip;
}
+ @Override
protected String getRemoveCommandTooltip() {
return ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryTooltip;
}
+ @Override
protected int openAddRepositoryDialog(Shell shell) {
return new AddArtifactRepositoryDialog(shell, getProvisioningUI()).open();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
+ @Override
protected int getListenerEventTypes() {
return ProvUIProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null)
tracker = new ArtifactRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
index 105880bc7..ec4f4265f 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
@@ -31,10 +31,12 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
this.ui = ui;
}
+ @Override
public URI[] getKnownRepositories(ProvisioningSession session) {
return getArtifactRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
}
+ @Override
public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -46,9 +48,7 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
+ @Override
public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -64,6 +64,7 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
* (non-Javadoc)
* @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
ui.signalRepositoryOperationStart();
SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
index f19ec30bb..b4271313e 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -39,10 +39,7 @@ public class InstallAction extends ProfileModificationAction {
userChosenProfileId = ui.getProfileId();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[])
- */
+ @Override
protected boolean isEnabledFor(Object[] selectionArray) {
if (selectionArray.length == 0)
return false;
@@ -61,13 +58,13 @@ public class InstallAction extends ProfileModificationAction {
/*
* Overridden to reject categories and nested IU's (parent is a non-category IU)
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isSelectable(org.eclipse.equinox.internal.p2.ui.model.IUElement)
*/
+ @Override
protected boolean isSelectable(IIUElement element) {
return super.isSelectable(element) && !(element.getParent(element) instanceof AvailableIUElement);
}
+ @Override
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(userChosenProfileId);
operation.setProfileId(userChosenProfileId);
@@ -76,12 +73,14 @@ public class InstallAction extends ProfileModificationAction {
return ret;
}
+ @Override
protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
InstallOperation op = new InstallOperation(getSession(), ius);
op.setProfileId(userChosenProfileId);
return op;
}
+ @Override
protected boolean isInvalidProfileId() {
if (userChosenProfileId == null) {
userChosenProfileId = getUserChosenProfileId();
@@ -114,6 +113,7 @@ public class InstallAction extends ProfileModificationAction {
return null;
}
+ @Override
protected void runCanceled() {
super.runCanceled();
userChosenProfileId = null;
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
index 6b00deea6..70fda2cb6 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -84,6 +84,7 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
*
* @see org.eclipse.swt.dnd.DropTargetListener#drop(org.eclipse.swt.dnd.DropTargetEvent)
*/
+ @Override
public boolean performDrop(final Object data) {
if (DEBUG) {
System.out.println("Perform drop on target: " + getCurrentTarget() + " with data: " + data); //$NON-NLS-1$//$NON-NLS-2$
@@ -100,16 +101,12 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
ISelectionProvider selectionProvider = new ISelectionProvider() {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
// Ignore because the selection won't change
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
+ @Override
public ISelection getSelection() {
if (DEBUG) {
System.out.println("Selection was queried by action"); //$NON-NLS-1$
@@ -118,16 +115,12 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
return structuredSelection;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
// ignore because the selection is static
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
+ @Override
public void setSelection(ISelection sel) {
throw new UnsupportedOperationException("This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
}
@@ -144,6 +137,7 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
/**
* Validate whether the drop is valid for the target
*/
+ @Override
public boolean validateDrop(Object target, int dragOperation, TransferData transferType) {
if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
@@ -158,11 +152,8 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
/*
* Overridden to force a copy when the drag is valid.
- *
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
*/
+ @Override
public void dragEnter(DropTargetEvent event) {
event.detail = DND.DROP_COPY;
super.dragEnter(event);
@@ -193,7 +184,7 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
*/
private IInstallableUnit[] getSelectedIUs() {
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
- List<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+ List<IInstallableUnit> ius = new ArrayList<>();
if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
return null;
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
index f0388fd20..982c82520 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -47,6 +47,7 @@ public class MetadataRepositoriesView extends RepositoriesView {
// constructor
}
+ @Override
protected Object getInput() {
if (input == null) {
// view by repo
@@ -62,27 +63,33 @@ public class MetadataRepositoriesView extends RepositoriesView {
return input;
}
+ @Override
protected String getAddCommandLabel() {
return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryLabel;
}
+ @Override
protected String getAddCommandTooltip() {
return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryTooltip;
}
+ @Override
protected String getRemoveCommandTooltip() {
return ProvAdminUIMessages.MetadataRepositoriesView_RemoveRepositoryTooltip;
}
+ @Override
protected int openAddRepositoryDialog(Shell shell) {
return new AddMetadataRepositoryDialog(shell, getProvisioningUI()).open();
}
+ @Override
protected void makeActions() {
super.makeActions();
installAction = new InstallAction(getProvisioningUI(), viewer);
}
+ @Override
protected void fillContextMenu(IMenuManager manager) {
if (installAction.isEnabled()) {
manager.add(new Separator());
@@ -91,6 +98,7 @@ public class MetadataRepositoriesView extends RepositoriesView {
super.fillContextMenu(manager);
}
+ @Override
protected void configureViewer(final TreeViewer treeViewer) {
super.configureViewer(treeViewer);
// Add drag support for IU's
@@ -104,14 +112,12 @@ public class MetadataRepositoriesView extends RepositoriesView {
return IRepositoryManager.REPOSITORIES_ALL;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
+ @Override
protected int getListenerEventTypes() {
return ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
}
+ @Override
protected List<String> getVisualProperties() {
List<String> list = super.getVisualProperties();
list.add(PreferenceConstants.PREF_USE_CATEGORIES);
@@ -119,14 +125,13 @@ public class MetadataRepositoriesView extends RepositoriesView {
return list;
}
+ @Override
protected void updateCachesForPreferences() {
// We want to reconstruct the input's query context based on the latest preferences
input = null;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null)
tracker = new MetadataRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
index efe7fc9ac..c932ab4b0 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,10 +31,12 @@ public class MetadataRepositoryTracker extends RepositoryTracker {
this.ui = ui;
}
+ @Override
public URI[] getKnownRepositories(ProvisioningSession session) {
return getMetadataRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
}
+ @Override
public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -47,9 +49,7 @@ public class MetadataRepositoryTracker extends RepositoryTracker {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
+ @Override
public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -61,10 +61,7 @@ public class MetadataRepositoryTracker extends RepositoryTracker {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
+ @Override
public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
ui.signalRepositoryOperationStart();
SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
index 76356cb3b..8bec03875 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class ProfileFactory {
static private EnvironmentInfo info;
public static IProfile makeProfile(String profileId) {
- Map<String, String> profileProperties = new HashMap<String, String>();
+ Map<String, String> profileProperties = new HashMap<>();
profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getDefaultLocation());
profileProperties.put(IProfile.PROP_ENVIRONMENTS, getDefaultEnvironments());
profileProperties.put(IProfile.PROP_NL, getDefaultNL());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
index 73ca264c7..ff801c720 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -52,9 +52,10 @@ public class ProfilesView extends ProvView {
}
+ @Override
public void run() {
Object[] selections = getSelection().toArray();
- List<String> profilesOnly = new ArrayList<String>();
+ List<String> profilesOnly = new ArrayList<>();
for (int i = 0; i < selections.length; i++) {
if (selections[i] instanceof ProfileElement)
profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
@@ -71,6 +72,7 @@ public class ProfilesView extends ProvView {
setImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
}
+ @Override
public void run() {
new AddProfileDialog(viewer.getControl().getShell(), getKnownProfileIds()).open();
}
@@ -80,17 +82,20 @@ public class ProfilesView extends ProvView {
// constructor
}
+ @Override
protected void addListeners() {
super.addListeners();
listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE, getProvisioningUI().getOperationRunner());
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).addListener(listener);
}
+ @Override
protected void removeListeners() {
super.removeListeners();
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).removeListener(listener);
}
+ @Override
protected void configureViewer(TreeViewer treeViewer) {
super.configureViewer(treeViewer);
InstallIUDropAdapter adapter = new InstallIUDropAdapter(treeViewer);
@@ -99,6 +104,7 @@ public class ProfilesView extends ProvView {
treeViewer.addDropSupport(DND.DROP_COPY, transfers, adapter);
}
+ @Override
protected void fillLocalPullDown(IMenuManager manager) {
manager.add(addProfileAction);
manager.add(removeProfileAction);
@@ -108,6 +114,7 @@ public class ProfilesView extends ProvView {
manager.add(uninstallAction);
}
+ @Override
protected void fillContextMenu(IMenuManager manager) {
manager.add(addProfileAction);
if (removeProfileAction.isEnabled()) {
@@ -123,12 +130,14 @@ public class ProfilesView extends ProvView {
}
}
+ @Override
protected void fillLocalToolBar(IToolBarManager manager) {
manager.add(new Separator());
manager.add(addProfileAction);
manager.add(removeProfileAction);
}
+ @Override
protected void makeActions() {
super.makeActions();
addProfileAction = new AddProfileAction();
@@ -139,17 +148,16 @@ public class ProfilesView extends ProvView {
updateAction.setSkipSelectionPage(true);
getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- ProfilesView.this.selectionChanged(ss);
- }
+ viewer.addSelectionChangedListener(event -> {
+ IStructuredSelection ss = event.getStructuredSelection();
+ ProfilesView.this.selectionChanged(ss);
});
// prime the action validation
selectionChanged((IStructuredSelection) viewer.getSelection());
}
+ @Override
protected void selectionChanged(IStructuredSelection ss) {
super.selectionChanged(ss);
propertiesAction.setEnabled(false);
@@ -170,18 +178,22 @@ public class ProfilesView extends ProvView {
}
}
+ @Override
protected IAction getDoubleClickAction() {
return propertiesAction;
}
+ @Override
protected IContentProvider getContentProvider() {
return new ProvElementContentProvider();
}
+ @Override
protected Object getInput() {
return new Profiles(getProvisioningUI());
}
+ @Override
protected String getProfileId() {
Object firstElement = getSelection().getFirstElement();
if (firstElement instanceof InstalledIUElement) {
@@ -193,6 +205,7 @@ public class ProfilesView extends ProvView {
return null;
}
+ @Override
protected List<String> getVisualProperties() {
List<String> list = super.getVisualProperties();
list.add(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY);
@@ -207,6 +220,7 @@ public class ProfilesView extends ProvView {
return ids;
}
+ @Override
protected ProvisioningUI getProvisioningUI() {
ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
if (ui != null)
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
index 447822780..8d48d63bf 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@ import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -71,11 +70,7 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
// constructor
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
+ @Override
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
plugin = this;
@@ -84,6 +79,7 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
}
+ @Override
public void stop(BundleContext bundleContext) throws Exception {
plugin = null;
getPreferenceStore().removePropertyChangeListener(preferenceListener);
@@ -93,11 +89,7 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
private IPropertyChangeListener getPreferenceListener() {
if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateForPreferences();
- }
- };
+ preferenceListener = event -> updateForPreferences();
}
return preferenceListener;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
index 40bc5d7f1..3006594d2 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.action.*;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
@@ -54,6 +53,7 @@ abstract class ProvView extends ViewPart {
/**
* Create and initialize the viewer
*/
+ @Override
public void createPartControl(Composite parent) {
// Store the display so we can make async calls from listeners
display = parent.getDisplay();
@@ -81,13 +81,11 @@ abstract class ProvView extends ViewPart {
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- ProvView.this.fillContextMenu(manager);
- manager.add(new Separator());
- manager.add(refreshAction);
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
+ menuMgr.addMenuListener(manager -> {
+ ProvView.this.fillContextMenu(manager);
+ manager.add(new Separator());
+ manager.add(refreshAction);
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
@@ -95,12 +93,10 @@ abstract class ProvView extends ViewPart {
}
private void hookDoubleClickAction() {
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- IAction action = getDoubleClickAction();
- if (action != null && action.isEnabled()) {
- action.run();
- }
+ viewer.addDoubleClickListener(event -> {
+ IAction action = getDoubleClickAction();
+ if (action != null && action.isEnabled()) {
+ action.run();
}
});
}
@@ -125,6 +121,7 @@ abstract class ProvView extends ViewPart {
protected void makeActions() {
refreshAction = new RefreshAction(ProvisioningUI.getDefaultUI(), viewer, viewer.getControl()) {
+ @Override
protected void refresh() {
refreshAll(true);
}
@@ -135,15 +132,12 @@ abstract class ProvView extends ViewPart {
/**
* Passing the focus request to the viewer's control.
*/
+ @Override
public void setFocus() {
viewer.getControl().setFocus();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
+ @Override
public void dispose() {
removeListeners();
super.dispose();
@@ -151,14 +145,11 @@ abstract class ProvView extends ViewPart {
protected void addListeners() {
IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (getVisualProperties().contains(event.getProperty())) {
- updateCachesForPreferences();
- ProvView.this.refreshAll(false);
- }
+ preferenceListener = event -> {
+ if (getVisualProperties().contains(event.getProperty())) {
+ updateCachesForPreferences();
+ ProvView.this.refreshAll(false);
}
-
};
store.addPropertyChangeListener(preferenceListener);
}
@@ -228,7 +219,7 @@ abstract class ProvView extends ViewPart {
}
protected List<String> getVisualProperties() {
- ArrayList<String> list = new ArrayList<String>(1);
+ ArrayList<String> list = new ArrayList<>(1);
list.add(PreferenceConstants.PREF_SHOW_GROUPS_ONLY);
return list;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
index 4a5e01d56..5b8c21cc3 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ public class ProvisioningPerspective implements IPerspectiveFactory {
super();
}
+ @Override
public void createInitialLayout(IPageLayout layout) {
this.factory = layout;
addViews();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
index 0e6bdd9cd..013971697 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public class RemoveProfilesJob extends ProvisioningJob {
this.profileIds = profileIds;
}
+ @Override
public IStatus runModal(IProgressMonitor monitor) {
for (int i = 0; i < profileIds.length; i++) {
ProvAdminUIActivator.getDefault().getProfileRegistry().removeProfile(profileIds[i]);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
index ea553e446..6a926e519 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
@@ -26,7 +25,6 @@ import org.eclipse.equinox.internal.p2.ui.viewers.StructuredViewerProvisioningLi
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.operations.RepositoryTracker;
import org.eclipse.jface.action.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
@@ -53,10 +51,11 @@ abstract class RepositoriesView extends ProvView {
}
+ @Override
public void run() {
RepositoryTracker tracker = RepositoriesView.this.getRepositoryTracker();
Object[] elements = getSelection().toArray();
- ArrayList<URI> uris = new ArrayList<URI>(elements.length);
+ ArrayList<URI> uris = new ArrayList<>(elements.length);
for (int i = 0; i < elements.length; i++) {
if (elements[i] instanceof IRepositoryElement<?>)
uris.add(((IRepositoryElement<?>) elements[i]).getLocation());
@@ -73,9 +72,10 @@ abstract class RepositoriesView extends ProvView {
}
+ @Override
public void run() {
Object[] elements = ((ITreeContentProvider) viewer.getContentProvider()).getElements(getInput());
- ArrayList<URI> urls = new ArrayList<URI>();
+ ArrayList<URI> urls = new ArrayList<>();
for (int i = 0; i < elements.length; i++)
if (elements[i] instanceof IRepositoryElement<?>)
urls.add(((IRepositoryElement<?>) elements[i]).getLocation());
@@ -95,9 +95,11 @@ abstract class RepositoriesView extends ProvView {
// nothing to do
}
+ @Override
protected void addListeners() {
super.addListeners();
listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, getListenerEventTypes(), ui.getOperationRunner()) {
+ @Override
protected void refreshViewer() {
RepositoriesView.this.refreshAll(false);
}
@@ -105,17 +107,20 @@ abstract class RepositoriesView extends ProvView {
ProvUI.getProvisioningEventBus(ui.getSession()).addListener(listener);
}
+ @Override
protected void removeListeners() {
super.removeListeners();
ProvUI.getProvisioningEventBus(ui.getSession()).removeListener(listener);
}
+ @Override
protected void fillLocalPullDown(IMenuManager manager) {
manager.add(addRepositoryAction);
manager.add(removeRepositoryAction);
manager.add(propertiesAction);
}
+ @Override
protected void fillContextMenu(IMenuManager manager) {
manager.add(addRepositoryAction);
if (removeRepositoryAction.isEnabled()) {
@@ -127,11 +132,13 @@ abstract class RepositoriesView extends ProvView {
}
}
+ @Override
protected void fillLocalToolBar(IToolBarManager manager) {
manager.add(addRepositoryAction);
manager.add(removeRepositoryAction);
}
+ @Override
protected void makeActions() {
super.makeActions();
addRepositoryAction = new AddRepositoryAction();
@@ -148,18 +155,18 @@ abstract class RepositoriesView extends ProvView {
propertiesAction.setEnabled(false);
removeRepositoryAction.setEnabled(false);
}
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- RepositoriesView.this.selectionChanged(ss);
- }
+ viewer.addSelectionChangedListener(event -> {
+ IStructuredSelection ss = (IStructuredSelection) event.getSelection();
+ RepositoriesView.this.selectionChanged(ss);
});
}
+ @Override
protected IAction getDoubleClickAction() {
return propertiesAction;
}
+ @Override
protected void selectionChanged(IStructuredSelection selection) {
propertiesAction.setEnabled(selection.size() == 1 && ((ProvUI.getAdapter(selection.getFirstElement(), IInstallableUnit.class) != null) || (isRepository(selection.getFirstElement()))));
boolean enabled = false;
@@ -174,6 +181,7 @@ abstract class RepositoriesView extends ProvView {
removeRepositoryAction.setEnabled(enabled);
}
+ @Override
protected IContentProvider getContentProvider() {
return new RepositoryContentProvider();
@@ -199,21 +207,19 @@ abstract class RepositoriesView extends ProvView {
protected abstract int getListenerEventTypes();
+ @Override
protected List<String> getVisualProperties() {
List<String> list = super.getVisualProperties();
list.add(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS);
return list;
}
+ @Override
protected void refreshUnderlyingModel() {
IWorkbenchSiteProgressService service = getSite().getAdapter(IWorkbenchSiteProgressService.class);
if (service != null) {
try {
- service.run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor);
- }
- });
+ service.run(true, false, monitor -> getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor));
} catch (InvocationTargetException e) {
ProvUI.handleException(e, null, StatusManager.SHOW);
} catch (InterruptedException e) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
index f92ea8530..f02bf6036 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ public class AddArtifactRepositoryDialog extends AddRepositoryDialog {
super(parentShell, ui);
}
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null) {
tracker = new ArtifactRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
index be6d58021..c91862a34 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ public class AddMetadataRepositoryDialog extends AddRepositoryDialog {
super(parentShell, ui);
}
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null) {
tracker = new MetadataRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
index 9b454cf8f..8eecaebac 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,10 +15,9 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.admin.*;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.StatusDialog;
import org.eclipse.swt.widgets.*;
/**
@@ -41,21 +40,20 @@ public class AddProfileDialog extends StatusDialog {
setTitle(ProvAdminUIMessages.AddProfileDialog_Title);
}
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
+ @Override
protected Control createDialogArea(Composite parent) {
- profileGroup = new ProfileGroup(parent, null, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
+ profileGroup = new ProfileGroup(parent, null, event -> verifyComplete());
Dialog.applyDialogFont(profileGroup.getComposite());
return profileGroup.getComposite();
}
+ @Override
protected void okPressed() {
verifyComplete();
if (okButton.isEnabled()) {
@@ -111,6 +109,7 @@ public class AddProfileDialog extends StatusDialog {
return false;
}
+ @Override
protected void updateButtonsEnableState(IStatus status) {
setOkEnablement(!status.matches(IStatus.ERROR));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
index 7e12cf262..b02bed0b1 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,15 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
import java.util.Collection;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
@@ -51,6 +49,7 @@ public class IUImplementationGroup extends IUGroup {
super(parent, iu, listener);
}
+ @Override
protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -179,6 +178,7 @@ public class IUImplementationGroup extends IUGroup {
providedCapabilities.setItems(items);
}
+ @Override
public void updateIU() {
// If it's not an InstallableUnit it is not editable
if (iuElement == null || iuElement instanceof IInstallableUnit) {
@@ -211,16 +211,12 @@ public class IUImplementationGroup extends IUGroup {
Menu copyMenu = new Menu(list);
MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
copyItem.addSelectionListener(new SelectionListener() {
- /*
- * @see SelectionListener.widgetSelected (SelectionEvent)
- */
+ @Override
public void widgetSelected(SelectionEvent e) {
copySelectionsToClipboard(list);
}
- /*
- * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
- */
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
copySelectionsToClipboard(list);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
index f9489663c..9765bd1f6 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,8 +16,6 @@ import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PropertyPage;
@@ -30,22 +28,20 @@ public class IUImplementationPropertyPage extends PropertyPage {
private IUImplementationGroup iuGroup;
+ @Override
protected Control createContents(Composite parent) {
IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
if (iu == null) {
Label label = new Label(parent, SWT.DEFAULT);
label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
}
- iuGroup = new IUImplementationGroup(parent, iu, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
+ iuGroup = new IUImplementationGroup(parent, iu, event -> verifyComplete());
Dialog.applyDialogFont(iuGroup.getComposite());
verifyComplete();
return iuGroup.getComposite();
}
+ @Override
public boolean performOk() {
return true;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
index 5704e6443..c270c904a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,6 +35,7 @@ public class IUProfilePropertiesGroup extends IUGroup {
super(parent, iuElement, listener);
}
+ @Override
protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
index 82ba93344..982a5e339 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ public class IUPropertiesGroup extends IUGroup {
super(parent, iu, listener);
}
+ @Override
protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
index 39521007d..f54972f53 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@ import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PropertyPage;
@@ -28,6 +26,7 @@ public class InstalledIUPropertyPage extends PropertyPage {
private IUProfilePropertiesGroup iuGroup;
+ @Override
protected Control createContents(Composite parent) {
Object element = getElement();
if (!(element instanceof InstalledIUElement)) {
@@ -35,15 +34,14 @@ public class InstalledIUPropertyPage extends PropertyPage {
label.setText(ProvAdminUIMessages.InstalledIUPropertyPage_NoInfoAvailable);
return label;
}
- iuGroup = new IUProfilePropertiesGroup(parent, (InstalledIUElement) element, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- // not editable
- }
+ iuGroup = new IUProfilePropertiesGroup(parent, (InstalledIUElement) element, event -> {
+ // not editable
});
Dialog.applyDialogFont(iuGroup.getComposite());
return iuGroup.getComposite();
}
+ @Override
public boolean performOk() {
return true;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
index 5292e7324..784c78f37 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -74,6 +74,7 @@ public class ProfileGroup {
Button locationButton = new Button(composite, SWT.PUSH);
locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse);
locationButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectProfileMessage);
@@ -94,6 +95,7 @@ public class ProfileGroup {
locationButton = new Button(composite, SWT.PUSH);
locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse2);
locationButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectBundlePoolCache);
@@ -176,7 +178,7 @@ public class ProfileGroup {
public Map<String, String> getProfileProperties() {
if (profile == null) {
- Map<String, String> profileProperties = new HashMap<String, String>();
+ Map<String, String> profileProperties = new HashMap<>();
String value = location.getText().trim();
if (value.length() > 0) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
index b3200c75d..32c24fc98 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public class ProfilePropertyPage extends PropertyPage {
private ProfileGroup profileGroup;
+ @Override
protected Control createContents(Composite parent) {
IProfile profile = ProvUI.getAdapter(getElement(), IProfile.class);
if (profile == null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
index d1c79091f..a52eeffe7 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,6 +35,7 @@ public class RepositoryImplementationPropertyPage extends PropertyPage {
private Text description;
private Table propertiesTable;
+ @Override
protected Control createContents(Composite parent) {
this.repositoryElement = getRepositoryElement();
if (repositoryElement == null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
index b16f0017f..5204a9b17 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,11 +21,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
*/
public class ProvUIPreferenceInitializer extends AbstractPreferenceInitializer {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
+ @Override
public void initializeDefaultPreferences() {
IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
store.setDefault(PreferenceConstants.PREF_SHOW_GROUPS_ONLY, true);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
index 3de6e31ed..8c58b2b4c 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,11 +30,7 @@ public class ProvisioningPrefPage extends FieldEditorPreferencePage implements I
setPreferenceStore(ProvAdminUIActivator.getDefault().getPreferenceStore());
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
+ @Override
public void createFieldEditors() {
addField(new BooleanFieldEditor(PreferenceConstants.PREF_SHOW_GROUPS_ONLY, ProvAdminUIMessages.ProvisioningPrefPage_ShowGroupsOnly, getFieldEditorParent()));
addField(new BooleanFieldEditor(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY, ProvAdminUIMessages.ProvisioningPrefPage_ShowInstallRootsOnly, getFieldEditorParent()));
@@ -43,11 +39,7 @@ public class ProvisioningPrefPage extends FieldEditorPreferencePage implements I
addField(new BooleanFieldEditor(PreferenceConstants.PREF_USE_CATEGORIES, ProvAdminUIMessages.ProvisioningPrefPage_UseCategories, getFieldEditorParent()));
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
+ @Override
public void init(IWorkbench workbench) {
// nothing to do
}

Back to the top