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 134073 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.java (-2 / +7 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-17 Link Here
12
package org.eclipse.jst.jsp.ui.internal.contentassist;
12
package org.eclipse.jst.jsp.ui.internal.contentassist;
13
13
14
import org.eclipse.jface.text.IRegion;
14
import org.eclipse.jface.text.IRegion;
15
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4;
15
import org.eclipse.jface.text.templates.Template;
16
import org.eclipse.jface.text.templates.Template;
16
import org.eclipse.jface.text.templates.TemplateContext;
17
import org.eclipse.jface.text.templates.TemplateContext;
17
import org.eclipse.jface.text.templates.TemplateProposal;
18
import org.eclipse.jface.text.templates.TemplateProposal;
Lines 25-31 Link Here
25
 * 
26
 * 
26
 * @plannedfor 1.0
27
 * @plannedfor 1.0
27
 */
28
 */
28
class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal {
29
class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal, ICompletionProposalExtension4 {
29
	// copies of this class exist in:
30
	// copies of this class exist in:
30
	// org.eclipse.jst.jsp.ui.internal.contentassist
31
	// org.eclipse.jst.jsp.ui.internal.contentassist
31
	// org.eclipse.wst.html.ui.internal.contentassist
32
	// org.eclipse.wst.html.ui.internal.contentassist
Lines 39-42 Link Here
39
		String additionalInfo = super.getAdditionalProposalInfo();
40
		String additionalInfo = super.getAdditionalProposalInfo();
40
		return StringUtils.convertToHTMLContent(additionalInfo);
41
		return StringUtils.convertToHTMLContent(additionalInfo);
41
	}
42
	}
43
44
	public boolean isAutoInsertable() {
45
		return false;
46
	}
42
}
47
}
(-)src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java (-2 / +7 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-17 Link Here
12
package org.eclipse.wst.html.ui.internal.contentassist;
12
package org.eclipse.wst.html.ui.internal.contentassist;
13
13
14
import org.eclipse.jface.text.IRegion;
14
import org.eclipse.jface.text.IRegion;
15
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4;
15
import org.eclipse.jface.text.templates.Template;
16
import org.eclipse.jface.text.templates.Template;
16
import org.eclipse.jface.text.templates.TemplateContext;
17
import org.eclipse.jface.text.templates.TemplateContext;
17
import org.eclipse.jface.text.templates.TemplateProposal;
18
import org.eclipse.jface.text.templates.TemplateProposal;
Lines 23-29 Link Here
23
 * Purpose of this class is to make the additional proposal info into content
24
 * Purpose of this class is to make the additional proposal info into content
24
 * fit for an HTML viewer (by escaping characters)
25
 * fit for an HTML viewer (by escaping characters)
25
 */
26
 */
26
class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal {
27
class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal, ICompletionProposalExtension4 {
27
	// copies of this class exist in:
28
	// copies of this class exist in:
28
	// org.eclipse.jst.jsp.ui.internal.contentassist
29
	// org.eclipse.jst.jsp.ui.internal.contentassist
29
	// org.eclipse.wst.html.ui.internal.contentassist
30
	// org.eclipse.wst.html.ui.internal.contentassist
Lines 37-40 Link Here
37
		String additionalInfo = super.getAdditionalProposalInfo();
38
		String additionalInfo = super.getAdditionalProposalInfo();
38
		return StringUtils.convertToHTMLContent(additionalInfo);
39
		return StringUtils.convertToHTMLContent(additionalInfo);
39
	}
40
	}
41
42
	public boolean isAutoInsertable() {
43
		return false;
44
	}
40
}
45
}
(-)src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java (+2 lines)
Lines 280-285 Link Here
280
				color = getColor(EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND);
280
				color = getColor(EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND);
281
				fContentAssistant.setContextInformationPopupForeground(color);
281
				fContentAssistant.setContextInformationPopupForeground(color);
282
				fContentAssistant.setContextSelectorForeground(color);
