Skip to main content

Posts

[Brainshare] Singleton Design pattern

What is Singleton Design Pattern: A class has only SINGLE instance and provide a global access to it. Usage of Singleton Design Pattern: https://stackoverflow.com/a/3192124/4955676 Type of Singleton Design Pattern: [code] Singleton Class - READ MORE [code] Lazy Initialization - READ MORE [code] Thread Safe - READ MORE Singleton Design Pattern Video Book

Preferences in Eclipse RCP

Preferences Preference pages will be appear Window>Preferences dialog. It can be used to configure different features from once place. Eclipse Preferences is kind of registry of configurations. e.g.: As you see here are the various configuration ( preferences ) for Java, Ant, etc. Sample Preference in Eclipse org.eclipse.ui.preferencePages extension has to be added to in the plug-in manifest editor for Preference Pages. Extension point for PreferencePages Once you add the extension, the following will be the structure: Extensions post adding PreferencePages Following is the implementation of SamplePreferencePage.java SamplePreferencePage.java package trial . preferences ; ​ import org . eclipse . jface . preference . BooleanFieldEditor ; import org . eclipse . jface . preference . DirectoryFieldEditor ; import org . eclipse . jface . preference . FieldEditorPreferencePage ; import org . eclip...