Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLDoubleClickStrategy.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLDoubleClickStrategy.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLDoubleClickStrategy.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLDoubleClickStrategy.java Sat Sep 6 08:06:53 2008 @@ -30,8 +30,9 @@ public void doubleClicked(ITextViewer part) { int pos = part.getSelectedRange().x; - if (pos < 0) + if (pos < 0) { return; + } fText = part; @@ -54,13 +55,15 @@ pos -= 2; continue; } - if (c == Character.LINE_SEPARATOR || c == '\"') + if (c == Character.LINE_SEPARATOR || c == '\"') { break; + } --pos; } - if (c != '\"') + if (c != '\"') { return false; + } startPos = pos; @@ -70,12 +73,14 @@ while (pos < length) { c = doc.getChar(pos); - if (c == Character.LINE_SEPARATOR || c == '\"') + if (c == Character.LINE_SEPARATOR || c == '\"') { break; + } ++pos; } - if (c != '\"') + if (c != '\"') { return false; + } endPos = pos; @@ -103,8 +108,9 @@ while (pos >= 0) { c = doc.getChar(pos); - if (!Character.isJavaIdentifierPart(c)) + if (!Character.isJavaIdentifierPart(c)) { break; + } --pos; } @@ -115,8 +121,9 @@ while (pos < length) { c = doc.getChar(pos); - if (!Character.isJavaIdentifierPart(c)) + if (!Character.isJavaIdentifierPart(c)) { break; + } ++pos; }
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLEditor.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLEditor.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLEditor.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLEditor.java Sat Sep 6 08:06:53 2008 @@ -32,8 +32,8 @@ public XMLEditor(IvyContentAssistProcessor processor) { super(); colorManager = new ColorManager(); - _configuration = new XMLConfiguration(colorManager, processor); - setSourceViewerConfiguration(_configuration); + configuration = new XMLConfiguration(colorManager, processor); + setSourceViewerConfiguration(configuration); setDocumentProvider(new XMLDocumentProvider()); } @@ -45,7 +45,7 @@ private static final String CONTENTASSIST_PROPOSAL_ID = "org.apache.ivyde.ContentAssistProposal"; - private XMLConfiguration _configuration; + private XMLConfiguration configuration; protected void createActions() { super.createActions(); @@ -65,6 +65,6 @@ } public void setFile(IFile file) { - _configuration.setFile(file); + configuration.setFile(file); } } Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLPartitionScanner.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLPartitionScanner.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLPartitionScanner.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLPartitionScanner.java Sat Sep 6 08:06:53 2008 @@ -24,11 +24,11 @@ import org.eclipse.jface.text.rules.Token; public class XMLPartitionScanner extends RuleBasedPartitionScanner { - public final static String XML_DEFAULT = "__xml_default"; + public static final String XML_DEFAULT = "__xml_default"; - public final static String XML_COMMENT = "__xml_comment"; + public static final String XML_COMMENT = "__xml_comment"; - public final static String XML_TAG = "__xml_tag"; + public static final String XML_TAG = "__xml_tag"; public XMLPartitionScanner() { Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java Sat Sep 6 08:06:53 2008 @@ -54,9 +54,9 @@ /** the ID of the preference page */ public static final String PEREFERENCE_PAGE_ID = "org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage"; - private StringFieldEditor _pattern; + private StringFieldEditor pattern; - private BooleanFieldEditor _retreiveSync; + private BooleanFieldEditor retreiveSync; public IvyPreferencePage() { super(GRID); @@ -64,6 +64,10 @@ setDescription(""); } + public void init(IWorkbench workbench) { + // nothing to init + } + /** * Creates the field editors. Field editors are abstractions of the common GUI blocks needed to * manipulate various types of preferences. Each field editor knows how to save and restore @@ -73,6 +77,7 @@ final Composite fieldParent = getFieldEditorParent(); Label info = new Label(fieldParent, SWT.NONE); + //CheckStyle:MagicNumber| OFF info.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 3, 1)); info.setText("Apache Ivy version " + Ivy.getIvyVersion() + " - " + Ivy.getIvyDate()); new Label(fieldParent, SWT.NONE).setLayoutData(new GridData(GridData.FILL, @@ -124,21 +129,21 @@ final Button b = getChangeControl(parent); b.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - _pattern.setEnabled(b.getSelection(), parent); - _retreiveSync.setEnabled(b.getSelection(), parent); + pattern.setEnabled(b.getSelection(), parent); + retreiveSync.setEnabled(b.getSelection(), parent); } }); } }; - _pattern = new StringFieldEditor(PreferenceConstants.RETRIEVE_PATTERN, "Pattern", + pattern = new StringFieldEditor(PreferenceConstants.RETRIEVE_PATTERN, "Pattern", fieldParent); - _pattern.setEnabled(getPreferenceStore().getBoolean(PreferenceConstants.DO_RETRIEVE), + pattern.setEnabled(getPreferenceStore().getBoolean(PreferenceConstants.DO_RETRIEVE), fieldParent); - _retreiveSync = new BooleanFieldEditor(PreferenceConstants.RETRIEVE_SYNC, + retreiveSync = new BooleanFieldEditor(PreferenceConstants.RETRIEVE_SYNC, "Delete old retrieved artifacts", fieldParent); addField(doR); - addField(_pattern); - addField(_retreiveSync); + addField(pattern); + addField(retreiveSync); new Label(fieldParent, SWT.NONE); // space explanation = new Label(fieldParent, SWT.NONE); @@ -238,14 +243,7 @@ fieldParent)); addField(new StringFieldEditor(PreferenceConstants.ORGANISATION_URL, "Organisation &URL:", fieldParent)); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) - */ - public void init(IWorkbench workbench) { + //CheckStyle:MagicNumber| ON } } Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java Sat Sep 6 08:06:53 2008 @@ -20,7 +20,11 @@ /** * Constant definitions for plug-in preferences */ -public class PreferenceConstants { +public final class PreferenceConstants { + + private PreferenceConstants() { + // utility class + } public static final String IVYSETTINGS_PATH = "ivy_conf_path"; Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java Sat Sep 6 08:06:53 2008 @@ -34,10 +34,10 @@ import org.eclipse.ui.part.ViewPart; public class ReportView extends ViewPart implements ISelectionListener { - private Browser _browser; + private Browser browser; public void createPartControl(Composite parent) { - _browser = new Browser(parent, SWT.NONE); + browser = new Browser(parent, SWT.NONE); // add myself as a global selection listener getSite().getPage().addSelectionListener(this); @@ -55,17 +55,18 @@ IvyClasspathContainer ivycp = IvyClasspathUtil .getIvyClasspathContainer((IStructuredSelection) sel); if (ivycp != null) { - _browser.setUrl(""); + browser.setUrl(""); URL report; try { report = ivycp.getReportUrl(); } catch (IvyDEException e) { e.log(IStatus.WARNING, "Impossible show the report for " + ivycp.getConf()); - e.show(IStatus.WARNING, "Show Ivy report failure", "Impossible show the report for " + ivycp.getConf()); + e.show(IStatus.WARNING, "Show Ivy report failure", + "Impossible show the report for " + ivycp.getConf()); return; } - if (!_browser.setUrl(report.toExternalForm())) { - _browser.setUrl(""); + if (!browser.setUrl(report.toExternalForm())) { + browser.setUrl(""); Message.warn("impossible to set report view url to " + report.toExternalForm()); } } Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizard.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizard.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizard.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizard.java Sat Sep 6 08:06:53 2008 @@ -45,7 +45,6 @@ import org.eclipse.ui.INewWizard; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWizard; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; @@ -92,7 +91,8 @@ final IFile file = container.getFile(new Path(fileName)); if (file.exists() && !MessageDialog.openConfirm(getShell(), "overwrite existing ?", - "The file you selected already exist. Do you want to overwrite its content ?")) { + "The file you selected already exist." + + "Do you want to overwrite its content ?")) { return false; } @@ -156,7 +156,8 @@ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getActivePage(); try { - page.openEditor(new IvyFileEditorInput(file), IvyModuleDescriptorEditor.ID, true); + page.openEditor(new IvyFileEditorInput(file), IvyModuleDescriptorEditor.ID, + true); // IDE.openEditor(page, file, IvyEditor.ID, true); } catch (PartInitException e) { // this should not happen Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizardPage.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizardPage.java?rev=692658&r1=692657&r2=692658&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizardPage.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/wizards/IvyNewWizardPage.java Sat Sep 6 08:06:53 2008 @@ -23,7 +23,6 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.IDialogPage; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.WizardPage; @@ -68,7 +67,8 @@ public IvyNewWizardPage(ISelection selection) { super("wizardPage"); setTitle("Ivy File"); - setDescription("This wizard creates a new ivy.xml that can be opened by the ivy multi-page editor."); + setDescription("This wizard creates a new ivy.xml " + + "that can be opened by the ivy multi-page editor."); this.selection = selection; } @@ -79,8 +79,10 @@ Composite container = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); container.setLayout(layout); + // CheckStyle:MagicNumber| OFF layout.numColumns = 3; layout.verticalSpacing = 9; + // CheckStyle:MagicNumber| ON Label label = new Label(container, SWT.NULL); label.setText("&Container:"); @@ -166,7 +168,7 @@ */ private void initialize() { - if (selection != null && selection.isEmpty() == false + if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { IStructuredSelection ssel = (IStructuredSelection) selection; if (ssel.size() > 1) { @@ -238,7 +240,7 @@ int dotLoc = fileName.lastIndexOf('.'); if (dotLoc != -1) { String ext = fileName.substring(dotLoc + 1); - if (ext.equalsIgnoreCase("xml") == false) { + if (!ext.equalsIgnoreCase("xml")) { updateStatus("File extension must be \".xml\""); return; }