mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug fixes
This commit is contained in:
parent
8a496f8607
commit
1be0c22c6a
3 changed files with 31 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-04-16 Hoda Amer
|
||||||
|
Fix for bug#44364 : [Content Assist] case sensitivity option
|
||||||
|
Fix for bug#53446 : [New Class Wizard] Be able to configure new class wizard to not open source
|
||||||
|
|
||||||
2004-04-16 David Inglis
|
2004-04-16 David Inglis
|
||||||
|
|
||||||
Work in Progress - CPath ui stuff
|
Work in Progress - CPath ui stuff
|
||||||
|
|
|
@ -364,16 +364,16 @@ public class CompletionEngine implements RelevanceConstants {
|
||||||
log("No of Keywords = " + numOfKeywords); //$NON-NLS-1$
|
log("No of Keywords = " + numOfKeywords); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addMacroToCompletions (String macroName){
|
private void addMacroToCompletions (String prefix, String macroName){
|
||||||
int relevance = MACRO_TYPE_RELEVANCE;
|
int relevance = computeRelevance(ICElement.C_MACRO, prefix, macroName);
|
||||||
requestor.acceptMacro(macroName, completionStart, completionLength, relevance);
|
requestor.acceptMacro(macroName, completionStart, completionLength, relevance);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addMacrosToCompletions(Iterator macros){
|
private void addMacrosToCompletions(String prefix, Iterator macros){
|
||||||
int numOfMacros = 0;
|
int numOfMacros = 0;
|
||||||
while (macros.hasNext()){
|
while (macros.hasNext()){
|
||||||
String macro = (String) macros.next();
|
String macro = (String) macros.next();
|
||||||
addMacroToCompletions(macro);
|
addMacroToCompletions(prefix, macro);
|
||||||
numOfMacros++;
|
numOfMacros++;
|
||||||
}
|
}
|
||||||
log("No of Macros = " + numOfMacros); //$NON-NLS-1$
|
log("No of Macros = " + numOfMacros); //$NON-NLS-1$
|
||||||
|
@ -547,7 +547,7 @@ public class CompletionEngine implements RelevanceConstants {
|
||||||
addToCompletions(result);
|
addToCompletions(result);
|
||||||
|
|
||||||
List macros = lookupMacros(completionNode.getCompletionPrefix());
|
List macros = lookupMacros(completionNode.getCompletionPrefix());
|
||||||
addMacrosToCompletions(macros.iterator());
|
addMacrosToCompletions(prefix, macros.iterator());
|
||||||
}
|
}
|
||||||
else // prefix is empty
|
else // prefix is empty
|
||||||
{
|
{
|
||||||
|
@ -602,7 +602,7 @@ public class CompletionEngine implements RelevanceConstants {
|
||||||
IASTScope searchNode = completionNode.getCompletionScope();
|
IASTScope searchNode = completionNode.getCompletionScope();
|
||||||
// only look for macros
|
// only look for macros
|
||||||
List result = lookupMacros(completionNode.getCompletionPrefix());
|
List result = lookupMacros(completionNode.getCompletionPrefix());
|
||||||
addMacrosToCompletions(result.iterator());
|
addMacrosToCompletions(completionNode.getCompletionPrefix(), result.iterator());
|
||||||
}
|
}
|
||||||
private void completionOnNewTypeReference(IASTCompletionNode completionNode){
|
private void completionOnNewTypeReference(IASTCompletionNode completionNode){
|
||||||
// 1. Get the search scope node
|
// 1. Get the search scope node
|
||||||
|
@ -643,7 +643,7 @@ public class CompletionEngine implements RelevanceConstants {
|
||||||
addToCompletions(result);
|
addToCompletions(result);
|
||||||
|
|
||||||
List macros = lookupMacros(completionNode.getCompletionPrefix());
|
List macros = lookupMacros(completionNode.getCompletionPrefix());
|
||||||
addMacrosToCompletions(macros.iterator());
|
addMacrosToCompletions(prefix, macros.iterator());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
|
||||||
public class NewClassWizard extends BasicNewResourceWizard implements INewWizard {
|
public class NewClassWizard extends BasicNewResourceWizard implements INewWizard {
|
||||||
private NewClassWizardPage fPage;
|
private NewClassWizardPage fPage;
|
||||||
private String wz_title;
|
private String wz_title;
|
||||||
|
// a boolean to programatically control opening the sources in the editor
|
||||||
|
private boolean openInEditor = true;
|
||||||
|
|
||||||
private static final String WZ_TITLE = "NewClassWizard.title"; //$NON-NLS-1$
|
private static final String WZ_TITLE = "NewClassWizard.title"; //$NON-NLS-1$
|
||||||
private static final String WZ_DESC = "NewClassWizard.description"; //$NON-NLS-1$
|
private static final String WZ_DESC = "NewClassWizard.description"; //$NON-NLS-1$
|
||||||
|
@ -58,15 +60,19 @@ public class NewClassWizard extends BasicNewResourceWizard implements INewWizard
|
||||||
if (headerTU != null) {
|
if (headerTU != null) {
|
||||||
IResource resource= headerTU.getResource();
|
IResource resource= headerTU.getResource();
|
||||||
selectAndReveal(resource);
|
selectAndReveal(resource);
|
||||||
|
if(doOpenInEditor()){
|
||||||
openResource((IFile) resource);
|
openResource((IFile) resource);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (bodyTU != null) {
|
if (bodyTU != null) {
|
||||||
IResource resource= bodyTU.getResource();
|
IResource resource= bodyTU.getResource();
|
||||||
selectAndReveal(resource);
|
selectAndReveal(resource);
|
||||||
|
if(doOpenInEditor()){
|
||||||
openResource((IFile) resource);
|
openResource((IFile) resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @see Wizard#performFinish
|
* @see Wizard#performFinish
|
||||||
*/
|
*/
|
||||||
|
@ -128,4 +134,16 @@ public class NewClassWizard extends BasicNewResourceWizard implements INewWizard
|
||||||
public ICElement getCreatedClassElement(){
|
public ICElement getCreatedClassElement(){
|
||||||
return fPage.getCreatedClassElement();
|
return fPage.getCreatedClassElement();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the openInEditor.
|
||||||
|
*/
|
||||||
|
public boolean doOpenInEditor() {
|
||||||
|
return openInEditor;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param openInEditor The openInEditor to set.
|
||||||
|
*/
|
||||||
|
public void setOpenInEditor(boolean openInEditor) {
|
||||||
|
this.openInEditor = openInEditor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue