From bcf9559cda927d14907c7b20642e547b0e069839 Mon Sep 17 00:00:00 2001 From: Philippe Herlin Date: Wed, 13 Aug 2003 20:10:20 +0000 Subject: [PATCH] Refactoring private->protected to remove warning about non accessible member access in enclosing types git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2190 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/eclipse/actions/PMDCheckAction.java | 5 +++- .../preferences/PMDPreferencePage.java | 23 +++++++++-------- .../pmd/eclipse/preferences/RuleDialog.java | 5 +++- .../preferences/RuleSetSelectionDialog.java | 5 +++- .../eclipse/properties/PMDPropertyPage.java | 5 +++- .../views/ResourceMarkerContentProvider.java | 5 +++- .../pmd/eclipse/views/ViolationView.java | 25 +++++++++++-------- 7 files changed, 47 insertions(+), 26 deletions(-) diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckAction.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckAction.java index 5611c89987..391a93a009 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckAction.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/PMDCheckAction.java @@ -34,6 +34,9 @@ import org.eclipse.ui.IWorkbenchPart; * @version $Revision$ * * $Log$ + * Revision 1.8 2003/08/13 20:08:40 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.7 2003/07/01 20:21:37 phherlin * Correcting some PMD violations ! (empty if stmt) * @@ -50,7 +53,7 @@ import org.eclipse.ui.IWorkbenchPart; * */ public class PMDCheckAction implements IObjectActionDelegate { - private static final Log log = LogFactory.getLog("net.sourceforge.pmd.eclipse.actions.PMDCheckAction"); + protected static final Log log = LogFactory.getLog("net.sourceforge.pmd.eclipse.actions.PMDCheckAction"); private IWorkbenchPart targetPart; /** diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/PMDPreferencePage.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/PMDPreferencePage.java index 08ecb92862..394b3287e1 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/PMDPreferencePage.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/PMDPreferencePage.java @@ -59,6 +59,9 @@ import org.eclipse.ui.IWorkbenchPreferencePage; * @version $Revision$ * * $Log$ + * Revision 1.10 2003/08/13 20:09:06 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.9 2003/07/07 19:27:10 phherlin * Making rules selectable from projects * Various refactoring and cleaning @@ -81,12 +84,12 @@ public class PMDPreferencePage extends PreferencePage implements IWorkbenchPrefe public static PMDPreferencePage activeInstance = null; - private TableViewer ruleTableViewer; - private TableViewer rulePropertiesTableViewer; - private Button removeRuleButton; - private Button editRuleButton; - private Button addPropertyButton; - private RuleSet ruleSet; + protected TableViewer ruleTableViewer; + protected TableViewer rulePropertiesTableViewer; + protected Button removeRuleButton; + protected Button editRuleButton; + protected Button addPropertyButton; + protected RuleSet ruleSet; private boolean modified = false; /** @@ -580,14 +583,14 @@ public class PMDPreferencePage extends PreferencePage implements IWorkbenchPrefe * @param key a message key * @return requested message */ - private String getMessage(String key) { + protected String getMessage(String key) { return PMDPlugin.getDefault().getMessage(key); } /** * Helper method to get a filename without its extension */ - private String getFileNameWithoutExtension(String fileName) { + protected String getFileNameWithoutExtension(String fileName) { String name = fileName; int index = fileName.lastIndexOf('.'); @@ -632,7 +635,7 @@ public class PMDPreferencePage extends PreferencePage implements IWorkbenchPrefe /** * Refresh the list */ - private void refresh() { + protected void refresh() { try { ruleTableViewer.getControl().setRedraw(false); ruleTableViewer.refresh(); @@ -693,7 +696,7 @@ public class PMDPreferencePage extends PreferencePage implements IWorkbenchPrefe /** * Select and show a particular rule in the table */ - private void selectAndShowRule(Rule rule) { + protected void selectAndShowRule(Rule rule) { Table table = ruleTableViewer.getTable(); TableItem[] items = table.getItems(); for (int i = 0; i < items.length; i++) { diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleDialog.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleDialog.java index 8bc74c00b7..bf860993d1 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleDialog.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleDialog.java @@ -28,6 +28,9 @@ import org.eclipse.swt.widgets.Text; * @version $Revision$ * * $Log$ + * Revision 1.3 2003/08/13 20:09:06 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.2 2003/07/07 19:25:36 phherlin * Adding PMD violations view * @@ -41,12 +44,12 @@ public class RuleDialog extends Dialog { private static final int MODE_EDIT = 2; private static final int MODE_VIEW = 3; + protected Text implementationClassText; private int mode = MODE_ADD; private Rule editedRule; private Rule rule; private Text nameText; private Button xpathRuleButton; - private Text implementationClassText; private Text messageText; private Text descriptionText; private Text exampleText; diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleSetSelectionDialog.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleSetSelectionDialog.java index 69468d9c3c..714a303e59 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleSetSelectionDialog.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RuleSetSelectionDialog.java @@ -23,13 +23,16 @@ import org.eclipse.swt.widgets.Shell; * @version $Revision$ * * $Log$ + * Revision 1.2 2003/08/13 20:09:06 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.1 2003/06/30 20:16:06 phherlin * Redesigning plugin configuration * * */ public class RuleSetSelectionDialog extends Dialog { - private Combo inputCombo; + protected Combo inputCombo; private String importedRuleSetName; /** diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/properties/PMDPropertyPage.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/properties/PMDPropertyPage.java index a7a26ae5bc..f7386af8ca 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/properties/PMDPropertyPage.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/properties/PMDPropertyPage.java @@ -44,6 +44,9 @@ import org.eclipse.ui.dialogs.PropertyPage; * @version $Revision$ * * $Log$ + * Revision 1.8 2003/08/13 20:09:40 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.7 2003/07/07 19:27:52 phherlin * Making rules selectable from projects * @@ -404,7 +407,7 @@ public class PMDPropertyPage extends PropertyPage { * @param key a message key * @return requested message */ - private String getMessage(String key) { + protected String getMessage(String key) { return PMDPlugin.getDefault().getMessage(key); } diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ResourceMarkerContentProvider.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ResourceMarkerContentProvider.java index f005b1a37a..0fc8b54f98 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ResourceMarkerContentProvider.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ResourceMarkerContentProvider.java @@ -23,6 +23,9 @@ import org.eclipse.jface.viewers.Viewer; * @version $Revision$ * * $Log$ + * Revision 1.2 2003/08/13 20:10:20 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.1 2003/07/07 19:24:54 phherlin * Adding PMD violations view * @@ -114,7 +117,7 @@ public class ResourceMarkerContentProvider implements IStructuredContentProvider /** * Apply found updates on the table */ - private void updateViewer(List additions, List removals, List changes) { + protected void updateViewer(List additions, List removals, List changes) { // perform removals if (removals.size() > 0) { tableViewer.cancelEditing(); diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ViolationView.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ViolationView.java index 5a8468d9ac..249d66dc39 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ViolationView.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/views/ViolationView.java @@ -49,6 +49,9 @@ import org.eclipse.ui.part.ViewPart; * @version $Revision$ * * $Log$ + * Revision 1.3 2003/08/13 20:10:20 phherlin + * Refactoring private->protected to remove warning about non accessible member access in enclosing types + * * Revision 1.2 2003/08/05 19:27:41 phherlin * Fixing CoreException when refreshing (Eclipse v3) * @@ -65,16 +68,16 @@ public class ViolationView extends ViewPart implements IOpenListener, ISelection private TableViewer violationTableViewer; private IResource focusResource; - private int sorterFlag = SORTER_PRIORITY; - private IAction projectSelectAction; - private IAction fileSelectAction; - private IAction errorHighFilterAction; - private IAction errorFilterAction; - private IAction warningHighFilterAction; - private IAction warningFilterAction; - private IAction informationFilterAction; - private IAction showRuleAction; - private IAction removeViolationAction; + protected int sorterFlag = SORTER_PRIORITY; + protected IAction projectSelectAction; + protected IAction fileSelectAction; + protected IAction errorHighFilterAction; + protected IAction errorFilterAction; + protected IAction warningHighFilterAction; + protected IAction warningFilterAction; + protected IAction informationFilterAction; + protected IAction showRuleAction; + protected IAction removeViolationAction; /** * @see org.eclipse.ui.IWorkbenchPart#createPartControl(Composite) @@ -312,7 +315,7 @@ public class ViolationView extends ViewPart implements IOpenListener, ISelection * @param key a message key * @return requested message */ - private String getMessage(String key) { + protected String getMessage(String key) { return PMDPlugin.getDefault().getMessage(key); }