Révision 4011

TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/AddLibraryMacro.groovy (revision 4011)
66 66
	}
67 67
}
68 68

  
69
println "Reload libraries..."
70
gse.reloadLibraries()
71
println "Done."
72

  
69 73
// update macros view
70 74
monitor.syncExec(new Runnable() {
71 75
		public void run() {
TXM/trunk/bundles/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java (revision 4011)
104 104
//		configuration.setRecompileGroovySource(false);
105 105
//		defaultGSE.reloadCaches();	
106 106
		
107
		reloadLibraries();
108
		
109
		// for the .class files if any
110
		defaultGSE.getGroovyClassLoader().addClasspath(rootDir.getAbsolutePath());
111
		
112
		return defaultGSE;
113
	}
114
	
115
	public static void reloadLibraries() {
116
		
117
		if (defaultGSE == null) {
118
			Log.severe("GSERunner not initialized");
119
			return;
120
		}
121
			
122
		File rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/"); //$NON-NLS-1$
123
		
107 124
		File jardir = new File(rootDir, "lib"); //$NON-NLS-1$
108 125
		try {
109 126
			defaultGSE.getGroovyClassLoader().addClasspath(jardir.getAbsolutePath());
......
131 148
				}
132 149
			}
133 150
		}
134
		
135
		// for the .class files if any
136
		defaultGSE.getGroovyClassLoader().addClasspath(rootDir.getAbsolutePath());
137
		
138
		return defaultGSE;
139 151
	}
140 152
	
141 153
	/**

Formats disponibles : Unified diff