Révision 2569
tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapterFactory.java (revision 2569) | ||
---|---|---|
16 | 16 |
* @author sjacquot |
17 | 17 |
*/ |
18 | 18 |
public abstract class TXMResultAdapterFactory implements IAdapterFactory { |
19 |
|
|
20 |
private static final Class<?>[] ADAPTER_LIST = new Class<?>[] { IWorkbenchAdapter.class, IWorkbenchAdapter2.class};
|
|
21 |
|
|
19 |
|
|
20 |
private static final Class<?>[] ADAPTER_LIST = new Class<?>[] { IWorkbenchAdapter.class, IWorkbenchAdapter2.class };
|
|
21 |
|
|
22 | 22 |
/** |
23 | 23 |
* Gets the adapter list. |
24 | 24 |
* |
... | ... | |
26 | 26 |
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() |
27 | 27 |
*/ |
28 | 28 |
@Override |
29 |
@SuppressWarnings({"rawtypes"}) //$NON-NLS-1$
|
|
29 |
@SuppressWarnings({ "rawtypes" })
|
|
30 | 30 |
public Class[] getAdapterList() { |
31 | 31 |
return ADAPTER_LIST; |
32 | 32 |
} |
33 |
|
|
33 |
|
|
34 | 34 |
/** |
35 | 35 |
* Checks if the factory manage the specified adapter type. |
36 |
* |
|
36 | 37 |
* @param adapterType |
37 | 38 |
* @return |
38 | 39 |
*/ |
39 |
protected boolean canAdapt(Class adapterType) {
|
|
40 |
protected boolean canAdapt(Class adapterType) {
|
|
40 | 41 |
return Arrays.asList(this.getAdapterList()).contains(adapterType); |
41 | 42 |
} |
42 | 43 |
} |
Formats disponibles : Unified diff