Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-06-30 06:01:31 +0000
committerAlexander Kurtakov2016-06-30 06:06:03 +0000
commit3a9b14a702b624ba9dbdfb869c95bae462e60d63 (patch)
tree8ebff9d0a45f5f52b5a1752883bf8e5196234a69
parent6db5931cf6b0ed0887b277f1ada1fd1499906bfa (diff)
downloadeclipse.platform.ua-3a9b14a702b624ba9dbdfb869c95bae462e60d63.tar.gz
eclipse.platform.ua-3a9b14a702b624ba9dbdfb869c95bae462e60d63.tar.xz
eclipse.platform.ua-3a9b14a702b624ba9dbdfb869c95bae462e60d63.zip
Bug 497046 - Add missing annotations to o.e.ui.intro
Enable warnings and fix them by either adding the annotation or converting to lambda where feasible. Change-Id: If80a348135b832bc9047aabaf801b8636ca3d85d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--org.eclipse.ui.intro/.settings/org.eclipse.jdt.core.prefs48
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java18
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/FormattedHTMLElement.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/HTMLElement.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java19
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java25
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java14
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractTextElement.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroAnchor.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroContentProvider.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java16
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java13
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInclude.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarElement.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java13
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java22
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPage.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPageTitle.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java35
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSeparator.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroStandbyContentPart.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroText.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java3
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLAction.java10
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java9
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java21
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelContentProvider.java26
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java55
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/StandbyPart.java23
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java94
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java13
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/FormIntroPartImplementation.java62
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java20
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/TextIntroPartImplementation.java47
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageFormWithNavigation.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java26
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java5
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Util.java128
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/CustomizableIntroPart.java80
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroElement.java4
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/AlwaysWelcomeCheckbox.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java51
55 files changed, 503 insertions, 632 deletions
diff --git a/org.eclipse.ui.intro/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.ui.intro/.settings/org.eclipse.jdt.core.prefs
index 51d4207a2..bcb05ffb8 100644
--- a/org.eclipse.ui.intro/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.ui.intro/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,13 @@
eclipse.preferences.version=1
+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.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
@@ -10,54 +19,89 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
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=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
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=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=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.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=error
+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=ignore
+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=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.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=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
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=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
index e359b4459..1c3bf9733 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -163,12 +163,8 @@ public class IntroPlugin extends AbstractUIPlugin {
}
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
+ @Override
+ public void start(BundleContext context) throws Exception {
super.start(context);
inst = this;
if (Log.logInfo)
@@ -184,12 +180,8 @@ public class IntroPlugin extends AbstractUIPlugin {
}
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
+ @Override
+ public void stop(BundleContext context) throws Exception {
resetVolatileImageRegistry();
super.stop(context);
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/FormattedHTMLElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/FormattedHTMLElement.java
index 584d65b1e..953dc5b70 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/FormattedHTMLElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/FormattedHTMLElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -93,11 +93,7 @@ public class FormattedHTMLElement extends HTMLElement {
}
return indent;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
+ @Override
public String toString() {
StringBuffer element = new StringBuffer();
// insert the indent
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/HTMLElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/HTMLElement.java
index ac3dc84c9..aac3a49df 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/HTMLElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/HTMLElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -125,11 +125,7 @@ public class HTMLElement {
this.elementName = elementName;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
+ @Override
public String toString() {
StringBuffer element = new StringBuffer();
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java
index 930f5c618..b04b284af 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -70,7 +70,8 @@ public abstract class AbstractBaseIntroElement extends AbstractIntroIdElement {
return style_id;
}
- protected void loadFromParent() {
+ @Override
+ protected void loadFromParent() {
style_id = getAttribute(getElement(), ATT_STYLE_ID);
filteredFrom = getAttribute(getElement(), ATT_FILTERED_FROM);
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
index 93b160ba2..0b1765dd6 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -591,23 +591,17 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
return null;
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.ABSTRACT_CONTAINER;
}
-
-
/**
* Deep copy since class has mutable objects. Leave DOM element as a shallow
* reference copy since DOM is immutable.
*/
- public Object clone() throws CloneNotSupportedException {
+ @Override
+ public Object clone() throws CloneNotSupportedException {
AbstractIntroContainer clone = (AbstractIntroContainer) super.clone();
clone.children = new Vector<>();
if (children != null) {
@@ -626,7 +620,8 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
*
* @return
*/
- public Element getElement() {
+ @Override
+ public Element getElement() {
return this.element;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java
index a34abd3f4..2e1eaba2f 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -453,7 +453,8 @@ public abstract class AbstractIntroElement implements Cloneable {
* it, hence one clone of this container object. This is why we have a
* shallow copy here.
*/
- public Object clone() throws CloneNotSupportedException {
+ @Override
+ public Object clone() throws CloneNotSupportedException {
return super.clone();
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java
index 134f8cdfa..dc3f9fb8e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -168,7 +168,8 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
}
- public void setParent(AbstractIntroElement parent) {
+ @Override
+ public void setParent(AbstractIntroElement parent) {
super.setParent(parent);
if (content == null)
init(element, getBundle(), initialBase);
@@ -384,12 +385,8 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.ABSTRACT_PAGE;
}
@@ -400,7 +397,8 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
*
* @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroContainer#resolveChildren()
*/
- protected void resolveChildren() {
+ @Override
+ protected void resolveChildren() {
// flag would be set
if (isXHTMLPage)
resolvePage();
@@ -416,7 +414,8 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
*
* @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroContainer#getModelChild(org.eclipse.core.runtime.IConfigurationElement)
*/
- protected AbstractIntroElement getModelChild(Element childElement,
+ @Override
+ protected AbstractIntroElement getModelChild(Element childElement,
Bundle bundle, String base) {
AbstractIntroElement child = null;
if (childElement.getNodeName().equalsIgnoreCase(IntroHead.TAG_HEAD)) {
@@ -453,7 +452,8 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
* content, all info is in the xhtml page. If we fail to load the page,
* display the Invalid Page page.
*/
- protected void loadChildren() {
+ @Override
+ protected void loadChildren() {
if (content == null) {
// no content. do regular loading.
super.loadChildren();
@@ -795,7 +795,8 @@ public abstract class AbstractIntroPage extends AbstractIntroContainer {
/**
* Deep copy since class has mutable objects.
*/
- public Object clone() throws CloneNotSupportedException {
+ @Override
+ public Object clone() throws CloneNotSupportedException {
AbstractIntroPage clone = (AbstractIntroPage) super.clone();
if (title != null) {
IntroPageTitle clonedTitle = (IntroPageTitle) title.clone();
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java
index 936c46695..57ba999b5 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -63,7 +63,8 @@ public abstract class AbstractIntroPartImplementation {
.createImageDescriptor("full/dlcl16/backward_nav.gif")); //$NON-NLS-1$
}
- public void run() {
+ @Override
+ public void run() {
navigateBackward();
}
};
@@ -78,7 +79,8 @@ public abstract class AbstractIntroPartImplementation {
.createImageDescriptor("full/dlcl16/forward_nav.gif")); //$NON-NLS-1$
}
- public void run() {
+ @Override
+ public void run() {
navigateForward();
}
};
@@ -93,7 +95,8 @@ public abstract class AbstractIntroPartImplementation {
.createImageDescriptor("full/dlcl16/home_nav.gif")); //$NON-NLS-1$
}
- public void run() {
+ @Override
+ public void run() {
navigateHome();
}
};
@@ -106,7 +109,8 @@ public abstract class AbstractIntroPartImplementation {
.createImageDescriptor("contents_view.gif")); //$NON-NLS-1$
}
- public void run() {
+ @Override
+ public void run() {
ElementTreeSelectionDialog treeViewer = new ElementTreeSelectionDialog(
getIntroPart().getIntroSite().getShell(),
new IntroModelLabelProvider(), new IntroModelContentProvider());
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractTextElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractTextElement.java
index 5bd95f66f..0af683e56 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractTextElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractTextElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -50,12 +50,8 @@ public abstract class AbstractTextElement extends AbstractIntroContainer {
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.ABSTRACT_TEXT;
}
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroAnchor.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroAnchor.java
index 13f1271e2..0fce6925b 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroAnchor.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroAnchor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -28,12 +28,8 @@ public class IntroAnchor extends AbstractIntroIdElement {
super(element, bundle);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.ANCHOR;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroContentProvider.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroContentProvider.java
index 43479a47d..43f7acad3 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroContentProvider.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -60,12 +60,8 @@ public class IntroContentProvider extends AbstractTextElement {
return pluginId;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.CONTENT_PROVIDER;
}
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java
index 2f3d7ff6d..cfb562284 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -168,12 +168,8 @@ public class IntroExtensionContent extends AbstractIntroElement {
return path;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.CONTAINER_EXTENSION;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java
index 5104678ca..2ab39b642 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,7 +39,8 @@ public class IntroGroup extends AbstractIntroContainer {
super(element, bundle, base);
}
- protected void loadFromParent() {
+ @Override
+ protected void loadFromParent() {
}
private void resolve() {
@@ -66,12 +67,8 @@ public class IntroGroup extends AbstractIntroContainer {
return label;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.GROUP;
}
@@ -85,7 +82,8 @@ public class IntroGroup extends AbstractIntroContainer {
return value!=null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
}
- protected void loadChildren() {
+ @Override
+ protected void loadChildren() {
String value = getAttribute(element, ATT_COMPUTED);
if (value!=null && value.equalsIgnoreCase("true")) //$NON-NLS-1$
loadDynamicNodes();
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java
index a23666faf..ccd5d1059 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -118,19 +118,16 @@ public class IntroHTML extends AbstractTextElement {
return introImage;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.HTML;
}
/**
* Deep copy since class has mutable objects.
*/
- public Object clone() throws CloneNotSupportedException {
+ @Override
+ public Object clone() throws CloneNotSupportedException {
IntroHTML clone = (IntroHTML) super.clone();
if (introImage != null) {
IntroImage cloneIntroImage = (IntroImage) introImage.clone();
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java
index 089dd5b2c..94b23c0d6 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -69,13 +69,8 @@ public class IntroHead extends AbstractIntroElement {
return encoding;
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.HEAD;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java
index c6018d602..eb102b955 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,12 +27,8 @@ public class IntroHomePage extends AbstractIntroPage {
super(element, bundle, base);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.HOME_PAGE;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java
index 78f177435..83aa01834 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -50,13 +50,8 @@ public class IntroImage extends AbstractBaseIntroElement {
return getAttribute(element, ATT_TITLE);
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.IMAGE;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInclude.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInclude.java
index 7f025fc5c..60adf5117 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInclude.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInclude.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -62,12 +62,8 @@ public class IntroInclude extends AbstractIntroElement {
return path;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.INCLUDE;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java
index 0560974ec..f2c17fb5d 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 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
@@ -36,7 +36,8 @@ public class IntroInjectedIFrame extends AbstractIntroIdElement {
}
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.INJECTED_IFRAME;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarElement.java
index 380362556..d23ded6cf 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -41,7 +41,8 @@ public class IntroLaunchBarElement extends AbstractIntroElement {
/**
* Returns LAUNCH_BAR.
*/
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.LAUNCH_BAR;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java
index e9c483282..ba839693d 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -43,7 +43,8 @@ public class IntroLaunchBarShortcut extends AbstractIntroElement {
}
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.LAUNCH_BAR_SHORTCUT;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java
index 42eb6fdf7..d8ce46549 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -88,12 +88,8 @@ public class IntroLink extends AbstractTextElement {
return introURL;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.LINK;
}
@@ -107,7 +103,8 @@ public class IntroLink extends AbstractTextElement {
/**
* Deep copy since class has mutable objects.
*/
- public Object clone() throws CloneNotSupportedException {
+ @Override
+ public Object clone() throws CloneNotSupportedException {
IntroLink clone = (IntroLink) super.clone();
if (img != null) {
IntroImage cloneIntroImage = (IntroImage) img.clone();
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java
index c49d89591..4e8c114d4 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -174,7 +174,8 @@ public class IntroModelRoot extends AbstractIntroContainer {
* xml content file.
*
*/
- protected void loadChildren() {
+ @Override
+ protected void loadChildren() {
children = new Vector<>();
if (Log.logInfo)
Log.info("Creating Intro plugin model...."); //$NON-NLS-1$
@@ -243,7 +244,8 @@ public class IntroModelRoot extends AbstractIntroContainer {
/**
* Resolve contributions into this container's children.
*/
- protected void resolveChildren() {
+ @Override
+ protected void resolveChildren() {
// now handle config extension.
resolveConfigExtensions();
resolved = true;
@@ -819,11 +821,13 @@ public class IntroModelRoot extends AbstractIntroContainer {
final IPropertyListener l = (IPropertyListener) array[i];
SafeRunner.run(new SafeRunnable() {
- public void run() {
+ @Override
+ public void run() {
l.propertyChanged(this, propertyId);
}
- public void handleException(Throwable e) {
+ @Override
+ public void handleException(Throwable e) {
super.handleException(e);
// If an unexpected exception happens, remove it
// to make sure the workbench keeps running.
@@ -855,12 +859,8 @@ public class IntroModelRoot extends AbstractIntroContainer {
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.MODEL_ROOT;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPage.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPage.java
index d85b8016d..17ec6b3e9 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPage.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,12 +26,8 @@ public class IntroPage extends AbstractIntroPage {
super(element, bundle, base);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.PAGE;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPageTitle.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPageTitle.java
index b98e04ab3..26da35c16 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPageTitle.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPageTitle.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -32,12 +32,8 @@ public class IntroPageTitle extends IntroText {
return getText();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.PAGE_TITLE;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java
index fa95a6eca..cc7fead3d 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -502,11 +502,7 @@ public class IntroPartPresentation extends AbstractIntroElement {
return standbyPageId;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
+ @Override
public int getType() {
return AbstractIntroElement.PRESENTATION;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java
index 95b84dbe1..54ef23355 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 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
@@ -46,11 +46,7 @@ public class IntroSearchParticipant extends SearchParticipant {
String summary;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.help.search.LuceneSearchParticipant#getContributingPlugins()
- */
+ @Override
public Set<String> getContributingPlugins() {
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
"org.eclipse.ui.intro.config"); //$NON-NLS-1$
@@ -72,11 +68,7 @@ public class IntroSearchParticipant extends SearchParticipant {
return set;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.help.search.LuceneSearchParticipant#getAllDocuments(java.lang.String)
- */
+ @Override
public Set<String> getAllDocuments(String locale) {
HashSet<String> set = new HashSet<>();
IProduct product = Platform.getProduct();
@@ -141,14 +133,7 @@ public class IntroSearchParticipant extends SearchParticipant {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.help.search.LuceneSearchParticipant#addDocument(java.lang.String,
- * java.lang.String, java.net.URL, java.lang.String, java.lang.String,
- * org.apache.lucene.document.Document)
- */
-
+ @Override
public IStatus addDocument(IHelpSearchIndex index, String pluginId, String name, URL url, String id,
ISearchDocument doc) {
if (model == null)
@@ -232,20 +217,12 @@ public class IntroSearchParticipant extends SearchParticipant {
buf.append(text);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.help.search.LuceneSearchParticipant#clear()
- */
+ @Override
public void clear() {
model = null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.help.search.LuceneSearchParticipant#open(java.lang.String)
- */
+ @Override
public boolean open(String id) {
IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
IIntroPart intro = introManager
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSeparator.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSeparator.java
index c2305959e..b955baf4e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSeparator.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSeparator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -24,12 +24,8 @@ public class IntroSeparator extends AbstractBaseIntroElement {
super(element, bundle);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.HR;
}
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroStandbyContentPart.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroStandbyContentPart.java
index c7af083b2..408134009 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroStandbyContentPart.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroStandbyContentPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -55,12 +55,8 @@ public class IntroStandbyContentPart extends AbstractIntroIdElement {
return pluginId;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
// this model class does not need a type so far.
return 0;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroText.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroText.java
index b9e7b50eb..b0a4464a9 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroText.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroText.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,12 +52,8 @@ public class IntroText extends AbstractBaseIntroElement {
return text;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
return AbstractIntroElement.TEXT;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java
index b5a1ea809..ffd539fd4 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 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
@@ -53,6 +53,7 @@ public class IntroTheme extends AbstractIntroIdElement {
return path;
}
+ @Override
public int getType() {
return THEME;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLAction.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLAction.java
index 8a2152003..d13d8faca 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLAction.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -53,12 +53,8 @@ public class IntroURLAction extends AbstractIntroElement {
return replaces;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
- */
- public int getType() {
+ @Override
+ public int getType() {
// this model class does not need a type so far.
return 0;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java
index 007979e81..6555f4966 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,7 +30,6 @@ import org.eclipse.ui.internal.intro.impl.util.Log;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
-import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -86,11 +85,7 @@ public class IntroContentParser {
docFactory.setNamespaceAware(true);
docFactory.setExpandEntityReferences(false);
DocumentBuilder parser = docFactory.newDocumentBuilder();
- parser.setEntityResolver(new EntityResolver() {
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- return new InputSource(new StringReader("")); //$NON-NLS-1$
- }
- });
+ parser.setEntityResolver((publicId, systemId) -> new InputSource(new StringReader(""))); //$NON-NLS-1$
document = parser.parse(fileURI);
return document;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
index 66d6b5d2d..17b942dcc 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -135,16 +135,12 @@ public class IntroURL implements IIntroURL {
* Executes whatever valid Intro action is embedded in this Intro URL.
*
*/
- public boolean execute() {
+ @Override
+ public boolean execute() {
final boolean[] result = new boolean[1];
Display display = Display.getCurrent();
- BusyIndicator.showWhile(display, new Runnable() {
-
- public void run() {
- result[0] = doExecute();
- }
- });
+ BusyIndicator.showWhile(display, () -> result[0] = doExecute());
return result[0];
}
@@ -301,7 +297,8 @@ public class IntroURL implements IIntroURL {
.getWorkbench().getActiveWorkbenchWindow());
Action proxy = new Action(this.action) {
- public void run() {
+ @Override
+ public void run() {
delegate.run(this);
}
};
@@ -571,7 +568,8 @@ public class IntroURL implements IIntroURL {
/**
* @return Returns the action imbedded in this URL.
*/
- public String getAction() {
+ @Override
+ public String getAction() {
return action;
}
@@ -583,7 +581,8 @@ public class IntroURL implements IIntroURL {
* @param parameterId
* @return
*/
- public String getParameter(String parameterId) {
+ @Override
+ public String getParameter(String parameterId) {
// make sure to decode only on return, since we may need to recreate the
// url when handling custom urls.
String value = parameters.getProperty(parameterId);
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelContentProvider.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelContentProvider.java
index 7b852d47e..08d4d9740 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelContentProvider.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -18,7 +18,8 @@ import org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement;
public class IntroModelContentProvider implements ITreeContentProvider {
- public Object[] getChildren(Object element) {
+ @Override
+ public Object[] getChildren(Object element) {
AbstractIntroElement introElement = null;
if (element instanceof AbstractIntroElement)
@@ -33,7 +34,8 @@ public class IntroModelContentProvider implements ITreeContentProvider {
return new Object[0];
}
- public Object getParent(Object element) {
+ @Override
+ public Object getParent(Object element) {
AbstractIntroElement introElement = null;
if (element instanceof AbstractIntroElement) {
// synch the resource first.
@@ -44,7 +46,8 @@ public class IntroModelContentProvider implements ITreeContentProvider {
}
- public boolean hasChildren(Object element) {
+ @Override
+ public boolean hasChildren(Object element) {
AbstractIntroElement introElement = null;
if (element instanceof AbstractIntroElement)
// synch the resource first.
@@ -57,22 +60,19 @@ public class IntroModelContentProvider implements ITreeContentProvider {
}
- public Object[] getElements(Object element) {
+ @Override
+ public Object[] getElements(Object element) {
return getChildren(element);
}
- public void dispose() {
+ @Override
+ public void dispose() {
// nothing to dispose
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IIntroContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// do nothing
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java
index 77216a5f6..3e6efbad7 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -45,7 +45,8 @@ public class IntroModelLabelProvider extends LabelProvider {
super();
}
- public Image getImage(Object element) {
+ @Override
+ public Image getImage(Object element) {
Image image = null;
AbstractIntroElement introElement = null;
if (element instanceof AbstractIntroElement)
@@ -68,7 +69,8 @@ public class IntroModelLabelProvider extends LabelProvider {
return image;
}
- public String getText(Object element) {
+ @Override
+ public String getText(Object element) {
String label = null;
AbstractIntroElement introElement = null;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java
index 165426994..2a0205cb9 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -32,13 +32,8 @@ public class EmptyStandbyContentPart implements IStandbyContentPart {
private Composite contentComposite;
private Text contentText;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.config.IStandbyContentPart#createPartControl(org.eclipse.swt.widgets.Composite,
- * org.eclipse.ui.forms.widgets.FormToolkit)
- */
- public void createPartControl(Composite parent, FormToolkit toolkit) {
+ @Override
+ public void createPartControl(Composite parent, FormToolkit toolkit) {
contentComposite = toolkit.createComposite(parent);
contentComposite.setLayout(new GridLayout());
// Util.highlight(contentComposite, SWT.COLOR_YELLOW);
@@ -55,12 +50,8 @@ public class EmptyStandbyContentPart implements IStandbyContentPart {
contentText.setLayoutData(textGd);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.config.IStandbyContentPart#getControl()
- */
- public Control getControl() {
+ @Override
+ public Control getControl() {
return contentComposite;
}
@@ -72,47 +63,31 @@ public class EmptyStandbyContentPart implements IStandbyContentPart {
}
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.config.IStandbyContentPart#init(org.eclipse.ui.intro.IIntroPart)
- */
- public void init(IIntroPart introPart, IMemento memento) {
+ @Override
+ public void init(IIntroPart introPart, IMemento memento) {
// no-op
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.config.IStandbyContentPart#setInput(java.lang.Object)
- */
- public void setInput(Object input) {
+ @Override
+ public void setInput(Object input) {
if (input != null)
setMessage((String) input);
else
setMessage(""); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.config.IStandbyContentPart#setFocus()
- */
- public void setFocus() {
+ @Override
+ public void setFocus() {
// no-op
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.config.IStandbyContentPart#dispose()
- */
- public void dispose() {
+ @Override
+ public void dispose() {
// no-op
}
- public void saveState(IMemento memento) {
+ @Override
+ public void saveState(IMemento memento) {
// no-op
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/StandbyPart.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/StandbyPart.java
index d56d1e4e7..80c57d355 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/StandbyPart.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/StandbyPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -79,13 +79,8 @@ public class StandbyPart implements IIntroConstants {
private int HMARGIN = 5;
private int SEPARATOR_HEIGHT = 1;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite,
- * int, int, boolean)
- */
- protected Point computeSize(Composite composite, int wHint, int hHint,
+ @Override
+ protected Point computeSize(Composite composite, int wHint, int hHint,
boolean flushCache) {
Point lsize = returnLink.computeSize(SWT.DEFAULT, SWT.DEFAULT,
flushCache);
@@ -96,13 +91,8 @@ public class StandbyPart implements IIntroConstants {
return new Point(width, height);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite,
- * boolean)
- */
- protected void layout(Composite composite, boolean flushCache) {
+ @Override
+ protected void layout(Composite composite, boolean flushCache) {
Rectangle carea = composite.getClientArea();
int lwidth = carea.width - HMARGIN * 2;
Point lsize = returnLink.computeSize(lwidth, SWT.DEFAULT,
@@ -157,7 +147,8 @@ public class StandbyPart implements IIntroConstants {
returnLink.setImage(ImageUtil.getImage(ImageUtil.BACK));
returnLink.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
doReturn();
}
});
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
index 1a2457c3e..860bd783c 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,8 +31,6 @@ import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPropertyListener;
@@ -92,6 +90,7 @@ public class BrowserIntroPartImplementation extends
setEnabled(scalePercent > -40);
}
+ @Override
public void run() {
int scalePercent = FontSelection.getScalePercentage();
FontSelection.setScalePercentage(scalePercent - 20);
@@ -111,6 +110,7 @@ public class BrowserIntroPartImplementation extends
setEnabled(scalePercent < 100);
}
+ @Override
public void run() {
int scalePercent = FontSelection.getScalePercentage();
FontSelection.setScalePercentage(scalePercent + SCALE_INCREMENT);
@@ -136,7 +136,8 @@ public class BrowserIntroPartImplementation extends
.createImageDescriptor("topic.gif")); //$NON-NLS-1$
}
- public void run() {
+ @Override
+ public void run() {
// Save the html to a file and open it in an external browser
File tempFile;
try {
@@ -185,7 +186,8 @@ public class BrowserIntroPartImplementation extends
private boolean resizeActionsAdded = false;
- protected void updateNavigationActionsState() {
+ @Override
+ protected void updateNavigationActionsState() {
if (getModel().isDynamic()) {
forwardAction.setEnabled(history.canNavigateForward());
backAction.setEnabled(history.canNavigateBackward());
@@ -201,7 +203,8 @@ public class BrowserIntroPartImplementation extends
/**
* create the browser and set it's contents
*/
- public void createPartControl(Composite parent) {
+ @Override
+ public void createPartControl(Composite parent) {
long start = 0;
if (Log.logPerformance)
start = System.currentTimeMillis();
@@ -218,11 +221,13 @@ public class BrowserIntroPartImplementation extends
// listener to filter out redundant navigations due to frames.
browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
+ @Override
+ public void changed(ProgressEvent event) {
// no-op
}
- public void completed(ProgressEvent event) {
+ @Override
+ public void completed(ProgressEvent event) {
urlListener.flagEndOfNavigation();
urlListener.flagEndOfFrameNavigation();
urlListener.flagRemovedTempUrl();
@@ -232,15 +237,12 @@ public class BrowserIntroPartImplementation extends
});
// Enable IE pop-up menu only in debug mode.
- browser.addListener(SWT.MenuDetect, new Listener() {
-
- public void handleEvent(Event event) {
- if (IntroPlugin.getDefault().isDebugging())
- event.doit = true;
- else
- event.doit = false;
- }
- });
+ browser.addListener(SWT.MenuDetect, event -> {
+ if (IntroPlugin.getDefault().isDebugging())
+ event.doit = true;
+ else
+ event.doit = false;
+ });
// if we are logging performance, log actual UI creation time for
// browser.
@@ -354,7 +356,8 @@ public class BrowserIntroPartImplementation extends
if (Log.logPerformance)
start = System.currentTimeMillis();
browser.addLocationListener(new LocationAdapter() {
- public void changed(LocationEvent event) {
+ @Override
+ public void changed(LocationEvent event) {
if (event.top) {
isFinishedLoading = true;
}
@@ -514,7 +517,8 @@ public class BrowserIntroPartImplementation extends
return htmlGenerator;
}
- protected void addToolBarActions() {
+ @Override
+ protected void addToolBarActions() {
// Handle menus:
IActionBars actionBars = getIntroPart().getIntroSite().getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
@@ -587,7 +591,8 @@ public class BrowserIntroPartImplementation extends
* @see org.eclipse.ui.IPropertyListener#propertyChanged(java.lang.Object,
* int)
*/
- public void propertyChanged(Object source, int propId) {
+ @Override
+ public void propertyChanged(Object source, int propId) {
if (propId == IntroModelRoot.CURRENT_PAGE_PROPERTY_ID) {
String pageId = getModel().getCurrentPageId();
if (pageId == null || pageId.equals("")) //$NON-NLS-1$
@@ -598,11 +603,13 @@ public class BrowserIntroPartImplementation extends
}
}
- public void setFocus() {
+ @Override
+ public void setFocus() {
browser.setFocus();
}
- public void dispose() {
+ @Override
+ public void dispose() {
browser.dispose();
}
@@ -617,7 +624,8 @@ public class BrowserIntroPartImplementation extends
*
* @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#reflow()
*/
- public void reflow(IIntroContentProvider provider, boolean incremental) {
+ @Override
+ public void reflow(IIntroContentProvider provider, boolean incremental) {
updateContent();
}
@@ -627,7 +635,8 @@ public class BrowserIntroPartImplementation extends
* last visited page is the dynamic browser is an http: page, and not an
* intro page.
*/
- protected void saveCurrentPage(IMemento memento) {
+ @Override
+ protected void saveCurrentPage(IMemento memento) {
if (memento == null)
return;
// Handle the case where we are on a static page.
@@ -649,12 +658,8 @@ public class BrowserIntroPartImplementation extends
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateBackward()
- */
- public boolean navigateBackward() {
+ @Override
+ public boolean navigateBackward() {
boolean success = false;
if (getModel().isDynamic()) {
// dynamic case. Uses navigation history.
@@ -685,12 +690,8 @@ public class BrowserIntroPartImplementation extends
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateForward()
- */
- public boolean navigateForward() {
+ @Override
+ public boolean navigateForward() {
boolean success = false;
if (getModel().isDynamic()) {
// dynamic case. Uses navigation history.
@@ -716,12 +717,8 @@ public class BrowserIntroPartImplementation extends
return success;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateHome()
- */
- public boolean navigateHome() {
+ @Override
+ public boolean navigateHome() {
// Home is URL of root page in static case, and root page in
// dynamic.
AbstractIntroPage rootPage = getModel().getHomePage();
@@ -747,14 +744,8 @@ public class BrowserIntroPartImplementation extends
return success;
}
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#handleRegistryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)
- */
- protected void handleRegistryChanged(IRegistryChangeEvent event) {
+ @Override
+ protected void handleRegistryChanged(IRegistryChangeEvent event) {
if (getModel().isDynamic()) {
// null generator first.
htmlGenerator = null;
@@ -767,7 +758,8 @@ public class BrowserIntroPartImplementation extends
}
- protected void doStandbyStateChanged(boolean standby,
+ @Override
+ protected void doStandbyStateChanged(boolean standby,
boolean isStandbyPartNeeded) {
// if we have a standby part, regardless if standby state, disable
// actions. Same behavior for static html.
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java
index 51ddd8468..3838b6c9c 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2016 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,12 +34,8 @@ public class BrowserIntroPartLocationListener implements LocationListener {
this.implementation = implementation;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.browser.LocationListener#changed(org.eclipse.swt.browser.LocationEvent)
- */
- public void changed(LocationEvent event) {
+ @Override
+ public void changed(LocationEvent event) {
String url = event.location;
if (url == null)
return;
@@ -115,7 +111,8 @@ public class BrowserIntroPartLocationListener implements LocationListener {
* valid IntroURL, cancel the event and execute the intro action that is
* embedded in the URL
*/
- public void changing(LocationEvent event) {
+ @Override
+ public void changing(LocationEvent event) {
String url = event.location;
if (url == null)
return;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/FormIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/FormIntroPartImplementation.java
index 21a76ecc8..44b125072 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/FormIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/FormIntroPartImplementation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -78,8 +78,8 @@ public class FormIntroPartImplementation extends
ImageUtil.registerImage(ImageUtil.DEFAULT_LINK, "welcome_item.gif"); //$NON-NLS-1$
}
-
- protected void updateNavigationActionsState() {
+ @Override
+ protected void updateNavigationActionsState() {
if (getModel().isDynamic()) {
forwardAction.setEnabled(history.canNavigateForward());
backAction.setEnabled(history.canNavigateBackward());
@@ -94,7 +94,8 @@ public class FormIntroPartImplementation extends
sharedStyleManager = new SharedStyleManager(getModel());
}
- public void createPartControl(Composite container) {
+ @Override
+ public void createPartControl(Composite container) {
if (getModel().isDynamic())
dynamicCreatePartControl(container);
else {
@@ -219,7 +220,8 @@ public class FormIntroPartImplementation extends
return pageBook;
}
- public void dispose() {
+ @Override
+ public void dispose() {
if (toolkit != null)
toolkit.dispose();
}
@@ -232,7 +234,8 @@ public class FormIntroPartImplementation extends
* @see org.eclipse.ui.IPropertyListener#propertyChanged(java.lang.Object,
* int)
*/
- public void propertyChanged(Object source, int propId) {
+ @Override
+ public void propertyChanged(Object source, int propId) {
if (propId == IntroModelRoot.CURRENT_PAGE_PROPERTY_ID) {
String pageId = getModel().getCurrentPageId();
if (pageId == null || pageId.equals("")) //$NON-NLS-1$
@@ -243,7 +246,8 @@ public class FormIntroPartImplementation extends
}
}
- protected void addToolBarActions() {
+ @Override
+ protected void addToolBarActions() {
// Handle menus:
IActionBars actionBars = getIntroPart().getIntroSite().getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
@@ -263,9 +267,8 @@ public class FormIntroPartImplementation extends
updateNavigationActionsState();
}
-
-
- protected void doStandbyStateChanged(boolean standby,
+ @Override
+ protected void doStandbyStateChanged(boolean standby,
boolean isStandbyPartNeeded) {
if (getModel().isDynamic())
dynamicStandbyStateChanged(standby, isStandbyPartNeeded);
@@ -379,7 +382,8 @@ public class FormIntroPartImplementation extends
* @see org.eclipse.ui.intro.config.IIntroContentProviderSite#reflow(org.eclipse.ui.intro.config.IIntroContentProvider,
* boolean)
*/
- public void reflow(IIntroContentProvider provider, boolean incremental) {
+ @Override
+ public void reflow(IIntroContentProvider provider, boolean incremental) {
AbstractIntroPage page = ContentProviderManager.getInst()
.getContentProviderParentPage(provider);
if (incremental) {
@@ -396,20 +400,16 @@ public class FormIntroPartImplementation extends
}
}
- public void setFocus() {
+ @Override
+ public void setFocus() {
if (model.isDynamic()) {
if (mainPageBook.getCurrentPage() != null)
mainPageBook.getCurrentPage().setFocus();
}
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateBackward()
- */
- public boolean navigateBackward() {
+ @Override
+ public boolean navigateBackward() {
boolean success = false;
if (getModel().isDynamic()) {
// dynamic case. Uses navigation history.
@@ -434,13 +434,8 @@ public class FormIntroPartImplementation extends
return success;
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateForward()
- */
- public boolean navigateForward() {
+ @Override
+ public boolean navigateForward() {
boolean success = false;
if (getModel().isDynamic()) {
@@ -465,7 +460,8 @@ public class FormIntroPartImplementation extends
return success;
}
- public boolean navigateHome() {
+ @Override
+ public boolean navigateHome() {
AbstractIntroPage homePage = getModel().getHomePage();
if (getModel().isDynamic()) {
CustomizableIntroPart currentIntroPart = (CustomizableIntroPart) IntroPlugin
@@ -481,13 +477,8 @@ public class FormIntroPartImplementation extends
return false;
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#handleRegistryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)
- */
- protected void handleRegistryChanged(IRegistryChangeEvent event) {
+ @Override
+ protected void handleRegistryChanged(IRegistryChangeEvent event) {
if (getModel().isDynamic()) {
IntroPlugin.closeIntro();
IntroPlugin.showIntro(false);
@@ -528,7 +519,8 @@ public class FormIntroPartImplementation extends
link.setLayoutData(gd);
link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
Hyperlink link = (Hyperlink) e.getSource();
Util.openBrowser((String) link.getHref());
return;
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java
index 1bffbdda7..3ceaa8733 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java
@@ -34,7 +34,6 @@ import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.util.Geometry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
@@ -128,6 +127,7 @@ public class IntroLaunchBar {
class BarLayout extends Layout {
+ @Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean changed) {
boolean vertical = (getOrientation() & SWT.VERTICAL) != 0;
int marginWidth = vertical | isPlain() ? 1 : simple ? 3 : 7;
@@ -154,6 +154,7 @@ public class IntroLaunchBar {
return new Point(width, height);
}
+ @Override
protected void layout(Composite composite, boolean changed) {
boolean vertical = (getOrientation() & SWT.VERTICAL) != 0;
int marginWidth = vertical | isPlain() ? 1 : simple ? 4 : 7;
@@ -307,19 +308,9 @@ public class IntroLaunchBar {
toolBar.setBackground(bg);
// coolBar.setBackground(bg);
}
- container.addPaintListener(new PaintListener() {
-
- public void paintControl(PaintEvent e) {
- onPaint(e);
- }
- });
+ container.addPaintListener(e -> onPaint(e));
MenuManager manager = new MenuManager();
- IMenuListener listener = new IMenuListener() {
-
- public void menuAboutToShow(IMenuManager manager) {
- contextMenuAboutToShow(manager);
- }
- };
+ IMenuListener listener = manager1 -> contextMenuAboutToShow(manager1);
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(listener);
Menu contextMenu = manager.createContextMenu(toolBarManager.getControl());
@@ -505,6 +496,7 @@ public class IntroLaunchBar {
closeAction = new Action("close") { //$NON-NLS-1$
+ @Override
public void run() {
closeLaunchBar(false);
}
@@ -518,6 +510,7 @@ public class IntroLaunchBar {
action = new Action("restore") { //$NON-NLS-1$
+ @Override
public void run() {
openPage(lastPageId);
}
@@ -539,6 +532,7 @@ public class IntroLaunchBar {
private void addShortcut(final IntroLaunchBarShortcut shortcut, IToolBarManager toolBarManager) {
Action action = new Action(shortcut.getToolTip()) {
+ @Override
public void run() {
executeShortcut(shortcut.getURL());
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/TextIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/TextIntroPartImplementation.java
index 7933238f3..32dc33dfb 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/TextIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/TextIntroPartImplementation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -28,12 +28,14 @@ public class TextIntroPartImplementation extends
AbstractIntroPartImplementation {
- public void doStandbyStateChanged(boolean standby,
+ @Override
+ public void doStandbyStateChanged(boolean standby,
boolean isStandbyPartNeeded) {
// no-op
}
- public void createPartControl(Composite container) {
+ @Override
+ public void createPartControl(Composite container) {
Text text = new Text(container, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
IntroModelRoot model = IntroPlugin.getDefault().getIntroModelRoot();
IntroModelSerializer serializer = new IntroModelSerializer(model);
@@ -41,48 +43,33 @@ public class TextIntroPartImplementation extends
addToolBarActions();
}
- protected void updateNavigationActionsState() {
+ @Override
+ protected void updateNavigationActionsState() {
// no-op
}
-
- public void setFocus() {
+ @Override
+ public void setFocus() {
// no-op
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateBackward()
- */
- public boolean navigateBackward() {
+ @Override
+ public boolean navigateBackward() {
return false;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateForward()
- */
- public boolean navigateForward() {
+ @Override
+ public boolean navigateForward() {
return false;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#handleRegistryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)
- */
- protected void handleRegistryChanged(IRegistryChangeEvent event) {
+ @Override
+ protected void handleRegistryChanged(IRegistryChangeEvent event) {
// no-op
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation#navigateHome()
- */
- public boolean navigateHome() {
+ @Override
+ public boolean navigateHome() {
return false;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java
index d6100c741..4f010fd0b 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -53,7 +53,8 @@ public class PageForm implements IIntroConstants {
protected HyperlinkAdapter hyperlinkAdapter = new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
String url = (String) e.getHref();
IntroURLParser parser = new IntroURLParser(url);
if (parser.hasIntroUrl()) {
@@ -68,10 +69,12 @@ public class PageForm implements IIntroConstants {
Messages.HyperlinkAdapter_urlIs + " " + url); //$NON-NLS-1$
}
- public void linkEntered(HyperlinkEvent e) {
+ @Override
+ public void linkEntered(HyperlinkEvent e) {
}
- public void linkExited(HyperlinkEvent e) {
+ @Override
+ public void linkExited(HyperlinkEvent e) {
}
};
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageFormWithNavigation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageFormWithNavigation.java
index 61317f22a..cf7dd3ea6 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageFormWithNavigation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageFormWithNavigation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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,7 +52,8 @@ public class PageFormWithNavigation extends PageForm {
*
* @param pageBook
*/
- public void createPartControl(ScrolledPageBook mainPageBook,
+ @Override
+ public void createPartControl(ScrolledPageBook mainPageBook,
SharedStyleManager sharedStyleManager) {
super.createPartControl(mainPageBook, sharedStyleManager);
@@ -80,7 +81,8 @@ public class PageFormWithNavigation extends PageForm {
/**
* Override parent id.
*/
- protected String getId() {
+ @Override
+ protected String getId() {
return PAGE_FORM_WITH_NAVIGATION_ID;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java
index ca6fcabb7..8127c2ece 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -88,7 +88,8 @@ public class PageStyleManager extends SharedStyleManager {
// Override parent method to include alt-styles. Use implicit keys as well.
- public String getProperty(String key) {
+ @Override
+ public String getProperty(String key) {
return getProperty(key, true);
}
@@ -142,7 +143,8 @@ public class PageStyleManager extends SharedStyleManager {
* @return
*/
- protected StyleContext getAssociatedContext(String key) {
+ @Override
+ protected StyleContext getAssociatedContext(String key) {
Properties aProperties = findPropertyOwner(key);
StyleContext context = (StyleContext) altStyleContexts.get(aProperties);
if (context != null)
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java
index 12d96f061..68f6e12b1 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -55,7 +55,8 @@ public class PageWidgetFactory {
protected HyperlinkAdapter hyperlinkAdapter = new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
String url = (String) e.getHref();
IntroURLParser parser = new IntroURLParser(url);
if (parser.hasIntroUrl()) {
@@ -70,10 +71,12 @@ public class PageWidgetFactory {
Messages.HyperlinkAdapter_urlIs + " " + url); //$NON-NLS-1$
}
- public void linkEntered(HyperlinkEvent e) {
+ @Override
+ public void linkEntered(HyperlinkEvent e) {
}
- public void linkExited(HyperlinkEvent e) {
+ @Override
+ public void linkExited(HyperlinkEvent e) {
}
};
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java
index 0fa04cd36..49153242c 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -65,7 +65,8 @@ public class RootPageForm implements IIntroConstants {
// Do not allow composite to take wHint as-is - layout manager
// can reject the hint and compute larger width.
- public Point computeSize(int wHint, int hHint, boolean changed) {
+ @Override
+ public Point computeSize(int wHint, int hHint, boolean changed) {
return ((RootPageLayout) getLayout()).computeSize(this, wHint,
hHint, changed);
}
@@ -81,7 +82,8 @@ public class RootPageForm implements IIntroConstants {
/*
* Custom layout for Root Page Composite.
*/
- protected Point computeSize(Composite composite, int wHint, int hHint,
+ @Override
+ protected Point computeSize(Composite composite, int wHint, int hHint,
boolean flushCache) {
int innerWHint = wHint;
if (wHint != SWT.DEFAULT)
@@ -95,13 +97,8 @@ public class RootPageForm implements IIntroConstants {
return size;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite,
- * boolean)
- */
- protected void layout(Composite composite, boolean flushCache) {
+ @Override
+ protected void layout(Composite composite, boolean flushCache) {
Control[] children = composite.getChildren();
Rectangle carea = composite.getClientArea();
Control content = children[0];
@@ -119,7 +116,8 @@ public class RootPageForm implements IIntroConstants {
private HyperlinkAdapter hyperlinkAdapter = new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
ImageHyperlink imageLink = (ImageHyperlink) e.getSource();
IntroLink introLink = (IntroLink) imageLink.getData(INTRO_LINK);
IntroURLParser parser = new IntroURLParser(introLink.getUrl());
@@ -135,13 +133,15 @@ public class RootPageForm implements IIntroConstants {
Messages.HyperlinkAdapter_urlIs + introLink.getUrl());
}
- public void linkEntered(HyperlinkEvent e) {
+ @Override
+ public void linkEntered(HyperlinkEvent e) {
ImageHyperlink imageLink = (ImageHyperlink) e.getSource();
IntroLink introLink = (IntroLink) imageLink.getData(INTRO_LINK);
updateDescription(introLink.getText());
}
- public void linkExited(HyperlinkEvent e) {
+ @Override
+ public void linkExited(HyperlinkEvent e) {
// empty text on exit.
updateDescription(""); //$NON-NLS-1$
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java
index 70993ecdd..f9a51dba7 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -364,7 +364,8 @@ public class IntroModelSerializer {
/**
* @return Returns the textUI.
*/
- public String toString() {
+ @Override
+ public String toString() {
return buffer.toString();
}
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Util.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Util.java
index c947e94a4..09093455f 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Util.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Util.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -18,7 +18,6 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PartInitException;
@@ -78,70 +77,67 @@ public class Util {
* @return
*/
public static Listener addDebugListener(Control control) {
- Listener listener = new Listener() {
-
- public void handleEvent(Event e) {
- switch (e.type) {
- case SWT.Selection:
- System.out.println("Selection EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.Dispose:
- System.out.println("Dispose EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.Paint:
- System.out.println("Paint EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.Resize:
- System.out.println("Resize EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.MouseDoubleClick:
- System.out.println("MouseDoubleClick EVENT: " //$NON-NLS-1$
- + e.toString());
- break;
- case SWT.MouseDown:
- System.out.println("MouseDown EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.MouseUp:
- System.out.println("MouseUp EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.MouseMove:
- System.out.println("MouseMove EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.MouseEnter:
- System.out.println("MouseEnter EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.MouseExit:
- System.out.println("MouseExit EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.MouseHover:
- System.out.println("MouseHover EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.FocusIn:
- System.out.println("FocusIn EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.FocusOut:
- System.out.println("FocusOut EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.KeyDown:
- System.out.println("KeyDown EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.KeyUp:
- System.out.println("KeyUp EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.Traverse:
- System.out.println("Traverse EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.Show:
- System.out.println("Show EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- case SWT.Hide:
- System.out.println("Hide EVENT: " + e.toString()); //$NON-NLS-1$
- break;
- default:
- System.out.println(e.toString());
- }
- }
- };
+ Listener listener = e -> {
+ switch (e.type) {
+ case SWT.Selection:
+ System.out.println("Selection EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.Dispose:
+ System.out.println("Dispose EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.Paint:
+ System.out.println("Paint EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.Resize:
+ System.out.println("Resize EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.MouseDoubleClick:
+ System.out.println("MouseDoubleClick EVENT: " //$NON-NLS-1$
+ + e.toString());
+ break;
+ case SWT.MouseDown:
+ System.out.println("MouseDown EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.MouseUp:
+ System.out.println("MouseUp EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.MouseMove:
+ System.out.println("MouseMove EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.MouseEnter:
+ System.out.println("MouseEnter EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.MouseExit:
+ System.out.println("MouseExit EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.MouseHover:
+ System.out.println("MouseHover EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.FocusIn:
+ System.out.println("FocusIn EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.FocusOut:
+ System.out.println("FocusOut EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.KeyDown:
+ System.out.println("KeyDown EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.KeyUp:
+ System.out.println("KeyUp EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.Traverse:
+ System.out.println("Traverse EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.Show:
+ System.out.println("Show EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ case SWT.Hide:
+ System.out.println("Hide EVENT: " + e.toString()); //$NON-NLS-1$
+ break;
+ default:
+ System.out.println(e.toString());
+ }
+ };
int[] allEvents = new int[] { SWT.Selection, SWT.Dispose, SWT.Paint,
SWT.Resize, SWT.MouseDoubleClick, SWT.MouseDown, SWT.MouseUp,
// SWT.MouseMove,
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/CustomizableIntroPart.java b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/CustomizableIntroPart.java
index affb2420f..1a07faeca 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/CustomizableIntroPart.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/CustomizableIntroPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2013 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -95,10 +95,12 @@ public final class CustomizableIntroPart extends IntroPart implements
// Adapter factory to abstract out the StandbyPart implementation from APIs.
IAdapterFactory factory = new IAdapterFactory() {
+ @Override
public Class<?>[] getAdapterList() {
return new Class[] { StandbyPart.class, IntroPartPresentation.class };
}
+ @Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
if (!(adaptableObject instanceof CustomizableIntroPart))
return null;
@@ -135,13 +137,8 @@ public final class CustomizableIntroPart extends IntroPart implements
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.IIntroPart#init(org.eclipse.ui.intro.IIntroSite,
- * org.eclipse.ui.IMemento)
- */
- public void init(IIntroSite site, IMemento memento)
+ @Override
+ public void init(IIntroSite site, IMemento memento)
throws PartInitException {
super.init(site, memento);
IntroPlugin.getDefault().closeLaunchBar();
@@ -192,7 +189,8 @@ public final class CustomizableIntroPart extends IntroPart implements
*
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
- public void createPartControl(Composite parent) {
+ @Override
+ public void createPartControl(Composite parent) {
container = new Composite(parent, SWT.NULL);
StackLayout layout = new StackLayout();
layout.marginHeight = 0;
@@ -247,7 +245,8 @@ public final class CustomizableIntroPart extends IntroPart implements
*
* @see org.eclipse.ui.IIntroPart#standbyStateChanged(boolean)
*/
- public void standbyStateChanged(boolean standby) {
+ @Override
+ public void standbyStateChanged(boolean standby) {
// do this only if there is a valid config.
if (model == null || !model.hasValidConfig())
@@ -312,12 +311,8 @@ public final class CustomizableIntroPart extends IntroPart implements
presentation.setFocus();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
+ @Override
+ public void setFocus() {
handleSetFocus(IntroPlugin.isIntroStandby());
}
@@ -345,12 +340,8 @@ public final class CustomizableIntroPart extends IntroPart implements
return presentation;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
+ @Override
+ public void dispose() {
super.dispose();
// call dispose on both parts.
if (presentation != null)
@@ -386,7 +377,8 @@ public final class CustomizableIntroPart extends IntroPart implements
return container;
}
- public void saveState(IMemento memento) {
+ @Override
+ public void saveState(IMemento memento) {
// give presentation and standby part there own children to create a
// name space for each. But save either the presentation or the standby
// part as needing to be restored. This way if we close with a standby
@@ -413,12 +405,6 @@ public final class CustomizableIntroPart extends IntroPart implements
standbyPart.saveState(standbyPartMemento);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.intro.IIntroPart#saveState(org.eclipse.ui.IMemento)
- */
-
private IMemento getMemento(IMemento memento, String key) {
if (memento == null)
return null;
@@ -430,30 +416,28 @@ public final class CustomizableIntroPart extends IntroPart implements
*
* @see org.eclipse.core.runtime.IRegistryChangeListener#registryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)
*/
- public void registryChanged(final IRegistryChangeEvent event) {
+ @Override
+ public void registryChanged(final IRegistryChangeEvent event) {
// Clear cached models first, then update UI by delegating to
// implementation. wrap in synchExec because notification is
// asynchronous. The design here is that the notification is centralized
// here, then this event propagates and each receiving class reacts
// accordingly.
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- String currentPageId = model.getCurrentPageId();
- // clear model, including content providers.
- ExtensionPointManager.getInst().clear();
- ContentProviderManager.getInst().clear();
- // refresh to new model.
- model = ExtensionPointManager.getInst().getCurrentModel();
- // reuse existing presentation, since we just nulled it.
- model.setPresentation(getPresentation());
- // keep same page on refresh. No need for notification here.
- model.setCurrentPageId(currentPageId, false);
- if (getPresentation() != null)
- getPresentation().registryChanged(event);
-
- }
- });
+ Display.getDefault().syncExec(() -> {
+ String currentPageId = model.getCurrentPageId();
+ // clear model, including content providers.
+ ExtensionPointManager.getInst().clear();
+ ContentProviderManager.getInst().clear();
+ // refresh to new model.
+ model = ExtensionPointManager.getInst().getCurrentModel();
+ // reuse existing presentation, since we just nulled it.
+ model.setPresentation(getPresentation());
+ // keep same page on refresh. No need for notification here.
+ model.setCurrentPageId(currentPageId, false);
+ if (getPresentation() != null)
+ getPresentation().registryChanged(event);
+
+ });
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroElement.java b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroElement.java
index 31ed8babc..feee0b531 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroElement.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroElement.java
@@ -1,5 +1,6 @@
/***************************************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. All rights reserved. This program and the
+ * Copyright (c) 2006, 2016 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
* http://www.eclipse.org/legal/epl-v10.html
@@ -123,6 +124,7 @@ public class IntroElement {
return (IntroElement[]) children.toArray(new IntroElement[children.size()]);
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof IntroElement) {
if (obj == this) {
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/AlwaysWelcomeCheckbox.java b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/AlwaysWelcomeCheckbox.java
index 240155456..37d9bee62 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/AlwaysWelcomeCheckbox.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/AlwaysWelcomeCheckbox.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -63,6 +63,7 @@ public class AlwaysWelcomeCheckbox implements IIntroContentProvider,IIntroAction
}
+ @Override
public void createContent(String id, PrintWriter out) {
boolean alwaysShowIntro = getAlwaysShowIntroPref();
@@ -88,6 +89,7 @@ public class AlwaysWelcomeCheckbox implements IIntroContentProvider,IIntroAction
}
+ @Override
public void createContent(String id, Composite parent, FormToolkit toolkit) {
if (disposed)
return;
@@ -100,6 +102,7 @@ public class AlwaysWelcomeCheckbox implements IIntroContentProvider,IIntroAction
checkBox.setText(getText());
checkBox.setSelection(alwaysShowIntro);
checkBox.addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEvent e){
reverseShowIntroState();
}
@@ -110,10 +113,12 @@ public class AlwaysWelcomeCheckbox implements IIntroContentProvider,IIntroAction
IWorkbenchPreferenceConstants.SHOW_INTRO, alwaysShowIntro);
}
+ @Override
public void dispose() {
disposed = true;
}
+ @Override
public void init(IIntroContentProviderSite site) {
}
@@ -121,6 +126,7 @@ public class AlwaysWelcomeCheckbox implements IIntroContentProvider,IIntroAction
* Method called when box is clicked in html (swt is handled with a
* SelectionAdapter - both methods call reverseShowIntroState())
*/
+ @Override
public void run(IIntroSite site, Properties params) {
reverseShowIntroState();
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java
index 14a618aa7..eaf63147e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -123,6 +123,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
* Initialize the content provider
* @param site an object which allows rcontainer reflows to be requested
*/
+ @Override
public void init(IIntroContentProviderSite site) {
this.site = site;
refresh();
@@ -133,6 +134,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
* @param id
* @param out a writer where the html will be written
*/
+ @Override
public void createContent(String id, PrintWriter out) {
if (disposed)
return;
@@ -192,6 +194,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
/**
* Create widgets to display the newsreader when using the SWT presentation
*/
+ @Override
public void createContent(String id, Composite parent, FormToolkit toolkit) {
if (disposed)
return;
@@ -202,6 +205,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
// a one-time pass
formText = toolkit.createFormText(parent, true);
formText.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
doNavigate((String) e.getHref());
}
@@ -266,6 +270,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
}
}
+ @Override
public void dispose() {
if (bulletImage != null) {
bulletImage.dispose();
@@ -321,18 +326,16 @@ public class EclipseRSSViewer implements IIntroContentProvider {
private void doNavigate(final String url) {
BusyIndicator.showWhile(PlatformUI.getWorkbench().getDisplay(),
- new Runnable() {
- public void run() {
- IIntroURL introUrl = IntroURLFactory
- .createIntroURL(url);
- if (introUrl != null) {
- // execute the action embedded in the IntroURL
- introUrl.execute();
- return;
- }
- // delegate to the browser support
- openBrowser(url);
+ () -> {
+ IIntroURL introUrl = IntroURLFactory
+ .createIntroURL(url);
+ if (introUrl != null) {
+ // execute the action embedded in the IntroURL
+ introUrl.execute();
+ return;
}
+ // delegate to the browser support
+ openBrowser(url);
});
}
@@ -362,24 +365,23 @@ public class EclipseRSSViewer implements IIntroContentProvider {
}
class NewsFeed implements Runnable {
+ @Override
public void run() {
// important: don't do the work if the
// part gets disposed in the process
if (disposed)
return;
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- if (parent != null) {
- // we must recreate the content
- // for SWT because we will use
- // a gentle incremental reflow.
- // HTML reflow will simply reload the page.
- createContent(id, parent, toolkit);
+ PlatformUI.getWorkbench().getDisplay().syncExec(() -> {
+ if (parent != null) {
+ // we must recreate the content
+ // for SWT because we will use
+ // a gentle incremental reflow.
+ // HTML reflow will simply reload the page.
+ createContent(id, parent, toolkit);
// reflow(formText);
- }
- site.reflow(EclipseRSSViewer.this, true);
}
+ site.reflow(EclipseRSSViewer.this, true);
});
}
}
@@ -400,6 +402,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
private StringBuffer buf;
private NewsItem item;
+ @Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
stack.push(qName);
@@ -422,6 +425,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
}
}
+ @Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
stack.pop();
@@ -447,6 +451,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
}
}
+ @Override
public void characters(char[] ch, int start, int length)
throws SAXException {
// were we expecting chars?
@@ -481,6 +486,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
private class ContentThread extends Thread{
+ @Override
public void run()
{
threadRunning = true;
@@ -533,6 +539,7 @@ public class EclipseRSSViewer implements IIntroContentProvider {
private class TimeoutThread extends Thread
{
+ @Override
public void run()
{
try{

Back to the top