Java Code Examples for org.eclipse.jdt.internal.ui.preferences.formatter.ProfileStore

The following examples show how to use org.eclipse.jdt.internal.ui.preferences.formatter.ProfileStore. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Returns a list of {@link org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile} stored in the <code>scope</code>,
 * including the built-in profiles.
 * @param scope the context from which to retrieve the profiles
 * @return list of profiles, not null
 * @since 3.3
 */
public static List<Profile> loadProfiles(IScopeContext scope) {

       CleanUpProfileVersioner versioner= new CleanUpProfileVersioner();
   	ProfileStore profileStore= new ProfileStore(CleanUpConstants.CLEANUP_PROFILES, versioner);

   	List<Profile> list= null;
       try {
           list= profileStore.readProfiles(scope);
       } catch (CoreException e1) {
           JavaPlugin.log(e1);
       }
       if (list == null) {
       	list= getBuiltInProfiles();
       } else {
       	list.addAll(getBuiltInProfiles());
       }

       return list;
   }
 
Example 2
Source Project: xtext-xtend   Source File: FormatterModifyDialog.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public FormatterModifyDialog create(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore,
		boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
	FormatterModifyDialog modifyDialog = new FormatterModifyDialog(parentShell, profile, profileManager, profileStore, newProfile,
			dialogPreferencesKey, lastSavePathKey);
	injector.injectMembers(modifyDialog);
	return modifyDialog;
}
 
Example 3
Source Project: xtext-xtend   Source File: FormatterModifyDialog.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public FormatterModifyDialog(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore,
		boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
	super(parentShell, profile, profileManager, profileStore, newProfile, dialogPreferencesKey, lastSavePathKey);
	this.fProfile = profile;
	this.fKeyLastFocus = JavaUI.ID_PLUGIN + dialogPreferencesKey + DS_KEY_LAST_FOCUS;
	this.fDialogSettings = JavaPlugin.getDefault().getDialogSettings();
}
 
Example 4
@Override
protected ModifyDialog createModifyDialog(Shell shell, ProfileManager.Profile profile,
		ProfileManager profileManager, ProfileStore profileStore, boolean newProfile) {
	return formatterModifyDialogFactory.create(shell, profile, profileManager, profileStore, newProfile, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
 
Example 5
@Override
protected abstract ProfileStore createProfileStore(IProfileVersioner versioner);
 
Example 6
@Override
protected ProfileStore createProfileStore(IProfileVersioner versioner) {
    fProfileStore= new ProfileStore(CleanUpConstants.CLEANUP_PROFILES, versioner);
	return fProfileStore;
   }
 
Example 7
@Override
protected ModifyDialog createModifyDialog(Shell shell, Profile profile, ProfileManager profileManager, ProfileStore profileStore, boolean newProfile) {
       return new CleanUpModifyDialog(shell, profile, profileManager, profileStore, newProfile, CLEANUP_PAGE_SETTINGS_KEY, DIALOGSTORE_LASTSAVELOADPATH);
   }
 
Example 8
public CleanUpModifyDialog(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore, boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
 super(parentShell, profile, profileManager, profileStore, newProfile, dialogPreferencesKey, lastSavePathKey);
}