blob: 110402e0d3fda2f691e6f14d762622c0849690a5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*******************************************************************************
* Copyright (c) 2007, 2008 Oracle. 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:
* Oracle - initial API and implementation
******************************************************************************/
package org.eclipse.jpt.core.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.JpaNode;
import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.core.internal.context.AbstractJpaContextNode;
import org.eclipse.jpt.utility.internal.Filter;
public abstract class JavaContextModel extends AbstractJpaContextNode implements JavaJpaContextNode
{
// ********** constructor **********
protected JavaContextModel(JpaNode parent) {
super(parent);
}
public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
if (this.isConnected()) {
Iterator<String> result = this.connectedCandidateValuesFor(pos, filter, astRoot);
if (result != null) {
return result;
}
}
return null;
}
/**
* This method is called if the database is connected, allowing us to
* get candidates from the various database tables etc.
* This method should NOT be cascaded to "child" objects; it should
* only return candidates for the current object. The cascading is
* handled by #candidateValuesFor(int, Filter, CompilationUnit).
*/
public Iterator<String> connectedCandidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
return null;
}
}
|