1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 02:15:31 +02:00
This commit is contained in:
Alain Magloire 2004-08-12 20:03:00 +00:00
parent df84ae7f47
commit 6f7758e2db
2 changed files with 16 additions and 30 deletions

View file

@ -61,10 +61,12 @@ public class CCompletionContributorManager {
IProject project = context.getProject();
c = desc[i].getCCompletionContributor(project);
}
if (c != null) {
IFunctionSummary f = c.getFunctionInfo(context, name);
if (f != null) {
return f;
}
}
} catch (CoreException e) {
//
}
@ -88,9 +90,7 @@ public class CCompletionContributorManager {
IProject project = context.getProject();
c = desc[i].getCCompletionContributor(project);
}
if (c == null) {
continue;
}
if (c != null) {
IFunctionSummary[] f = c.getMatchingFunctions(context, frag);
if (f != null) {
if (fs == null) {
@ -102,6 +102,7 @@ public class CCompletionContributorManager {
fs = dest;
}
}
}
} catch (CoreException e) {
//
}

View file

@ -37,7 +37,6 @@ public class CCompletionContributorDescriptor {
private IConfigurationElement fConfigurationElement;
private ICCompletionContributor fContributorInstance;
private ITranslationUnit fLastUnit;
private Boolean fStatus;
private boolean fLastResult;
private static final String ID= "id"; //$NON-NLS-1$
@ -47,10 +46,6 @@ public class CCompletionContributorDescriptor {
fConfigurationElement= element;
fContributorInstance= null;
fLastUnit= null;
fStatus= null; // undefined
if (fConfigurationElement.getChildren(ExpressionTagNames.ENABLEMENT).length == 0) {
fStatus= Boolean.TRUE;
}
}
public IStatus checkSyntax() {
@ -63,10 +58,6 @@ public class CCompletionContributorDescriptor {
}
private boolean matches(ITranslationUnit unit) {
if (fStatus != null) {
return fStatus.booleanValue();
}
IConfigurationElement[] children= fConfigurationElement.getChildren(ExpressionTagNames.ENABLEMENT);
if (children.length == 1) {
if (unit.equals(fLastUnit)) {
@ -87,7 +78,6 @@ public class CCompletionContributorDescriptor {
CUIPlugin.getDefault().log(e);
}
}
fStatus= Boolean.FALSE;
return false;
}
@ -118,10 +108,6 @@ public class CCompletionContributorDescriptor {
private boolean matches(IProject project) {
if (fStatus != null) {
return fStatus.booleanValue();
}
IConfigurationElement[] children= fConfigurationElement.getChildren(ExpressionTagNames.ENABLEMENT);
if (children.length == 1 && project != null) {
try {
@ -137,7 +123,6 @@ public class CCompletionContributorDescriptor {
CUIPlugin.getDefault().log(e);
}
}
fStatus= Boolean.FALSE;
return false;
}