282
				fContentAssistant.setContextSelectorForeground(color);
283
284
				fContentAssistant.enableAutoInsert(fPreferenceStore.getBoolean(EditorPreferenceNames.INSERT_SINGLE_SUGGESTION));
283
			}
285
			}
284
			
286
			
285
			// add content assist processors for each partition type
287
			// add content assist processors for each partition type
(-)src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2009 IBM Corporation and others.
2
 * Copyright (c) 2001, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 75-80 Link Here
75
		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)));
75
		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)));
76
		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255)));
76
		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255)));
77
		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0)));
77
		PreferenceConverter.setDefault(store, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND, ColorHelper.findRGB(registry, EditorPreferenceNames.CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0)));
78
		store.setDefault(EditorPreferenceNames.INSERT_SINGLE_SUGGESTION, true);
78
79
79
		store.setDefault(EditorPreferenceNames.SEMANTIC_HIGHLIGHTING, true);
80
		store.setDefault(EditorPreferenceNames.SEMANTIC_HIGHLIGHTING, true);
80
	}
81
	}
(-)src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java (+1 lines)
Lines 205-210 Link Here
205
	public static String StructuredTextEditorPreferencePage_30;
205
	public static String StructuredTextEditorPreferencePage_30;
206
	public static String StructuredTextEditorPreferencePage_37;
206
	public static String StructuredTextEditorPreferencePage_37;
207
	public static String StructuredTextEditorPreferencePage_38;
207
	public static String StructuredTextEditorPreferencePage_38;
208
	public static String StructuredTextEditorPreferencePage_4;
208
	public static String StructuredTextEditorPreferencePage_40;
209
	public static String StructuredTextEditorPreferencePage_40;
209
	public static String StructuredTextEditorPreferencePage_41;
210
	public static String StructuredTextEditorPreferencePage_41;
210
	public static String StructuredTextEditorPreferencePage_42;
211
	public static String StructuredTextEditorPreferencePage_42;
(-)src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties (+1 lines)
Lines 179-184 Link Here
179
StructuredTextEditorPreferencePage_37=Empty input
179
StructuredTextEditorPreferencePage_37=Empty input
180
StructuredTextEditorPreferencePage_38=is not a valid input.
180
StructuredTextEditorPreferencePage_38=is not a valid input.
181
StructuredTextEditorPreferencePage_39=Inform when &unsupported content type is in editor
181
StructuredTextEditorPreferencePage_39=Inform when &unsupported content type is in editor
182
StructuredTextEditorPreferencePage_4=Insert single proposals automatically
182
StructuredTextEditorPreferencePage_40=Also see the <a>''{0}''</a> preferences.
183
StructuredTextEditorPreferencePage_40=Also see the <a>''{0}''</a> preferences.
183
StructuredTextEditorPreferencePage_41=Completion proposal background
184
StructuredTextEditorPreferencePage_41=Completion proposal background
184
StructuredTextEditorPreferencePage_42=Completion proposal foreground
185
StructuredTextEditorPreferencePage_42=Completion proposal foreground
(-)src/org/eclipse/wst/sse/ui/internal/preferences/EditorPreferenceNames.java (-1 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 153-156 Link Here
153
	 * </p>
153
	 * </p>
154
	 */
154
	 */
155
	public final static String SEMANTIC_HIGHLIGHTING = "semanticHighlighting"; //$NON-NLS-1$
155
	public final static String SEMANTIC_HIGHLIGHTING = "semanticHighlighting"; //$NON-NLS-1$
156
157
	/**
158
	 * A named preference that controls whether content assist will automatically insert single suggestions
159
	 * <p>
160
	 * Value is of type <code>Boolean</code>.
161
	 * </p>
162
	 */
163
	public final static String INSERT_SINGLE_SUGGESTION = "insertSingleSuggestion"; //$NON-NLS-1$
156
}
164
}
(-)src/org/eclipse/wst/sse/ui/internal/preferences/ui/StructuredTextEditorPreferencePage.java (-3 / +8 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2009 IBM Corporation and others.
2
 * Copyright (c) 2001, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 158-164 Link Here
158
158
159
		label = SSEUIMessages.StructuredTextEditorPreferencePage_3;
159
		label = SSEUIMessages.StructuredTextEditorPreferencePage_3;
160
		addCheckBox(appearanceComposite, label, AbstractStructuredFoldingStrategy.FOLDING_ENABLED, 0);
160
		addCheckBox(appearanceComposite, label, AbstractStructuredFoldingStrategy.FOLDING_ENABLED, 0);
161
		
161
162
		label = SSEUIMessages.StructuredTextEditorPreferencePage_4;
163
		addCheckBox(appearanceComposite, label, EditorPreferenceNames.INSERT_SINGLE_SUGGESTION, 0);
164
162
		label = SSEUIMessages.StructuredTextEditorPreferencePage_1;
165
		label = SSEUIMessages.StructuredTextEditorPreferencePage_1;
163
		addCheckBox(appearanceComposite, label, EditorPreferenceNames.SEMANTIC_HIGHLIGHTING, 0);
166
		addCheckBox(appearanceComposite, label, EditorPreferenceNames.SEMANTIC_HIGHLIGHTING, 0);
164
167
Lines 296-302 Link Here
296
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG));
299
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.SHOW_UNKNOWN_CONTENT_TYPE_MSG));
297
300
298
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractStructuredFoldingStrategy.FOLDING_ENABLED));
301
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractStructuredFoldingStrategy.FOLDING_ENABLED));
299
		
