From 8046fc7ab2aeb3c1b1c3183ace5ba827c106f271 Mon Sep 17 00:00:00 2001 From: incastrix Date: Wed, 23 Dec 2009 17:37:17 +0000 Subject: [PATCH] Refactory: remove unused classes, imports, fields and methods. --- .../ui/text/phpdoc/JavaDocAutoIndentStrategy.java | 14 ++++---- .../ui/text/phpdoc/PHPDocCompletionProcessor.java | 6 ++-- .../phpdt/internal/ui/util/ExceptionHandler.java | 14 ++++---- .../phpdt/internal/ui/util/FilteredList.java | 8 ++-- .../phpdt/internal/ui/util/StringMatcher.java | 6 ++-- .../viewsupport/AppearanceAwareLabelProvider.java | 6 ++-- .../ui/viewsupport/ContainerCheckedTreeViewer.java | 16 ++++---- .../ui/viewsupport/JavaUILabelProvider.java | 36 ++++++++++---------- .../ui/viewsupport/ListContentProvider.java | 6 ++-- .../internal/ui/viewsupport/MemberFilter.java | 6 ++-- .../ui/viewsupport/ProblemTableViewer.java | 18 +++++----- 11 files changed, 68 insertions(+), 68 deletions(-) diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/JavaDocAutoIndentStrategy.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/JavaDocAutoIndentStrategy.java index a4afa5d..84c8219 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/JavaDocAutoIndentStrategy.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/JavaDocAutoIndentStrategy.java @@ -26,7 +26,7 @@ import net.sourceforge.phpdt.ui.PreferenceConstants; import net.sourceforge.phpeclipse.ui.WebUI; //import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Preferences; +//import org.eclipse.core.runtime.Preferences; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy; @@ -194,12 +194,12 @@ public class JavaDocAutoIndentStrategy extends // lineDelimiter); // } - public static int getTabWidth() { - Preferences preferences = WebUI.getDefault() - .getPluginPreferences(); - return preferences - .getInt(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH); - } +// public static int getTabWidth() { +// Preferences preferences = WebUI.getDefault() +// .getPluginPreferences(); +// return preferences +// .getInt(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH); +// } // private String createTypeTags(IDocument document, DocumentCommand command, // String indentation, String lineDelimiter, IType type) diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/PHPDocCompletionProcessor.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/PHPDocCompletionProcessor.java index 19b5ee5..2f5fa5a 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/PHPDocCompletionProcessor.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/text/phpdoc/PHPDocCompletionProcessor.java @@ -47,7 +47,7 @@ public class PHPDocCompletionProcessor implements IContentAssistProcessor { private TemplateEngine fTemplateEngine; - private boolean fRestrictToMatchingCase; + //private boolean fRestrictToMatchingCase; private IEditorPart fEditor; @@ -63,7 +63,7 @@ public class PHPDocCompletionProcessor implements IContentAssistProcessor { .getTemplateContextRegistry().getContextType("phpdoc"); //$NON-NLS-1$ if (contextType != null) fTemplateEngine = new TemplateEngine(contextType); - fRestrictToMatchingCase = false; + //fRestrictToMatchingCase = false; fComparator = new PHPCompletionProposalComparator(); } @@ -86,7 +86,7 @@ public class PHPDocCompletionProcessor implements IContentAssistProcessor { * true if proposals should be restricted */ public void restrictProposalsToMatchingCases(boolean restrict) { - fRestrictToMatchingCase = restrict; + //fRestrictToMatchingCase = restrict; } /** diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java index a5807a9..baceffd 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/ExceptionHandler.java @@ -23,19 +23,19 @@ public class ExceptionHandler { IStatus.ERROR, message, t)); } - public static void handle(CoreException e, String title, String message) { - handle(e, WebUI.getActiveWorkbenchShell(), title, message); - } +// public static void handle(CoreException e, String title, String message) { +// handle(e, WebUI.getActiveWorkbenchShell(), title, message); +// } public static void handle(CoreException e, Shell parent, String title, String message) { fgInstance.perform(e, parent, title, message); } - public static void handle(InvocationTargetException e, String title, - String message) { - handle(e, WebUI.getActiveWorkbenchShell(), title, message); - } +// public static void handle(InvocationTargetException e, String title, +// String message) { +// handle(e, WebUI.getActiveWorkbenchShell(), title, message); +// } public static void handle(InvocationTargetException e, Shell parent, String title, String message) { diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/FilteredList.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/FilteredList.java index 374edab..a9e209f 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/FilteredList.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/FilteredList.java @@ -250,10 +250,10 @@ public class FilteredList extends Composite { /** * Sets the filter matcher. */ - public void setFilterMatcher(FilterMatcher filterMatcher) { - Assert.isNotNull(filterMatcher); - fFilterMatcher = filterMatcher; - } +// public void setFilterMatcher(FilterMatcher filterMatcher) { +// Assert.isNotNull(filterMatcher); +// fFilterMatcher = filterMatcher; +// } /** * Sets a custom comparator for sorting the list. diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java index dc778c3..7218c11 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/util/StringMatcher.java @@ -350,7 +350,7 @@ public class StringMatcher { * @return the starting index in the text of the pattern , or -1 if not * found */ - protected int regExpPosIn(String text, int start, int end, String p) { + private int regExpPosIn(String text, int start, int end, String p) { int plen = p.length(); int max = end - plen; @@ -374,7 +374,7 @@ public class StringMatcher { * @param ignoreCase, boolean indicating wether code>p * is case sensitive */ - protected boolean regExpRegionMatches(String text, int tStart, String p, + private boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) { while (plen-- > 0) { char tchar = text.charAt(tStart++); @@ -418,7 +418,7 @@ public class StringMatcher { * @return the starting index in the text of the pattern , or -1 if not * found */ - protected int textPosIn(String text, int start, int end, String p) { + private int textPosIn(String text, int start, int end, String p) { int plen = p.length(); int max = end - plen; diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java index bbed6ac..8150635 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java @@ -48,9 +48,9 @@ public class AppearanceAwareLabelProvider extends JavaUILabelProvider implements /** * Creates a labelProvider with DEFAULT_TEXTFLAGS and DEFAULT_IMAGEFLAGS */ - public AppearanceAwareLabelProvider() { - this(DEFAULT_TEXTFLAGS, DEFAULT_IMAGEFLAGS); - } +// public AppearanceAwareLabelProvider() { +// this(DEFAULT_TEXTFLAGS, DEFAULT_IMAGEFLAGS); +// } private void initMasks() { IPreferenceStore store = PreferenceConstants.getPreferenceStore(); diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ContainerCheckedTreeViewer.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ContainerCheckedTreeViewer.java index 0bd7141..eb261b1 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ContainerCheckedTreeViewer.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ContainerCheckedTreeViewer.java @@ -27,10 +27,10 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer { * * @see CheckboxTreeViewer#CheckboxTreeViewer(Composite) */ - public ContainerCheckedTreeViewer(Composite parent) { - super(parent); - initViewer(); - } +// public ContainerCheckedTreeViewer(Composite parent) { +// super(parent); +// initViewer(); +// } /** * Constructor for ContainerCheckedTreeViewer. @@ -47,10 +47,10 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer { * * @see CheckboxTreeViewer#CheckboxTreeViewer(Tree) */ - public ContainerCheckedTreeViewer(Tree tree) { - super(tree); - initViewer(); - } +// public ContainerCheckedTreeViewer(Tree tree) { +// super(tree); +// initViewer(); +// } private void initViewer() { setUseHashlookup(true); diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/JavaUILabelProvider.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/JavaUILabelProvider.java index abe10ec..09b8826 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/JavaUILabelProvider.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/JavaUILabelProvider.java @@ -33,10 +33,10 @@ public class JavaUILabelProvider extends LabelProvider { /** * Creates a new label provider with default flags. */ - public JavaUILabelProvider() { - this(JavaElementLabels.M_PARAMETER_TYPES, - JavaElementImageProvider.OVERLAY_ICONS); - } +// public JavaUILabelProvider() { +// this(JavaElementLabels.M_PARAMETER_TYPES, +// JavaElementImageProvider.OVERLAY_ICONS); +// } /** * @param textFlags @@ -222,19 +222,19 @@ public class JavaUILabelProvider extends LabelProvider { super.removeListener(listener); } - public static ILabelDecorator[] getDecorators(boolean errortick, - ILabelDecorator extra) { - if (errortick) { - if (extra == null) { - return new ILabelDecorator[] {}; - } else { - return new ILabelDecorator[] { extra }; - } - } - if (extra != null) { - return new ILabelDecorator[] { extra }; - } - return null; - } +// public static ILabelDecorator[] getDecorators(boolean errortick, +// ILabelDecorator extra) { +// if (errortick) { +// if (extra == null) { +// return new ILabelDecorator[] {}; +// } else { +// return new ILabelDecorator[] { extra }; +// } +// } +// if (extra != null) { +// return new ILabelDecorator[] { extra }; +// } +// return null; +// } } diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ListContentProvider.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ListContentProvider.java index e520f4f..8c4b098 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ListContentProvider.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ListContentProvider.java @@ -41,7 +41,7 @@ public class ListContentProvider implements IStructuredContentProvider { public void dispose() { } - public boolean isDeleted(Object o) { - return fContents != null && !fContents.contains(o); - } +// public boolean isDeleted(Object o) { +// return fContents != null && !fContents.contains(o); +// } } diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/MemberFilter.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/MemberFilter.java index 5b5bf44..4352cc8 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/MemberFilter.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/MemberFilter.java @@ -58,9 +58,9 @@ public class MemberFilter extends ViewerFilter { /* * @see ViewerFilter@isFilterProperty */ - public boolean isFilterProperty(Object element, Object property) { - return false; - } +// public boolean isFilterProperty(Object element, Object property) { +// return false; +// } /* * @see ViewerFilter@select diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ProblemTableViewer.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ProblemTableViewer.java index 6bc9ca3..0670c04 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ProblemTableViewer.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/viewsupport/ProblemTableViewer.java @@ -20,7 +20,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.jface.viewers.IBaseLabelProvider; import org.eclipse.jface.viewers.LabelProviderChangedEvent; import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.swt.widgets.Composite; +//import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Widget; @@ -39,10 +39,10 @@ public class ProblemTableViewer extends TableViewer { * * @param parent */ - public ProblemTableViewer(Composite parent) { - super(parent); - initMapper(); - } +// public ProblemTableViewer(Composite parent) { +// super(parent); +// initMapper(); +// } /** * Constructor for ProblemTableViewer. @@ -50,10 +50,10 @@ public class ProblemTableViewer extends TableViewer { * @param parent * @param style */ - public ProblemTableViewer(Composite parent, int style) { - super(parent, style); - initMapper(); - } +// public ProblemTableViewer(Composite parent, int style) { +// super(parent, style); +// initMapper(); +// } /** * Constructor for ProblemTableViewer. -- 1.7.1