diff options
author | Alena Laskavaia | 2010-05-08 01:22:37 +0000 |
---|---|---|
committer | Alena Laskavaia | 2010-05-08 01:22:37 +0000 |
commit | 26dc9d8c6820d5067e89e929203b379b38c411a5 (patch) | |
tree | e7fc039298739b8f20a460b2862870ddaa7b8596 | |
parent | 95d8915fee43f03272e0bb475fbbad38d45daf8f (diff) | |
download | org.eclipse.cdt-26dc9d8c6820d5067e89e929203b379b38c411a5.tar.gz org.eclipse.cdt-26dc9d8c6820d5067e89e929203b379b38c411a5.tar.xz org.eclipse.cdt-26dc9d8c6820d5067e89e929203b379b38c411a5.zip |
Externalized string - fixed issues
16 files changed, 64 insertions, 125 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/OSGI-INF/l10n/bundle.properties b/codan/org.eclipse.cdt.codan.ui/OSGI-INF/l10n/bundle.properties index 05ec72ae9e1..9afafb2b034 100644 --- a/codan/org.eclipse.cdt.codan.ui/OSGI-INF/l10n/bundle.properties +++ b/codan/org.eclipse.cdt.codan.ui/OSGI-INF/l10n/bundle.properties @@ -8,4 +8,5 @@ CodeAnalysisPreferencesBuild.name = Launching category.name = Code Analysis command.name = Run Code Analysis view.name = Problem Details -extension-point.name = Codan Problem Details
\ No newline at end of file +extension-point.name = Codan Problem Details +extension-point.name.codamMarkerResolution = Codan Marker Resolution
\ No newline at end of file diff --git a/codan/org.eclipse.cdt.codan.ui/plugin.xml b/codan/org.eclipse.cdt.codan.ui/plugin.xml index e014a45484c..c1284b72bb7 100644 --- a/codan/org.eclipse.cdt.codan.ui/plugin.xml +++ b/codan/org.eclipse.cdt.codan.ui/plugin.xml @@ -80,7 +80,7 @@ </view> </extension> <extension-point id="codanProblemDetails" name="%extension-point.name" schema="schema/codanProblemDetails.exsd"/> - <extension-point id="codanMarkerResolution" name="Codan Marker Resolution" schema="schema/codanMarkerResolution.exsd"/> + <extension-point id="codanMarkerResolution" name="%extension-point.name.codamMarkerResolution" schema="schema/codanMarkerResolution.exsd"/> <!-- <extension point="org.eclipse.ui.bindings"> diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/Messages.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java index d6a51ad6f8e..b608df49140 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/Messages.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java @@ -13,9 +13,9 @@ package org.eclipse.cdt.codan.internal.ui; import org.eclipse.osgi.util.NLS; /** - * TODO: add description + * Externalized messages */ -public class Messages extends NLS { +public class CodanUIMessages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.cdt.codan.internal.ui.messages"; //$NON-NLS-1$ public static String BuildPropertyPage_RunAsYouType; public static String BuildPropertyPage_RunWithBuild; @@ -23,16 +23,27 @@ public class Messages extends NLS { public static String CodanPreferencePage_Customize; public static String CodanPreferencePage_HasParameters; public static String CodanPreferencePage_Info; + public static String CodanPreferencePage_MessageLabel; public static String CodanPreferencePage_NoInfo; public static String CodanPreferencePage_NoParameters; public static String ProblemsTreeEditor_NameColumn; public static String ProblemsTreeEditor_Problems; public static String ProblemsTreeEditor_SeverityColumn; + public static String OverlayPage_Use_Workspace_Settings; + public static String OverlayPage_Use_Project_Settings; + public static String OverlayPage_Configure_Workspace_Settings; + public static String PropertyStore_Cannot_write_resource_property; + public static String CustomizeProblemComposite_TabParameters; + public static String CustomizeProblemComposite_TabScope; + public static String CustomizeProblemDialog_Message; + public static String CustomizeProblemDialog_Title; + public static String Job_TitleRunningAnalysis; + public static String ParametersComposite_None; static { // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); + NLS.initializeMessages(BUNDLE_NAME, CodanUIMessages.class); } - private Messages() { + private CodanUIMessages() { } } diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodnaUIMessages.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodnaUIMessages.java deleted file mode 100644 index c02254425c8..00000000000 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodnaUIMessages.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009,2010 Alena Laskavaia - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Alena Laskavaia - initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.codan.internal.ui; - -import org.eclipse.osgi.util.NLS; - -/** - * UI Messages - */ -public class CodnaUIMessages extends NLS { - private static final String BUNDLE_NAME = "org.eclipse.cdt.codan.internal.ui"; //$NON-NLS-1$ - public static String CustomizeProblemComposite_TabParameters; - public static String CustomizeProblemComposite_TabScope; - public static String CustomizeProblemDialog_Message; - public static String CustomizeProblemDialog_Title; - public static String Job_TitleRunningAnalysis; - public static String ParametersComposite_None; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, CodnaUIMessages.class); - } - - private CodnaUIMessages() { - } -} diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java index f3148a70c47..22ed21894d5 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java @@ -13,7 +13,7 @@ package org.eclipse.cdt.codan.internal.ui.actions; import java.util.Iterator; import org.eclipse.cdt.codan.core.CodanRuntime; -import org.eclipse.cdt.codan.internal.ui.CodnaUIMessages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; @@ -34,7 +34,7 @@ public class RunCodeAnalysis implements IObjectActionDelegate { } public void run(IAction action) { - Job job = new Job(CodnaUIMessages.Job_TitleRunningAnalysis) { + Job job = new Job(CodanUIMessages.Job_TitleRunningAnalysis) { @SuppressWarnings("unchecked") @Override protected IStatus run(final IProgressMonitor monitor) { diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemComposite.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemComposite.java index f4031ee2139..9ec2d404b9b 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemComposite.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemComposite.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.codan.internal.ui.dialogs; import org.eclipse.cdt.codan.core.model.IProblem; import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy; -import org.eclipse.cdt.codan.internal.ui.CodnaUIMessages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; @@ -56,7 +56,7 @@ public class CustomizeProblemComposite extends Composite { */ private void createParamtersTab(TabFolder tabFolder) { TabItem tabItem1 = new TabItem(tabFolder, SWT.NULL); - tabItem1.setText(CodnaUIMessages.CustomizeProblemComposite_TabParameters); + tabItem1.setText(CodanUIMessages.CustomizeProblemComposite_TabParameters); parametersTab = new Composite(tabFolder, SWT.NONE); tabItem1.setControl(parametersTab); parametersTab.setLayout(new GridLayout()); @@ -69,7 +69,7 @@ public class CustomizeProblemComposite extends Composite { */ private void createScopeTab(TabFolder tabFolder) { TabItem tabItem1 = new TabItem(tabFolder, SWT.NULL); - tabItem1.setText(CodnaUIMessages.CustomizeProblemComposite_TabScope); + tabItem1.setText(CodanUIMessages.CustomizeProblemComposite_TabScope); Composite comp = new Composite(tabFolder, SWT.NONE); tabItem1.setControl(comp); comp.setLayout(new GridLayout()); diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java index 1c737afc25c..6f24b251b96 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/CustomizeProblemDialog.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.codan.internal.ui.dialogs; import org.eclipse.cdt.codan.core.model.IProblem; import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy; -import org.eclipse.cdt.codan.internal.ui.CodnaUIMessages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.jface.dialogs.TitleAreaDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; @@ -51,9 +51,9 @@ public class CustomizeProblemDialog extends TitleAreaDialog { */ @Override protected Control createDialogArea(Composite parent) { - getShell().setText(CodnaUIMessages.CustomizeProblemDialog_Title); + getShell().setText(CodanUIMessages.CustomizeProblemDialog_Title); setTitle(problem.getName()); - setMessage(CodnaUIMessages.CustomizeProblemDialog_Message); + setMessage(CodanUIMessages.CustomizeProblemDialog_Message); Composite area = (Composite) super.createDialogArea(parent); comp = new CustomizeProblemComposite(area, problem); GridData ld = new GridData(GridData.FILL_BOTH); diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ParametersComposite.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ParametersComposite.java index dd02795683b..4fdf10341fb 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ParametersComposite.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ParametersComposite.java @@ -13,7 +13,7 @@ package org.eclipse.cdt.codan.internal.ui.dialogs; import org.eclipse.cdt.codan.core.model.IProblem; import org.eclipse.cdt.codan.core.model.IProblemParameterInfo; import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy; -import org.eclipse.cdt.codan.internal.ui.CodnaUIMessages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.PreferenceStore; import org.eclipse.jface.preference.StringFieldEditor; @@ -75,7 +75,7 @@ public class ParametersComposite extends Composite { IProblemParameterInfo info = problem.getParameterInfo(); if (info == null) { Label label = new Label(this, 0); - label.setText(CodnaUIMessages.ParametersComposite_None); + label.setText(CodanUIMessages.ParametersComposite_None); } initPrefStore(info); page.setPreferenceStore(pref); diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/messages.properties b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/messages.properties index 242b25c26f8..fb5ae2dbe44 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/messages.properties +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/messages.properties @@ -4,6 +4,7 @@ CheckedTreeEditor_SelectionCannotBeEmpty=Selection cannot be empty CodanPreferencePage_Customize=Customize... CodanPreferencePage_HasParameters=This problem has parameters CodanPreferencePage_Info=Info +CodanPreferencePage_MessageLabel=Problem message CodanPreferencePage_NoInfo=No additional information CodanPreferencePage_NoParameters=No parameters CustomizeProblemComposite_TabParameters=Parameters @@ -15,3 +16,8 @@ ParametersComposite_None=No Parameters ProblemsTreeEditor_NameColumn=Name ProblemsTreeEditor_Problems=Problems ProblemsTreeEditor_SeverityColumn=Severity +OverlayPage_Use_Workspace_Settings=Use &workspace settings +OverlayPage_Use_Project_Settings=Use pr&oject settings +OverlayPage_Configure_Workspace_Settings=&Configure Workspace Settings... +PropertyStore_Cannot_write_resource_property=Cannot write resource property + diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java index 7d51f16666d..9107cea0679 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java @@ -2,7 +2,7 @@ package org.eclipse.cdt.codan.internal.ui.preferences; import org.eclipse.cdt.codan.core.PreferenceConstants; import org.eclipse.cdt.codan.internal.ui.CodanUIActivator; -import org.eclipse.cdt.codan.internal.ui.Messages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.cdt.codan.internal.ui.actions.ToggleNatureAction; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; @@ -32,9 +32,9 @@ public class BuildPropertyPage extends FieldEditorPreferencePage implements @Override protected void createFieldEditors() { addField(new BooleanFieldEditor(PreferenceConstants.P_RUN_ON_BUILD, - Messages.BuildPropertyPage_RunWithBuild, getFieldEditorParent())); + CodanUIMessages.BuildPropertyPage_RunWithBuild, getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.P_RUN_IN_EDITOR, - Messages.BuildPropertyPage_RunAsYouType, getFieldEditorParent())); + CodanUIMessages.BuildPropertyPage_RunAsYouType, getFieldEditorParent())); } @Override diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java index 951dade6221..14889a1b46e 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.cdt.codan.internal.ui.preferences; -import org.eclipse.cdt.codan.internal.ui.Messages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.jface.preference.FieldEditor; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTreeViewer; @@ -313,7 +313,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements if (!emptySelectionAllowed) { Object[] checkedElements = getTreeViewer().getCheckedElements(); if (checkedElements.length == 0) { - showErrorMessage(Messages.CheckedTreeEditor_SelectionCannotBeEmpty); + showErrorMessage(CodanUIMessages.CheckedTreeEditor_SelectionCannotBeEmpty); return false; } } diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java index 14a235d8ffc..604971cb5be 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java @@ -16,7 +16,7 @@ import org.eclipse.cdt.codan.core.model.ICheckersRegistry; import org.eclipse.cdt.codan.core.model.IProblem; import org.eclipse.cdt.codan.core.model.IProblemParameterInfo; import org.eclipse.cdt.codan.core.model.IProblemProfile; -import org.eclipse.cdt.codan.internal.ui.Messages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.cdt.codan.internal.ui.dialogs.CustomizeProblemDialog; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.preferences.InstanceScope; @@ -63,7 +63,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements super(GRID); setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(), CodanCorePlugin.PLUGIN_ID)); - //setDescription("Code Analysis Preference Page"); + // setDescription("Code Analysis Preference Page"); problemSelectionListener = new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { if (info != null) { @@ -127,14 +127,14 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements info = new Group(comp, SWT.NONE); info.setLayoutData(new GridData(GridData.FILL_BOTH)); info.setLayout(new GridLayout(2, false)); - info.setText(Messages.CodanPreferencePage_Info); + info.setText(CodanUIMessages.CodanPreferencePage_Info); infoParams = new Label(info, SWT.NONE); infoParams.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); infoButton = new Button(info, SWT.PUSH); infoButton .setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false)); - infoButton.setText(Messages.CodanPreferencePage_Customize); + infoButton.setText(CodanUIMessages.CodanPreferencePage_Customize); infoButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -144,7 +144,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements infoMessage = new Label(info, SWT.WRAP); GridData ld = new GridData(SWT.BEGINNING, SWT.CENTER, false, false); ld.horizontalSpan = 2; - ld.widthHint=400; + ld.widthHint = 400; infoMessage.setLayoutData(ld); setSelectedProblem(null); } @@ -188,10 +188,12 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IProblemParameterInfo parameterInfo = selectedProblem .getParameterInfo(); String desc = selectedProblem.getDescription(); - infoMessage.setText(desc == null ? Messages.CodanPreferencePage_NoInfo - : desc); - infoParams.setText(parameterInfo == null ? Messages.CodanPreferencePage_NoParameters - : Messages.CodanPreferencePage_HasParameters); + if (desc == null) + desc = CodanUIMessages.CodanPreferencePage_NoInfo; + infoMessage.setText(desc); + infoParams + .setText(parameterInfo == null ? CodanUIMessages.CodanPreferencePage_NoParameters + : CodanUIMessages.CodanPreferencePage_HasParameters); infoButton.setEnabled(true); } info.layout(true); diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java index 4dd7239eb25..e2eb58065f3 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java @@ -13,8 +13,10 @@ package org.eclipse.cdt.codan.internal.ui.preferences; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import org.eclipse.cdt.codan.core.CodanCorePlugin; import org.eclipse.cdt.codan.core.PreferenceConstants; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ProjectScope; import org.eclipse.core.runtime.IAdaptable; @@ -120,7 +122,8 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage * @see org.eclipse.ui.IWorkbenchPropertyPage#getElement() */ public IAdaptable getElement() { - if (element==null) return element; + if (element == null) + return element; if (!(element instanceof IProject)) return (IAdaptable) element.getAdapter(IProject.class); return element; @@ -205,13 +208,12 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage Composite radioGroup = new Composite(comp, SWT.NONE); radioGroup.setLayout(new GridLayout()); radioGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - useWorkspaceSettingsButton = createRadioButton(radioGroup, Messages - .getString("OverlayPage.Use_Workspace_Settings")); //$NON-NLS-1$ - useProjectSettingsButton = createRadioButton(radioGroup, Messages - .getString("OverlayPage.Use_Project_Settings")); //$NON-NLS-1$ + useWorkspaceSettingsButton = createRadioButton(radioGroup, + CodanUIMessages.OverlayPage_Use_Workspace_Settings); + useProjectSettingsButton = createRadioButton(radioGroup, + CodanUIMessages.OverlayPage_Use_Project_Settings); configureButton = new Button(comp, SWT.PUSH); - configureButton.setText(Messages - .getString("OverlayPage.Configure_Workspace_Settings")); //$NON-NLS-1$ + configureButton.setText(CodanUIMessages.OverlayPage_Use_Workspace_Settings); configureButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { configureWorkspaceSettings(); @@ -327,6 +329,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage /** * Creates a new preferences page and opens it */ + @SuppressWarnings("cast") protected void configureWorkspaceSettings() { try { // create a new instance of the current class diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.java deleted file mode 100644 index 4ef5f89be83..00000000000 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003 Berthold Daum. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * Berthold Daum - *******************************************************************************/ - -package org.eclipse.cdt.codan.internal.ui.preferences; - -import java.util.ResourceBundle; - - -public class Messages { - - private final static String RESOURCE_BUNDLE = "org.eclipse.cdt.codan.internal.ui.preferences.Messages";//$NON-NLS-1$ - - private static ResourceBundle fgResourceBundle = null; - - private static boolean notRead = true; - - public Messages() { - } - public static ResourceBundle getResourceBundle() { - if (notRead) { - notRead = false; - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } - catch (Exception e) { - } - } - - return fgResourceBundle; - } - public static String getString(String key) { - try { - return getResourceBundle().getString(key); - } catch (Exception e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - } -} - diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.properties b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.properties deleted file mode 100644 index f055e743905..00000000000 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.properties +++ /dev/null @@ -1,4 +0,0 @@ -OverlayPage.Use_Workspace_Settings=Use &workspace settings -OverlayPage.Use_Project_Settings=Use pr&oject settings -OverlayPage.Configure_Workspace_Settings=&Configure Workspace Settings... -PropertyStore.Cannot_write_resource_property=Cannot write resource property diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java index 3cde72aa443..b314bbd8d54 100644 --- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java +++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java @@ -18,7 +18,7 @@ import org.eclipse.cdt.codan.core.model.IProblemElement; import org.eclipse.cdt.codan.core.model.IProblemProfile; import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy; import org.eclipse.cdt.codan.internal.core.CodanPreferencesLoader; -import org.eclipse.cdt.codan.internal.ui.Messages; +import org.eclipse.cdt.codan.internal.ui.CodanUIMessages; import org.eclipse.core.resources.IMarker; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.CheckStateChangedEvent; @@ -146,7 +146,7 @@ public class ProblemsTreeEditor extends CheckedTreeEditor { public ProblemsTreeEditor(Composite parent, IProblemProfile profile) { - super(PreferenceConstants.P_PROBLEMS, Messages.ProblemsTreeEditor_Problems, parent); + super(PreferenceConstants.P_PROBLEMS, CodanUIMessages.ProblemsTreeEditor_Problems, parent); setEmptySelectionAllowed(true); getTreeViewer().getTree().setHeaderVisible(true); // getTreeViewer().getTree(). @@ -155,7 +155,7 @@ public class ProblemsTreeEditor extends CheckedTreeEditor { // column Name TreeViewerColumn column1 = new TreeViewerColumn(getTreeViewer(), SWT.NONE); column1.getColumn().setWidth(300); - column1.getColumn().setText(Messages.ProblemsTreeEditor_NameColumn); + column1.getColumn().setText(CodanUIMessages.ProblemsTreeEditor_NameColumn); column1.setLabelProvider(new ColumnLabelProvider() { public String getText(Object element) { if (element instanceof IProblem) { @@ -172,7 +172,7 @@ public class ProblemsTreeEditor extends CheckedTreeEditor { // column Severity TreeViewerColumn column2 = new TreeViewerColumn(getTreeViewer(), SWT.NONE); column2.getColumn().setWidth(100); - column2.getColumn().setText(Messages.ProblemsTreeEditor_SeverityColumn); + column2.getColumn().setText(CodanUIMessages.ProblemsTreeEditor_SeverityColumn); column2.setLabelProvider(new ColumnLabelProvider() { @Override public Image getImage(Object element) { |