Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 310876 | Differences between
and this patch

Collapse All | Expand All

(-)property_files/jpt_ui.properties (+6 lines)
Lines 44-49 Link Here
44
DatabaseSchemaWizardPage_connectionInfo=(Note: JPA project must have a connection and it must be active to select a schema)
44
DatabaseSchemaWizardPage_connectionInfo=(Note: JPA project must have a connection and it must be active to select a schema)
45
DatabaseSchemaWizardPage_schemaInfo=(Note: Must have active connection to select schema)
45
DatabaseSchemaWizardPage_schemaInfo=(Note: Must have active connection to select schema)
46
46
47
DontShowAgainDialog_doNotShowWarning = Don't show me this warning again
48
47
Error_openingEditor=Error Opening Editor
49
Error_openingEditor=Error Opening Editor
48
50
49
General_browse=Br&owse...
51
General_browse=Br&owse...
Lines 118-123 Link Here
118
JpaMakePersistentWizardPage_mappingFileDoesNotExistError=The XML mapping file does not exist
120
JpaMakePersistentWizardPage_mappingFileDoesNotExistError=The XML mapping file does not exist
119
JpaMakePersistentWizardPage_mappingFileNotListedInPersistenceXmlError=The XML mapping file is not listed in the persistence.xml
121
JpaMakePersistentWizardPage_mappingFileNotListedInPersistenceXmlError=The XML mapping file is not listed in the persistence.xml
120
122
123
JptPreferencesPage_DoNotShowDialogs=Dialogs
124
JptPreferencesPage_DoNotShowText=Clear all 'do not show again' settings and show all hidden dialogs again.
125
JptPreferencesPage_ClearButtonText=&Clear
126
121
JpaPreferencesPage_Description=Expand the tree to edit preferences for a particular JPA feature.
127
JpaPreferencesPage_Description=Expand the tree to edit preferences for a particular JPA feature.
122
128
123
JpaProblemSeveritiesPage_Description=Select the severity level for the following optional Java Persistence validation problems:
129
JpaProblemSeveritiesPage_Description=Select the severity level for the following optional Java Persistence validation problems:
(-)property_files/jpt_ui_entity_gen.properties (-1 lines)
Lines 104-110 Link Here
104
GenerateEntitiesWizard_assocEditor_tableJoin=Table &join:
104
GenerateEntitiesWizard_assocEditor_tableJoin=Table &join:
105
GenerateEntitiesWizard_assocEditor_joinedWhen=The table rows are joined when:\n%s
105
GenerateEntitiesWizard_assocEditor_joinedWhen=The table rows are joined when:\n%s
106
GenerateEntitiesWizard_assocEditor_genAssoc=Generate &this association
106
GenerateEntitiesWizard_assocEditor_genAssoc=Generate &this association
107
GenerateEntitiesWizard_doNotShowWarning = Don't show me this warning again
108
107
109
selectCascadeDlgTitle=Select Cascade
108
selectCascadeDlgTitle=Select Cascade
110
selectTableDlgTitle=Table Selection
109
selectTableDlgTitle=Table Selection
(-)src/org/eclipse/jpt/jpa/ui/internal/JptUiMessages.java (+4 lines)
Lines 49-54 Link Here
49
	public static String DatabaseSchemaWizardPage_schema;
49
	public static String DatabaseSchemaWizardPage_schema;
50
	public static String DatabaseSchemaWizardPage_connectionInfo;
50
	public static String DatabaseSchemaWizardPage_connectionInfo;
51
	public static String DatabaseSchemaWizardPage_schemaInfo;
51
	public static String DatabaseSchemaWizardPage_schemaInfo;
52
	public static String DontShowAgainDialog_doNotShowWarning;
52
	public static String Error_openingEditor;
53
	public static String Error_openingEditor;
53
	public static String General_browse;
54
	public static String General_browse;
54
	public static String General_revert;
55
	public static String General_revert;
Lines 132-137 Link Here
132
	public static String OverwriteConfirmerDialog_title;
133
	public static String OverwriteConfirmerDialog_title;
133
	public static String PersistenceItemLabelProviderFactory_persistenceLabel;
134
	public static String PersistenceItemLabelProviderFactory_persistenceLabel;
134
	public static String EntitiesGenerator_jobName;
135
	public static String EntitiesGenerator_jobName;
136
	public static String JptPreferencesPage_DoNotShowDialogs;
137
	public static String JptPreferencesPage_DoNotShowText;
138
	public static String JptPreferencesPage_ClearButtonText;
135
	public static String JpaPreferencesPage_Description;
139
	public static String JpaPreferencesPage_Description;
136
	public static String JpaProblemSeveritiesPage_Description;
