Révision 2347

tmp/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java (revision 2347)
55 55
		String w = Toolbox.getTxmHomePath();
56 56
		if (w == null || w.length() == 0) return null;
57 57

  
58
		return new File(w, "scripts/groovy/user/org/txm/macro/ui/menu/main");
58
		return new File(w, "scripts/groovy/user/"+this.getId().replace(".", "/"));
59 59
	}
60 60

  
61 61
	public void onOpen(Menu menu, int index) {
......
75 75
			menuItem.setText("<no macro>");
76 76
			menuItem.addSelectionListener(new SelectionAdapter() {
77 77
				public void widgetSelected(SelectionEvent e) {
78
					Log.info("To populate this menu, you must create macros in the 'ui/menu/main' macro directory.");
78
					File dir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/"+getId().replace(".", "/"));
79
					Log.info(NLS.bind("To populate this menu, you must create macros in the '{0}' macro directory.", dir));
79 80
				}
80 81
			});
81 82
			return;
......
116 117
		for (File f : files) {
117 118
			if (f.getName().endsWith("Macro.groovy")) {
118 119
				MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
119
				menuItem.setText(f.getName().substring(0, f.getName().length()-12));
120
				menuItem.setText(f.getName().substring(0, f.getName().length()-12).replaceAll("([A-Z])([^A-Z])", " $1$2"));
120 121
				menuItem.addSelectionListener(new MacroSelectionAdapter(f));
121 122
			} else if (f.isDirectory()) {
122 123
				MenuItem subMenuItem = new MenuItem(menu, SWT.CASCADE);

Formats disponibles : Unified diff