Révision 3604
TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/EditionPanel.java (revision 3604) | ||
---|---|---|
48 | 48 |
import org.txm.rcp.commands.ShowSelected; |
49 | 49 |
import org.txm.rcp.editors.CommandLink; |
50 | 50 |
import org.txm.rcp.editors.TXMBrowserEditor; |
51 |
import org.txm.rcp.editors.menu.PagePropertiesMenu; |
|
51 | 52 |
import org.txm.rcp.utils.IOClipboard; |
52 | 53 |
import org.txm.utils.io.IOUtils; |
53 | 54 |
import org.txm.utils.logger.Log; |
... | ... | |
1561 | 1562 |
public void widgetDefaultSelected(SelectionEvent e) {} |
1562 | 1563 |
}); |
1563 | 1564 |
|
1564 |
MenuItem propertiesItem = new MenuItem(menu, SWT.NONE); |
|
1565 |
propertiesItem.setText("Page properties"); |
|
1566 |
propertiesItem.addSelectionListener(new SelectionListener() { |
|
1567 |
|
|
1568 |
@Override |
|
1569 |
public void widgetSelected(SelectionEvent e) { |
|
1570 |
try { |
|
1571 |
String url = getURL(); |
|
1572 |
if (url.startsWith("http://")) { |
|
1573 |
System.out.println(url); |
|
1574 |
} else { |
|
1575 |
ShowSelected.print(Paths.get(new URL(url).toURI()).toFile()); |
|
1576 |
} |
|
1577 |
} |
|
1578 |
catch (Exception e1) { |
|
1579 |
// TODO Auto-generated catch block |
|
1580 |
e1.printStackTrace(); |
|
1581 |
} |
|
1582 |
} |
|
1583 |
|
|
1584 |
@Override |
|
1585 |
public void widgetDefaultSelected(SelectionEvent e) {} |
|
1586 |
}); |
|
1565 |
MenuItem propertiesItem = new PagePropertiesMenu(getBrowser(), menu, SWT.NONE); |
|
1587 | 1566 |
} |
1588 | 1567 |
|
1589 | 1568 |
@Override |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java (revision 3604) | ||
---|---|---|
1492 | 1492 |
public static String corpusToProcess; |
1493 | 1493 |
|
1494 | 1494 |
public static String textsToProcess; |
1495 |
|
|
1496 |
public static String pageProperties; |
|
1495 | 1497 |
|
1496 | 1498 |
static { |
1497 | 1499 |
// initialize resource bundle |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 3604) | ||
---|---|---|
742 | 742 |
YouReGoingToLostThoseModificationsIfNotAlreadyExportedContinue=You're going to lose your manual modifications of the result. Continue? |
743 | 743 |
zoomInAmpoutColonMouseWheelORShiftPlusRightMousePlusDrag=\ Zoom +/-\: Mouse wheel OR Shift + Right Mouse + Drag |
744 | 744 |
zoomToSelectionColonCtrlPlusLeftMousePlusdrag=\ Zoom to selection\: Ctrl + Left Mouse + Drag |
745 |
pageProperties=Page properties |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 3604) | ||
---|---|---|
743 | 743 |
YouReGoingToLostThoseModificationsIfNotAlreadyExportedContinue=Vous allez perdre vos modifications manuelles du résultat. Continuer ? |
744 | 744 |
zoomInAmpoutColonMouseWheelORShiftPlusRightMousePlusDrag=\ Zoom +/- \: Roulette OU Maj + Clic Droit + Glisser |
745 | 745 |
zoomToSelectionColonCtrlPlusLeftMousePlusdrag=\ Zoomer sur la sélection \: Ctrl + Clic Gauche + Glisser |
746 |
pageProperties=Propriétés de la page |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMBrowserEditor.java (revision 3604) | ||
---|---|---|
53 | 53 |
import org.eclipse.ui.internal.browser.BrowserViewer; |
54 | 54 |
import org.eclipse.ui.internal.browser.WebBrowserEditor; |
55 | 55 |
import org.txm.rcp.commands.ShowSelected; |
56 |
import org.txm.rcp.editors.menu.PagePropertiesMenu; |
|
56 | 57 |
import org.txm.rcp.messages.TXMUIMessages; |
57 | 58 |
import org.txm.rcp.utils.IOClipboard; |
58 | 59 |
|
... | ... | |
290 | 291 |
public void widgetDefaultSelected(SelectionEvent e) {} |
291 | 292 |
}); |
292 | 293 |
|
293 |
MenuItem propertiesItem = new MenuItem(menu, SWT.NONE); |
|
294 |
propertiesItem.setText(TXMUIMessages.Properties); |
|
295 |
propertiesItem.addSelectionListener(new SelectionListener() { |
|
296 |
|
|
297 |
@Override |
|
298 |
public void widgetSelected(SelectionEvent e) { |
|
299 |
|
|
300 |
ShowSelected.print(new File(TXMBrowserEditor.this.getBrowser().getUrl())); |
|
301 |
} |
|
302 |
|
|
303 |
@Override |
|
304 |
public void widgetDefaultSelected(SelectionEvent e) {} |
|
305 |
}); |
|
294 |
MenuItem propertiesItem = new PagePropertiesMenu(getBrowser(), menu, SWT.NONE); |
|
306 | 295 |
} |
307 | 296 |
|
308 | 297 |
@Override |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/menu/PagePropertiesMenu.java (revision 3604) | ||
---|---|---|
1 |
package org.txm.rcp.editors.menu; |
|
2 |
|
|
3 |
import java.net.URL; |
|
4 |
import java.nio.file.Paths; |
|
5 |
|
|
6 |
import org.eclipse.swt.SWT; |
|
7 |
import org.eclipse.swt.browser.Browser; |
|
8 |
import org.eclipse.swt.events.SelectionEvent; |
|
9 |
import org.eclipse.swt.events.SelectionListener; |
|
10 |
import org.eclipse.swt.widgets.Menu; |
|
11 |
import org.eclipse.swt.widgets.MenuItem; |
|
12 |
import org.txm.rcp.commands.ShowSelected; |
|
13 |
import org.txm.rcp.messages.TXMUIMessages; |
|
14 |
|
|
15 |
public class PagePropertiesMenu extends MenuItem { |
|
16 |
|
|
17 |
Browser browser; |
|
18 |
|
|
19 |
public PagePropertiesMenu(Browser browser, Menu menu, int style) { |
|
20 |
|
|
21 |
super(menu, style); |
|
22 |
|
|
23 |
this.browser = browser; |
|
24 |
this.setText(TXMUIMessages.pageProperties); |
|
25 |
this.addSelectionListener(new SelectionListener() { |
|
26 |
|
|
27 |
@Override |
|
28 |
public void widgetSelected(SelectionEvent e) { |
|
29 |
try { |
|
30 |
String url = browser.getUrl(); |
|
31 |
if (url.startsWith("http://") || url.startsWith("https://")) { |
|
32 |
System.out.println("URL="+url); |
|
33 |
} else { |
|
34 |
ShowSelected.print(Paths.get(new URL(url).toURI()).toFile()); |
|
35 |
} |
|
36 |
} |
|
37 |
catch (Exception e1) { |
|
38 |
// TODO Auto-generated catch block |
|
39 |
e1.printStackTrace(); |
|
40 |
} |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public void widgetDefaultSelected(SelectionEvent e) {} |
|
45 |
}); |
|
46 |
} |
|
47 |
|
|
48 |
/* |
|
49 |
* (non-Javadoc) |
|
50 |
* @see org.eclipse.swt.widgets.Combo#checkSubclass() |
|
51 |
*/ |
|
52 |
@Override |
|
53 |
protected void checkSubclass() { |
|
54 |
|
|
55 |
} |
|
56 |
} |
|
0 | 57 |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java (revision 3604) | ||
---|---|---|
30 | 30 |
import java.util.Deque; |
31 | 31 |
import java.util.LinkedList; |
32 | 32 |
|
33 |
import org.eclipse.swt.layout.GridData; |
|
34 | 33 |
import org.eclipse.swt.widgets.Combo; |
35 | 34 |
import org.eclipse.swt.widgets.Composite; |
36 | 35 |
import org.txm.searchengine.core.IQuery; |
TXM/trunk/org.txm.rcp/META-INF/MANIFEST.MF (revision 3604) | ||
---|---|---|
56 | 56 |
org.junit.runners, |
57 | 57 |
org.junit.runners.model, |
58 | 58 |
org.txm.rcp, |
59 |
org.txm.rcp.InstallationPage, |
|
59 | 60 |
org.txm.rcp.actions, |
60 | 61 |
org.txm.rcp.adapters, |
61 | 62 |
org.txm.rcp.commands, |
... | ... | |
70 | 71 |
org.txm.rcp.editors.imports.sections, |
71 | 72 |
org.txm.rcp.editors.input, |
72 | 73 |
org.txm.rcp.editors.listeners, |
74 |
org.txm.rcp.editors.menu, |
|
73 | 75 |
org.txm.rcp.handlers, |
74 | 76 |
org.txm.rcp.handlers.export, |
75 | 77 |
org.txm.rcp.handlers.files, |
Formats disponibles : Unified diff