PreferenceConstants.EDITOR_FOLDING_JAVADOC));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_FOLDING_HEADERS));
- // overlayKeys.add(new
- // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
- // PreferenceConstants.EDITOR_FOLDING_INNERTYPES));
+ overlayKeys.add(new
+ OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+ PreferenceConstants.EDITOR_FOLDING_INNERTYPES));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_FOLDING_METHODS));
// overlayKeys.add(new
FoldingMessages.getString("DefaultJavaFoldingPreferenceBlock.comments"), PreferenceConstants.EDITOR_FOLDING_JAVADOC, 0); //$NON-NLS-1$
addCheckBox(inner,
FoldingMessages.getString("DefaultJavaFoldingPreferenceBlock.headers"), PreferenceConstants.EDITOR_FOLDING_HEADERS, 0);//$NON-NLS-1$
- // addCheckBox(inner,
- // FoldingMessages.getString("DefaultJavaFoldingPreferenceBlock.innerTypes"),
- // PreferenceConstants.EDITOR_FOLDING_INNERTYPES, 0); //$NON-NLS-1$
+ addCheckBox(inner,
+ FoldingMessages.getString("DefaultJavaFoldingPreferenceBlock.innerTypes"),
+ PreferenceConstants.EDITOR_FOLDING_INNERTYPES, 0); //$NON-NLS-1$
addCheckBox(inner,
FoldingMessages.getString("DefaultJavaFoldingPreferenceBlock.methods"), PreferenceConstants.EDITOR_FOLDING_METHODS, 0); //$NON-NLS-1$
// addCheckBox(inner,
// createProjection = true;
// break;
case IJavaElement.TYPE:
- collapse = fAllowCollapsing && fCollapseInnerTypes && isInnerType((IType) element);
+ collapse = fAllowCollapsing;
+ if (isInnerType((IType) element)) {
+ collapse = collapse && fCollapseInnerTypes;
+ }
+ else {
+ collapse = false; //don't allow the most outer type to be folded, may be changed in future versions
+ }
createProjection = true;
break;
case IJavaElement.METHOD: