Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 434269 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAccess2.java (-15 / +16 lines)
Lines 621-646 Link Here
621
			boolean isGetter= name.startsWith("get"); //$NON-NLS-1$
621
			boolean isGetter= name.startsWith("get"); //$NON-NLS-1$
622
			boolean isSetter= name.startsWith("set"); //$NON-NLS-1$
622
			boolean isSetter= name.startsWith("set"); //$NON-NLS-1$
623
			boolean isProperty= name.endsWith("Property"); //$NON-NLS-1$
623
			boolean isProperty= name.endsWith("Property"); //$NON-NLS-1$
624
			if (isGetter || isSetter || isProperty) {
624
			
625
				String propertyName= null;
625
			if( isGetter || isSetter ) {
626
				if (isGetter || isSetter) {
626
				String propertyName= firstToLower(name.substring(3));
627
					propertyName= firstToLower(name.substring(3));
627
				IType type= member.getDeclaringType();
628
				} else {
628
				String content = getHTMLContentFromSource(type.getMethod(propertyName+"Property",new String[0])); //$NON-NLS-1$
629
					propertyName= name.substring(0, name.length() - 8);
629
				
630
				if (content != null) {
631
					if (isGetter) {
632
						content= Messages.format(JavaDocMessages.JavadocContentAccess2_getproperty_message, new Object[] { propertyName, content });
633
					} else if (isSetter) {
634
						content= Messages.format(JavaDocMessages.JavadocContentAccess2_setproperty_message, new Object[] { propertyName, content });
635
					}
630
				}
636
				}
637
				return content;
638
			} else if( isProperty ) {
639
				String propertyName= name.substring(0, name.length() - 8);
631
640
632
				IType type= member.getDeclaringType();
641
				IType type= member.getDeclaringType();
633
				IField field= type.getField(propertyName);
642
				IField field= type.getField(propertyName);
634
				if (field.exists()) {
643
				if (field.exists()) {
635
					String content= getHTMLContentFromSource(field);
644
					return getHTMLContentFromSource(field);
636
					if (content != null) {
637
						if (isGetter) {
638
							content= Messages.format(JavaDocMessages.JavadocContentAccess2_getproperty_message, new Object[] { propertyName, content });
639
						} else if (isSetter) {
640
							content= Messages.format(JavaDocMessages.JavadocContentAccess2_setproperty_message, new Object[] { propertyName, content });
641
						}
642
					}
643
					return content;
644
				}
645
				}
645
			}
646
			}
646
		}
647
		}

Return to bug 434269