Revision 43099
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/MDIFrame.java | ||
---|---|---|
298 | 298 |
super.setTitle(titlePrefix + " : " + title); |
299 | 299 |
} |
300 | 300 |
|
301 |
private SelectableToolBar getToolBar(final String toolBarName) { |
|
301 |
private SelectableToolBar getToolBar(final String toolBarName, String pluginName) {
|
|
302 | 302 |
SelectableToolBar jtb = (SelectableToolBar) toolBarMap.get(toolBarName); |
303 | 303 |
if ( jtb == null ) { |
304 | 304 |
jtb = new SelectableToolBar(toolBarName); |
... | ... | |
310 | 310 |
return jtb; |
311 | 311 |
} |
312 | 312 |
|
313 |
public SelectableToolBar addToolBar(final String toolBarName, String description, int position) { |
|
314 |
SelectableToolBar toolBar = (SelectableToolBar) toolBarMap.get(toolBarName); |
|
315 |
if( toolBar == null ) { |
|
316 |
toolBar = new SelectableToolBar(toolBarName, description, position); |
|
317 |
toolBar.setRollover(true); |
|
318 |
toolBar.setAndamiVisibility(true); |
|
319 |
toolBarMap.put(toolBarName, toolBar); |
|
320 |
toolBars.add(toolBar); |
|
321 |
|
|
322 |
} else if( toolBar.getPosition() < 1 ) { |
|
323 |
toolBar.setPosition(position); |
|
324 |
|
|
325 |
} else if( toolBar.getPosition() != position ) { |
|
326 |
logger.warn("Add duplicate tool-bar ("+toolBarName+") with diferent position."); |
|
327 |
} |
|
328 |
|
|
329 |
return toolBar; |
|
330 |
} |
|
331 |
|
|
313 | 332 |
public void addTool(final PluginClassLoader loader, final SkinExtensionType ext, |
314 | 333 |
final ToolBar toolBar, final SelectableTool selectableTool) |
315 | 334 |
throws ClassNotFoundException { |
... | ... | |
330 | 349 |
return; |
331 | 350 |
} |
332 | 351 |
String name = toolBar.getName(); |
333 |
SelectableToolBar jtb = getToolBar(name); |
|
352 |
SelectableToolBar jtb = getToolBar(name, loader.getPluginName());
|
|
334 | 353 |
if( selectableTool.getDropDownGroup()!=null ) { |
335 | 354 |
ActionInfoManager actionManager = PluginsLocator.getActionInfoManager(); |
336 | 355 |
ActionInfo action = actionManager.getAction(selectableTool.getName()); |
... | ... | |
422 | 441 |
} |
423 | 442 |
|
424 | 443 |
String name = toolBar.getName(); |
425 |
SelectableToolBar jtb = getToolBar(name); |
|
444 |
SelectableToolBar jtb = getToolBar(name, loader.getPluginName());
|
|
426 | 445 |
if( actionTool.getDropDownGroup()!=null ) { |
427 | 446 |
ActionInfoManager actionManager = PluginsLocator.getActionInfoManager(); |
428 | 447 |
ActionInfo action = actionManager.getAction(actionTool.getName()); |
... | ... | |
487 | 506 |
}); |
488 | 507 |
return; |
489 | 508 |
} |
490 |
SelectableToolBar jtb = getToolBar(toolBarName); |
|
509 |
SelectableToolBar jtb = getToolBar(toolBarName, action.getPluginName());
|
|
491 | 510 |
DropDownButton dropDownButton = (DropDownButton) jtb.findComponent(dropDownName); |
492 | 511 |
if( dropDownButton == null ) { |
493 | 512 |
dropDownButton = new DropDownButton(); |
... | ... | |
528 | 547 |
btn.setToolTipKey(action.getTooltip()); |
529 | 548 |
} |
530 | 549 |
|
531 |
SelectableToolBar jtb = getToolBar(toolBarName); |
|
550 |
SelectableToolBar jtb = getToolBar(toolBarName, action.getPluginName());
|
|
532 | 551 |
jtb.add(btn); |
533 | 552 |
|
534 | 553 |
addControl(btn); |
... | ... | |
573 | 592 |
btn.setToolTipKey(action.getTooltip()); |
574 | 593 |
} |
575 | 594 |
|
576 |
SelectableToolBar jtb = getToolBar(toolBarName); |
|
595 |
SelectableToolBar jtb = getToolBar(toolBarName, action.getPluginName());
|
|
577 | 596 |
jtb.addButton(group, btn); |
578 | 597 |
|
579 | 598 |
addControl(btn); |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/SelectableToolBar.java | ||
---|---|---|
41 | 41 |
* hidden even if its associated extension is visible. |
42 | 42 |
*/ |
43 | 43 |
private boolean _visible; |
44 |
private int position; |
|
45 |
private String description; |
|
44 | 46 |
|
45 | 47 |
/** |
46 | 48 |
* Creates a new SelectableToolBar object. |
... | ... | |
48 | 50 |
* @param titulo T?tulo de la barra |
49 | 51 |
*/ |
50 | 52 |
public SelectableToolBar(String titulo) { |
53 |
this(titulo,null,0); |
|
54 |
} |
|
55 |
|
|
56 |
public SelectableToolBar(String titulo, String description, int position) { |
|
51 | 57 |
super(titulo); |
58 |
this.description = description; |
|
59 |
this.position = position; |
|
52 | 60 |
} |
53 | 61 |
|
62 |
public int getPosition() { |
|
63 |
return this.position; |
|
64 |
} |
|
65 |
|
|
66 |
public void setPosition(int position) { |
|
67 |
this.position = position; |
|
68 |
} |
|
69 |
|
|
70 |
public String getDescription() { |
|
71 |
return this.description; |
|
72 |
} |
|
73 |
|
|
54 | 74 |
/** |
55 | 75 |
* A?ade un boton a la caja |
56 | 76 |
* |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/plugins/config/generate/ToolBarDescriptor.java | ||
---|---|---|
125 | 125 |
fieldValidator.setValidator(typeValidator); |
126 | 126 |
} |
127 | 127 |
desc.setValidator(fieldValidator); |
128 |
|
|
129 |
//-- _description |
|
130 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Attribute); |
|
131 |
desc.setImmutable(true); |
|
132 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
133 |
public java.lang.Object getValue( java.lang.Object object ) |
|
134 |
throws IllegalStateException |
|
135 |
{ |
|
136 |
ToolBar target = (ToolBar) object; |
|
137 |
return target.getDescription(); |
|
138 |
} |
|
139 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
140 |
throws IllegalStateException, IllegalArgumentException |
|
141 |
{ |
|
142 |
try { |
|
143 |
ToolBar target = (ToolBar) object; |
|
144 |
target.setDescription((java.lang.String) value); |
|
145 |
} |
|
146 |
catch (java.lang.Exception ex) { |
|
147 |
throw new IllegalStateException(ex.toString()); |
|
148 |
} |
|
149 |
} |
|
150 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
151 |
return null; |
|
152 |
} |
|
153 |
} ); |
|
154 |
desc.setHandler(handler); |
|
155 |
desc.setRequired(false); |
|
156 |
addFieldDescriptor(desc); |
|
157 |
|
|
158 |
//-- validation code for: _description |
|
159 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
160 |
{ //-- local scope |
|
161 |
StringValidator typeValidator = new StringValidator(); |
|
162 |
typeValidator.setWhiteSpace("preserve"); |
|
163 |
fieldValidator.setValidator(typeValidator); |
|
164 |
} |
|
165 |
desc.setValidator(fieldValidator); |
|
166 |
|
|
167 |
|
|
128 | 168 |
//-- _position |
129 | 169 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
130 | 170 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/plugins/config/generate/ToolBar.java | ||
---|---|---|
62 | 62 |
* Field _name |
63 | 63 |
*/ |
64 | 64 |
private java.lang.String _name; |
65 |
|
|
66 |
private java.lang.String _description; |
|
65 | 67 |
|
66 | 68 |
/** |
67 | 69 |
* Field _position |
68 | 70 |
*/ |
69 |
private int _position = 50;
|
|
71 |
private int _position = 0; |
|
70 | 72 |
|
71 | 73 |
/** |
72 | 74 |
* keeps track of state for field: _position |
... | ... | |
393 | 395 |
} //-- java.lang.String getName() |
394 | 396 |
|
395 | 397 |
/** |
398 |
* Returns the value of field 'name'. |
|
399 |
* |
|
400 |
* @return the value of field 'name'. |
|
401 |
*/ |
|
402 |
public java.lang.String getDescription() |
|
403 |
{ |
|
404 |
return this._description; |
|
405 |
} //-- java.lang.String getName() |
|
406 |
|
|
407 |
/** |
|
396 | 408 |
* Returns the value of field 'position'. |
397 | 409 |
* |
398 | 410 |
* @return the value of field 'position'. |
... | ... | |
685 | 697 |
} //-- void setName(java.lang.String) |
686 | 698 |
|
687 | 699 |
/** |
700 |
* Sets the value of field 'name'. |
|
701 |
* |
|
702 |
* @param name the value of field 'name'. |
|
703 |
*/ |
|
704 |
public void setDescription(java.lang.String description) |
|
705 |
{ |
|
706 |
this._description = description; |
|
707 |
} //-- void setName(java.lang.String) |
|
708 |
|
|
709 |
/** |
|
688 | 710 |
* Sets the value of field 'position'. |
689 | 711 |
* |
690 | 712 |
* @param position the value of field 'position'. |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/Launcher.java | ||
---|---|---|
1846 | 1846 |
return menuItems; |
1847 | 1847 |
} |
1848 | 1848 |
|
1849 |
private List<ToolBar> getOrderedToolBars() { |
|
1850 |
Map<String, ToolBar> toolbars = new HashMap<>(); |
|
1851 |
|
|
1852 |
Iterator<String> pluginNames = pluginsConfig.keySet().iterator(); |
|
1853 |
while (pluginNames.hasNext()) { |
|
1854 |
String pluginName = pluginNames.next(); |
|
1855 |
String extensionName = "unknow"; |
|
1856 |
try { |
|
1857 |
PluginConfig pc = pluginsConfig.get(pluginName); |
|
1858 |
Extension[] extensions = pc.getExtensions().getExtension(); |
|
1859 |
for (Extension extension : extensions) { |
|
1860 |
extensionName = extension.getClassName(); |
|
1861 |
ToolBar[] extensionToolbars = extension.getToolBar(); |
|
1862 |
for (ToolBar toolbar : extensionToolbars) { |
|
1863 |
ToolBar x = toolbars.get(toolbar.getName()); |
|
1864 |
if ( x!=null ) { |
|
1865 |
if( !x.hasPosition() && toolbar.hasPosition() ) { |
|
1866 |
toolbars.put(toolbar.getName(), toolbar); |
|
1867 |
} |
|
1868 |
} else { |
|
1869 |
toolbars.put(toolbar.getName(), toolbar); |
|
1870 |
} |
|
1871 |
} |
|
1872 |
} |
|
1873 |
} catch (Exception ex) { |
|
1874 |
addError("Can't process tool-bars of extension '"+extensionName+"'.", ex); |
|
1875 |
} |
|
1876 |
} |
|
1877 |
List<ToolBar> toolBarsList = new ArrayList<>(toolbars.values()); |
|
1878 |
Collections.sort(toolBarsList, new Comparator<ToolBar>() { |
|
1879 |
|
|
1880 |
@Override |
|
1881 |
public int compare(ToolBar o1, ToolBar o2) { |
|
1882 |
return Integer.compare(o1.getPosition(), o2.getPosition()); |
|
1883 |
} |
|
1884 |
}); |
|
1885 |
return toolBarsList; |
|
1886 |
} |
|
1887 |
|
|
1849 | 1888 |
/** |
1850 | 1889 |
* Installs the menus, toolbars, actiontools, selectable toolbars and |
1851 | 1890 |
* combos. The order in which they are shown is determined here. |
... | ... | |
1853 | 1892 |
private void installPluginsControls() { |
1854 | 1893 |
logger.info("installPluginsControls (toolbars)"); |
1855 | 1894 |
|
1856 |
Iterator<String> i = pluginsConfig.keySet().iterator();
|
|
1895 |
Iterator<String> pluginNames = pluginsConfig.keySet().iterator();
|
|
1857 | 1896 |
|
1858 | 1897 |
Map<Extension, PluginServices> extensionPluginServices = new HashMap<Extension, PluginServices>(); |
1859 | 1898 |
Map<Extension, PluginConfig> extensionPluginConfig = new HashMap<Extension, PluginConfig>(); |
... | ... | |
1864 | 1903 |
// We need to iterate on the plugins, and iterate on each plugin's |
1865 | 1904 |
// extensions |
1866 | 1905 |
// (each plugin may contain one or more extensions) |
1867 |
while (i.hasNext()) { // iterate on the plugins
|
|
1868 |
String pName = i.next();
|
|
1906 |
while (pluginNames.hasNext()) { // iterate on the plugins
|
|
1907 |
String pluginName = pluginNames.next();
|
|
1869 | 1908 |
try { |
1870 |
PluginConfig pc = pluginsConfig.get(pName); |
|
1871 |
PluginServices ps = pluginsServices.get(pName); |
|
1909 |
PluginConfig pc = pluginsConfig.get(pluginName);
|
|
1910 |
PluginServices ps = pluginsServices.get(pluginName);
|
|
1872 | 1911 |
|
1873 | 1912 |
Extension[] exts = pc.getExtensions().getExtension(); |
1874 | 1913 |
|
... | ... | |
1893 | 1932 |
} |
1894 | 1933 |
} catch (Throwable e) { |
1895 | 1934 |
addError("Error initializing controls of plugin '" |
1896 |
+ pName + "' extension '" + cname + "'", e); |
|
1935 |
+ pluginName + "' extension '" + cname + "'", e);
|
|
1897 | 1936 |
} |
1898 | 1937 |
} |
1899 | 1938 |
} catch (Throwable e) { |
1900 |
addError("Error initializing controls of plugin '" + pName |
|
1939 |
addError("Error initializing controls of plugin '" + pluginName
|
|
1901 | 1940 |
+ "'", e); |
1902 | 1941 |
} |
1903 | 1942 |
} |
1904 | 1943 |
|
1944 |
|
|
1945 |
// A?ade primero las toolbars ordenadas para garantizar el orden de estas |
|
1946 |
for( ToolBar toolbar : getOrderedToolBars() ) { |
|
1947 |
frame.addToolBar(toolbar.getName(), toolbar.getDescription(), toolbar.getPosition()); |
|
1948 |
} |
|
1949 |
|
|
1905 | 1950 |
TreeSet<SortableTool> orderedTools = new TreeSet<SortableTool>( |
1906 | 1951 |
new ToolComparator()); |
1907 | 1952 |
Iterator<Extension> e = orderedExtensions.iterator(); |
... | ... | |
2039 | 2084 |
|
2040 | 2085 |
// Add the tools from MDI extensions to the ordered tool-list, so that |
2041 | 2086 |
// we get a sorted list containing all the tools |
2042 |
i = pluginsConfig.keySet().iterator();
|
|
2043 |
while (i.hasNext()) {
|
|
2044 |
String pName = (String) i.next();
|
|
2087 |
pluginNames = pluginsConfig.keySet().iterator();
|
|
2088 |
while (pluginNames.hasNext()) {
|
|
2089 |
String pName = (String) pluginNames.next();
|
|
2045 | 2090 |
try { |
2046 | 2091 |
PluginConfig pc = (PluginConfig) pluginsConfig.get(pName); |
2047 | 2092 |
PluginServices ps = (PluginServices) pluginsServices.get(pName); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.daltransform.app/org.gvsig.daltransform.app.eventtheme/src/main/resources-plugin/config.xml | ||
---|---|---|
52 | 52 |
text="View/Anadir_capa_de_eventos" |
53 | 53 |
/> |
54 | 54 |
|
55 |
<tool-bar name="view" position="30015">
|
|
55 |
<tool-bar name="view"> |
|
56 | 56 |
<action-tool name="view-event-theme-add"/> |
57 | 57 |
</tool-bar> |
58 | 58 |
|
... | ... | |
60 | 60 |
</extensions> |
61 | 61 |
|
62 | 62 |
|
63 |
</plugin-config> |
|
63 |
</plugin-config> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.datalocator.app/org.gvsig.datalocator.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
48 | 48 |
text="View/Navigation/Localizador_por_atributo" |
49 | 49 |
/> |
50 | 50 |
|
51 |
<tool-bar name="view_navigation" position="3">
|
|
51 |
<tool-bar name="view_navigation">
|
|
52 | 52 |
<action-tool name="view-navigation-locator-by-attribute"/> |
53 | 53 |
</tool-bar> |
54 | 54 |
|
55 | 55 |
</extension> |
56 | 56 |
</extensions> |
57 |
</plugin-config> |
|
57 |
</plugin-config> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geometrymeasurement.app/org.gvsig.geometrymeasurement.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
43 | 43 |
|
44 | 44 |
<menu name="table-add-area" text="Table/_Add_measurement/area" /> |
45 | 45 |
|
46 |
<tool-bar name="table-add-measurement">
|
|
46 |
<tool-bar name="table_tools_addmeasurement">
|
|
47 | 47 |
<action-tool name="table-add-area"/> |
48 | 48 |
</tool-bar> |
49 | 49 |
</extension> |
... | ... | |
61 | 61 |
|
62 | 62 |
<menu name="table-add-perimeter" text="Table/_Add_measurement/perimeter" /> |
63 | 63 |
|
64 |
<tool-bar name="table-add-measurement">
|
|
64 |
<tool-bar name="table_tools_addmeasurement">
|
|
65 | 65 |
<action-tool name="table-add-perimeter"/> |
66 | 66 |
</tool-bar> |
67 | 67 |
</extension> |
... | ... | |
79 | 79 |
|
80 | 80 |
<menu name="table-add-xy" text="Table/_Add_measurement/add_x_y" /> |
81 | 81 |
|
82 |
<tool-bar name="table-add-measurement">
|
|
82 |
<tool-bar name="table_tools_addmeasurement">
|
|
83 | 83 |
<action-tool name="table-add-xy"/> |
84 | 84 |
</tool-bar> |
85 | 85 |
</extension> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/develtools/ActionsInfoDevelTool.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.app.extension.develtools; |
25 | 25 |
|
26 |
import java.awt.Component; |
|
27 |
import java.util.Arrays; |
|
28 |
import java.util.Comparator; |
|
26 | 29 |
import java.util.Iterator; |
27 |
|
|
28 | 30 |
import org.gvsig.andami.PluginsLocator; |
29 | 31 |
import org.gvsig.andami.actioninfo.ActionInfo; |
32 |
import org.gvsig.andami.actioninfo.ActionInfoManager; |
|
33 |
import org.gvsig.andami.ui.mdiFrame.MainFrame; |
|
34 |
import org.gvsig.andami.ui.mdiFrame.SelectableToolBar; |
|
30 | 35 |
import org.gvsig.app.ApplicationLocator; |
31 | 36 |
import org.gvsig.app.ApplicationManager; |
32 | 37 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
... | ... | |
39 | 44 |
InfoPanel.save2file("actions-report", html); |
40 | 45 |
InfoPanel.showPanel("Actions information", WindowManager.MODE.WINDOW, html); |
41 | 46 |
} |
47 |
|
|
48 |
public void showToolBars() { |
|
49 |
ActionInfoManager actionsManager = PluginsLocator.getActionInfoManager(); |
|
50 |
MainFrame mainFrame = ApplicationLocator.getManager().getMainFrame(); |
|
51 |
SelectableToolBar[] toolbars = mainFrame.getToolbars(); |
|
52 |
Arrays.sort(toolbars, new Comparator<SelectableToolBar>() { |
|
53 |
@Override |
|
54 |
public int compare(SelectableToolBar o1, SelectableToolBar o2) { |
|
55 |
return Integer.compare(o1.getPosition(), o2.getPosition()); |
|
56 |
} |
|
57 |
}); |
|
58 |
|
|
59 |
StringBuilder buffer = new StringBuilder(); |
|
42 | 60 |
|
61 |
buffer.append("<html>\n"); |
|
62 |
buffer.append("<body>\n"); |
|
63 |
|
|
64 |
buffer.append("<div>\n"); |
|
65 |
buffer.append("<h2>Toolbars information</h2>\n"); |
|
66 |
buffer.append("<br>\n"); |
|
67 |
|
|
68 |
buffer.append("<table border=\"0\">\n"); |
|
69 |
buffer.append(" <tr>\n"); |
|
70 |
buffer.append(" <td>Position</td>\n"); |
|
71 |
buffer.append(" <td>Name</td>\n"); |
|
72 |
buffer.append(" <td>Plugin</td>\n"); |
|
73 |
buffer.append(" </tr>\n"); |
|
74 |
for (SelectableToolBar toolBar : toolbars) { |
|
75 |
buffer.append(" <tr valign=\"top\">\n"); |
|
76 |
buffer.append(" <td>") |
|
77 |
.append(toolBar.getPosition()) |
|
78 |
.append("</td>\n"); |
|
79 |
buffer.append(" <td colspan=\"2\"><b>") |
|
80 |
.append(toolBar.getName()) |
|
81 |
.append("</b> - ") |
|
82 |
.append(toolBar.getDescription()) |
|
83 |
.append("</td>\n"); |
|
84 |
buffer.append(" </tr>\n"); |
|
85 |
Component item;; |
|
86 |
for( int i=0; (item=toolBar.getComponentAtIndex(i))!=null; i++) { |
|
87 |
String name = item.getName(); |
|
88 |
ActionInfo action = null; |
|
89 |
if( name!=null ) { |
|
90 |
action = actionsManager.getAction(name); |
|
91 |
} |
|
92 |
buffer.append(" <tr valign=\"top\">\n"); |
|
93 |
buffer.append(" <td></td>\n"); |
|
94 |
buffer.append(" <td>"); |
|
95 |
buffer.append(name); |
|
96 |
buffer.append(" </td>\n"); |
|
97 |
buffer.append(" <td>"); |
|
98 |
if( action!=null ) { |
|
99 |
buffer.append(action.getPluginName()); |
|
100 |
} |
|
101 |
buffer.append("</td>\n"); |
|
102 |
buffer.append(" </tr>\n"); |
|
103 |
} |
|
104 |
} |
|
105 |
buffer.append("</table>\n"); |
|
106 |
buffer.append("</div>\n"); |
|
107 |
buffer.append("</body>\n"); |
|
108 |
buffer.append("</html>\n"); |
|
109 |
|
|
110 |
String html = buffer.toString(); |
|
111 |
InfoPanel.save2file("toolbars-report", html); |
|
112 |
InfoPanel.showPanel("Toolbars report", WindowManager.MODE.WINDOW, html); |
|
113 |
} |
|
114 |
|
|
43 | 115 |
public void showReportOfPlugin() { |
44 | 116 |
ApplicationManager application = ApplicationLocator.getManager(); |
45 | 117 |
String pluginName = null; |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ShowDevelInfoExtension.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.app.extension; |
25 | 25 |
|
26 |
import org.gvsig.andami.PluginsLocator; |
|
27 |
import org.gvsig.andami.actioninfo.ActionInfo; |
|
28 |
import org.gvsig.andami.actioninfo.ActionInfoManager; |
|
29 | 26 |
import org.gvsig.andami.plugins.Extension; |
30 | 27 |
import org.gvsig.app.extension.develtools.ActionsInfoDevelTool; |
31 | 28 |
import org.gvsig.app.extension.develtools.IconThemeDevelTool; |
... | ... | |
39 | 36 |
|
40 | 37 |
public class ShowDevelInfoExtension extends Extension { |
41 | 38 |
|
42 |
private static Logger logger = LoggerFactory |
|
39 |
private static final Logger logger = LoggerFactory
|
|
43 | 40 |
.getLogger(ShowDevelInfoExtension.class); |
44 | 41 |
|
42 |
@Override |
|
45 | 43 |
public void initialize() { |
46 | 44 |
// Do nothing |
47 | 45 |
} |
48 | 46 |
|
47 |
@Override |
|
49 | 48 |
public void postInitialize() { |
50 | 49 |
super.postInitialize(); |
51 | 50 |
// ActionInfoManager actionMgr = PluginsLocator.getActionInfoManager(); |
... | ... | |
63 | 62 |
|
64 | 63 |
} |
65 | 64 |
|
65 |
@Override |
|
66 | 66 |
public void execute(String actionCommand) { |
67 | 67 |
if ("tools-devel-show-persistencefactories".equalsIgnoreCase(actionCommand)) { |
68 | 68 |
new PersistenceDevelTool().showPersistenceFactories(); |
... | ... | |
70 | 70 |
new IconThemeDevelTool().showDefaultIconTheme(); |
71 | 71 |
} else if ("tools-devel-show-actions".equalsIgnoreCase(actionCommand)) { |
72 | 72 |
new ActionsInfoDevelTool().showActions(); |
73 |
} else if ("tools-devel-show-toolbars".equalsIgnoreCase(actionCommand)) { |
|
74 |
new ActionsInfoDevelTool().showToolBars(); |
|
73 | 75 |
} else if ("tools-devel-show-menus".equalsIgnoreCase(actionCommand)) { |
74 | 76 |
new MenusDevelTool().showAllMenus(); |
75 | 77 |
} else if ("tools-devel-show-menus-by-plugin".equalsIgnoreCase(actionCommand)) { |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
212 | 212 |
name="application-project-saveas" |
213 | 213 |
/> |
214 | 214 |
|
215 |
<tool-bar name="project" position="1"> |
|
215 |
<tool-bar name="project" position="100" description="Project management tools">
|
|
216 | 216 |
<action-tool name="application-project-new"/> |
217 | 217 |
<action-tool name="application-project-open"/> |
218 | 218 |
<action-tool name="application-project-save"/> |
219 | 219 |
</tool-bar> |
220 |
|
|
221 |
<tool-bar name="view" position="200" description="Add layers to the view tools"/> |
|
222 |
<tool-bar name="view_navigation" position="300" description="Tools to navigate in the view"/> |
|
223 |
<tool-bar name="view_tools" position="400" description="Generics tools for the view"/> |
|
224 |
<tool-bar name="view_tools_query" position="500" description="Query tools for the view"/> |
|
225 |
<tool-bar name="selection" position="600" description="Selection tools for the view"/> |
|
226 |
<tool-bar name="table" position="700" description="Core table tools"/> |
|
227 |
<tool-bar name="table_tools" position="800" description="Generic tools for the table"/> |
|
228 |
<tool-bar name="table_tools_addmeasurement" position="900"/> |
|
229 |
<tool-bar name="edit" position="1000" description="Edit/copy/paste/undo/redo tools"/> |
|
230 |
<tool-bar name="editing" position="1100" description="Tools for editing, start/end editing and vectorial tools"/> |
|
231 |
<tool-bar name="core" position="10000" description="Core tools like preferences or console of errores"/> |
|
232 |
|
|
220 | 233 |
</extension> |
221 | 234 |
|
222 | 235 |
<extension class-name="org.gvsig.app.extension.ViewProjectWindow" |
... | ... | |
263 | 276 |
name="view-layer-add" |
264 | 277 |
text="View/Add_layer" |
265 | 278 |
/> |
266 |
<tool-bar name="view" position="30010">
|
|
279 |
<tool-bar name="view"> |
|
267 | 280 |
<action-tool name="view-layer-add"/> |
268 | 281 |
</tool-bar> |
269 | 282 |
</extension> |
... | ... | |
286 | 299 |
name="layer-addtolocator" |
287 | 300 |
text="Layer/add_to_locator" |
288 | 301 |
/> |
289 |
<!-- <tool-bar name="view" position="30010"> |
|
302 |
<!-- |
|
303 |
<tool-bar name="view"> |
|
290 | 304 |
<action-tool name="add-to-locator"/> |
291 | 305 |
</tool-bar> |
292 | 306 |
--> |
... | ... | |
315 | 329 |
name="view-navigation-zoom-back" |
316 | 330 |
text="View/Navigation/Zoom_back" |
317 | 331 |
/> |
318 |
<tool-bar name="view_navigation" position ="3">
|
|
332 |
<tool-bar name="view_navigation"> |
|
319 | 333 |
<action-tool name="view-navigation-zoom-back"/> |
320 | 334 |
</tool-bar> |
321 | 335 |
</extension> |
... | ... | |
337 | 351 |
name="view-navigation-zoom-next" |
338 | 352 |
text="View/Navigation/Zoom_next" |
339 | 353 |
/> |
340 |
<tool-bar name="view_navigation" position ="3">
|
|
354 |
<tool-bar name="view_navigation"> |
|
341 | 355 |
<action-tool name="view-navigation-zoom-next"/> |
342 | 356 |
</tool-bar> |
343 | 357 |
</extension> |
... | ... | |
359 | 373 |
name="layer-info-by-point" |
360 | 374 |
text="Layer/Query/_Information_by_point" |
361 | 375 |
/> |
362 |
<tool-bar name="view_tools_query" position="5">
|
|
376 |
<tool-bar name="view_tools_query"> |
|
363 | 377 |
<selectable-tool name="layer-info-by-point" /> |
364 | 378 |
</tool-bar> |
365 | 379 |
</extension> |
... | ... | |
552 | 566 |
/> |
553 | 567 |
|
554 | 568 |
|
555 |
<tool-bar name="view_navigation" position="3">
|
|
569 |
<tool-bar name="view_navigation"> |
|
556 | 570 |
<selectable-tool name="view-navigation-zoom-in-topoint" is-default="true" /> |
557 | 571 |
<selectable-tool name="view-navigation-zoom-out-topoint" /> |
558 | 572 |
<action-tool name="view-navigation-zoom-all" /> |
... | ... | |
560 | 574 |
<action-tool name="view-navigation-zoom-out-center" /> |
561 | 575 |
</tool-bar> |
562 | 576 |
|
563 |
<tool-bar name="view_navigation" position ="4">
|
|
577 |
<tool-bar name="view_navigation"> |
|
564 | 578 |
<selectable-tool name="view-navigation-pan"/> |
565 | 579 |
<action-tool name="view-navigation-frame-manager" /> |
566 | 580 |
</tool-bar> |
... | ... | |
600 | 614 |
text="Layer/Query/Area" |
601 | 615 |
/> |
602 | 616 |
|
603 |
<tool-bar name="view_tools_query" position="5">
|
|
617 |
<tool-bar name="view_tools_query"> |
|
604 | 618 |
<selectable-tool name="view-query-distance" /> |
605 | 619 |
<selectable-tool name="view-query-area" /> |
606 | 620 |
</tool-bar> |
... | ... | |
640 | 654 |
text="Selection/Select_by_polygon" |
641 | 655 |
/> |
642 | 656 |
|
643 |
<tool-bar name="view_selection" position="6">
|
|
657 |
<tool-bar name="selection">
|
|
644 | 658 |
<selectable-tool name="selection-select-by-rectangle-view" /> |
645 | 659 |
<selectable-tool name="selection-select-by-polygon" /> |
646 | 660 |
</tool-bar> |
... | ... | |
668 | 682 |
text="Selection/Simple" |
669 | 683 |
/> |
670 | 684 |
|
671 |
<tool-bar name="view_selection" position="6">
|
|
685 |
<tool-bar name="selection">
|
|
672 | 686 |
<selectable-tool name="selection-simple-select-view" /> |
673 | 687 |
</tool-bar> |
674 | 688 |
|
... | ... | |
694 | 708 |
text="Selection/Select_by_layer" |
695 | 709 |
/> |
696 | 710 |
|
697 |
<tool-bar name="view_selection" position="6">
|
|
711 |
<tool-bar name="selection">
|
|
698 | 712 |
<action-tool name="selection-select-by-layer" /> |
699 | 713 |
</tool-bar> |
700 | 714 |
</extension> |
... | ... | |
718 | 732 |
text="Selection/Reverse" |
719 | 733 |
/> |
720 | 734 |
|
721 |
<tool-bar name="view_selection" position="6">
|
|
735 |
<tool-bar name="selection">
|
|
722 | 736 |
<action-tool name="selection-reverse-view" /> |
723 | 737 |
</tool-bar> |
724 | 738 |
|
... | ... | |
764 | 778 |
text="View/Navigation/Zoom_to_selection" |
765 | 779 |
/> |
766 | 780 |
|
767 |
<tool-bar name="view_navigation" position="3">
|
|
781 |
<tool-bar name="view_navigation"> |
|
768 | 782 |
<action-tool name="view-navigation-zoom-to-selection" /> |
769 | 783 |
</tool-bar> |
770 | 784 |
|
... | ... | |
789 | 803 |
text="Selection/_Clear" |
790 | 804 |
/> |
791 | 805 |
|
792 |
<tool-bar name="view_selection" position="6">
|
|
806 |
<tool-bar name="selection" position="6"> |
|
793 | 807 |
<action-tool name="selection-clear-view" /> |
794 | 808 |
</tool-bar> |
795 | 809 |
|
... | ... | |
814 | 828 |
text="Selection/_Select_by_attributes" |
815 | 829 |
/> |
816 | 830 |
|
817 |
<tool-bar name="view_selection" position="12">
|
|
831 |
<tool-bar name="selection">
|
|
818 | 832 |
<action-tool name="selection-by-attributes-layer" /> |
819 | 833 |
</tool-bar> |
820 | 834 |
|
... | ... | |
932 | 946 |
accelerator="" |
933 | 947 |
/> |
934 | 948 |
<action |
949 |
name="tools-devel-show-toolbars" |
|
950 |
label="_Show_toolbars_information" |
|
951 |
tooltip="_Show_toolbars_information" |
|
952 |
position="908501001" |
|
953 |
action-command="tools-devel-show-toolbars" |
|
954 |
icon="tools-devel-show-toolbars" |
|
955 |
accelerator="" |
|
956 |
/> |
|
957 |
<action |
|
935 | 958 |
name="tools-devel-show-plugin-report" |
936 | 959 |
label="_Show_plugin_report" |
937 | 960 |
tooltip="_Show_plugin_report_of_actions_menus_and_icons" |
... | ... | |
973 | 996 |
<menu |
974 | 997 |
name="tools-devel-show-actions" |
975 | 998 |
text="tools/Development/Show_actions_information" |
999 |
/> |
|
1000 |
<menu |
|
1001 |
name="tools-devel-show-toolbars" |
|
1002 |
text="tools/Development/Show_toolbars_information" |
|
976 | 1003 |
/> |
977 | 1004 |
<menu |
978 | 1005 |
name="tools-devel-show-menus" |
... | ... | |
1112 | 1139 |
text="Edit/_Undo" |
1113 | 1140 |
/> |
1114 | 1141 |
|
1115 |
<tool-bar name="edit_tools">
|
|
1142 |
<tool-bar name="edit"> |
|
1116 | 1143 |
<action-tool name="edit-undo-layer"/> |
1117 | 1144 |
</tool-bar> |
1118 | 1145 |
|
... | ... | |
1137 | 1164 |
text="Edit/_Redo" |
1138 | 1165 |
/> |
1139 | 1166 |
|
1140 |
<tool-bar name="edit_tools">
|
|
1167 |
<tool-bar name="edit"> |
|
1141 | 1168 |
<action-tool name="edit-redo-layer"/> |
1142 | 1169 |
</tool-bar> |
1143 | 1170 |
|
... | ... | |
1162 | 1189 |
text="Edit/_Undo_redo_history" |
1163 | 1190 |
/> |
1164 | 1191 |
|
1165 |
<tool-bar name="edit_tools">
|
|
1192 |
<tool-bar name="edit"> |
|
1166 | 1193 |
<action-tool name="edit-undo-redo-actions-layer"/> |
1167 | 1194 |
</tool-bar> |
1168 | 1195 |
|
... | ... | |
1195 | 1222 |
text="Layer/Modify/_Copy_selected_features_to_clipboard" |
1196 | 1223 |
/> |
1197 | 1224 |
|
1198 |
<tool-bar name="layer_modify">
|
|
1225 |
<tool-bar name="edit">
|
|
1199 | 1226 |
<action-tool |
1200 | 1227 |
name="layer-modify-clipboard-copy" |
1201 | 1228 |
/> |
... | ... | |
1221 | 1248 |
text="Layer/Modify/_Paste_features_from_clipboard" |
1222 | 1249 |
/> |
1223 | 1250 |
|
1224 |
<tool-bar name="layer_modify">
|
|
1251 |
<tool-bar name="edit">
|
|
1225 | 1252 |
<action-tool |
1226 | 1253 |
name="layer-modify-clipboard-paste" |
1227 | 1254 |
/> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.selectiontools.app/org.gvsig.selectiontools.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
55 | 55 |
text="Selection/SelectAll" |
56 | 56 |
/> |
57 | 57 |
|
58 |
<tool-bar name="view_selection" position="6">
|
|
58 |
<tool-bar name="selection">
|
|
59 | 59 |
<action-tool name="selection-select-all"/> |
60 | 60 |
</tool-bar> |
61 | 61 |
</extension> |
... | ... | |
78 | 78 |
text="Selection/Select_by_circle" |
79 | 79 |
/> |
80 | 80 |
|
81 |
<tool-bar name="view_selection" position="6">
|
|
81 |
<tool-bar name="selection">
|
|
82 | 82 |
<selectable-tool name="selection-select-by-circle"/> |
83 | 83 |
</tool-bar> |
84 | 84 |
</extension> |
... | ... | |
99 | 99 |
name="selection-select-by-polyline" |
100 | 100 |
text="Selection/Select_by_polyline" |
101 | 101 |
/> |
102 |
<tool-bar name="view_selection" position="6">
|
|
102 |
<tool-bar name="selection">
|
|
103 | 103 |
<selectable-tool name="selection-select-by-polyline" /> |
104 | 104 |
</tool-bar> |
105 | 105 |
</extension> |
... | ... | |
122 | 122 |
text="Selection/Select_by_buffer" |
123 | 123 |
/> |
124 | 124 |
|
125 |
<tool-bar name="view_selection" position="6">
|
|
125 |
<tool-bar name="selection">
|
|
126 | 126 |
<action-tool name="selection-select-by-buffer" /> |
127 | 127 |
</tool-bar> |
128 | 128 |
</extension> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
52 | 52 |
text="Show/Console" |
53 | 53 |
/> |
54 | 54 |
|
55 |
<tool-bar name="core" position="20">
|
|
55 |
<tool-bar name="core"> |
|
56 | 56 |
<action-tool name="show-console" last="true" /> |
57 | 57 |
</tool-bar> |
58 | 58 |
|
... | ... | |
88 | 88 |
text="File/salir" |
89 | 89 |
/> |
90 | 90 |
|
91 |
<tool-bar name="core" position="20">
|
|
91 |
<tool-bar name="core"> |
|
92 | 92 |
<action-tool name="edit-setup"/> |
93 | 93 |
</tool-bar> |
94 | 94 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
54 | 54 |
text="Selection/_Clear" |
55 | 55 |
/> |
56 | 56 |
|
57 |
<tool-bar name="view_selection">
|
|
57 |
<tool-bar name="selection"> |
|
58 | 58 |
<action-tool |
59 | 59 |
name="selection-clear-table" |
60 | 60 |
/> |
... | ... | |
80 | 80 |
text="Layer/_Show_attributes_table" |
81 | 81 |
/> |
82 | 82 |
|
83 |
<tool-bar name="view_actions">
|
|
83 |
<tool-bar name="view_tools">
|
|
84 | 84 |
<action-tool |
85 | 85 |
name="layer-show-attributes-table" |
86 | 86 |
/> |
... | ... | |
132 | 132 |
text="Edit/_Undo_redo_history" |
133 | 133 |
/> |
134 | 134 |
|
135 |
<tool-bar name="edit_actions">
|
|
135 |
<tool-bar name="edit"> |
|
136 | 136 |
<action-tool name="edit-undo-redo-actions-table"/> |
137 | 137 |
</tool-bar> |
138 | 138 |
|
... | ... | |
157 | 157 |
text="Edit/_Redo" |
158 | 158 |
/> |
159 | 159 |
|
160 |
<tool-bar name="edit_actions">
|
|
160 |
<tool-bar name="edit"> |
|
161 | 161 |
<action-tool |
162 | 162 |
name="edit-redo-table" |
163 | 163 |
/> |
... | ... | |
183 | 183 |
text="Edit/_Undo" |
184 | 184 |
/> |
185 | 185 |
|
186 |
<tool-bar name="edit_actions">
|
|
186 |
<tool-bar name="edit"> |
|
187 | 187 |
<action-tool |
188 | 188 |
name="edit-undo-table" |
189 | 189 |
/> |
... | ... | |
209 | 209 |
text="Table/_Stop_editing" |
210 | 210 |
/> |
211 | 211 |
|
212 |
<tool-bar name="table_actions">
|
|
212 |
<tool-bar name="editing">
|
|
213 | 213 |
<action-tool |
214 | 214 |
name="table-stop-editing" |
215 | 215 |
/> |
... | ... | |
234 | 234 |
text="Table/_Start_editing" |
235 | 235 |
/> |
236 | 236 |
|
237 |
<tool-bar name="table_actions">
|
|
237 |
<tool-bar name="editing">
|
|
238 | 238 |
<action-tool |
239 | 239 |
name="table-start-editing" |
240 | 240 |
/> |
... | ... | |
259 | 259 |
text="Table/_Add_row" |
260 | 260 |
/> |
261 | 261 |
|
262 |
<tool-bar name="table_actions">
|
|
262 |
<tool-bar name="table"> |
|
263 | 263 |
<action-tool |
264 | 264 |
name="table-add-row" |
265 | 265 |
/> |
... | ... | |
285 | 285 |
text="Table/_Remove_row" |
286 | 286 |
/> |
287 | 287 |
|
288 |
<tool-bar name="table_actions">
|
|
288 |
<tool-bar name="table"> |
|
289 | 289 |
<action-tool |
290 | 290 |
name="table-remove-row" |
291 | 291 |
/> |
... | ... | |
325 | 325 |
text="Table/_Rename_column" |
326 | 326 |
/> |
327 | 327 |
|
328 |
<tool-bar name="table_actions">
|
|
328 |
<tool-bar name="table"> |
|
329 | 329 |
<action-tool |
330 | 330 |
name="table-remove-column" |
331 | 331 |
/> |
... | ... | |
368 | 368 |
text="Table/_Add_column" |
369 | 369 |
/> |
370 | 370 |
|
371 |
<tool-bar name="table_actions">
|
|
371 |
<tool-bar name="table"> |
|
372 | 372 |
<action-tool |
373 | 373 |
name="table-column-manager" |
374 | 374 |
/> |
... | ... | |
396 | 396 |
text="Edit/_Copy" |
397 | 397 |
/> |
398 | 398 |
|
399 |
<tool-bar name="edit_actions">
|
|
399 |
<tool-bar name="edit"> |
|
400 | 400 |
<action-tool |
401 | 401 |
name="edit-copy-table" |
402 | 402 |
/> |
... | ... | |
421 | 421 |
text="Edit/_Cut" |
422 | 422 |
/> |
423 | 423 |
|
424 |
<tool-bar name="edit_actions">
|
|
424 |
<tool-bar name="edit"> |
|
425 | 425 |
<action-tool |
426 | 426 |
name="edit-cut-table" |
427 | 427 |
/> |
... | ... | |
446 | 446 |
text="Edit/_Paste" |
447 | 447 |
/> |
448 | 448 |
|
449 |
<tool-bar name="edit_actions">
|
|
449 |
<tool-bar name="edit"> |
|
450 | 450 |
<action-tool |
451 | 451 |
name="edit-paste-table" |
452 | 452 |
/> |
... | ... | |
501 | 501 |
text="Table/_Find_and_select_duplicates" |
502 | 502 |
/> |
503 | 503 |
|
504 |
<tool-bar name="table_actions">
|
|
504 |
<tool-bar name="table"> |
|
505 | 505 |
<action-tool |
506 | 506 |
name="table-order-asc" |
507 | 507 |
/> |
... | ... | |
532 | 532 |
text="Table/_Statistics" |
533 | 533 |
/> |
534 | 534 |
|
535 |
<tool-bar name="table_actions">
|
|
535 |
<tool-bar name="table"> |
|
536 | 536 |
<action-tool |
537 | 537 |
name="table-statistics" |
538 | 538 |
/> |
... | ... | |
587 | 587 |
text="Selection/_Reverse" |
588 | 588 |
/> |
589 | 589 |
|
590 |
<tool-bar name="selection_actions">
|
|
590 |
<tool-bar name="selection"> |
|
591 | 591 |
<selectable-tool |
592 | 592 |
name="selection-move-up" |
593 | 593 |
/> |
... | ... | |
643 | 643 |
text="File/_Print" |
644 | 644 |
/> |
645 | 645 |
|
646 |
<tool-bar name="table_actions">
|
|
646 |
<tool-bar name="table"> |
|
647 | 647 |
<action-tool |
648 | 648 |
name="application-print-table" |
649 | 649 |
/> |
... | ... | |
692 | 692 |
text="Selection/_Select_by_attributes" |
693 | 693 |
/> |
694 | 694 |
|
695 |
<tool-bar name="table_actions">
|
|
695 |
<tool-bar name="table"> |
|
696 | 696 |
<action-tool |
697 | 697 |
name="selection-by-attributes-table" |
698 | 698 |
/> |
Also available in: Unified diff