forked from eclipse-jdt/eclipse.jdt.ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make some internal methods accessible to help Postfix Code Completion
plug-in Bug: 433500 Change-Id: I94ebd51c67d7f7c804d175e33fceb80d6216330d Signed-off-by: Nicolaj Hoess <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* IBM Corporation - initial API and implementation | ||
* Lars Vogel <[email protected]> - [templates][content assist] Ctrl+Space without any starting letter shows to no templates - https://bugs.eclipse.org/406463 | ||
* Lukas Hanke <[email protected]> - [templates][content assist] Content assist for 'for' loop should suggest member variables - https://bugs.eclipse.org/117215 | ||
* Nicolaj Hoess <[email protected]> - Make some internal methods accessible to help Postfix Code Completion plug-in - https://bugs.eclipse.org/433500 | ||
*******************************************************************************/ | ||
package org.eclipse.jdt.internal.corext.template.java; | ||
|
||
|
@@ -759,7 +760,7 @@ public static String evaluateTemplate(Template template, ICompilationUnit compil | |
return buffer.getString(); | ||
} | ||
|
||
TemplateVariable getTemplateVariable(String name) { | ||
public TemplateVariable getTemplateVariable(String name) { | ||
TemplateVariable variable= fVariables.get(name); | ||
if (variable != null && !variable.isResolved()) | ||
getContextType().resolve(variable, this); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2000, 2011 IBM Corporation and others. | ||
* Copyright (c) 2000, 2014 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 | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
* Nicolaj Hoess <[email protected]> - Make some internal methods accessible to help Postfix Code Completion plug-in - https://bugs.eclipse.org/433500 | ||
*******************************************************************************/ | ||
package org.eclipse.jdt.internal.ui.text.template.contentassist; | ||
|
||
|
@@ -148,7 +149,15 @@ public void complete(ITextViewer viewer, int completionPosition, ICompilationUni | |
} | ||
} | ||
|
||
private Image getImage() { | ||
protected TemplateContextType getContextType() { | ||
return fContextType; | ||
} | ||
|
||
protected ArrayList<TemplateProposal> getProposals() { | ||
return fProposals; | ||
} | ||
|
||
protected Image getImage() { | ||
if (fContextType instanceof SWTContextType) | ||
return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_SWT_TEMPLATE); | ||
else | ||
|