From: Patrick Plitzner Date: Mon, 24 Aug 2015 05:01:43 +0000 (+0200) Subject: Remove comments X-Git-Tag: 3.8.0^2~43^2~7 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/3c258b8a85168618e4f5b6fe1c1e41cc9e7f44ed Remove comments --- diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java index c2978874b..720cd6157 100644 --- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java +++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java @@ -34,9 +34,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.IViewPart; import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; import org.eclipse.ui.texteditor.ITextEditorActionConstants; import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineDocumentProvider; @@ -44,7 +42,6 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor; import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation; import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel; import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; -import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView; import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart; import eu.etaxonomy.taxeditor.model.IDirtyMarkable; import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; @@ -54,10 +51,6 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil; import eu.etaxonomy.taxeditor.store.CdmStore; /** - *

- * BulkEditor class. - *

- * * @author p.ciardelli * @created 07.07.2009 * @version 1.0 @@ -76,16 +69,10 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe private boolean isDirty; - /** - *

Constructor for BulkEditor.

- */ public BulkEditor() { super(CdmStore.createConversation()); } - /* (non-Javadoc) - * @see org.eclipse.ui.editors.text.TextEditor#initializeEditor() - */ /** {@inheritDoc} */ @Override protected void initializeEditor() { @@ -103,9 +90,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe setSourceViewerConfiguration(new BulkEditorViewerConfiguration(lineDisplayStrategy)); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.bulkeditor.ListEditor#createSourceViewer(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.source.IVerticalRuler, int) - */ /** {@inheritDoc} */ @Override protected ISourceViewer createSourceViewer(Composite parent, @@ -117,9 +101,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe return viewer; } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.bulkeditor.AnnotatedLineEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput) - */ /** {@inheritDoc} */ @Override public void init(IEditorSite site, IEditorInput input) @@ -132,9 +113,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe super.init(site, input); } - /* (non-Javadoc) - * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite) - */ /** {@inheritDoc} */ @Override public void createPartControl(Composite parent) { @@ -164,9 +142,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe } } - /* (non-Javadoc) - * @see org.eclipse.ui.editors.text.TextEditor#dispose() - */ /** {@inheritDoc} */ @Override public void dispose() { @@ -177,18 +152,12 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe } - /* (non-Javadoc) - * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#isEditable() - */ /** {@inheritDoc} */ @Override public boolean isEditable() { return false; } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#setFocus() - */ /** {@inheritDoc} */ @Override public void setFocus() { @@ -203,9 +172,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe } } - /** - * - */ private void displayWarningDialog() { IPreferenceStore prefs = PreferencesUtil.getPreferenceStore(); if (!prefs.getBoolean(PreferencesUtil.HIDE_BULKEDITOR_INFO)) { @@ -221,9 +187,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe } } - /** - * @param control - */ private void addToggleMergeCandidateListener(Control control) { control.addMouseListener(new MouseAdapter() { @Override @@ -235,11 +198,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe }); } - /** - *

toggleMergeCandidateAnnotation

- * - * @param line a int. - */ public void toggleMergeCandidateAnnotation(int line) { IDocument document = getSourceViewer().getDocument(); @@ -261,9 +219,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe } } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#isDirty() - */ @Override public boolean isDirty() { if(isDirty){ @@ -280,17 +235,14 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe firePropertyChange(PROP_DIRTY); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#doSave(org.eclipse.core.runtime.IProgressMonitor) - */ @Override public void doSave(IProgressMonitor progressMonitor) { isDirty = false; - + super.doSave(progressMonitor); - + selectFirstItem(); - + getSourceViewer().getTextWidget().setFocus(); } @@ -304,9 +256,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe // firePropertyChange(PROP_DIRTY); } - /* (non-Javadoc) - * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) - */ /** {@inheritDoc} */ public void performSearch(BulkEditorQuery query) { if (query != null) { @@ -323,7 +272,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe } conversation.commit(); conversation.clear(); - + getEditorInput().performSearch(query); refresh(); @@ -339,9 +288,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe getSelectionProvider().setSelection(selection); } - /** - * - */ public void refresh() { if(getDocumentProvider().getAnnotationModel(getEditorInput()) != null){ ((AnnotationModel) getDocumentProvider().getAnnotationModel(getEditorInput())).removeAllAnnotations(); diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSearch.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSearch.java index eb17b5435..238df83c8 100644 --- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSearch.java +++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSearch.java @@ -1,9 +1,9 @@ // $Id$ /** * Copyright (C) 2007 EDIT -* European Distributed Institute of Taxonomy +* European Distributed Institute of Taxonomy * http://www.e-taxonomy.eu -* +* * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ @@ -33,8 +33,6 @@ import eu.etaxonomy.taxeditor.preference.Resources; import eu.etaxonomy.taxeditor.store.SearchManager; /** - *

