Bug 569660 Lazy compute additional proposal info

Instead of computing the additional info of each content assist proposal
before displaying the content assist popup, do it lazy.

Remove parameter additionalText from the method createProposal of the
interface IContentProposalProvider. Therefore the additionalText must
not be provided when creating the proposal.

The new class LazyAdditionalTextCompletionProposal uses the interface
IDescibedInDetail to the get the detailed description and provide is as
additional info. This code was duplicated before in a lot of classes
that provided proposals.

Change-Id: I18bcf3eb86bda3f129538f31f7abf9dfb6e0f310
Signed-off-by: Reto Weiss <reto.weiss@axonivy.com>
Also-by: Andreas Rusch <andreas.rusch@axonivy.com>
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=569660
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java
index a979a9d..f96ffc8 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2013 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 package org.eclipse.jst.jsf.context.symbol.internal.provider;
@@ -74,7 +75,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public List getPropertyDescriptors(Object object) {
+	@Override
+  public List getPropertyDescriptors(Object object) {
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
@@ -138,7 +140,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public Object getImage(Object object) {
+	@Override
+  public Object getImage(Object object) {
 		return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanInstanceSymbol")); //$NON-NLS-1$
 	}
 
@@ -150,7 +153,8 @@
 	 * <!-- end-user-doc -->
      * @generated NOT
      */
-	public String getText(Object object) {
+	@Override
+  public String getText(Object object) {
         String label = ((IBeanInstanceSymbol)object).getName();
         return label == null || label.length() == 0 ?
             getString("_UI_IBeanInstanceSymbol_type") : //$NON-NLS-1$
@@ -165,7 +169,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void notifyChanged(Notification notification) {
+	@Override
+  public void notifyChanged(Notification notification) {
 		updateChildren(notification);
 		super.notifyChanged(notification);
 	}
@@ -179,7 +184,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+	@Override
+  protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
 	}
 
@@ -190,7 +196,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public ResourceLocator getResourceLocator() {
+	@Override
+  public ResourceLocator getResourceLocator() {
 		return JSFCommonPlugin.INSTANCE;
 	}
 
@@ -199,14 +206,14 @@
 	 * @param proposalFactory 
 	 * @return a completion proposal for target at offset
 	 */
-	public ICompletionProposal[] getProposals(Object target_, 
+	@Override
+  public ICompletionProposal[] getProposals(Object target_, 
                                           IProposalCreationFactory proposalFactory) 
 	{
 		IBeanInstanceSymbol  symbol = (IBeanInstanceSymbol) target_;
 
 		final String replacementText = symbol.getName();
 		final String displayText = getText(symbol);
-		final String additionalText = symbol.getDetailedDescription();
 		// for running headless, we need to avoid hitting the image registry
         // because it accesses the Display object that won't exist
         final Image displayImage = Display.getCurrent() != null ? 
@@ -217,7 +224,6 @@
 		{
             proposalFactory.createProposal(replacementText, 
                                            displayText, 
-                                           additionalText, 
                                            displayImage,
                                            target_)
         };
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java
index 3c6383e..03d02db 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 package org.eclipse.jst.jsf.context.symbol.internal.provider;
@@ -239,7 +240,6 @@
 
         final String replacementText = symbol.getName();
         final String displayText = getText(target_);
-        final String additionalText = symbol.getDetailedDescription();
         final Image displayImage = 
             ExtendedImageRegistry.getInstance().getImage(getImage(symbol));
         
@@ -247,7 +247,6 @@
         {
             proposalFactory.createProposal(replacementText, 
                                            displayText, 
-                                           additionalText, 
                                            displayImage,
                                            target_)
         };
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java
index 1b24e9d..2df8804 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 package org.eclipse.jst.jsf.context.symbol.internal.provider;
@@ -155,7 +156,6 @@
 
         final String replacementText = symbol.getName();
         final String displayText = getText(symbol);
-        final String additionalText = symbol.getDetailedDescription();
         final Image displayImage = 
             ExtendedImageRegistry.getInstance().getImage(getImage(symbol));
 
@@ -163,7 +163,6 @@
         {
             proposalFactory.createProposal(replacementText, 
                                            displayText, 
-                                           additionalText, 
                                            displayImage,
                                            target_)
         };
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java
index 1af174c..8f9f5e4 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2013 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 package org.eclipse.jst.jsf.context.symbol.internal.provider;
@@ -327,7 +328,6 @@
         {
             proposalFactory.createProposal(replacementText, 
                                            displayText, 
-                                           null, 
                                            displayImage,
                                            target_)
         };
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java
index fa0912c..1a0ec8c 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 package org.eclipse.jst.jsf.context.symbol.internal.provider;
@@ -36,7 +37,6 @@
 import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jst.jsf.common.JSFCommonPlugin;
-import org.eclipse.jst.jsf.context.symbol.IDescribedInDetail;
 import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
 import org.eclipse.jst.jsf.context.symbol.SymbolPackage;
 import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider;
@@ -325,7 +325,6 @@
                     completions.add(proposalFactory.createProposal(                          
                                         replacementText, 
                                         replacementText, 
-                                        null, 
                                         displayImage, symbol));
                 }
                 else
@@ -350,14 +349,9 @@
 	private ICompletionProposal createProposal(IPropertySymbol symbol,
 			final String replacementText, final String displayText,
 			final Image displayImage, IProposalCreationFactory proposalFactory) {
-		String additionalText = null; // TODO: put property value here where possible?
-        if (symbol instanceof IDescribedInDetail) {
-            additionalText = ((IDescribedInDetail) symbol).getDetailedDescription();
-        }
 		return proposalFactory.createProposal(
 		                                    replacementText, 
 		                                    displayText, 
-		                                    additionalText,
 		                                    displayImage, symbol);
 	}
 }
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java
index dd115fd..be1e8c7 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 
@@ -48,8 +49,6 @@
         /**
          * @param replacementText  The text to be replaced
          * @param displayText  The text to be displayed in the assist window
-         * @param additionalText The text to be displayed in the "addition info"
-         *                          or null
          * @param displayImage The image to be displayed or null
          * @param sourceObject  The original source object.  Implementors should
          * make no assumptions (i.e. always test instanceof before casting)
@@ -57,7 +56,6 @@
          */
         ICompletionProposal createProposal(final String  replacementText,
                 final String  displayText,
-                final String  additionalText,
                 final Image   displayImage,
                 final Object  sourceObject);
     }
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/LazyAdditionalTextCompletionProposal.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/LazyAdditionalTextCompletionProposal.java
new file mode 100644
index 0000000..b17a98d
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/LazyAdditionalTextCompletionProposal.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2020, 2021 Axon Ivy AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc) 
+ *    
+ ********************************************************************************/
+package org.eclipse.jst.jsf.context.symbol.provider;
+
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jst.jsf.context.symbol.IDescribedInDetail;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
+
+/**
+ * Proposal class that creates the additional text (JavaDoc) lazily, if not provided in constructor.
+ * @since 8.0.11
+ */
+public class LazyAdditionalTextCompletionProposal extends CustomCompletionProposal
+{
+  final private Object symbol;
+
+ /**
+  * Constructor
+  * @param replacementText
+  * @param replacementOffset
+  * @param replacementLength
+  * @param cursorPosition
+  * @param displayImage
+  * @param displayText
+  * @param contextInfo
+  * @param relevance
+  * @param target
+  */
+public LazyAdditionalTextCompletionProposal(String replacementText, int replacementOffset, int replacementLength,
+          int cursorPosition, Image displayImage, String displayText, IContextInformation contextInfo, int relevance, Object target)
+  {
+    super(replacementText, replacementOffset, replacementLength,
+            cursorPosition, displayImage, displayText, contextInfo,
+            null, relevance);
+      this.symbol = target;
+  }
+  
+  @Override
+  public String getAdditionalProposalInfo()
+  {
+    if (symbol instanceof IDescribedInDetail)
+    {
+      return ((IDescribedInDetail)symbol).getDetailedDescription();
+    }
+    return null;
+  }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java
index f4522f4..42c45e5 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 
@@ -18,7 +19,6 @@
 import org.eclipse.jface.text.contentassist.IContextInformation;
 import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider.IProposalCreationFactory;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
 
 /**
  * Default implementation of the proposal creation factory
@@ -53,7 +53,7 @@
     }
 
     public ICompletionProposal createProposal(String replacementText, 
-                String displayText, String additionalText, Image displayImage,
+                String displayText, Image displayImage,
                 Object targetObject) 
                 
     {
@@ -64,8 +64,8 @@
                 displayImage, 
                 displayText, 
                 null, 
-                additionalText,
-                1);
+                1,
+                targetObject);
     }
     
     /**
@@ -78,8 +78,8 @@
      * @param displayImage
      * @param displayText
      * @param contextInfo
-     * @param additionalText
      * @param relevance
+     * @param target The original source object.
      * @return a default configuration of the completion proposal based on 
      * the CustomCompletionProposal
      */
@@ -91,17 +91,17 @@
                                           final Image displayImage,
                                           final String displayText,
                                           final IContextInformation contextInfo,
-                                          final String additionalText,
-                                          final int relevance)
+                                          final int relevance,
+                                          final Object target)
     {
-        return new CustomCompletionProposal(replacementText, 
+        return new LazyAdditionalTextCompletionProposal(replacementText, 
                 replacementOffset, 
                 replacementLength, 
                 cursorPosition, 
                 displayImage, 
                 displayText, 
                 contextInfo, 
-                additionalText,
-                relevance);
+                relevance,
+                target);
     }
 }
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/FunctionCompletionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/FunctionCompletionStrategy.java
index 602b8ae..c7351e7 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/FunctionCompletionStrategy.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/FunctionCompletionStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2013 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc) 
  *
  ********************************************************************************/
 package org.eclipse.jst.jsf.core.internal.contentassist.el;
@@ -28,8 +29,8 @@
 import org.eclipse.jst.jsf.context.symbol.IObjectSymbol;
 import org.eclipse.jst.jsf.context.symbol.ISymbol;
 import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider;
-import org.eclipse.jst.jsf.context.symbol.provider.ProposalCreationFactoryAdapter;
 import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider.IProposalCreationFactory;
+import org.eclipse.jst.jsf.context.symbol.provider.ProposalCreationFactoryAdapter;
 import org.eclipse.jst.jsf.designtime.resolver.ISymbolContextResolver;
 import org.eclipse.jst.jsf.designtime.resolver.StructuredDocumentSymbolResolverFactory;
 import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
@@ -150,7 +151,6 @@
         @Override
 		public ICompletionProposal createProposal(final String replacementText,
                                                   final String displayText,
-                                                  final String additionalText,
                                                   final Image displayImage,
                                                   final Object target)
         {
@@ -201,8 +201,8 @@
                                          displayImage,
                                          displayText,
                                          null,
-                                         additionalText,
-                                         getRelevance(target, DEFAULT_RELEVANCE));
+                                         getRelevance(target, DEFAULT_RELEVANCE),
+                                         target);
         }
 
         private int getRelevance(final Object target, final int defaultRelevance)
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/IdCompletionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/IdCompletionStrategy.java
index cd3de37..3f8f0ee 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/IdCompletionStrategy.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contentassist/el/IdCompletionStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc)
  *    
  ********************************************************************************/
 