140
	public static String JpaProblemSeveritiesPage_Description;
137
	public static String JpaProblemSeveritiesPage_Error;
141
	public static String JpaProblemSeveritiesPage_Error;
(-)src/org/eclipse/jpt/jpa/ui/internal/preferences/JpaPreferencesPage.java (-1 / +1 lines)
Lines 22-28 Link Here
22
import org.eclipse.ui.IWorkbenchPreferencePage;
22
import org.eclipse.ui.IWorkbenchPreferencePage;
23
23
24
/**
24
/**
25
 * This is the root of the Java Persistence preferences hierarchy in the IDE
25
 * This is the root of the JPA preferences hierarchy in the IDE
26
 * preferences dialog.
26
 * preferences dialog.
27
 * <p>
27
 * <p>
28
 * Structure:
28
 * Structure:
(-)src/org/eclipse/jpt/jpa/ui/internal/preferences/JptPerferencesPage.java (+86 lines)
Added Link Here
1
package org.eclipse.jpt.jpa.ui.internal.preferences;
2
3
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
4
import org.eclipse.jface.dialogs.IDialogConstants;
5
import org.eclipse.jface.preference.PreferencePage;
6
import org.eclipse.jpt.jpa.ui.JptJpaUiPlugin;
7
import org.eclipse.jpt.jpa.ui.internal.JptUiMessages;
8
import org.eclipse.jpt.jpa.ui.internal.dialogs.DontShowAgainDialog;
9
import org.eclipse.swt.SWT;
10
import org.eclipse.swt.events.SelectionEvent;
11
import org.eclipse.swt.events.SelectionListener;
12
import org.eclipse.swt.layout.GridData;
13
import org.eclipse.swt.layout.GridLayout;
14
import org.eclipse.swt.widgets.Button;
15
import org.eclipse.swt.widgets.Composite;
16
import org.eclipse.swt.widgets.Control;
17
import org.eclipse.swt.widgets.Group;
18
import org.eclipse.swt.widgets.Label;
19
import org.eclipse.ui.IWorkbench;
20
import org.eclipse.ui.IWorkbenchPreferencePage;
21
22
/**
23
 * This is the root of the Java Persistence preferences hierarchy in the IDE
24
 * preferences dialog.
25
 * <p>
26
 * Structure:
27
 * <p>
28
 * Java Persistence<br>
29
 *
30
 * @version 2.2
31
 * @since 2.2
32
 */
33
public class JptPerferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
34
35
	@Override
36
	protected Control createContents(Composite parent) {
37
        
38
		Composite container= new Composite(parent, SWT.NONE);
39
		GridLayout layout= new GridLayout();
40
		layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
41
		layout.marginWidth= 0;
42
		layout.verticalSpacing= convertVerticalDLUsToPixels(10);
43
		layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
44
		container.setLayout(layout);
45
46
		layout = new GridLayout();
47
		layout.numColumns= 2;
48
49
		Group dontAskGroup = new Group(container, SWT.NONE);
50
		dontAskGroup.setLayout(layout);
51
		dontAskGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
52
		dontAskGroup.setText(JptUiMessages.JptPreferencesPage_DoNotShowDialogs);
53
54
		Label label = new Label(dontAskGroup, SWT.WRAP);
55
		label.setText(JptUiMessages.JptPreferencesPage_DoNotShowText);
56
		GridData data= new GridData(GridData.FILL, GridData.CENTER, true, false);
57
		data.widthHint= convertVerticalDLUsToPixels(50);
58
		label.setLayoutData(data);
59
		
60
		Button button = new Button(dontAskGroup, SWT.PUSH);
61
		button.setText(JptUiMessages.JptPreferencesPage_ClearButtonText);
62
		button.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
63
		button.addSelectionListener(new SelectionListener() {
64
			public void widgetSelected(SelectionEvent e) {
65
				unhideAllDialogs();
66
			}
67
			public void widgetDefaultSelected(SelectionEvent e) {
68
				unhideAllDialogs();
69
			}
70
		});
71
		
72
		return container;
73
	}
74
75
	public void init(IWorkbench workbench) {
76
		setPreferenceStore(JptJpaUiPlugin.instance().getPreferenceStore());
77
	}
78
	
79
	private final void unhideAllDialogs() {
80
		Iterable<String> preferenceKeys = DontShowAgainDialog.allPreferenceKeys();
81
		for (String preferenceKey : preferenceKeys) {
82
	    	final IEclipsePreferences pref = DontShowAgainDialog.getDontShowPreferences(); 
83
            pref.putBoolean(preferenceKey, false);
84
		}
85
	}
86
}

Return to bug 310876