我尝试从eclipse首选项页面实现一个视图,在某些字段中,此方法(performStringSubstitution)不起作用,因为StringFieldEditor之前进行了验证,并且不授予label.setText() ,我会感激任何帮助。 `
public void propertyChange(PropertyChangeEvent event)
{
/*Solve Eclipse variable method (${workspace_loc},${project_loc},...)*/
String dir = Activator.getDefault().getPreferenceStore()
.getString(event.getNewValue().toString());
IStringVariableManager manager = VariablesPlugin.getDefault()
.getStringVariableManager();
try {
String solvePathUpdate = manager.performStringSubstitution(dir);
label.setText(solvePathUpdate);
}
catch (CoreException e)
{
// TODO Auto-generated catch block
/* Creating the method print console */
}
}