Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to capture the behavior of preferences in Eclipse using the org.eclipse.core.runtime.preferences
How to capture the behavior of preferences in Eclipse using the org.eclipse.core.runtime.preferences [message #1862452] Tue, 05 December 2023 19:54
Fabian Juarez is currently offline Fabian JuarezFriend
Messages: 1
Registered: December 2023
Junior Member
Hi,
I am trying to add additional functionality when modifying the preferences of a java project, more precisely in preference "Select JRE for the project build path" when modifying the "JRE System Library".
According to what I investigated, I should modify my plugin.xml by adding the following:
<extension point="org.eclipse.core.runtime.preferences">
	<initializer 
	    class="my.package.ProjectPreferenceInitializer" 
	    id="my.package.projectPreferenceInitializer"/>
	<modifier 
		class="my.package.ProjectPreferenceModifier" 
		id="my.package.projectPreferenceMofidier" 
		name="Your Preference Modifier"/>
</extension>

Here the ProjectPreferenceInitializer class works correctly, but for the Modifier it does not work as expected. My ProjectPreferenceModifier class is shown below:
public class ProjectPreferenceModifier implements IPreferenceChangeListener {
	
    @Override
    public void preferenceChange(PreferenceChangeEvent event) {
    	System.out.println("");
    }
}

Any help will be appreciated.
Thanks!
Previous Topic:integrated profiler in eclipse IDE for Java Developers
Next Topic:Loop bytecode from ECJ differs from javac
Goto Forum:
  


Current Time: Wed Feb 05 17:00:50 GMT 2025

Powered by FUDForum. Page generated in 0.03586 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top