302
303
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.INSERT_SINGLE_SUGGESTION));
304
300
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.SEMANTIC_HIGHLIGHTING));
305
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, EditorPreferenceNames.SEMANTIC_HIGHLIGHTING));
301
306
302
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND));
307
		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, EditorPreferenceNames.CODEASSIST_PROPOSALS_BACKGROUND));
(-)src/org/eclipse/wst/xml/ui/internal/contentassist/CustomTemplateProposal.java (-2 / +7 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-17 Link Here
12
package org.eclipse.wst.xml.ui.internal.contentassist;
12
package org.eclipse.wst.xml.ui.internal.contentassist;
13
13
14
import org.eclipse.jface.text.IRegion;
14
import org.eclipse.jface.text.IRegion;
15
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4;
15
import org.eclipse.jface.text.templates.Template;
16
import org.eclipse.jface.text.templates.Template;
16
import org.eclipse.jface.text.templates.TemplateContext;
17
import org.eclipse.jface.text.templates.TemplateContext;
17
import org.eclipse.jface.text.templates.TemplateProposal;
18
import org.eclipse.jface.text.templates.TemplateProposal;
Lines 23-29 Link Here
23
 * Purpose of this class is to make the additional proposal info into content
24
 * Purpose of this class is to make the additional proposal info into content
24
 * fit for an HTML viewer (by escaping characters)
25
 * fit for an HTML viewer (by escaping characters)
25
 */
26
 */
26
class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal {
27
class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal, ICompletionProposalExtension4 {
27
	// copies of this class exist in:
28
	// copies of this class exist in:
28
	// org.eclipse.jst.jsp.ui.internal.contentassist
29
	// org.eclipse.jst.jsp.ui.internal.contentassist
29
	// org.eclipse.wst.html.ui.internal.contentassist
30
	// org.eclipse.wst.html.ui.internal.contentassist
Lines 37-40 Link Here
37
		String additionalInfo = super.getAdditionalProposalInfo();
38
		String additionalInfo = super.getAdditionalProposalInfo();
38
		return StringUtils.convertToHTMLContent(additionalInfo);
39
		return StringUtils.convertToHTMLContent(additionalInfo);
39
	}
40
	}
41
42
	public boolean isAutoInsertable() {
43
		return false;
44
	}
40
}
45
}

Return to bug 134073