Révision 781
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NavigationWidget.java (revision 781) | ||
|---|---|---|
| 92 | 92 |
previous.setEnabled(false); |
| 93 | 93 |
|
| 94 | 94 |
// [current] |
| 95 |
currentPosition = new Text(this, SWT.NONE);
|
|
| 95 |
currentPosition = new Text(this, SWT.BORDER);
|
|
| 96 | 96 |
GridData currentPositionLayoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER, SWT.CENTER, true, false); |
| 97 | 97 |
currentPositionLayoutData.minimumWidth = 20; |
| 98 | 98 |
currentPosition.setLayoutData(currentPositionLayoutData); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NewNavigationWidget.java (revision 781) | ||
|---|---|---|
| 39 | 39 |
import org.eclipse.swt.widgets.Composite; |
| 40 | 40 |
import org.eclipse.swt.widgets.Label; |
| 41 | 41 |
import org.eclipse.swt.widgets.Text; |
| 42 |
import org.txm.rcp.IImageKeys; |
|
| 42 | 43 |
import org.txm.rcp.messages.TXMUIMessages; |
| 43 | 44 |
import org.txm.utils.logger.Log; |
| 44 | 45 |
|
| ... | ... | |
| 111 | 112 |
|
| 112 | 113 |
// [|<] |
| 113 | 114 |
first = new Button(this, SWT.PUSH); |
| 114 |
first.setText("|<"); //$NON-NLS-1$
|
|
| 115 |
first.setToolTipText("|<"); //$NON-NLS-1$
|
|
| 115 | 116 |
first.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); |
| 116 | 117 |
first.addSelectionListener(new SelectionListener() {
|
| 117 | 118 |
|
| ... | ... | |
| 130 | 131 |
|
| 131 | 132 |
// [<] |
| 132 | 133 |
prev = new Button(this, SWT.PUSH); |
| 133 |
prev.setText("<"); //$NON-NLS-1$
|
|
| 134 |
prev.setToolTipText("<"); //$NON-NLS-1$
|
|
| 134 | 135 |
prev.addSelectionListener(new SelectionListener() {
|
| 135 | 136 |
|
| 136 | 137 |
@Override |
| ... | ... | |
| 148 | 149 |
|
| 149 | 150 |
|
| 150 | 151 |
// [current] |
| 151 |
currentPositionText = new Text(this, SWT.NONE);
|
|
| 152 |
currentPositionText = new Text(this, SWT.BORDER);
|
|
| 152 | 153 |
GridData currentPositionLayoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER, SWT.CENTER, true, false); |
| 153 | 154 |
currentPositionText.setLayoutData(currentPositionLayoutData); |
| 154 | 155 |
currentPositionText.setTextLimit(6); |
| ... | ... | |
| 181 | 182 |
|
| 182 | 183 |
// [>] |
| 183 | 184 |
next = new Button(this, SWT.PUSH); |
| 184 |
next.setText(">"); //$NON-NLS-1$
|
|
| 185 |
next.setToolTipText(">"); //$NON-NLS-1$
|
|
| 185 | 186 |
next.addSelectionListener(new SelectionListener() {
|
| 186 | 187 |
|
| 187 | 188 |
@Override |
| ... | ... | |
| 200 | 201 |
|
| 201 | 202 |
// [>|] |
| 202 | 203 |
last = new Button(this, SWT.PUSH); |
| 203 |
last.setText(">|"); //$NON-NLS-1$
|
|
| 204 |
last.setToolTipText(">|"); //$NON-NLS-1$
|
|
| 204 | 205 |
last.addSelectionListener(new SelectionListener() {
|
| 205 | 206 |
|
| 206 | 207 |
@Override |
| ... | ... | |
| 216 | 217 |
} |
| 217 | 218 |
}); |
| 218 | 219 |
|
| 220 |
first.setImage(IImageKeys.getImage(IImageKeys.CTRLSTART)); |
|
| 221 |
prev.setImage(IImageKeys.getImage(IImageKeys.CTRLREVERSE)); |
|
| 222 |
next.setImage(IImageKeys.getImage(IImageKeys.CTRLPLAY)); |
|
| 223 |
last.setImage(IImageKeys.getImage(IImageKeys.CTRLEND)); |
|
| 219 | 224 |
|
| 220 | 225 |
} |
| 221 | 226 |
|
| tmp/org.txm.annotation.core/src/org/txm/annotation/core/AnnotationEngines.java (revision 781) | ||
|---|---|---|
| 1 | 1 |
package org.txm.annotation.core; |
| 2 | 2 |
|
| 3 |
import org.eclipse.core.runtime.IConfigurationElement; |
|
| 3 | 4 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 5 |
import org.eclipse.core.runtime.Platform; |
|
| 4 | 6 |
import org.txm.EngineType; |
| 5 | 7 |
import org.txm.EnginesManager; |
| 6 | 8 |
|
| 7 |
public abstract class AnnotationEngines extends EnginesManager<AnnotationEngine> {
|
|
| 9 |
public class AnnotationEngines extends EnginesManager<AnnotationEngine> {
|
|
| 8 | 10 |
|
| 9 | 11 |
public AnnotationEngines() {
|
| 10 | 12 |
|
| ... | ... | |
| 49 | 51 |
@Override |
| 50 | 52 |
protected boolean fetchEngines() {
|
| 51 | 53 |
|
| 52 |
// IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(AnnotationEngine.EXTENSION_POINT_ID);
|
|
| 53 |
// //System.out.println("search engine contributions: "+SearchEngine.EXTENSION_POINT_ID);
|
|
| 54 |
// for (int i = 0; i < contributions.length; i++) {
|
|
| 55 |
// try {
|
|
| 56 |
// AnnotationEngine e = (AnnotationEngine)contributions[i].createExecutableExtension("class"); //$NON-NLS-1$
|
|
| 57 |
// if (e.initialize()) {
|
|
| 58 |
// engines.put(e.getName(), e);
|
|
| 59 |
// } else {
|
|
| 60 |
// System.out.println("Fail to initialize "+e.getName()+" annotation engine.");
|
|
| 61 |
// }
|
|
| 62 |
// } catch(Exception e) {
|
|
| 63 |
// System.out.println("Error: fail instanciate "+contributions[i].getName()+": "+e.getLocalizedMessage());
|
|
| 64 |
// e.printStackTrace();
|
|
| 65 |
// }
|
|
| 66 |
// }
|
|
| 54 |
IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(AnnotationEngine.EXTENSION_POINT_ID); |
|
| 55 |
//System.out.println("search engine contributions: "+SearchEngine.EXTENSION_POINT_ID);
|
|
| 56 |
for (int i = 0; i < contributions.length; i++) {
|
|
| 57 |
try {
|
|
| 58 |
AnnotationEngine e = (AnnotationEngine)contributions[i].createExecutableExtension("class"); //$NON-NLS-1$
|
|
| 59 |
if (e.initialize()) {
|
|
| 60 |
engines.put(e.getName(), e); |
|
| 61 |
} else {
|
|
| 62 |
System.out.println("Fail to initialize "+e.getName()+" annotation engine.");
|
|
| 63 |
} |
|
| 64 |
} catch(Exception e) {
|
|
| 65 |
System.out.println("Error: fail instanciate "+contributions[i].getName()+": "+e.getLocalizedMessage());
|
|
| 66 |
e.printStackTrace(); |
|
| 67 |
} |
|
| 68 |
} |
|
| 67 | 69 |
|
| 68 | 70 |
return engines.size() > 0; |
| 69 | 71 |
} |
| tmp/org.txm.annotation.core/src/org/txm/annotation/core/KRAnnotationEngine.java (revision 781) | ||
|---|---|---|
| 250 | 250 |
|
| 251 | 251 |
@Override |
| 252 | 252 |
public boolean initialize() { // nothing to load right now, the kr and am are lazy
|
| 253 |
return false;
|
|
| 253 |
return true;
|
|
| 254 | 254 |
} |
| 255 | 255 |
|
| 256 | 256 |
@SuppressWarnings("unchecked")
|
| tmp/org.txm.annotation.core/plugin.xml (revision 781) | ||
|---|---|---|
| 16 | 16 |
class="org.txm.annotation.core.preferences.AnnotationPreferences"> |
| 17 | 17 |
</initializer> |
| 18 | 18 |
</extension> |
| 19 |
<extension |
|
| 20 |
point="org.txm.annotation.core.AnnotationEngine"> |
|
| 21 |
<AnnotationEngine |
|
| 22 |
class="org.txm.annotation.core.KRAnnotationEngine"> |
|
| 23 |
</AnnotationEngine> |
|
| 24 |
</extension> |
|
| 19 | 25 |
|
| 20 | 26 |
</plugin> |
Formats disponibles : Unified diff