BulkEditorSearchComposite class.

- * * @author p.ciardelli * @author e.-m.lee * @author n.hoffmann @@ -42,83 +40,63 @@ import eu.etaxonomy.taxeditor.store.SearchManager; * @version 1.0 */ public class BulkEditorSearch { - - /** - * - */ + private static final String SEARCH = "Search"; - + private static final String DEFAULT_TEXT = String.format("Use \'%s\' for wildcard searching", SearchManager.WILDCARD); - + private final BulkEditor editor; - + private Text text; private BulkEditorSortCombo sortCombo; - + private Button button; - - + + public Object ORDER_BY = new Object(); - - /** - *

Constructor for BulkEditorSearchComposite.

- * - * @param parent a {@link org.eclipse.swt.widgets.Composite} object. - * @param style a int. - * @param editor a {@link org.eclipse.ui.IEditorPart} object. - */ + public BulkEditorSearch(BulkEditor editor, Composite parent, int style) { this.editor = editor; - + createControl(parent, style); } - /* - * Creates the search control. - */ /** - *

createControl

+ * Creates the search control. */ protected void createControl(Composite parent, int style) { - + final Composite container = new Composite(parent, style); GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false); container.setLayoutData(gridData); container.setLayout(new GridLayout(5, false)); - + createSearchTextField(container, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); - + createSortCombo(container, style); - + button = new Button(container, SWT.PUSH); button.setText(SEARCH); button.addSelectionListener(new SelectionAdapter() { - /* (non-Javadoc) - * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) - */ @Override public void widgetSelected(SelectionEvent e) { updateEditorInput(); } }); - + registerAtFocusService(); } - /** - * @param container - * @param style - */ private void createSortCombo(Composite parent, int style) { sortCombo = new BulkEditorSortCombo(parent, editor.getEditorInput().getSortProviders()); - + } /** * Handles focus changes for the textfield. */ private void registerAtFocusService() { - IFocusService focusService = + IFocusService focusService = (IFocusService) PlatformUI.getWorkbench().getService(IFocusService.class); if (focusService != null) { focusService.addFocusTracker(text, "bulkeditor.textControlId"); @@ -132,32 +110,31 @@ public class BulkEditorSearch { private void createSearchTextField(Composite parent, int style) { final Label label = new Label(parent, SWT.NONE); label.setText("Title Cache"); - + text = new Text(parent, style); text.setText(DEFAULT_TEXT); text.setForeground(BulkEditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND)); - + text.addFocusListener(new FocusListener() { - public void focusGained(FocusEvent e) { + @Override + public void focusGained(FocusEvent e) { text.setForeground(BulkEditorUtil.getColor(Resources.SEARCH_VIEW_FOCUS)); if (DEFAULT_TEXT.equals(text.getText())) { text.setText(""); } } - public void focusLost(FocusEvent e) { + @Override + public void focusLost(FocusEvent e) { if (CdmUtils.isEmpty(text.getText())) { text.setForeground(BulkEditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND)); - text.setText(DEFAULT_TEXT); - } + text.setText(DEFAULT_TEXT); + } } }); - + text.addKeyListener(new KeyAdapter() { - /* (non-Javadoc) - * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent) - */ @Override public void keyReleased(KeyEvent e) { if (e.keyCode == SWT.CR) { @@ -165,7 +142,7 @@ public class BulkEditorSearch { } } }); - + GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); text.setLayoutData(gridData); } @@ -175,49 +152,29 @@ public class BulkEditorSearch { * Shows the results of the search. */ private void updateEditorInput() { - + String searchString = getSearchString().trim(); - + if(DEFAULT_TEXT.equals(searchString) || CdmUtils.isEmpty(searchString)){ return; - } - + } + BulkEditorQuery query = new BulkEditorQuery(getSearchString(), getComparator()); editor.performSearch(query); } - - /* + + /** * Returns the current string in the search textfield. * @return the content of the textfield */ - /** - *

getSearchString

- * - * @return a {@link java.lang.String} object. - */ public String getSearchString() { return text.getText().trim(); } - - /* - * - */ - /** - *

getComparator

- * - * @return a {@link java.util.Comparator} object. - */ + public Comparator getComparator() { return sortCombo.getSelection(); - }; - - /* - * - */ + } - /** - * - */ public void setFocus() { if(text != null && ! text.isDisposed()){ text.setFocus();