Revision b2f59380
Added by Lutz Suhrbier over 12 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/singlesource/org/eclipse/jface/text/PositionFacade.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import javax.naming.OperationNotSupportedException; |
7 | 7 |
|
8 |
import org.apache.log4j.Logger; |
|
9 |
|
|
8 | 10 |
import eu.etaxonomy.taxeditor.singlesource.ImplementationLoader; |
11 |
import eu.etaxonomy.taxeditor.singlesource.editor.key.polytomous.IPolytomousKeyListLabelProvider; |
|
12 |
import eu.etaxonomy.taxeditor.singlesource.editor.key.polytomous.PolytomousKeyListLabelProviderFacade; |
|
9 | 13 |
|
10 | 14 |
/** |
11 | 15 |
* @author lusu |
12 | 16 |
* |
13 | 17 |
*/ |
14 |
public class PositionFacade implements IPosition { |
|
15 |
protected IPosition IMPL; |
|
18 |
public abstract class PositionFacade implements IPosition { |
|
19 |
private static final Logger logger = Logger.getLogger(PositionFacade.class); |
|
20 |
|
|
21 |
private final static IPosition IMPL; |
|
22 |
static { |
|
23 |
IMPL = (IPosition)ImplementationLoader.newInstance(PositionFacade.class) ; |
|
24 |
} |
|
16 | 25 |
|
17 |
/** |
|
18 |
* <p>Constructor for NameViewer.</p> |
|
19 |
* |
|
20 |
* @param parent a {@link org.eclipse.swt.widgets.Composite} object. |
|
21 |
*/ |
|
22 |
public PositionFacade() throws OperationNotSupportedException { |
|
23 |
IMPL = (IPosition)ImplementationLoader.newInstance(PositionFacade.class); |
|
26 |
protected PositionFacade() { |
|
24 | 27 |
} |
28 |
|
|
29 |
public static IPosition getInstance () throws OperationNotSupportedException { |
|
30 |
return (IPosition)IMPL.getInstanceInternal(); |
|
31 |
} |
|
32 |
|
|
33 |
public abstract Object getInstanceInternal(); |
|
25 | 34 |
|
26 |
public PositionFacade(Integer offset) throws OperationNotSupportedException {
|
|
27 |
IMPL = (IPosition)ImplementationLoader.newInstance(PositionFacade.class, offset);
|
|
35 |
public static IPosition getInstance (Integer offset) throws OperationNotSupportedException {
|
|
36 |
return (IPosition)IMPL.getInstanceInternal(offset);
|
|
28 | 37 |
} |
29 | 38 |
|
30 |
public PositionFacade(Integer offset, Integer length) throws OperationNotSupportedException { |
|
31 |
IMPL = (IPosition)ImplementationLoader.newInstance(PositionFacade.class, offset, length); |
|
39 |
public abstract Object getInstanceInternal(Integer offset); |
|
40 |
|
|
41 |
public static IPosition getInstance (Integer offset, Integer length) throws OperationNotSupportedException { |
|
42 |
return (IPosition)IMPL.getInstanceInternal(offset, length); |
|
32 | 43 |
} |
33 | 44 |
|
45 |
public abstract Object getInstanceInternal(Integer offset, Integer length); |
|
34 | 46 |
} |
Also available in: Unified diff
PolytomousKeyListLabelProvider, Position and EditorAnnotation: fixed Single-Source problems