@@ -28,8 +29,8 @@
 import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
 import org.eclipse.jst.jsf.context.symbol.ISymbol;
 import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider;
-import org.eclipse.jst.jsf.context.symbol.provider.ProposalCreationFactoryAdapter;
 import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider.IProposalCreationFactory;
+import org.eclipse.jst.jsf.context.symbol.provider.ProposalCreationFactoryAdapter;
 import org.eclipse.jst.jsf.designtime.resolver.ISymbolContextResolver;
 import org.eclipse.jst.jsf.designtime.resolver.StructuredDocumentSymbolResolverFactory;
 import org.eclipse.swt.graphics.Image;
@@ -132,17 +133,18 @@
             super(replacementOffset - replacementLength, replacementLength);
         }
 
+        @Override
         public ICompletionProposal createProposal(final String replacementText, 
                                                   final String displayText, 
-                                                  final String additionalText, 
                                                   final Image displayImage, 
                                                   final Object targetObject) 
         {
             return createDefaultProposal(replacementText, _replacementOffset, 
                                          _replacementLength, 
                                          replacementText.length(), displayImage, 
-                                         displayText, null, additionalText, 
-                                         getRelevance(targetObject));
+                                         displayText, null,
+                                         getRelevance(targetObject),
+                                         targetObject);
         }
         
         private int getRelevance(Object target)
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java
index c28eac5..b4d9d2c 100644
--- a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle Corporation.
+ * Copyright (c) 2006, 2021 Oracle Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *
  * Contributors:
  *    Cameron Bateman/Oracle - initial API and implementation
+ *    Andreas Rusch/Axon Ivy - Lazy compute additional proposal info (javadoc) 
  *    
  ********************************************************************************/
 
@@ -127,12 +128,10 @@
             _replacementText = new ArrayList<String>();
         }
 
-        public ICompletionProposal createProposal(String replacementText, String displayText, String additionalText, Image displayImage, Object targetObject) 
+        public ICompletionProposal createProposal(String replacementText, String displayText, Image displayImage, Object targetObject) 
         {
             _replacementText.add(replacementText);
-            
-            return super.createProposal(replacementText, displayText, additionalText,
-                    displayImage, targetObject);
+            return super.createProposal(replacementText, displayText, displayImage, targetObject);
         }
     }
 }