Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 21:39:58 +0000
committerPaul Pazderski2019-05-19 23:44:04 +0000
commit8bc461175ceded9ec872cff17d84fbce8fc4795d (patch)
tree341effbc5c46d3376180e05cefa509d7d4ec270b
parent9e7f66919496659795478f8cd80804da71498fff (diff)
downloadeclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.tar.gz
eclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.tar.xz
eclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.zip
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: I3e7b6abb69a1894c402f9123417346a44fc0992a
-rw-r--r--org.eclipse.core.filebuffers/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.core.filebuffers/pom.xml2
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ITextFileBufferManager.java2
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/LocationKind.java2
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java4
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractUndoManagerTest.java2
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java4
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/rules/FastPartitionerTest.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java126
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java130
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java6
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java8
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultDocumentAdapter.java6
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java58
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/IFindReplaceTarget.java26
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewerExtension2.java6
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java18
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java216
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java80
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java14
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java26
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultPartitioner.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/FastPartitioner.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitioner.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedScanner.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java18
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java12
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java16
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java36
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java24
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java12
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java8
-rw-r--r--org.eclipse.search/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java4
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java32
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java48
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java6
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistoryDropDownAction.java2
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java14
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchMessages.java16
-rw-r--r--org.eclipse.search/pom.xml2
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java2
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java148
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java2
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java10
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java2
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java26
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java26
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPreferencePage.java28
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java4
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java30
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java16
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceRefactoring.java18
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java4
-rw-r--r--org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java22
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/AbstractLineTrackerTest.java2
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/AdaptiveGapTextTest.java16
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/GapTextTest.java16
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/LineTrackerTest3.java10
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java2
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/Assert.java2
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/IDocument.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java14
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java8
-rwxr-xr-xorg.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java40
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java78
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java60
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java138
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java52
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java32
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java10
-rw-r--r--org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java20
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java14
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ConvertLineDelimitersAction.java2
-rwxr-xr-xorg.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/LinkedModeConfigurationBlock.java50
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/RemoveTrailingWhitespaceHandler.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesDialog.java108
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java12
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java26
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java12
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java8
-rw-r--r--org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java24
-rw-r--r--org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/FoldingReconciler.java18
-rw-r--r--org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/HighlightReconciler.java6
-rw-r--r--org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NatureLabelHoverProvider.java46
-rw-r--r--org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NaturesAndProjectsContentAssistProcessor.java92
-rw-r--r--org.eclipse.ui.genericeditor.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.genericeditor.tests/pom.xml2
-rw-r--r--org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/FoldingReconciler.java18
-rw-r--r--org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightReconciler.java6
-rw-r--r--org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerFirst.java2
-rw-r--r--org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerSecond.java2
-rw-r--r--org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/DefaultWordHighlightReconciler.java6
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/pom.xml2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java34
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java76
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java6
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java14
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/compare/equivalence/DJBHashFunction.java16
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java48
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java6
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java10
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java28
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceAction.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java80
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java8
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java62
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java44
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesTransfer.java6
131 files changed, 1406 insertions, 1406 deletions
diff --git a/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF b/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF
index 07a476c2824..18791686a24 100644
--- a/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF
+++ b/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.filebuffers; singleton:=true
-Bundle-Version: 3.6.500.qualifier
+Bundle-Version: 3.6.600.qualifier
Bundle-Activator: org.eclipse.core.internal.filebuffers.FileBuffersPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/org.eclipse.core.filebuffers/pom.xml b/org.eclipse.core.filebuffers/pom.xml
index 68dbd3f5619..18b26a357f5 100644
--- a/org.eclipse.core.filebuffers/pom.xml
+++ b/org.eclipse.core.filebuffers/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.filebuffers</artifactId>
- <version>3.6.500-SNAPSHOT</version>
+ <version>3.6.600-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ITextFileBufferManager.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ITextFileBufferManager.java
index 299f92fe15d..0fa233ce548 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ITextFileBufferManager.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ITextFileBufferManager.java
@@ -96,7 +96,7 @@ public interface ITextFileBufferManager extends IFileBufferManager {
ITextFileBuffer getFileStoreTextFileBuffer(IFileStore fileStore);
/**
- * Returns the text file buffer managed for the given document
+ * Returns the text file buffer managed for the given document
* or <code>null</code> if there is no such text file buffer.
* <p>
* <strong>Note:</strong> This method goes through the list
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/LocationKind.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/LocationKind.java
index 0d95286374f..7378dc8a9b8 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/LocationKind.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/LocationKind.java
@@ -32,7 +32,7 @@ public final class LocationKind {
* connected using a file store will not be found.
* </p>
*
- * @see IFileBufferManager#connectFileStore(org.eclipse.core.filesystem.IFileStore, org.eclipse.core.runtime.IProgressMonitor)
+ * @see IFileBufferManager#connectFileStore(org.eclipse.core.filesystem.IFileStore, org.eclipse.core.runtime.IProgressMonitor)
*/
public static final LocationKind LOCATION= new LocationKind("location"); //$NON-NLS-1$
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java
index bbaad7989a7..06f91f8c374 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java
@@ -113,7 +113,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
/** Tells whether the file on disk has a BOM. */
private boolean fHasBOM;
/** The annotation model of this file buffer */
- private IAnnotationModel fAnnotationModel;
+ private IAnnotationModel fAnnotationModel;
/**
* Lock for lazy creation of annotation model.
* @since 3.2
@@ -258,7 +258,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
if (fAnnotationModel instanceof IPersistableAnnotationModel) {
IPersistableAnnotationModel persistableModel= (IPersistableAnnotationModel) fAnnotationModel;
try {
- persistableModel.revert(fDocument);
+ persistableModel.revert(fDocument);
} catch (CoreException x) {
fStatus= x.getStatus();
}
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractUndoManagerTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractUndoManagerTest.java
index 14fd1a881fd..01f385a1c38 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractUndoManagerTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractUndoManagerTest.java
@@ -404,7 +404,7 @@ public abstract class AbstractUndoManagerTest {
fUndoManager.beginCompoundChange();
fUndoManager.endCompoundChange();
- // insert the atomic changes
+ // insert the atomic changes
doRepeatableChange(document);
assertTrue(fUndoManager.undoable());
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
index 9e06ba19ba8..4fbb54ecffc 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
@@ -118,8 +118,8 @@ public class CodeMiningProjectionViewerTest {
public void dispose() {
}
});
- projectionSupport.install();
- fViewer.doOperation(ProjectionViewer.TOGGLE);
+ projectionSupport.install();
+ fViewer.doOperation(ProjectionViewer.TOGGLE);
}
@After
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/rules/FastPartitionerTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/rules/FastPartitionerTest.java
index 71053c1e4a7..9a51de2b4d2 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/rules/FastPartitionerTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/rules/FastPartitionerTest.java
@@ -243,7 +243,7 @@ public class FastPartitionerTest {
int[] offsets= new int[] { 0, 1 };
assertComputePartitioning_InterleavingPartitions(offsets);
- }
+ }
@Test
public void testBug368219_1() throws Exception {
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
index 777850d2fc8..ea232664e09 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
@@ -50,7 +50,7 @@ public abstract class SingleCharReader extends Reader {
/**
* @see Reader#ready()
*/
- @Override
+ @Override
public boolean ready() throws IOException {
return true;
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
index 4e1a0c0ece8..dea4d1d26f8 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
@@ -131,7 +131,7 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
/**
* @see Reader#ready()
*/
- @Override
+ @Override
public boolean ready() throws IOException {
return fReader.ready();
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java
index 8ea4fae1230..38c6be651ea 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java
@@ -1541,7 +1541,7 @@ public class ContentAssistant2 implements IContentAssistant, IContentAssistantEx
* @since 3.4
*/
boolean isColoredLabelsSupportEnabled() {
- return fIsColoredLabelsSupportEnabled;
+ return fIsColoredLabelsSupportEnabled;
}
/**
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
index b89eaec75fb..5dda118d83c 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
@@ -564,7 +564,7 @@ class ContextInformationPopup2 implements IContentAssistListener2 {
} else if (key == SWT.ESC) {
e.doit= false;
- hideContextInfoPopup();
+ hideContextInfoPopup();
} else {
validateContextInformation();
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java
index bc95f338820..83fa56f0cd2 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java
@@ -30,7 +30,7 @@ public final class LineIndexOutOfBoundsException extends IndexOutOfBoundsExcepti
super();
}
- /**
+ /**
* Constructs an <code>LineIndexOutOfBoundsException</code> with the specified detail message.
*
* @param s the detail message.
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
index 0bb4492361d..0daf9b69e00 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
@@ -285,7 +285,7 @@ public final class RevisionPainter {
updateFocusRevision(null); // kill any focus as the ctx menu is going to show
if (e.button == 1) {
fMouseDownRegion= fFocusRange;
- postRedraw();
+ postRedraw();
}
}
@@ -351,41 +351,41 @@ public final class RevisionPainter {
@Override
protected IInformationControl doCreateInformationControl(Shell parent) {
if (BrowserInformationControl.isAvailable(parent)) {
- return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, fIsFocusable) {
- /**
+ return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, fIsFocusable) {
+ /**
* {@inheritDoc}
*
* @deprecated use {@link #setInput(Object)}
*/
- @Deprecated
+ @Deprecated
@Override
public void setInformation(String content) {
- content= addCSSToHTMLFragment(content);
- super.setInformation(content);
- }
-
- /**
- * Adds a HTML header and CSS info if <code>html</code> is only an HTML fragment (has no
- * &lt;html&gt; section).
- *
- * @param html the html / text produced by a revision
- * @return modified html
- */
- private String addCSSToHTMLFragment(String html) {
- int max= Math.min(100, html.length());
- if (html.substring(0, max).indexOf("<html>") != -1) //$NON-NLS-1$
- // there is already a header
- return html;
-
- StringBuilder info= new StringBuilder(512 + html.length());
- HTMLPrinter.insertPageProlog(info, 0, fgStyleSheet);
- info.append(html);
- HTMLPrinter.addPageEpilog(info);
- return info.toString();
- }
-
- };
- }
+ content= addCSSToHTMLFragment(content);
+ super.setInformation(content);
+ }
+
+ /**
+ * Adds a HTML header and CSS info if <code>html</code> is only an HTML fragment (has no
+ * &lt;html&gt; section).
+ *
+ * @param html the html / text produced by a revision
+ * @return modified html
+ */
+ private String addCSSToHTMLFragment(String html) {
+ int max= Math.min(100, html.length());
+ if (html.substring(0, max).indexOf("<html>") != -1) //$NON-NLS-1$
+ // there is already a header
+ return html;
+
+ StringBuilder info= new StringBuilder(512 + html.length());
+ HTMLPrinter.insertPageProlog(info, 0, fgStyleSheet);
+ info.append(html);
+ HTMLPrinter.addPageEpilog(info);
+ return info.toString();
+ }
+
+ };
+ }
return new DefaultInformationControl(parent, fIsFocusable);
}
@@ -473,7 +473,7 @@ public final class RevisionPainter {
return range == null ? null : new LineRange(lineNumber, 1);
}
- @Override
+ @Override
public IInformationControlCreator getInformationPresenterControlCreator() {
RevisionInformation revisionInfo= fRevisionInfo;
if (revisionInfo != null) {
@@ -482,7 +482,7 @@ public final class RevisionPainter {
return creator;
}
return new HoverInformationControlCreator(true);
- }
+ }
}
/* Listeners and helpers. */
@@ -1156,8 +1156,8 @@ public final class RevisionPainter {
/**
* Handles the selection of a revision id and informs listeners
*
- * @param id the selected revision id
- */
+ * @param id the selected revision id
+ */
void handleRevisionSelected(String id) {
Assert.isLegal(id != null);
if (fRevisionInfo == null)
@@ -1174,14 +1174,14 @@ public final class RevisionPainter {
handleRevisionSelected((Revision) null);
}
- /**
- * Returns the selection provider.
- *
- * @return the selection provider
- */
- public RevisionSelectionProvider getRevisionSelectionProvider() {
+ /**
+ * Returns the selection provider.
+ *
+ * @return the selection provider
+ */
+ public RevisionSelectionProvider getRevisionSelectionProvider() {
return fRevisionSelectionProvider;
- }
+ }
/**
* Updates the focus line with a new line.
@@ -1232,9 +1232,9 @@ public final class RevisionPainter {
}
private void updateFocusRevision(Revision revision) {
- if (fFocusRevision != revision)
+ if (fFocusRevision != revision)
onFocusRevisionChanged(fFocusRevision, revision);
- }
+ }
/**
* Handles a changing focus revision.
@@ -1423,30 +1423,30 @@ public final class RevisionPainter {
* @param offset the document offset
* @return the revision at offset, or <code>null</code> for none
*/
- Revision getRevision(int offset) {
- IDocument document= fViewer.getDocument();
- int line;
- try {
- line= document.getLineOfOffset(offset);
- } catch (BadLocationException x) {
- return null;
- }
- if (line != -1) {
- RevisionRange range= getRange(line);
- if (range != null)
- return range.getRevision();
- }
- return null;
- }
+ Revision getRevision(int offset) {
+ IDocument document= fViewer.getDocument();
+ int line;
+ try {
+ line= document.getLineOfOffset(offset);
+ } catch (BadLocationException x) {
+ return null;
+ }
+ if (line != -1) {
+ RevisionRange range= getRange(line);
+ if (range != null)
+ return range.getRevision();
+ }
+ return null;
+ }
/**
* Returns <code>true</code> if a revision model has been set, <code>false</code> otherwise.
*
- * @return <code>true</code> if a revision model has been set, <code>false</code> otherwise
- */
- public boolean hasInformation() {
- return fRevisionInfo != null;
- }
+ * @return <code>true</code> if a revision model has been set, <code>false</code> otherwise
+ */
+ public boolean hasInformation() {
+ return fRevisionInfo != null;
+ }
/**
* Returns the width in chars required to display information.
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java
index 4c43acb41f2..842bd796138 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java
@@ -46,29 +46,29 @@ public final class RevisionSelectionProvider implements ISelectionProvider {
* Post selection listener on the viewer that remembers the selection provider it is registered
* with.
*/
- private final class PostSelectionListener implements ISelectionChangedListener {
- private final IPostSelectionProvider fPostProvider;
+ private final class PostSelectionListener implements ISelectionChangedListener {
+ private final IPostSelectionProvider fPostProvider;
public PostSelectionListener(IPostSelectionProvider postProvider) {
postProvider.addPostSelectionChangedListener(this);
fPostProvider= postProvider;
- }
+ }
@Override
public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection= event.getSelection();
- if (selection instanceof ITextSelection) {
- ITextSelection ts= (ITextSelection) selection;
- int offset= ts.getOffset();
- setSelectedRevision(fPainter.getRevision(offset));
- }
+ ISelection selection= event.getSelection();
+ if (selection instanceof ITextSelection) {
+ ITextSelection ts= (ITextSelection) selection;
+ int offset= ts.getOffset();
+ setSelectedRevision(fPainter.getRevision(offset));
+ }
- }
+ }
public void dispose() {
fPostProvider.removePostSelectionChangedListener(this);
}
- }
+ }
private final RevisionPainter fPainter;
@@ -98,78 +98,78 @@ public final class RevisionSelectionProvider implements ISelectionProvider {
*
* @param painter the painter that the created provider interacts with
*/
- RevisionSelectionProvider(RevisionPainter painter) {
+ RevisionSelectionProvider(RevisionPainter painter) {
fPainter= painter;
- }
+ }
- @Override
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- fListeners.add(listener);
- }
+ fListeners.add(listener);
+ }
- @Override
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- fListeners.remove(listener);
- }
+ fListeners.remove(listener);
+ }
- @Override
+ @Override
public ISelection getSelection() {
- if (fSelection == null)
- return StructuredSelection.EMPTY;
- return new StructuredSelection(fSelection);
- }
+ if (fSelection == null)
+ return StructuredSelection.EMPTY;
+ return new StructuredSelection(fSelection);
+ }
- @Override
+ @Override
public void setSelection(ISelection selection) {
- if (fIgnoreEvents)
- return;
- if (selection instanceof IStructuredSelection) {
- Object first= ((IStructuredSelection) selection).getFirstElement();
- if (first instanceof Revision)
+ if (fIgnoreEvents)
+ return;
+ if (selection instanceof IStructuredSelection) {
+ Object first= ((IStructuredSelection) selection).getFirstElement();
+ if (first instanceof Revision)
fPainter.handleRevisionSelected((Revision) first);
else if (first instanceof String)
fPainter.handleRevisionSelected((String) first);
else if (selection.isEmpty())
fPainter.handleRevisionSelected((Revision) null);
- }
- }
+ }
+ }
- /**
+ /**
* Installs the selection provider on the viewer.
*
* @param viewer the viewer on which we listen to for post selection events
*/
- void install(ITextViewer viewer) {
- uninstall();
+ void install(ITextViewer viewer) {
+ uninstall();
fViewer= viewer;
if (fViewer != null) {
ISelectionProvider provider= fViewer.getSelectionProvider();
if (provider instanceof IPostSelectionProvider) {
- IPostSelectionProvider postProvider= (IPostSelectionProvider) provider;
- fSelectionListener= new PostSelectionListener(postProvider);
- }
+ IPostSelectionProvider postProvider= (IPostSelectionProvider) provider;
+ fSelectionListener= new PostSelectionListener(postProvider);
+ }
}
- }
-
- /**
- * Uninstalls the selection provider.
- */
- void uninstall() {
- fViewer= null;
- if (fSelectionListener != null) {
- fSelectionListener.dispose();
- fSelectionListener= null;
- }
- }
-
- /**
+ }
+
+ /**
+ * Uninstalls the selection provider.
+ */
+ void uninstall() {
+ fViewer= null;
+ if (fSelectionListener != null) {
+ fSelectionListener.dispose();
+ fSelectionListener= null;
+ }
+ }
+
+ /**
* Private protocol used by {@link RevisionPainter} to signal selection of a revision.
*
* @param revision the selected revision, or <code>null</code> for none
*/
- void revisionSelected(Revision revision) {
- setSelectedRevision(revision);
- }
+ void revisionSelected(Revision revision) {
+ setSelectedRevision(revision);
+ }
/**
* Updates the currently selected revision and sends out an event if it changed.
@@ -181,19 +181,19 @@ public final class RevisionSelectionProvider implements ISelectionProvider {
fSelection= revision;
fireSelectionEvent();
}
- }
+ }
- private void fireSelectionEvent() {
- fIgnoreEvents= true;
- try {
- ISelection selection= getSelection();
- SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
+ private void fireSelectionEvent() {
+ fIgnoreEvents= true;
+ try {
+ ISelection selection= getSelection();
+ SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
for (ISelectionChangedListener listener : fListeners) {
listener.selectionChanged(event);
}
- } finally {
- fIgnoreEvents= false;
- }
- }
+ } finally {
+ fIgnoreEvents= false;
+ }
+ }
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java
index fd8f0270ef3..2c1d4ccc808 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java
@@ -526,9 +526,9 @@ public final class DiffPainter {
/**
* Returns <code>true</code> if diff information is being displayed, <code>false</code> otherwise.
*
- * @return <code>true</code> if diff information is being displayed, <code>false</code> otherwise
- * @since 3.3
- */
+ * @return <code>true</code> if diff information is being displayed, <code>false</code> otherwise
+ * @since 3.3
+ */
public boolean hasInformation() {
if (fLineDiffer instanceof ILineDifferExtension2)
return !((ILineDifferExtension2) fLineDiffer).isSuspended();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java
index 1166e264edc..f35accda33f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java
@@ -609,7 +609,7 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
private MouseTracker fMouseTracker= new MouseTracker();
/**
* The remembered hover event.
- * @since 3.0
+ * @since 3.0
*/
private MouseEvent fHoverEvent= null;
/** The remembered hover event state mask of the keyboard modifiers */
@@ -845,7 +845,7 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
fReplacingDelayJob= new Job("AbstractHoverInformationControlManager Replace Delayer") { //$NON-NLS-1$
@Override
public IStatus run(final IProgressMonitor monitor) {
- if (monitor.isCanceled() || display.isDisposed()) {
+ if (monitor.isCanceled() || display.isDisposed()) {
return Status.CANCEL_STATUS;
}
display.syncExec(() -> {
@@ -939,14 +939,14 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
return fHoverEvent;
}
- /**
+ /**
* Returns the SWT event state of the most recent mouse hover event.
*
* @return the SWT event state of the most recent mouse hover event
*/
protected int getHoverEventStateMask() {
return fHoverEventStateMask;
- }
+ }
/**
* Returns an adapter that gives access to internal methods.
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultDocumentAdapter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultDocumentAdapter.java
index e752f80d6e6..a02d9b8af4f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultDocumentAdapter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultDocumentAdapter.java
@@ -352,9 +352,9 @@ class DefaultDocumentAdapter implements IDocumentAdapter, IDocumentListener, IDo
return;
try {
- IDocument document= fEvent.getDocument();
- if (document == null)
- return;
+ IDocument document= fEvent.getDocument();
+ if (document == null)
+ return;
TextChangingEvent event= new TextChangingEvent(this);
event.start= fEvent.fOffset;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java
index 6cea829c7ba..f583c8459a7 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java
@@ -121,7 +121,7 @@ public class DefaultInformationControl extends AbstractInformationControl implem
/**
* Additional styles to use for the text control.
* @since 3.4, previously called <code>fTextStyle</code>
- */
+ */
private final int fAdditionalTextStyles;
/**
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java
index 9b283c9db82..f3e472e24a5 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java
@@ -75,8 +75,8 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy
@Override
public char last() {
- fIndex= fOffset < fEndOffset ? fEndOffset -1 : fEndOffset;
- return current();
+ fIndex= fOffset < fEndOffset ? fEndOffset -1 : fEndOffset;
+ return current();
}
@Override
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
index a39148352f0..eae94c20c0f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
@@ -104,8 +104,8 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
* @since 3.1
*/
TextCommand(IUndoContext context) {
- super(JFaceTextMessages.getString("DefaultUndoManager.operationLabel")); //$NON-NLS-1$
- addContext(context);
+ super(JFaceTextMessages.getString("DefaultUndoManager.operationLabel")); //$NON-NLS-1$
+ addContext(context);
}
/**
@@ -133,7 +133,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
@Override
public void dispose() {
- reinitialize();
+ reinitialize();
}
/**
@@ -223,13 +223,13 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
@Override
public boolean canExecute() {
- return isConnected();
+ return isConnected();
}
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable uiInfo) {
// Text commands execute as they are typed, so executing one has no effect.
- return Status.OK_STATUS;
+ return Status.OK_STATUS;
}
/*
@@ -324,7 +324,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
} else {
reinitialize();
}
- } else {
+ } else {
updateCommand();
fCurrent= createCurrent();
}
@@ -368,15 +368,15 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
* @since 3.1
*/
protected boolean isValid() {
- return fStart > -1 &&
- fEnd > -1 &&
- fText != null;
+ return fStart > -1 &&
+ fEnd > -1 &&
+ fText != null;
}
@Override
public String toString() {
String delimiter= ", "; //$NON-NLS-1$
- StringBuilder text= new StringBuilder(super.toString());
+ StringBuilder text= new StringBuilder(super.toString());
text.append("\n"); //$NON-NLS-1$
text.append(this.getClass().getName());
text.append(" undo modification stamp: "); //$NON-NLS-1$
@@ -386,17 +386,17 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
text.append(" start: "); //$NON-NLS-1$
text.append(fStart);
text.append(delimiter);
- text.append("end: "); //$NON-NLS-1$
- text.append(fEnd);
+ text.append("end: "); //$NON-NLS-1$
+ text.append(fEnd);
text.append(delimiter);
- text.append("text: '"); //$NON-NLS-1$
+ text.append("text: '"); //$NON-NLS-1$
text.append(fText);
- text.append('\'');
+ text.append('\'');
text.append(delimiter);
- text.append("preservedText: '"); //$NON-NLS-1$
+ text.append("preservedText: '"); //$NON-NLS-1$
text.append(fPreservedText);
- text.append('\'');
- return text.toString();
+ text.append('\'');
+ return text.toString();
}
/**
@@ -436,7 +436,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
* @since 3.1
*/
CompoundTextCommand(IUndoContext context) {
- super(context);
+ super(context);
}
/**
@@ -545,7 +545,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
protected boolean isValid() {
if (isConnected())
return (fStart > -1 || fCommands.size() > 0);
- return false;
+ return false;
}
/**
@@ -827,7 +827,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
* @param undoLevel the length of this manager's history
*/
public DefaultUndoManager(int undoLevel) {
- fHistory= OperationHistoryFactory.getOperationHistory();
+ fHistory= OperationHistoryFactory.getOperationHistory();
setMaximalUndoLevel(undoLevel);
}
@@ -909,8 +909,8 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
*/
private void addToCommandStack(TextCommand command){
if (!fFoldingIntoCompoundChange || command instanceof CompoundTextCommand) {
- fHistory.add(command);
- fLastAddedCommand= command;
+ fHistory.add(command);
+ fLastAddedCommand= command;
}
}
@@ -920,7 +920,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
* @since 3.1
*/
private void disposeCommandStack() {
- fHistory.dispose(fUndoContext, true, true, true);
+ fHistory.dispose(fUndoContext, true, true, true);
}
/**
@@ -929,7 +929,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
* @since 3.1
*/
private void initializeCommandStack() {
- if (fHistory != null && fUndoContext != null)
+ if (fHistory != null && fUndoContext != null)
fHistory.dispose(fUndoContext, true, true, false);
}
@@ -1193,10 +1193,10 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
fTextViewer= textViewer;
fTextBuffer= new StringBuilder();
fPreservedTextBuffer= new StringBuilder();
- if (fUndoContext == null)
- fUndoContext= new ObjectUndoContext(this);
+ if (fUndoContext == null)
+ fUndoContext= new ObjectUndoContext(this);
- fHistory.setLimit(fUndoContext, fUndoLevel);
+ fHistory.setLimit(fUndoContext, fUndoLevel);
initializeCommandStack();
@@ -1240,12 +1240,12 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
@Override
public boolean redoable() {
- return fHistory.canRedo(fUndoContext);
+ return fHistory.canRedo(fUndoContext);
}
@Override
public boolean undoable() {
- return fHistory.canUndo(fUndoContext);
+ return fHistory.canUndo(fUndoContext);
}
@Override
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/IFindReplaceTarget.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/IFindReplaceTarget.java
index a699b2abb02..dc2939b8127 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/IFindReplaceTarget.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/IFindReplaceTarget.java
@@ -55,19 +55,19 @@ public interface IFindReplaceTarget {
*/
boolean canPerformFind();
- /**
- * Searches for a string starting at the given widget offset and using the specified search
- * directives. If a string has been found it is selected and its start offset is
- * returned.
- * <p>
- * Replaced by {@link IFindReplaceTargetExtension3#findAndSelect(int, String, boolean, boolean, boolean, boolean)}.
- *
- * @param widgetOffset the widget offset at which searching starts
- * @param findString the string which should be found
- * @param searchForward <code>true</code> searches forward, <code>false</code> backwards
- * @param caseSensitive <code>true</code> performs a case sensitive search, <code>false</code> an insensitive search
- * @param wholeWord if <code>true</code> only occurrences are reported in which the findString stands as a word by itself
- * @return the position of the specified string, or -1 if the string has not been found
+ /**
+ * Searches for a string starting at the given widget offset and using the specified search
+ * directives. If a string has been found it is selected and its start offset is
+ * returned.
+ * <p>
+ * Replaced by {@link IFindReplaceTargetExtension3#findAndSelect(int, String, boolean, boolean, boolean, boolean)}.
+ *
+ * @param widgetOffset the widget offset at which searching starts
+ * @param findString the string which should be found
+ * @param searchForward <code>true</code> searches forward, <code>false</code> backwards
+ * @param caseSensitive <code>true</code> performs a case sensitive search, <code>false</code> an insensitive search
+ * @param wholeWord if <code>true</code> only occurrences are reported in which the findString stands as a word by itself
+ * @return the position of the specified string, or -1 if the string has not been found
*/
int findAndSelect(int widgetOffset, String findString, boolean searchForward, boolean caseSensitive, boolean wholeWord);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java
index 1a7ed56fc5b..fe56c6157e9 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java
@@ -194,7 +194,7 @@ public interface ITextViewer {
* behavior over the course of time, this method causes them to be set
* back to their initial state and behavior. E.g., if an {@link IUndoManager}
* has been installed on this text viewer, the manager's list of remembered
- * text editing operations is removed.
+ * text editing operations is removed.
*/
void resetPlugins();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewerExtension2.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewerExtension2.java
index 0dafb5f512e..f6ea97f4148 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewerExtension2.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewerExtension2.java
@@ -47,9 +47,9 @@ import org.eclipse.swt.graphics.Point;
*/
public interface ITextViewerExtension2 {
- /**
- * The state mask of the default hover (value <code>0xff</code>).
- */
+ /**
+ * The state mask of the default hover (value <code>0xff</code>).
+ */
final int DEFAULT_HOVER_STATE_MASK= 0xff;
/**
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
index 75feb94457f..c98fa3ec50d 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
@@ -2216,13 +2216,13 @@ public class TextViewer extends Viewer implements
return true;
}
- } else {
- fWidgetTokenKeeper= requester;
- return true;
- }
- }
- return false;
- }
+ } else {
+ fWidgetTokenKeeper= requester;
+ return true;
+ }
+ }
+ return false;
+ }
@Override
public void releaseWidgetToken(IWidgetTokenKeeper tokenKeeper) {
@@ -2843,7 +2843,7 @@ public class TextViewer extends Viewer implements
* @return <code>true</code> if the slave has been adapted successfully
* @throws BadLocationException in case the specified range is not valid in the master document
* @since 2.1
- * @deprecated use <code>updateSlaveDocument</code> instead
+ * @deprecated use <code>updateSlaveDocument</code> instead
*/
@Deprecated
protected boolean updateVisibleDocument(IDocument visibleDocument, int visibleRegionOffset, int visibleRegionLength) throws BadLocationException {
@@ -4412,7 +4412,7 @@ public class TextViewer extends Viewer implements
options.printTextFontStyle= true;
options.printTextForeground= true;
print(options);
- }
+ }
//------ find support
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java
index 9d2655dc90a..a4c43e67aae 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java
@@ -63,16 +63,16 @@ class AdditionalInfoController extends AbstractInformationControlManager {
/**
* @return the delay in milliseconds before this task should be run
*/
- public abstract long delay();
- /**
- * Runs this task.
- */
- @Override
+ public abstract long delay();
+ /**
+ * Runs this task.
+ */
+ @Override
public abstract void run();
- /**
- * @return the task to be scheduled after this task has been run
- */
- public abstract Task nextTask();
+ /**
+ * @return the task to be scheduled after this task has been run
+ */
+ public abstract Task nextTask();
}
/**
@@ -88,7 +88,7 @@ class AdditionalInfoController extends AbstractInformationControlManager {
@Override
public Task nextTask() {
Assert.isTrue(false);
- return null;
+ return null;
}
@Override
@@ -112,15 +112,15 @@ class AdditionalInfoController extends AbstractInformationControlManager {
@Override
protected IStatus run(IProgressMonitor monitor) {
Object info;
- try {
- info= proposal.getAdditionalProposalInfo(monitor);
- } catch (RuntimeException x) {
- /*
+ try {
+ info= proposal.getAdditionalProposalInfo(monitor);
+ } catch (RuntimeException x) {
+ /*
* XXX: This is the safest fix at this point so close to end of 3.2.
* Will be revisited when fixing https://bugs.eclipse.org/bugs/show_bug.cgi?id=101033
- */
- return new Status(IStatus.WARNING, "org.eclipse.jface.text", IStatus.OK, "", x); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ */
+ return new Status(IStatus.WARNING, "org.eclipse.jface.text", IStatus.OK, "", x); //$NON-NLS-1$ //$NON-NLS-2$
+ }
setInfo((ICompletionProposal) proposal, info);
return Status.OK_STATUS;
}
@@ -200,7 +200,7 @@ class AdditionalInfoController extends AbstractInformationControlManager {
@Override
public String toString() {
- return "LEGACY_WAIT"; //$NON-NLS-1$
+ return "LEGACY_WAIT"; //$NON-NLS-1$
}
};
/**
@@ -209,19 +209,19 @@ class AdditionalInfoController extends AbstractInformationControlManager {
private final Task EXIT= new Task() {
@Override
public long delay() {
- return 1;
- }
+ return 1;
+ }
@Override
public Task nextTask() {
Assert.isTrue(false);
- return EXIT;
- }
+ return EXIT;
+ }
@Override
public void run() {
Assert.isTrue(false);
- }
+ }
@Override
public String toString() {
@@ -251,10 +251,10 @@ class AdditionalInfoController extends AbstractInformationControlManager {
* @param delay the delay until to show additional info
*/
public Timer(Display display, int delay) {
- fDisplay= display;
+ fDisplay= display;
fDelay= delay;
long current= System.currentTimeMillis();
- schedule(IDLE, current);
+ schedule(IDLE, current);
fThread= new Thread((Runnable) () -> {
try {
@@ -292,68 +292,68 @@ class AdditionalInfoController extends AbstractInformationControlManager {
}
}
- private Task taskOnReset(ICompletionProposal p) {
+ private Task taskOnReset(ICompletionProposal p) {
if (p == null)
return IDLE;
if (isExt5(p))
return FIRST_WAIT;
return LEGACY_WAIT;
- }
-
- private synchronized void loop() throws InterruptedException {
- long current= System.currentTimeMillis();
- Task task= currentTask();
-
- while (task != EXIT) {
- long delay= fNextWakeup - current;
- if (delay <= 0) {
- task.run();
- task= task.nextTask();
- schedule(task, current);
- } else {
- wait(delay);
- current= System.currentTimeMillis();
- task= currentTask();
- }
- }
- }
-
- private Task currentTask() {
- return fTask;
- }
-
- private void schedule(Task task, long current) {
- fTask= task;
- long nextWakeup= current + task.delay();
- if (nextWakeup <= current)
- fNextWakeup= Long.MAX_VALUE;
- else
- fNextWakeup= nextWakeup;
- }
+ }
+
+ private synchronized void loop() throws InterruptedException {
+ long current= System.currentTimeMillis();
+ Task task= currentTask();
+
+ while (task != EXIT) {
+ long delay= fNextWakeup - current;
+ if (delay <= 0) {
+ task.run();
+ task= task.nextTask();
+ schedule(task, current);
+ } else {
+ wait(delay);
+ current= System.currentTimeMillis();
+ task= currentTask();
+ }
+ }
+ }
+
+ private Task currentTask() {
+ return fTask;
+ }
+
+ private void schedule(Task task, long current) {
+ fTask= task;
+ long nextWakeup= current + task.delay();
+ if (nextWakeup <= current)
+ fNextWakeup= Long.MAX_VALUE;
+ else
+ fNextWakeup= nextWakeup;
+ }
private boolean isExt5(ICompletionProposal p) {
return p instanceof ICompletionProposalExtension5;
}
- ICompletionProposal getCurrentProposal() {
- return fCurrentProposal;
- }
-
- ICompletionProposalExtension5 getCurrentProposalEx() {
- Assert.isTrue(fCurrentProposal instanceof ICompletionProposalExtension5);
- return (ICompletionProposalExtension5) fCurrentProposal;
- }
-
- synchronized void setInfo(ICompletionProposal proposal, Object info) {
- if (proposal == fCurrentProposal) {
- fCurrentInfo= info;
- if (fAllowShowing) {
- triggerShowing();
- }
- }
- }
-
- private void triggerShowing() {
+ ICompletionProposal getCurrentProposal() {
+ return fCurrentProposal;
+ }
+
+ ICompletionProposalExtension5 getCurrentProposalEx() {
+ Assert.isTrue(fCurrentProposal instanceof ICompletionProposalExtension5);
+ return (ICompletionProposalExtension5) fCurrentProposal;
+ }
+
+ synchronized void setInfo(ICompletionProposal proposal, Object info) {
+ if (proposal == fCurrentProposal) {
+ fCurrentInfo= info;
+ if (fAllowShowing) {
+ triggerShowing();
+ }
+ }
+ }
+
+ private void triggerShowing() {
final Object info= fCurrentInfo;
if (!fDisplay.isDisposed()) {
fDisplay.asyncExec(() -> {
@@ -364,20 +364,20 @@ class AdditionalInfoController extends AbstractInformationControlManager {
}
});
}
- }
-
- /**
- * Called in the display thread to show additional info.
- *
- * @param proposal the proposal to show information about
- * @param info the information about <code>proposal</code>
- */
- protected abstract void showInformation(ICompletionProposal proposal, Object info);
-
- void allowShowing() {
- fAllowShowing= true;
- triggerShowing();
- }
+ }
+
+ /**
+ * Called in the display thread to show additional info.
+ *
+ * @param proposal the proposal to show information about
+ * @param info the information about <code>proposal</code>
+ */
+ protected abstract void showInformation(ICompletionProposal proposal, Object info);
+
+ void allowShowing() {
+ fAllowShowing= true;
+ triggerShowing();
+ }
}
/**
* Internal table selection listener.
@@ -441,12 +441,12 @@ class AdditionalInfoController extends AbstractInformationControlManager {
setAnchor(ANCHOR_RIGHT);
setFallbackAnchors(new Anchor[] { ANCHOR_RIGHT, ANCHOR_LEFT, ANCHOR_BOTTOM });
- /*
+ /*
* Adjust the location by one pixel towards the proposal popup, so that the single pixel
* border of the additional info popup overlays with the border of the popup. This avoids
* having a double black line.
*/
- int spacing= -1;
+ int spacing= -1;
setMargins(spacing, spacing); // see also adjustment in #computeLocation
InformationControlReplacer replacer= new InformationControlReplacer(new DefaultPresenterControlCreator());
@@ -525,10 +525,10 @@ class AdditionalInfoController extends AbstractInformationControlManager {
if (fProposal == proposal && ((info == null && fInformation == null) || (info != null && info.equals(fInformation))))
return;
- fInformation= info;
- fProposal= proposal;
- showInformation();
- }
+ fInformation= info;
+ fProposal= proposal;
+ showInformation();
+ }
@Override
protected void computeInformation() {
@@ -546,16 +546,16 @@ class AdditionalInfoController extends AbstractInformationControlManager {
@Override
protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor) {
- Point location= super.computeLocation(subjectArea, controlSize, anchor);
+ Point location= super.computeLocation(subjectArea, controlSize, anchor);
- /*
+ /*
* The location is computed using subjectControl.toDisplay(), which does not include the
* trim of the subject control. As we want the additional info popup aligned with the outer
* coordinates of the proposal popup, adjust this here
*/
- Rectangle trim= fProposalTable.getShell().computeTrim(0, 0, 0, 0);
- location.x += trim.x;
- location.y += trim.y;
+ Rectangle trim= fProposalTable.getShell().computeTrim(0, 0, 0, 0);
+ location.x += trim.x;
+ location.y += trim.y;
return location;
}
@@ -566,14 +566,14 @@ class AdditionalInfoController extends AbstractInformationControlManager {
Point sizeConstraint= super.computeSizeConstraints(subjectControl, informationControl);
Point size= subjectControl.getShell().getSize();
- // AbstractInformationControlManager#internalShowInformationControl(Rectangle, Object) adds trims
+ // AbstractInformationControlManager#internalShowInformationControl(Rectangle, Object) adds trims
// to the computed constraints. Need to remove them here, to make the outer bounds of the additional
// info shell fit the bounds of the proposal shell:
- if (fInformationControl instanceof IInformationControlExtension3) {
- Rectangle shellTrim= ((IInformationControlExtension3) fInformationControl).computeTrim();
- size.x -= shellTrim.width;
- size.y -= shellTrim.height;
- }
+ if (fInformationControl instanceof IInformationControlExtension3) {
+ Rectangle shellTrim= ((IInformationControlExtension3) fInformationControl).computeTrim();
+ size.x -= shellTrim.width;
+ size.y -= shellTrim.height;
+ }
if (sizeConstraint.x < size.x)
sizeConstraint.x= size.x;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
index d84b562d910..364b6707941 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
@@ -740,36 +740,36 @@ class CompletionProposalPopup implements IContentAssistListener {
* @param control the control to watch for focus
* @since 3.2
*/
- private void addCommandSupport(final Control control) {
- final KeySequence commandSequence= fContentAssistant.getRepeatedInvocationKeySequence();
- if (commandSequence != null && !commandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
- control.addFocusListener(new FocusListener() {
- private CommandKeyListener fCommandKeyListener;
- @Override
+ private void addCommandSupport(final Control control) {
+ final KeySequence commandSequence= fContentAssistant.getRepeatedInvocationKeySequence();
+ if (commandSequence != null && !commandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
+ control.addFocusListener(new FocusListener() {
+ private CommandKeyListener fCommandKeyListener;
+ @Override
public void focusGained(FocusEvent e) {
- if (Helper.okToUse(control)) {
- if (fCommandKeyListener == null) {
- fCommandKeyListener= new CommandKeyListener(commandSequence);
- fProposalTable.addKeyListener(fCommandKeyListener);
- }
- }
- }
- @Override
+ if (Helper.okToUse(control)) {
+ if (fCommandKeyListener == null) {
+ fCommandKeyListener= new CommandKeyListener(commandSequence);
+ fProposalTable.addKeyListener(fCommandKeyListener);
+ }
+ }
+ }
+ @Override
public void focusLost(FocusEvent e) {
- if (fCommandKeyListener != null) {
- control.removeKeyListener(fCommandKeyListener);
- fCommandKeyListener= null;
- }
- }
- });
- }
- if (fAdditionalInfoController != null) {
- control.addFocusListener(new FocusListener() {
- private TraverseListener fTraverseListener;
- @Override
+ if (fCommandKeyListener != null) {
+ control.removeKeyListener(fCommandKeyListener);
+ fCommandKeyListener= null;
+ }
+ }
+ });
+ }
+ if (fAdditionalInfoController != null) {
+ control.addFocusListener(new FocusListener() {
+ private TraverseListener fTraverseListener;
+ @Override
public void focusGained(FocusEvent e) {
- if (Helper.okToUse(control)) {
- if (fTraverseListener == null) {
+ if (Helper.okToUse(control)) {
+ if (fTraverseListener == null) {
fTraverseListener= new TraverseListener() {
@Override
public void keyTraversed(TraverseEvent event) {
@@ -782,20 +782,20 @@ class CompletionProposalPopup implements IContentAssistListener {
}
}
};
- fProposalTable.addTraverseListener(fTraverseListener);
- }
- }
- }
- @Override
+ fProposalTable.addTraverseListener(fTraverseListener);
+ }
+ }
+ }
+ @Override
public void focusLost(FocusEvent e) {
- if (fTraverseListener != null) {
- control.removeTraverseListener(fTraverseListener);
- fTraverseListener= null;
- }
- }
- });
- }
- }
+ if (fTraverseListener != null) {
+ control.removeTraverseListener(fTraverseListener);
+ fTraverseListener= null;
+ }
+ }
+ });
+ }
+ }
/**
* Returns the background color to use.
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
index 79ef8c91448..a301bbd818f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
@@ -2464,12 +2464,12 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
/**
* Returns the prefix completion state.
*
- * @return <code>true</code> if prefix completion is enabled, <code>false</code> otherwise
- * @since 3.2
- */
- boolean isPrefixCompletionEnabled() {
- return fIsPrefixCompletionEnabled;
- }
+ * @return <code>true</code> if prefix completion is enabled, <code>false</code> otherwise
+ * @since 3.2
+ */
+ boolean isPrefixCompletionEnabled() {
+ return fIsPrefixCompletionEnabled;
+ }
/**
* Returns whether the content assistant proposal popup has the focus.
@@ -2732,7 +2732,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
* @since 3.4
*/
boolean isColoredLabelsSupportEnabled() {
- return fIsColoredLabelsSupportEnabled;
+ return fIsColoredLabelsSupportEnabled;
}
/**
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
index 9bbc4fb6694..6f8b9e9f2ec 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
@@ -823,7 +823,7 @@ class ContextInformationPopup implements IContentAssistListener {
} else if (key == SWT.ESC) {
e.doit= false;
- hideContextInfoPopup();
+ hideContextInfoPopup();
} else {
validateContextInformation();
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java
index d97b12f2dc2..c23974546dc 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java
@@ -150,7 +150,7 @@ abstract public class AbstractReconciler implements IReconciler {
}
}
- reconcilerReset();
+ reconcilerReset();
}
/**
@@ -482,12 +482,12 @@ abstract public class AbstractReconciler implements IReconciler {
}
fListener= null;
- synchronized (this) {
- // http://dev.eclipse.org/bugs/show_bug.cgi?id=19135
- BackgroundThread bt= fThread;
- fThread= null;
- bt.cancel();
- }
+ synchronized (this) {
+ // http://dev.eclipse.org/bugs/show_bug.cgi?id=19135
+ BackgroundThread bt= fThread;
+ fThread= null;
+ bt.cancel();
+ }
}
}
@@ -578,13 +578,13 @@ abstract public class AbstractReconciler implements IReconciler {
}
}
- /**
- * Hook that is called after the reconciler thread has been reset.
- */
- protected void reconcilerReset() {
- }
+ /**
+ * Hook that is called after the reconciler thread has been reset.
+ */
+ protected void reconcilerReset() {
+ }
- /**
+ /**
* Tells whether the code is running in this reconciler's
* background thread.
*
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultPartitioner.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultPartitioner.java
index e0c979a8db3..b8243a7cc6e 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultPartitioner.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultPartitioner.java
@@ -514,7 +514,7 @@ public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartit
return null;
}
- /* zero-length partition support */
+ /* zero-length partition support */
@Override
public String getContentType(int offset, boolean preferOpenPartitions) {
@@ -534,7 +534,7 @@ public class DefaultPartitioner implements IDocumentPartitioner, IDocumentPartit
return new TypedRegion(offset, 0, IDocument.DEFAULT_CONTENT_TYPE);
}
}
- return region;
+ return region;
}
@Override
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/FastPartitioner.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/FastPartitioner.java
index 4405a7ddee3..5d1301aed5f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/FastPartitioner.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/FastPartitioner.java
@@ -574,7 +574,7 @@ public class FastPartitioner implements IDocumentPartitioner, IDocumentPartition
return null;
}
- /* zero-length partition support */
+ /* zero-length partition support */
/**
* {@inheritDoc}
@@ -606,7 +606,7 @@ public class FastPartitioner implements IDocumentPartitioner, IDocumentPartition
return new TypedRegion(offset, 0, IDocument.DEFAULT_CONTENT_TYPE);
}
}
- return region;
+ return region;
}
/**
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitioner.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitioner.java
index 2cee441dd98..a5e508cf590 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitioner.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitioner.java
@@ -506,7 +506,7 @@ public class RuleBasedPartitioner implements IDocumentPartitioner, IDocumentPart
return null;
}
- /* zero-length partition support */
+ /* zero-length partition support */
@Override
public String getContentType(int offset, boolean preferOpenPartitions) {
@@ -526,7 +526,7 @@ public class RuleBasedPartitioner implements IDocumentPartitioner, IDocumentPart
return new TypedRegion(offset, 0, IDocument.DEFAULT_CONTENT_TYPE);
}
}
- return region;
+ return region;
}
@Override
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedScanner.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedScanner.java
index a61caa3eafa..a9c821321b8 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedScanner.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedScanner.java
@@ -195,7 +195,7 @@ public class RuleBasedScanner implements ICharacterScanner, ITokenScanner {
@Override
public void unread() {
- --fOffset;
+ --fOffset;
fColumn= UNDEFINED;
}
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
index 53a05157869..aa80985d407 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
@@ -350,14 +350,14 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
@Override
protected void showInformationControl(Rectangle subjectArea) {
- super.showInformationControl(subjectArea);
- fCurrentHover= getHover(getHoverEvent());
+ super.showInformationControl(subjectArea);
+ fCurrentHover= getHover(getHoverEvent());
}
@Override
protected void hideInformationControl() {
fCurrentHover= null;
- super.hideInformationControl();
+ super.hideInformationControl();
}
/**
@@ -707,9 +707,9 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
* @return the currently shown annotation hover or <code>null</code>
* @since 3.2
*/
- public IAnnotationHover getCurrentAnnotationHover() {
- return fCurrentHover;
- }
+ public IAnnotationHover getCurrentAnnotationHover() {
+ return fCurrentHover;
+ }
/**
* Returns an adapter that gives access to internal methods.
@@ -722,9 +722,9 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
- @Override
+ @Override
public InternalAccessor getInternalAccessor() {
- return new InternalAccessor() {
+ return new InternalAccessor() {
@Override
public IInformationControl getCurrentInformationControl() {
return AnnotationBarHoverManager.super.getInternalAccessor().getCurrentInformationControl();
@@ -770,6 +770,6 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
return fAllowMouseExit;
}
};
- }
+ }
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
index 493c3e9ad82..4e967c8df0a 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
@@ -957,8 +957,8 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
private void invalidateTextPresentation() {
IRegion r= null;
synchronized (fHighlightedDecorationsMapLock) {
- if (fCurrentHighlightAnnotationRange != null)
- r= new Region(fCurrentHighlightAnnotationRange.getOffset(), fCurrentHighlightAnnotationRange.getLength());
+ if (fCurrentHighlightAnnotationRange != null)
+ r= new Region(fCurrentHighlightAnnotationRange.getOffset(), fCurrentHighlightAnnotationRange.getLength());
}
if (r == null)
return;
@@ -1610,10 +1610,10 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
}
/**
- * Retrieves the annotation model from the given source viewer.
- *
- * @param sourceViewer the source viewer
- * @return the source viewer's annotation model or <code>null</code> if none can be found
+ * Retrieves the annotation model from the given source viewer.
+ *
+ * @param sourceViewer the source viewer
+ * @return the source viewer's annotation model or <code>null</code> if none can be found
* @since 3.0
*/
protected IAnnotationModel findAnnotationModel(ISourceViewer sourceViewer) {
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java
index 9d49ec6fe53..991c3d284f3 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java
@@ -494,12 +494,12 @@ public final class ChangeRulerColumn implements IChangeRulerColumn, IRevisionRul
}
/**
- * Returns the revision selection provider.
- *
- * @return the revision selection provider
- * @since 3.2
- */
- public ISelectionProvider getRevisionSelectionProvider() {
- return fRevisionPainter.getRevisionSelectionProvider();
- }
+ * Returns the revision selection provider.
+ *
+ * @return the revision selection provider
+ * @since 3.2
+ */
+ public ISelectionProvider getRevisionSelectionProvider() {
+ return fRevisionPainter.getRevisionSelectionProvider();
+ }
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java
index 53c11e7f07c..cd31396949d 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java
@@ -124,6 +124,6 @@ public interface IOverviewRuler extends IVerticalRuler {
* top of the text widget and the top of this overview ruler.
*
* @return the header control of this overview ruler.
- */
+ */
Control getHeaderControl();
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
index 955856fb8a2..326d6e74f95 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
@@ -229,16 +229,16 @@ public class LineNumberChangeRulerColumn extends LineNumberRulerColumn implement
postRedraw();
}
- @Override
+ @Override
public ISelectionProvider getRevisionSelectionProvider() {
- return fRevisionPainter.getRevisionSelectionProvider();
- }
-
- /*
- * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#setRenderingMode(org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension.RenderingMode)
- * @since 3.3
- */
- @Override
+ return fRevisionPainter.getRevisionSelectionProvider();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#setRenderingMode(org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension.RenderingMode)
+ * @since 3.3
+ */
+ @Override
public void setRevisionRenderingMode(RenderingMode renderingMode) {
fRevisionPainter.setRenderingMode(renderingMode);
}
@@ -250,22 +250,22 @@ public class LineNumberChangeRulerColumn extends LineNumberRulerColumn implement
* diff / revision info.
* @since 3.3
*/
- public void showLineNumbers(boolean showNumbers) {
- if (fShowNumbers != showNumbers) {
- fShowNumbers= showNumbers;
+ public void showLineNumbers(boolean showNumbers) {
+ if (fShowNumbers != showNumbers) {
+ fShowNumbers= showNumbers;
updateNumberOfDigits();
computeIndentations();
layout(true);
- }
- }
+ }
+ }
- @Override
+ @Override
public int getWidth() {
- int width= super.getWidth();
+ int width= super.getWidth();
return width > 0 ? width : 8; // minimal width to display quick diff / revisions if no textual info is shown
- }
+ }
- /**
+ /**
* Returns <code>true</code> if the ruler is showing line numbers, <code>false</code>
* otherwise
*
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
index 3244d08849e..1e41584ccc7 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
@@ -612,7 +612,7 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
VisibleLinesTracker.track(fCachedTextViewer, lineHeightChangeHandler);
fCanvas= new Canvas(parentControl, SWT.NO_FOCUS ) {
- @Override
+ @Override
public void addMouseListener(MouseListener listener) {
// see bug 40889, bug 230073 and AnnotationRulerColumn#isPropagatingMouseListener()
if (listener == fMouseHandler)
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
index 15b3029ec2b..a086fa2661e 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
@@ -364,18 +364,18 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler {
thumbHeight= verticalBar != null ? Math.max(Math.min(bounds.height, verticalBar.getThumbBounds().height), 0) : 0;
}
- int partialTopIndex= JFaceTextUtil.getPartialTopIndex(textWidget);
- int topLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialTopIndex));
- int topLinePixel= textWidget.getLinePixel(partialTopIndex);
- double topIndex= partialTopIndex - (double) topLinePixel / topLineHeight;
-
- int partialBottomIndex= JFaceTextUtil.getPartialBottomIndex(textWidget);
- int bottomLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialBottomIndex));
- int bottomLinePixel= textWidget.getLinePixel(partialBottomIndex);
- double bottomIndex= partialBottomIndex - ((double) bottomLinePixel - textWidget.getClientArea().height) / bottomLineHeight;
-
- visibleLines= bottomIndex - topIndex;
- invisibleLines= maxLines - visibleLines;
+ int partialTopIndex= JFaceTextUtil.getPartialTopIndex(textWidget);
+ int topLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialTopIndex));
+ int topLinePixel= textWidget.getLinePixel(partialTopIndex);
+ double topIndex= partialTopIndex - (double) topLinePixel / topLineHeight;
+
+ int partialBottomIndex= JFaceTextUtil.getPartialBottomIndex(textWidget);
+ int bottomLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialBottomIndex));
+ int bottomLinePixel= textWidget.getLinePixel(partialBottomIndex);
+ double bottomIndex= partialBottomIndex - ((double) bottomLinePixel - textWidget.getClientArea().height) / bottomLineHeight;
+
+ visibleLines= bottomIndex - topIndex;
+ invisibleLines= maxLines - visibleLines;
}
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java
index f52244bb86b..85395bd7b2f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java
@@ -1258,14 +1258,14 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
}
}
- @Override
+ @Override
public IAnnotationHover getCurrentAnnotationHover() {
- if (fVerticalRulerHoveringController == null)
- return null;
- return fVerticalRulerHoveringController.getCurrentAnnotationHover();
- }
+ if (fVerticalRulerHoveringController == null)
+ return null;
+ return fVerticalRulerHoveringController.getCurrentAnnotationHover();
+ }
- @Override
+ @Override
public void setCodeMiningProviders(ICodeMiningProvider[] codeMiningProviders) {
boolean enable= codeMiningProviders != null && codeMiningProviders.length > 0;
fCodeMiningProviders= codeMiningProviders;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java
index 2e3067c1e16..9a8c5b1e70a 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java
@@ -281,7 +281,7 @@ public class TemplateProposal implements ICompletionProposal, ICompletionProposa
private int getCaretOffset(TemplateBuffer buffer) {
- TemplateVariable[] variables= buffer.getVariables();
+ TemplateVariable[] variables= buffer.getVariables();
for (int i= 0; i != variables.length; i++) {
TemplateVariable variable= variables[i];
if (variable.getType().equals(GlobalTemplateVariables.Cursor.NAME))
@@ -336,8 +336,8 @@ public class TemplateProposal implements ICompletionProposal, ICompletionProposa
@Override
public String getAdditionalProposalInfo() {
- try {
- fContext.setReadOnly(true);
+ try {
+ fContext.setReadOnly(true);
TemplateBuffer templateBuffer;
try {
templateBuffer= fContext.evaluate(fTemplate);
@@ -347,7 +347,7 @@ public class TemplateProposal implements ICompletionProposal, ICompletionProposa
return templateBuffer.getString();
- } catch (BadLocationException e) {
+ } catch (BadLocationException e) {
return null;
}
}
diff --git a/org.eclipse.search/META-INF/MANIFEST.MF b/org.eclipse.search/META-INF/MANIFEST.MF
index e1f7826aeb6..a47e00dbe6a 100644
--- a/org.eclipse.search/META-INF/MANIFEST.MF
+++ b/org.eclipse.search/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.search; singleton:=true
-Bundle-Version: 3.11.500.qualifier
+Bundle-Version: 3.11.600.qualifier
Bundle-Activator: org.eclipse.search.internal.ui.SearchPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java
index 8d15e6e7f0f..c90a6584eac 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java
@@ -98,7 +98,7 @@ public interface ISearchPageContainer {
* The scope is WORKSPACE_SCOPE, SELECTED_PROJECTS_SCOPE, SELECTION_SCOPE or WORKING_SET_SCOPE.
* @param scope the newly selected scope
*
- * @since 2.0
+ * @since 2.0
*/
public void setSelectedScope(int scope);
@@ -106,7 +106,7 @@ public interface ISearchPageContainer {
* Tells whether a valid scope is selected.
*
* @return a <code>true</code> if a valid scope is selected in this search page container
- * @since 2.0
+ * @since 2.0
*/
public boolean hasValidScope();
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
index 01310e7e571..a3f53b0e70d 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
@@ -152,14 +152,14 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
} else {
fIsUIUpdateScheduled= false;
turnOnDecoration();
- updateBusyLabel();
- if (fScheduleEnsureSelection) {
- fScheduleEnsureSelection= false;
- AbstractTextSearchResult result = getInput();
- if (result != null && fViewer.getSelection().isEmpty()) {
- navigateNext(true);
- }
- }
+ updateBusyLabel();
+ if (fScheduleEnsureSelection) {
+ fScheduleEnsureSelection= false;
+ AbstractTextSearchResult result = getInput();
+ if (result != null && fViewer.getSelection().isEmpty()) {
+ navigateNext(true);
+ }
+ }
}
fViewPart.updateLabel();
return Status.OK_STATUS;
@@ -210,7 +210,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
private volatile boolean fIsUIUpdateScheduled= false;
- private volatile boolean fScheduleEnsureSelection= false;
+ private volatile boolean fScheduleEnsureSelection= false;
private static final String KEY_LAYOUT = "org.eclipse.search.resultpage.layout"; //$NON-NLS-1$
/**
@@ -606,9 +606,9 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
@Override
public void queryFinished(final ISearchQuery query) {
- // handle the end of the query in the UIUpdateJob, as ui updates
- // may not be finished here.
- postEnsureSelection();
+ // handle the end of the query in the UIUpdateJob, as ui updates
+ // may not be finished here.
+ postEnsureSelection();
}
};
}
@@ -617,10 +617,10 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Posts a UI update to make sure an element is selected.
* @since 3.2
*/
- protected void postEnsureSelection() {
- fScheduleEnsureSelection= true;
- scheduleUIUpdate();
- }
+ protected void postEnsureSelection() {
+ fScheduleEnsureSelection= true;
+ scheduleUIUpdate();
+ }
private void updateBusyLabel() {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java
index b94617b4906..391648ade87 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java
@@ -21,40 +21,40 @@ package org.eclipse.search.ui.text;
*/
public abstract class MatchFilter {
- /**
- * Returns whether the given match is filtered by this filter.
- *
- * @param match the match to look at
- * @return returns <code>true</code> if the given match should be filtered or <code>false</code> if not.
- */
+ /**
+ * Returns whether the given match is filtered by this filter.
+ *
+ * @param match the match to look at
+ * @return returns <code>true</code> if the given match should be filtered or <code>false</code> if not.
+ */
public abstract boolean filters(Match match);
- /**
- * Returns the name of the filter as shown in the match filter selection dialog.
- *
- * @return the name of the filter as shown in the match filter selection dialog.
- */
+ /**
+ * Returns the name of the filter as shown in the match filter selection dialog.
+ *
+ * @return the name of the filter as shown in the match filter selection dialog.
+ */
public abstract String getName();
- /**
- * Returns the description of the filter as shown in the match filter selection dialog.
- *
- * @return the description of the filter as shown in the match filter selection dialog.
- */
+ /**
+ * Returns the description of the filter as shown in the match filter selection dialog.
+ *
+ * @return the description of the filter as shown in the match filter selection dialog.
+ */
public abstract String getDescription();
/**
- * Returns the label of the filter as shown by the filter action.
- *
- * @return the label of the filter as shown by the filter action.
- */
+ * Returns the label of the filter as shown by the filter action.
+ *
+ * @return the label of the filter as shown by the filter action.
+ */
public abstract String getActionLabel();
/**
- * Returns an ID of this filter.
- *
- * @return the id of the filter to be used when persisting this filter.
- */
+ * Returns an ID of this filter.
+ *
+ * @return the id of the filter to be used when persisting this filter.
+ */
public abstract String getID();
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java
index a58695c3124..0613d9c7d1c 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java
@@ -37,9 +37,9 @@ public abstract class TextSearchQueryProvider {
/**
* Specified the input for a search query.
- * <p>
- * Clients may instantiate this class.
- * </p>
+ * <p>
+ * Clients may instantiate this class.
+ * </p>
*/
public static abstract class TextSearchInput {
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistoryDropDownAction.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistoryDropDownAction.java
index 361691bbab1..51904bcb03a 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistoryDropDownAction.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistoryDropDownAction.java
@@ -36,7 +36,7 @@ class SearchHistoryDropDownAction extends Action implements IMenuCreator {
private ISearchResult fSearch;
public ShowSearchFromHistoryAction(ISearchResult search) {
- super("", AS_RADIO_BUTTON); //$NON-NLS-1$
+ super("", AS_RADIO_BUTTON); //$NON-NLS-1$
fSearch= search;
String label= escapeAmp(search.getLabel());
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
index d727777d191..6ee61f8836c 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
@@ -321,14 +321,14 @@ public class SearchHistorySelectionDialog extends SelectionDialog {
table.setLayoutData(gd);
- fRemoveButton= new Button(parent, SWT.PUSH);
- fRemoveButton.setText(SearchMessages.SearchesDialog_remove_label);
- fRemoveButton.addSelectionListener(new SelectionAdapter() {
- @Override
+ fRemoveButton= new Button(parent, SWT.PUSH);
+ fRemoveButton.setText(SearchMessages.SearchesDialog_remove_label);
+ fRemoveButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
- buttonPressed(REMOVE_ID);
- }
- });
+ buttonPressed(REMOVE_ID);
+ }
+ });
fRemoveButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
SWTUtil.setButtonDimensionHint(fRemoveButton);
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchMessages.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchMessages.java
index 9552fa922a5..7a3de33bda0 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchMessages.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchMessages.java
@@ -23,9 +23,9 @@ public final class SearchMessages extends NLS {
// Do not instantiate
}
- static {
- NLS.initializeMessages(BUNDLE_NAME, SearchMessages.class);
- }
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, SearchMessages.class);
+ }
public static String AbstractTextSearchViewPage_update_job_name;
public static String MatchFilterSelectionAction_label;
@@ -92,11 +92,11 @@ public final class SearchMessages extends NLS {
public static String PinSearchViewAction_label;
public static String PinSearchViewAction_tooltip;
public static String SearchPageRegistry_error_creating_extensionpoint;
- public static String TextSearchGroup_submenu_text;
- public static String FindInWorkspaceActionDelegate_text;
- public static String FindInProjectActionDelegate_text;
- public static String FindInWorkingSetActionDelegate_text;
- public static String FindInFileActionDelegate_text;
+ public static String TextSearchGroup_submenu_text;
+ public static String FindInWorkspaceActionDelegate_text;
+ public static String FindInProjectActionDelegate_text;
+ public static String FindInWorkingSetActionDelegate_text;
+ public static String FindInFileActionDelegate_text;
public static String TextSearchQueryProviderRegistry_defaultProviderLabel;
public static String RetrieverAction_dialog_title;
public static String RetrieverAction_empty_selection;
diff --git a/org.eclipse.search/pom.xml b/org.eclipse.search/pom.xml
index a5c584cf755..8f32b33d154 100644
--- a/org.eclipse.search/pom.xml
+++ b/org.eclipse.search/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.search</groupId>
<artifactId>org.eclipse.search</artifactId>
- <version>3.11.500-SNAPSHOT</version>
+ <version>3.11.600-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java
index ec48bda03be..28cd5899a74 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java
@@ -136,7 +136,7 @@ public class FileNamePatternSearchScope extends TextSearchScope {
* @return returns true if the file name is matching to a file name pattern
*/
private boolean matchesFileName(String fileName) {
- return getFileNameMatcher().reset(fileName).matches();
+ return getFileNameMatcher().reset(fileName).matches();
}
/**
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java
index 5210d2505e5..f4b1a8b22a1 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java
@@ -156,9 +156,9 @@ public class PatternConstructor {
}
- private static boolean isWordChar(char c) {
- return Character.isLetterOrDigit(c);
- }
+ private static boolean isWordChar(char c) {
+ return Character.isLetterOrDigit(c);
+ }
/**
* Creates a pattern element from an array of patterns in the old 'StringMatcher' format.
@@ -172,8 +172,8 @@ public class PatternConstructor {
StringBuilder pattern= new StringBuilder();
for (int i= 0; i < patterns.length; i++) {
if (i > 0) {
- // note that this works only as we know that the operands of the
- // or expression will be simple and need no brackets.
+ // note that this works only as we know that the operands of the
+ // or expression will be simple and need no brackets.
pattern.append('|');
}
appendAsRegEx(true, patterns[i], pattern);
@@ -183,75 +183,75 @@ public class PatternConstructor {
public static StringBuilder appendAsRegEx(boolean isStringMatcher, String pattern, StringBuilder buffer) {
- boolean isEscaped= false;
- for (int i = 0; i < pattern.length(); i++) {
- char c = pattern.charAt(i);
- switch(c) {
- // the backslash
- case '\\':
- // the backslash is escape char in string matcher
- if (isStringMatcher && !isEscaped) {
- isEscaped= true;
- }
- else {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- break;
- // characters that need to be escaped in the regex.
- case '(':
- case ')':
- case '{':
- case '}':
- case '.':
- case '[':
- case ']':
- case '$':
- case '^':
- case '+':
- case '|':
- if (isEscaped) {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- buffer.append('\\');
- buffer.append(c);
- break;
- case '?':
- if (isStringMatcher && !isEscaped) {
- buffer.append('.');
- }
- else {
- buffer.append('\\');
- buffer.append(c);
- isEscaped= false;
- }
- break;
- case '*':
- if (isStringMatcher && !isEscaped) {
- buffer.append(".*"); //$NON-NLS-1$
- }
- else {
- buffer.append('\\');
- buffer.append(c);
- isEscaped= false;
- }
- break;
- default:
- if (isEscaped) {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- buffer.append(c);
- break;
- }
- }
- if (isEscaped) {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- return buffer;
- }
+ boolean isEscaped= false;
+ for (int i = 0; i < pattern.length(); i++) {
+ char c = pattern.charAt(i);
+ switch(c) {
+ // the backslash
+ case '\\':
+ // the backslash is escape char in string matcher
+ if (isStringMatcher && !isEscaped) {
+ isEscaped= true;
+ }
+ else {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ break;
+ // characters that need to be escaped in the regex.
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '.':
+ case '[':
+ case ']':
+ case '$':
+ case '^':
+ case '+':
+ case '|':
+ if (isEscaped) {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ buffer.append('\\');
+ buffer.append(c);
+ break;
+ case '?':
+ if (isStringMatcher && !isEscaped) {
+ buffer.append('.');
+ }
+ else {
+ buffer.append('\\');
+ buffer.append(c);
+ isEscaped= false;
+ }
+ break;
+ case '*':
+ if (isStringMatcher && !isEscaped) {
+ buffer.append(".*"); //$NON-NLS-1$
+ }
+ else {
+ buffer.append('\\');
+ buffer.append(c);
+ isEscaped= false;
+ }
+ break;
+ default:
+ if (isEscaped) {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ buffer.append(c);
+ break;
+ }
+ }
+ if (isEscaped) {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ return buffer;
+ }
/**
* Interprets escaped characters in the given replace pattern.
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
index d7cb7cca8fe..d54ca7c8626 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
@@ -434,7 +434,7 @@ public class TextSearchVisitor {
System.out.println(Messages.format(
"[TextSearch] Search duration for {0} files in {1} jobs using {2} threads: {3}ms", args)); //$NON-NLS-1$
}
- }
+ }
}
public IStatus search(TextSearchScope scope, IProgressMonitor monitor) {
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
index 4af679f816e..316279d2eca 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
@@ -385,7 +385,7 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
ArrayList<SearchPageDescriptor> filteredList= new ArrayList<>(input.size());
for (SearchPageDescriptor descriptor : input) {
if (!WorkbenchActivityHelper.filterItem(descriptor))
- filteredList.add(descriptor);
+ filteredList.add(descriptor);
}
return filteredList;
@@ -431,7 +431,7 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
for (int i= 0; i < numPages; i++) {
SearchPageDescriptor descriptor= getDescriptorAt(i);
if (WorkbenchActivityHelper.filterItem(descriptor))
- continue;
+ continue;
final CTabItem item = new CTabItem(folder, SWT.NONE);
item.setData("descriptor", descriptor); //$NON-NLS-1$
@@ -480,9 +480,9 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
// create help control if needed
- if (isHelpAvailable()) {
- createHelpControl(composite);
- }
+ if (isHelpAvailable()) {
+ createHelpControl(composite);
+ }
fCustomizeButton= createButton(composite, CUSTOMIZE_ID, SearchMessages.SearchDialog_customize, true);
Label filler= new Label(composite, SWT.NONE);
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java
index 128325ba81f..090407b3325 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java
@@ -216,7 +216,7 @@ public final class SearchMessages extends NLS {
}
// public static String ReplaceDialog2_nomatches_error;
- public static String SearchPreferencePage_textSearchEngine;
+ public static String SearchPreferencePage_textSearchEngine;
public static String TextSearchEngineRegistry_defaulttextsearch_label;
public static String FileSearchQuery_singularPatternWithFileExt;
public static String FileSearchQuery_pluralPatternWithFileExt;
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
index 372c4dedeb5..e9ced17ae76 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
@@ -192,15 +192,15 @@ class SearchPageDescriptor implements IPluginContribution, Comparable<SearchPage
if (sizeHint != null) {
int commaSep= sizeHint.indexOf(',');
if (commaSep != -1) {
- try {
- int xval= Integer.parseInt(sizeHint.substring(0, commaSep).trim());
- int yval= Integer.parseInt(sizeHint.substring(commaSep + 1).trim());
- return new Point(xval, yval);
- } catch (NumberFormatException e) {
- }
+ try {
+ int xval= Integer.parseInt(sizeHint.substring(0, commaSep).trim());
+ int yval= Integer.parseInt(sizeHint.substring(commaSep + 1).trim());
+ return new Point(xval, yval);
+ } catch (NumberFormatException e) {
+ }
}
}
- return UNKNOWN_SIZE;
+ return UNKNOWN_SIZE;
}
/**
@@ -367,13 +367,13 @@ class SearchPageDescriptor implements IPluginContribution, Comparable<SearchPage
}
}
- @Override
+ @Override
public String getLocalId() {
- return getId();
- }
+ return getId();
+ }
- @Override
+ @Override
public String getPluginId() {
- return fElement.getContributor().getName();
- }
+ return fElement.getContributor().getName();
+ }
}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
index 62feefb89dc..d5860f28bec 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
@@ -302,19 +302,19 @@ public class SearchPlugin extends AbstractUIPlugin {
}
- public TextSearchEngineRegistry getTextSearchEngineRegistry() {
- if (fTextSearchEngineRegistry == null) {
- fTextSearchEngineRegistry= new TextSearchEngineRegistry();
- }
- return fTextSearchEngineRegistry;
- }
-
- public TextSearchQueryProviderRegistry getTextSearchQueryProviderRegistry() {
- if (fTextSearchQueryProviderRegistry == null) {
- fTextSearchQueryProviderRegistry= new TextSearchQueryProviderRegistry();
- }
- return fTextSearchQueryProviderRegistry;
- }
+ public TextSearchEngineRegistry getTextSearchEngineRegistry() {
+ if (fTextSearchEngineRegistry == null) {
+ fTextSearchEngineRegistry= new TextSearchEngineRegistry();
+ }
+ return fTextSearchEngineRegistry;
+ }
+
+ public TextSearchQueryProviderRegistry getTextSearchQueryProviderRegistry() {
+ if (fTextSearchQueryProviderRegistry == null) {
+ fTextSearchQueryProviderRegistry= new TextSearchQueryProviderRegistry();
+ }
+ return fTextSearchQueryProviderRegistry;
+ }
/**
* Creates all necessary sorter description nodes.
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPreferencePage.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPreferencePage.java
index 331f9c81a93..7e868698d10 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPreferencePage.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPreferencePage.java
@@ -53,8 +53,8 @@ public class SearchPreferencePage extends FieldEditorPreferencePage implements I
public static final String DEFAULT_PERSPECTIVE= "org.eclipse.search.defaultPerspective"; //$NON-NLS-1$
private static final String NO_DEFAULT_PERSPECTIVE= "org.eclipse.search.defaultPerspective.none"; //$NON-NLS-1$
public static final String BRING_VIEW_TO_FRONT= "org.eclipse.search.bringToFront"; //$NON-NLS-1$
- public static final String TEXT_SEARCH_ENGINE = "org.eclipse.search.textSearchEngine"; //$NON-NLS-1$
- public static final String TEXT_SEARCH_QUERY_PROVIDER = "org.eclipse.search.textSearchQueryProvider"; //$NON-NLS-1$
+ public static final String TEXT_SEARCH_ENGINE = "org.eclipse.search.textSearchEngine"; //$NON-NLS-1$
+ public static final String TEXT_SEARCH_QUERY_PROVIDER = "org.eclipse.search.textSearchQueryProvider"; //$NON-NLS-1$
public static final String LIMIT_HISTORY= "org.eclipse.search.limitHistory"; //$NON-NLS-1$
private ColorFieldEditor fColorEditor;
@@ -119,7 +119,7 @@ public class SearchPreferencePage extends FieldEditorPreferencePage implements I
POTENTIAL_MATCH_FG_COLOR,
SearchMessages.SearchPreferencePage_potentialMatchFgColor,
getFieldEditorParent()
- );
+ );
addField(fColorEditor);
fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored(), getFieldEditorParent());
@@ -134,17 +134,17 @@ public class SearchPreferencePage extends FieldEditorPreferencePage implements I
getFieldEditorParent());
addField(comboEditor);
- // in case we have a contributed engine, let the user choose.
- TextSearchEngineRegistry reg= SearchPlugin.getDefault().getTextSearchEngineRegistry();
- String[][] engineNamesAndIds= reg.getAvailableEngines();
- if (engineNamesAndIds.length > 1) {
- comboEditor= new ComboFieldEditor(
- TEXT_SEARCH_ENGINE,
- SearchMessages.SearchPreferencePage_textSearchEngine,
- engineNamesAndIds,
- getFieldEditorParent());
- addField(comboEditor);
- }
+ // in case we have a contributed engine, let the user choose.
+ TextSearchEngineRegistry reg= SearchPlugin.getDefault().getTextSearchEngineRegistry();
+ String[][] engineNamesAndIds= reg.getAvailableEngines();
+ if (engineNamesAndIds.length > 1) {
+ comboEditor= new ComboFieldEditor(
+ TEXT_SEARCH_ENGINE,
+ SearchMessages.SearchPreferencePage_textSearchEngine,
+ engineNamesAndIds,
+ getFieldEditorParent());
+ addField(comboEditor);
+ }
}
@Override
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java
index 32a76bcdb88..6d843df2483 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SortDropDownAction.java
@@ -132,10 +132,10 @@ class SortDropDownAction extends Action implements IMenuCreator {
item.fill(parent, -1);
}
- @Override
+ @Override
public void run() {
// nothing to do
- }
+ }
private SorterDescriptor findSorter(String pageId) {
Iterator<SorterDescriptor> iter= SearchPlugin.getDefault().getSorterDescriptors().iterator();
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java
index 8a64d62fc1e..b396c04c4bf 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java
@@ -90,30 +90,30 @@ public class FileSearchPage extends AbstractTextSearchViewPage implements IAdapt
return 2;
}
- @Override
+ @Override
public int compare(Viewer viewer, Object e1, Object e2) {
- int cat1 = category(e1);
- int cat2 = category(e2);
+ int cat1 = category(e1);
+ int cat2 = category(e2);
- if (cat1 != cat2) {
+ if (cat1 != cat2) {
return cat1 - cat2;
}
- if (e1 instanceof LineElement && e2 instanceof LineElement) {
+ if (e1 instanceof LineElement && e2 instanceof LineElement) {
LineElement m1= (LineElement) e1;
LineElement m2= (LineElement) e2;
- return m1.getOffset() - m2.getOffset();
- }
-
- String name1= fLabelProvider.getText(e1);
- String name2= fLabelProvider.getText(e2);
- if (name1 == null)
- name1 = "";//$NON-NLS-1$
- if (name2 == null)
- name2 = "";//$NON-NLS-1$
+ return m1.getOffset() - m2.getOffset();
+ }
+
+ String name1= fLabelProvider.getText(e1);
+ String name2= fLabelProvider.getText(e2);
+ if (name1 == null)
+ name1 = "";//$NON-NLS-1$
+ if (name2 == null)
+ name2 = "";//$NON-NLS-1$
int result= getComparator().compare(name1, name2);
return result;
- }
+ }
}
private static final String KEY_SORTING= "org.eclipse.search.resultpage.sorting"; //$NON-NLS-1$
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java
index 07a7d597cbd..803577488a6 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java
@@ -63,12 +63,12 @@ public class ReplaceConfigurationPage extends UserInputWizardPage {
public ReplaceConfigurationPage(ReplaceRefactoring refactoring) {
super("ReplaceConfigurationPage"); //$NON-NLS-1$
fReplaceRefactoring= refactoring;
- }
+ }
- @Override
+ @Override
public void createControl(Composite parent) {
- Composite result= new Composite(parent, SWT.NONE);
- GridLayout layout= new GridLayout(2, false);
+ Composite result= new Composite(parent, SWT.NONE);
+ GridLayout layout= new GridLayout(2, false);
result.setLayout(layout);
Label description= new Label(result, SWT.NONE);
@@ -153,7 +153,7 @@ public class ReplaceConfigurationPage extends UserInputWizardPage {
Dialog.applyDialogFont(result);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ISearchHelpContextIds.REPLACE_DIALOG);
- }
+ }
final void updateOKStatus() {
RefactoringStatus status= new RefactoringStatus();
@@ -176,7 +176,7 @@ public class ReplaceConfigurationPage extends UserInputWizardPage {
fTextFieldContentAssist.setEnabled(enable);
}
- @Override
+ @Override
protected boolean performFinish() {
initializeRefactoring();
storeSettings();
@@ -204,10 +204,10 @@ public class ReplaceConfigurationPage extends UserInputWizardPage {
IDialogSettings settings= SearchPlugin.getDefault().getDialogSettings().addNewSection(SETTINGS_GROUP);
settings.put(SETTINGS_REPLACE_WITH, history.toArray(new String[history.size()]));
- }
+ }
private void initializeRefactoring() {
fReplaceRefactoring.setReplaceString(fTextField.getText());
- }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceRefactoring.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceRefactoring.java
index 6c7648f2b32..e07c3653509 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceRefactoring.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceRefactoring.java
@@ -476,15 +476,15 @@ public class ReplaceRefactoring extends Refactoring {
replacementText= PatternConstructor.interpretReplaceEscapes(replacementText, originalText, lineDelimiter);
Matcher matcher= pattern.matcher(originalText);
- StringBuffer sb = new StringBuffer();
- matcher.reset();
- if (matcher.find()) {
- matcher.appendReplacement(sb, replacementText);
- } else {
- return null;
- }
- matcher.appendTail(sb);
- return sb.toString();
+ StringBuffer sb = new StringBuffer();
+ matcher.reset();
+ if (matcher.find()) {
+ matcher.appendReplacement(sb, replacementText);
+ } else {
+ return null;
+ }
+ matcher.appendTail(sb);
+ return sb.toString();
} catch (IndexOutOfBoundsException ex) {
throw new PatternSyntaxException(ex.getLocalizedMessage(), replacementText, -1);
}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
index 09ce30ad928..75bb63ea705 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
@@ -279,7 +279,7 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
ErrorDialog.openError(getShell(), SearchMessages.TextSearchPage_replace_searchproblems_title, SearchMessages.TextSearchPage_replace_searchproblems_message, e.getStatus());
return false;
}
- return true;
+ return true;
}
@Override
@@ -741,7 +741,7 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
});
fSearchBinaryCheckbox.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false, 1, 1));
fSearchBinaryCheckbox.setFont(searchInGroup.getFont());
- }
+ }
/**
* Sets the search page's container.
diff --git a/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java b/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java
index 19696cbc6d0..180084c81ab 100644
--- a/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java
+++ b/org.eclipse.search/search/org/eclipse/search/ui/ISearchResultView.java
@@ -53,26 +53,26 @@ public interface ISearchResultView extends IViewPart {
* If every match should show up in the search result view then the match
* itself can be used as key.
*
- * @param groupFactory the action group factory
- * or <code>null</code> if no factory is provided.
- * @param singularLabel the label to be used for this search occurrence
- * if there is one match
+ * @param groupFactory the action group factory
+ * or <code>null</code> if no factory is provided.
+ * @param singularLabel the label to be used for this search occurrence
+ * if there is one match
* or <code>null</code> if the pluralLabelPattern should be used
- * @param pluralLabelPattern the label pattern to be used for this search occurrence
- * if there are more than one matches or none.
- * This string may contain {0} which will be replace by the match count
- * @param imageDescriptor the image descriptor to be used for this search occurrence,
+ * @param pluralLabelPattern the label pattern to be used for this search occurrence
+ * if there are more than one matches or none.
+ * This string may contain {0} which will be replace by the match count
+ * @param imageDescriptor the image descriptor to be used for this search occurrence,
* or <code>null</code> if this search should not have an image
* @param pageId the id of the search page which started the search
* @param labelProvider the label provider used by this search result view
- * or <code>null</code> if the default provider should be used.
+ * or <code>null</code> if the default provider should be used.
* The default label provider shows the resource name and the corresponding image.
* @param gotoAction the action used by the view to go to a marker
* @param groupByKeyComputer the computer used by the view to compute the key for a marker
* @param operation the runnable used by the view to repeat the search
*
* @see IActionGroupFactory
- * @since 2.0
+ * @since 2.0
*/
public void searchStarted(
IActionGroupFactory groupFactory,
@@ -200,7 +200,7 @@ public interface ISearchResultView extends IViewPart {
*
* @param description the text description of the match
* @param groupByKey the <code>Object</code> by which this match is grouped
- * @param marker the marker for this match
+ * @param marker the marker for this match
* @param resource the marker's resource passed for optimization
*/
public void addMatch(String description, Object groupByKey, IResource resource, IMarker marker);
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/AbstractLineTrackerTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/AbstractLineTrackerTest.java
index cadeab46f6c..a5593de633d 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/AbstractLineTrackerTest.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/AbstractLineTrackerTest.java
@@ -50,6 +50,6 @@ public abstract class AbstractLineTrackerTest {
protected final void set(String string) {
fText.set(string);
fTracker.set(string);
- }
+ }
}
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/AdaptiveGapTextTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/AdaptiveGapTextTest.java
index a39f1bf9c37..7c850eaaed0 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/AdaptiveGapTextTest.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/AdaptiveGapTextTest.java
@@ -157,12 +157,12 @@ public class AdaptiveGapTextTest extends AbstractGapTextTest {
@Test
public void testRemoveReallocateBeforeGap() throws Exception {
- fText.replace(0, 0, "yyyyyzzzzz");
- assertGap(10, 15);
- assertContents("yyyyyzzzzzxxxxx");
-
- fText.replace(2, 6, null);
- assertGap(2, 5);
- assertContents("yyzzxxxxx");
- }
+ fText.replace(0, 0, "yyyyyzzzzz");
+ assertGap(10, 15);
+ assertContents("yyyyyzzzzzxxxxx");
+
+ fText.replace(2, 6, null);
+ assertGap(2, 5);
+ assertContents("yyzzxxxxx");
+ }
}
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/GapTextTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/GapTextTest.java
index 83c19f4a6cc..b5452db1d48 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/GapTextTest.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/GapTextTest.java
@@ -160,12 +160,12 @@ public class GapTextTest extends AbstractGapTextTest {
@Test
public void testRemoveReallocateBeforeGap() throws Exception {
- fText.replace(0, 0, "yyyyyzzzzz");
- assertGap(10, 15);
- assertContents("yyyyyzzzzzxxxxx");
-
- fText.replace(2, 6, null);
- assertGap(2, 7);
- assertContents("yyzzxxxxx");
- }
+ fText.replace(0, 0, "yyyyyzzzzz");
+ assertGap(10, 15);
+ assertContents("yyyyyzzzzzxxxxx");
+
+ fText.replace(2, 6, null);
+ assertGap(2, 7);
+ assertContents("yyzzxxxxx");
+ }
}
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/LineTrackerTest3.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/LineTrackerTest3.java
index 17d388f266b..610245c7e07 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/LineTrackerTest3.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/LineTrackerTest3.java
@@ -382,12 +382,12 @@ public class LineTrackerTest3 extends AbstractLineTrackerTest {
@Test
public void testNoDelimiterLine() throws Exception {
- set("abcef");
- checkLines(new int[] { 5 });
+ set("abcef");
+ checkLines(new int[] { 5 });
- replace(0, 0, ""); // switch to TreeLineTracker
- checkLines(new int[] { 5 });
- }
+ replace(0, 0, ""); // switch to TreeLineTracker
+ checkLines(new int[] { 5 });
+ }
@Test
public void testFunnyLastLineCompatibility2() throws Exception {
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java b/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
index 00bfb436589..458f0e515de 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
@@ -245,7 +245,7 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
* Returns all positions managed by the document grouped by category.
*
* @return the document's positions
- */
+ */
protected Map<String, List<Position>> getDocumentManagedPositions() {
return fPositions;
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/Assert.java b/org.eclipse.text/src/org/eclipse/jface/text/Assert.java
index 7f3d71b687f..c0ca2e9242f 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/Assert.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/Assert.java
@@ -69,7 +69,7 @@ public final class Assert {
* @param detail the detailed message
*/
public AssertionFailedException(String detail) {
- super(detail);
+ super(detail);
}
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java b/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java
index 887a67ccde7..2ef08388946 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java
@@ -330,8 +330,8 @@ public class GapTextStore implements ITextStore {
* @since 3.3
*/
private char[] allocate(int size) {
- return new char[size];
- }
+ return new char[size];
+ }
/*
* Executes System.arraycopy if length != 0. A length < 0 cannot happen -> don't hide coding
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java b/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java
index fba0c365acd..02d83d0c486 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java
@@ -628,10 +628,10 @@ public interface IDocument {
/**
* Returns the line delimiter of that line or <code>null</code> if the
- * line is not closed with a line delimiter.
+ * line is not closed with a line delimiter.
*
* @param line the line of interest
- * @return the line's delimiter or <code>null</code> if line does not have a delimiter
+ * @return the line's delimiter or <code>null</code> if line does not have a delimiter
* @exception BadLocationException if the line number is invalid in this document
*/
String getLineDelimiter(int line) throws BadLocationException;
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java b/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java
index 15bda870050..ef30c72baff 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java
@@ -48,9 +48,9 @@ public interface IDocumentPartitionerExtension2 {
String[] getManagingPositionCategories();
- /* zero-length partition support */
+ /* zero-length partition support */
- /**
+ /**
* Returns the content type of the partition containing the given offset in
* the connected document. There must be a document connected to this
* partitioner.
@@ -71,9 +71,9 @@ public interface IDocumentPartitionerExtension2 {
* a delimited partition starting at <code>offset</code>
* @return the content type of the offset's partition
*/
- String getContentType(int offset, boolean preferOpenPartitions);
+ String getContentType(int offset, boolean preferOpenPartitions);
- /**
+ /**
* Returns the partition containing the given offset of the connected
* document. There must be a document connected to this partitioner.
* <p>
@@ -93,9 +93,9 @@ public interface IDocumentPartitionerExtension2 {
* a delimited partition starting at <code>offset</code>
* @return the partition containing the offset
*/
- ITypedRegion getPartition(int offset, boolean preferOpenPartitions);
+ ITypedRegion getPartition(int offset, boolean preferOpenPartitions);
- /**
+ /**
* Returns the partitioning of the given range of the connected document.
* There must be a document connected to this partitioner.
* <p>
@@ -118,5 +118,5 @@ public interface IDocumentPartitionerExtension2 {
* partitioning
* @return the partitioning of the range
*/
- ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions);
+ ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions);
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java b/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java
index 46bad0fb8b6..5d0e92e2b54 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java
@@ -29,7 +29,7 @@ package org.eclipse.jface.text;
*/
public interface ISynchronizable {
- /**
+ /**
* Sets the lock object for this object. If the lock object is not
* <code>null</code> subsequent calls to specified methods of this object
* are synchronized on this lock object. Which methods are synchronized is
@@ -41,14 +41,14 @@ public interface ISynchronizable {
*
* @param lockObject the lock object. May be <code>null</code>.
*/
- void setLockObject(Object lockObject);
+ void setLockObject(Object lockObject);
- /**
+ /**
* Returns the lock object or <code>null</code> if there is none. Clients
* should use the lock object in order to synchronize concurrent access to
* the implementer.
*
* @return the lock object or <code>null</code>
*/
- Object getLockObject();
+ Object getLockObject();
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java b/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java
index 49216db2450..e4cdbee1e5c 100755
--- a/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java
@@ -172,34 +172,34 @@ abstract class TreeLineTracker implements ILineTracker {
*
* @param tracker the list line tracker
*/
- TreeLineTracker(ListLineTracker tracker) {
- final List<Line> lines= tracker.getLines();
- final int n= lines.size();
- if (n == 0)
- return;
-
- Line line= lines.get(0);
- String delim= line.delimiter;
- if (delim == null)
- delim= NO_DELIM;
- int length= line.length;
- fRoot= new Node(length, delim);
- Node node= fRoot;
+ TreeLineTracker(ListLineTracker tracker) {
+ final List<Line> lines= tracker.getLines();
+ final int n= lines.size();
+ if (n == 0)
+ return;
+
+ Line line= lines.get(0);
+ String delim= line.delimiter;
+ if (delim == null)
+ delim= NO_DELIM;
+ int length= line.length;
+ fRoot= new Node(length, delim);
+ Node node= fRoot;
for (int i= 1; i < n; i++) {
- line= lines.get(i);
- delim= line.delimiter;
- if (delim == null)
- delim= NO_DELIM;
- length= line.length;
+ line= lines.get(i);
+ delim= line.delimiter;
+ if (delim == null)
+ delim= NO_DELIM;
+ length= line.length;
node= insertAfter(node, length, delim);
- }
+ }
if (node.delimiter != NO_DELIM)
insertAfter(node, 0, NO_DELIM);
if (ASSERT) checkTree();
- }
+ }
/**
* Returns the node (line) including a certain offset. If the offset is between two
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java
index 1b5aabfc560..0a6b2f5e7d7 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java
@@ -175,45 +175,45 @@ class LinkedModeManager {
}
}
- /**
- * Tries to nest the given <code>LinkedModeModel</code> onto the top of
- * the stack of environments managed by the receiver. If <code>force</code>
- * is <code>true</code>, any environments on the stack that create a conflict
- * are killed.
- *
- * @param model the model to nest
- * @param force whether to force the addition of the model
- * @return <code>true</code> if nesting was successful, <code>false</code> otherwise (only possible if <code>force</code> is <code>false</code>
- */
- public boolean nestEnvironment(LinkedModeModel model, boolean force) {
- Assert.isNotNull(model);
-
- try {
- while (true) {
- if (fEnvironments.isEmpty()) {
- model.addLinkingListener(fListener);
- fEnvironments.push(model);
- return true;
- }
-
- LinkedModeModel top= fEnvironments.peek();
- if (model.canNestInto(top)) {
- model.addLinkingListener(fListener);
- fEnvironments.push(model);
- return true;
- } else if (!force) {
- return false;
- } else { // force
- fEnvironments.pop();
- top.exit(ILinkedModeListener.NONE);
- // continue;
- }
- }
- } finally {
- // if we remove any, make sure the new one got inserted
- Assert.isTrue(fEnvironments.size() > 0);
- }
- }
+ /**
+ * Tries to nest the given <code>LinkedModeModel</code> onto the top of
+ * the stack of environments managed by the receiver. If <code>force</code>
+ * is <code>true</code>, any environments on the stack that create a conflict
+ * are killed.
+ *
+ * @param model the model to nest
+ * @param force whether to force the addition of the model
+ * @return <code>true</code> if nesting was successful, <code>false</code> otherwise (only possible if <code>force</code> is <code>false</code>
+ */
+ public boolean nestEnvironment(LinkedModeModel model, boolean force) {
+ Assert.isNotNull(model);
+
+ try {
+ while (true) {
+ if (fEnvironments.isEmpty()) {
+ model.addLinkingListener(fListener);
+ fEnvironments.push(model);
+ return true;
+ }
+
+ LinkedModeModel top= fEnvironments.peek();
+ if (model.canNestInto(top)) {
+ model.addLinkingListener(fListener);
+ fEnvironments.push(model);
+ return true;
+ } else if (!force) {
+ return false;
+ } else { // force
+ fEnvironments.pop();
+ top.exit(ILinkedModeListener.NONE);
+ // continue;
+ }
+ }
+ } finally {
+ // if we remove any, make sure the new one got inserted
+ Assert.isTrue(fEnvironments.size() > 0);
+ }
+ }
/**
* Returns the <code>LinkedModeModel</code> that is on top of the stack of
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java
index c2485e65369..dac5e74998a 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java
@@ -505,8 +505,8 @@ public class LinkedModeModel {
// register positions
try {
for (LinkedPositionGroup group : fGroups) {
- group.register(this);
- }
+ group.register(this);
+ }
return true;
} catch (BadLocationException e){
// if we fail to add, make sure to release all listeners again
@@ -520,7 +520,7 @@ public class LinkedModeModel {
* model, throws an IllegalStateException otherwise.
*/
private void enforceNotEmpty() {
- boolean hasPosition= false;
+ boolean hasPosition= false;
for (LinkedPositionGroup linkedPositionGroup : fGroups)
if (!linkedPositionGroup.isEmpty()) {
hasPosition= true;
@@ -529,42 +529,42 @@ public class LinkedModeModel {
if (!hasPosition)
throw new IllegalStateException("must specify at least one linked position"); //$NON-NLS-1$
- }
+ }
- /**
+ /**
* Collects all the documents that contained positions are set upon.
- * @return the set of documents affected by this model
- */
- private IDocument[] getDocuments() {
- Set<IDocument> docs= new HashSet<>();
- for (LinkedPositionGroup group : fGroups) {
- docs.addAll(Arrays.asList(group.getDocuments()));
- }
- return docs.toArray(new IDocument[docs.size()]);
- }
-
- /**
- * Returns whether the receiver can be nested into the given <code>parent</code>
- * model. If yes, the parent model and its position that the receiver
- * fits in are remembered.
- *
- * @param parent the parent model candidate
- * @return <code>true</code> if the receiver can be nested into <code>parent</code>, <code>false</code> otherwise
- */
- boolean canNestInto(LinkedModeModel parent) {
- for (LinkedPositionGroup group : fGroups) {
+ * @return the set of documents affected by this model
+ */
+ private IDocument[] getDocuments() {
+ Set<IDocument> docs= new HashSet<>();
+ for (LinkedPositionGroup group : fGroups) {
+ docs.addAll(Arrays.asList(group.getDocuments()));
+ }
+ return docs.toArray(new IDocument[docs.size()]);
+ }
+
+ /**
+ * Returns whether the receiver can be nested into the given <code>parent</code>
+ * model. If yes, the parent model and its position that the receiver
+ * fits in are remembered.
+ *
+ * @param parent the parent model candidate
+ * @return <code>true</code> if the receiver can be nested into <code>parent</code>, <code>false</code> otherwise
+ */
+ boolean canNestInto(LinkedModeModel parent) {
+ for (LinkedPositionGroup group : fGroups) {
if (!enforceNestability(group, parent)) {
fParentPosition= null;
return false;
}
}
- Assert.isNotNull(fParentPosition);
- fParentEnvironment= parent;
- return true;
- }
+ Assert.isNotNull(fParentPosition);
+ fParentEnvironment= parent;
+ return true;
+ }
- /**
+ /**
* Called by nested models when a group is added to them. All
* positions in all groups of a nested model have to fit inside a
* single position in the parent model.
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java
index 3e416fab838..d16a3576e4d 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java
@@ -321,8 +321,8 @@ public class LinkedPositionGroup {
void register(LinkedModeModel model) throws BadLocationException {
for (LinkedPosition pos : fPositions) {
- model.register(pos);
- }
+ model.register(pos);
+ }
}
/**
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
index 17105ace2f3..97312b0a2b3 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
@@ -31,103 +31,103 @@ import org.eclipse.jface.text.Position;
*/
class AnnotationMap implements IAnnotationMap {
- /**
- * The lock object used to synchronize the operations explicitly defined by
- * <code>IAnnotationMap</code>
- */
- private Object fLockObject;
- /**
- * The internal lock object used if <code>fLockObject</code> is <code>null</code>.
+ /**
+ * The lock object used to synchronize the operations explicitly defined by
+ * <code>IAnnotationMap</code>
+ */
+ private Object fLockObject;
+ /**
+ * The internal lock object used if <code>fLockObject</code> is <code>null</code>.
* @since 3.2
*/
- private final Object fInternalLockObject= new Object();
+ private final Object fInternalLockObject= new Object();
- /** The map holding the annotations */
- private Map<Annotation, Position> fInternalMap;
+ /** The map holding the annotations */
+ private Map<Annotation, Position> fInternalMap;
- /**
- * Creates a new annotation map with the given capacity.
- *
- * @param capacity the capacity
- */
- public AnnotationMap(int capacity) {
- fInternalMap= new HashMap<>(capacity);
- }
+ /**
+ * Creates a new annotation map with the given capacity.
+ *
+ * @param capacity the capacity
+ */
+ public AnnotationMap(int capacity) {
+ fInternalMap= new HashMap<>(capacity);
+ }
- @Override
+ @Override
public synchronized void setLockObject(Object lockObject) {
- fLockObject= lockObject;
- }
+ fLockObject= lockObject;
+ }
- @Override
+ @Override
public synchronized Object getLockObject() {
- if (fLockObject == null)
- return fInternalLockObject;
- return fLockObject;
- }
+ if (fLockObject == null)
+ return fInternalLockObject;
+ return fLockObject;
+ }
- @Override
+ @Override
public Iterator<Position> valuesIterator() {
- synchronized (getLockObject()) {
- return new ArrayList<>(fInternalMap.values()).iterator();
- }
- }
+ synchronized (getLockObject()) {
+ return new ArrayList<>(fInternalMap.values()).iterator();
+ }
+ }
- @Override
+ @Override
public Iterator<Annotation> keySetIterator() {
- synchronized (getLockObject()) {
- return new ArrayList<>(fInternalMap.keySet()).iterator();
- }
- }
+ synchronized (getLockObject()) {
+ return new ArrayList<>(fInternalMap.keySet()).iterator();
+ }
+ }
- @Override
+ @Override
public boolean containsKey(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.containsKey(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.containsKey(annotation);
+ }
+ }
- @Override
+ @Override
public Position put(Annotation annotation, Position position) {
- synchronized (getLockObject()) {
- return fInternalMap.put(annotation, position);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.put(annotation, position);
+ }
+ }
- @Override
+ @Override
public Position get(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.get(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.get(annotation);
+ }
+ }
- @Override
+ @Override
public void clear() {
- synchronized (getLockObject()) {
- fInternalMap.clear();
- }
- }
+ synchronized (getLockObject()) {
+ fInternalMap.clear();
+ }
+ }
- @Override
+ @Override
public Position remove(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.remove(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.remove(annotation);
+ }
+ }
- @Override
+ @Override
public int size() {
- synchronized (getLockObject()) {
- return fInternalMap.size();
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.size();
+ }
+ }
- @Override
+ @Override
public boolean isEmpty() {
- synchronized (getLockObject()) {
+ synchronized (getLockObject()) {
return fInternalMap.isEmpty();
}
- }
+ }
@Override
public boolean containsValue(Object value) {
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
index 39517429356..602545e49dc 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
@@ -330,33 +330,33 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens
return (IAnnotationMap) fAnnotations;
}
- @Override
+ @Override
public Object getLockObject() {
- return getAnnotationMap().getLockObject();
- }
+ return getAnnotationMap().getLockObject();
+ }
- @Override
+ @Override
public void setLockObject(Object lockObject) {
- getAnnotationMap().setLockObject(lockObject);
- }
-
- /**
- * Returns the current annotation model event. This is the event that will be sent out
- * when calling <code>fireModelChanged</code>.
- *
- * @return the current annotation model event
- * @since 3.0
- */
- protected final AnnotationModelEvent getAnnotationModelEvent() {
- synchronized (getLockObject()) {
- if (fModelEvent == null) {
- fModelEvent= createAnnotationModelEvent();
- fModelEvent.markWorldChange(false);
- fModificationStamp= new Object();
- }
- return fModelEvent;
- }
- }
+ getAnnotationMap().setLockObject(lockObject);
+ }
+
+ /**
+ * Returns the current annotation model event. This is the event that will be sent out
+ * when calling <code>fireModelChanged</code>.
+ *
+ * @return the current annotation model event
+ * @since 3.0
+ */
+ protected final AnnotationModelEvent getAnnotationModelEvent() {
+ synchronized (getLockObject()) {
+ if (fModelEvent == null) {
+ fModelEvent= createAnnotationModelEvent();
+ fModelEvent.markWorldChange(false);
+ fModificationStamp= new Object();
+ }
+ return fModelEvent;
+ }
+ }
@Override
public void addAnnotation(Annotation annotation, Position position) {
@@ -442,9 +442,9 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens
IAnnotationModelListenerExtension extension= (IAnnotationModelListenerExtension) listener;
AnnotationModelEvent event= createAnnotationModelEvent();
event.markSealed();
- extension.modelChanged(event);
+ extension.modelChanged(event);
} else
- listener.modelChanged(this);
+ listener.modelChanged(this);
}
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java
index 5fa9ef3ed05..97aa7a65726 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java
@@ -36,9 +36,9 @@ public final class TemplateBuffer {
* @param string the string
* @param variables the variable positions
*/
- public TemplateBuffer(String string, TemplateVariable[] variables) {
+ public TemplateBuffer(String string, TemplateVariable[] variables) {
setContent(string, variables);
- }
+ }
/**
* Sets the content of the template buffer.
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java
index 84711b37d8a..6a795f7129c 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java
@@ -85,7 +85,7 @@ public class TemplateContextType {
* @return the id of the receiver
*/
public String getId() {
- return fId;
+ return fId;
}
@@ -235,9 +235,9 @@ public class TemplateContextType {
List<RangeMarker> positions= variablesToPositions(variables);
List<ReplaceEdit> edits= new ArrayList<>(5);
- // iterate over all variables and try to resolve them
- for (int i= 0; i != variables.length; i++) {
- TemplateVariable variable= variables[i];
+ // iterate over all variables and try to resolve them
+ for (int i= 0; i != variables.length; i++) {
+ TemplateVariable variable= variables[i];
if (!variable.isResolved())
resolve(variable, context);
@@ -248,18 +248,18 @@ public class TemplateContextType {
for (int k= 0; k != offsets.length; k++)
edits.add(new ReplaceEdit(offsets[k], variable.getInitialLength(), value));
- }
+ }
- IDocument document= new Document(buffer.getString());
- MultiTextEdit edit= new MultiTextEdit(0, document.getLength());
- edit.addChildren(positions.toArray(new TextEdit[positions.size()]));
- edit.addChildren(edits.toArray(new TextEdit[edits.size()]));
- edit.apply(document, TextEdit.UPDATE_REGIONS);
+ IDocument document= new Document(buffer.getString());
+ MultiTextEdit edit= new MultiTextEdit(0, document.getLength());
+ edit.addChildren(positions.toArray(new TextEdit[positions.size()]));
+ edit.addChildren(edits.toArray(new TextEdit[edits.size()]));
+ edit.apply(document, TextEdit.UPDATE_REGIONS);
positionsToVariables(positions, variables);
- buffer.setContent(document.get(), variables);
- }
+ buffer.setContent(document.get(), variables);
+ }
/**
* Resolves a single variable in a context. Resolving is delegated to the registered resolver.
@@ -277,10 +277,10 @@ public class TemplateContextType {
}
private static List<RangeMarker> variablesToPositions(TemplateVariable[] variables) {
- List<RangeMarker> positions= new ArrayList<>(5);
+ List<RangeMarker> positions= new ArrayList<>(5);
for (int i= 0; i != variables.length; i++) {
- int[] offsets= variables[i].getOffsets();
- for (int j= 0; j != offsets.length; j++)
+ int[] offsets= variables[i].getOffsets();
+ for (int j= 0; j != offsets.length; j++)
positions.add(new RangeMarker(offsets[j], 0));
}
@@ -291,7 +291,7 @@ public class TemplateContextType {
Iterator<RangeMarker> iterator= positions.iterator();
for (int i= 0; i != variables.length; i++) {
- TemplateVariable variable= variables[i];
+ TemplateVariable variable= variables[i];
int[] offsets= new int[variable.getOffsets().length];
for (int j= 0; j != offsets.length; j++)
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java
index ddbd31f5470..d95a9a5a81d 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java
@@ -141,7 +141,7 @@ public class TemplateVariable {
* @return the type name of the variable
*/
public String getType() {
- return fType.getName();
+ return fType.getName();
}
/**
@@ -160,7 +160,7 @@ public class TemplateVariable {
* @return the name of the variable
*/
public String getName() {
- return fName;
+ return fName;
}
/**
@@ -251,9 +251,9 @@ public class TemplateVariable {
* @param unambiguous the new unambiguous state of the variable
*/
public void setUnambiguous(boolean unambiguous) {
- fIsUnambiguous= unambiguous;
- if (unambiguous)
- setResolved(true);
+ fIsUnambiguous= unambiguous;
+ if (unambiguous)
+ setResolved(true);
}
/**
diff --git a/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java b/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java
index 53781afc606..b320a32528b 100644
--- a/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java
+++ b/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java
@@ -110,7 +110,7 @@ public class TextEditGroup {
* @since 3.3
*/
public boolean removeTextEdit(TextEdit edit) {
- return fEdits.remove(edit);
+ return fEdits.remove(edit);
}
/**
@@ -119,7 +119,7 @@ public class TextEditGroup {
* @since 3.3
*/
public void clearTextEdits() {
- fEdits.clear();
+ fEdits.clear();
}
diff --git a/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java b/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java
index d32d2f9d078..08e80498154 100644
--- a/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java
+++ b/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java
@@ -127,16 +127,16 @@ public class TemplateStoreCore {
@Override
public void preferenceChange(PreferenceChangeEvent event) {
/*
- * Don't load if we are in the process of saving ourselves. We are in sync anyway after the
- * save operation, and clients may trigger reloading by listening to preference store
- * updates.
- */
- if (!fIgnorePreferenceStoreChanges && fKey.equals(event.getKey()))
- try {
- load();
- } catch (IOException x) {
- handleException(x);
- }
+ * Don't load if we are in the process of saving ourselves. We are in sync anyway after the
+ * save operation, and clients may trigger reloading by listening to preference store
+ * updates.
+ */
+ if (!fIgnorePreferenceStoreChanges && fKey.equals(event.getKey()))
+ try {
+ load();
+ } catch (IOException x) {
+ handleException(x);
+ }
}
};
fPreferenceStore.addPreferenceChangeListener(fPropertyListener);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
index fe3102433e1..965acf01643 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
@@ -83,7 +83,7 @@ public class EncodingActionGroup extends ActionGroup {
* @param editor the target editor
*/
public PredefinedEncodingAction(ResourceBundle bundle, String prefix, String encoding, ITextEditor editor) {
- super(bundle, prefix, editor);
+ super(bundle, prefix, editor);
fEncoding= encoding;
if (prefix == null)
setText(encoding);
@@ -98,7 +98,7 @@ public class EncodingActionGroup extends ActionGroup {
* @param editor the target editor
*/
public PredefinedEncodingAction(ResourceBundle bundle, String encoding, ITextEditor editor) {
- super(bundle, null, editor);
+ super(bundle, null, editor);
fEncoding= encoding;
setText(encoding);
fLabel= getText();
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
index 366351fc11f..ab09e71a1cf 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
@@ -97,9 +97,9 @@ public class TextEditor extends AbstractDecoratedTextEditor {
/**
* Installs the encoding support on the given text editor.
* <p>
- * Subclasses may override to install their own encoding
- * support or to disable the default encoding support.
- * </p>
+ * Subclasses may override to install their own encoding
+ * support or to disable the default encoding support.
+ * </p>
* @since 2.1
*/
protected void installEncodingSupport() {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java
index 88ff833f53e..7c977951111 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java
@@ -24,7 +24,7 @@ import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
* @since 2.1
* @noinstantiate This class is not intended to be instantiated by clients.
* @noextend This class is not intended to be subclassed by clients.
- */
+ */
public class TextEditorPreferenceConstants {
/**
@@ -60,7 +60,7 @@ public class TextEditorPreferenceConstants {
/**
* A named preference that controls whether the print margin is turned on or off
- * (value <code>"printMargin"</code>).
+ * (value <code>"printMargin"</code>).
* <p>
* The preference value is of type <code>Boolean</code>.
* </p>
@@ -125,7 +125,7 @@ public class TextEditorPreferenceConstants {
/**
* A named preference that controls whether the overview ruler shows unknown indicators
- * (value <code>"othersIndicationInOverviewRuler"</code>).
+ * (value <code>"othersIndicationInOverviewRuler"</code>).
* <p>
* The preference value is of type <code>Boolean</code>.
* </p>
@@ -137,7 +137,7 @@ public class TextEditorPreferenceConstants {
/**
* A named preference that controls if the overview ruler is shown in the UI
- * (value <code>"overviewRuler"</code>).
+ * (value <code>"overviewRuler"</code>).
* <p>
* The preference value is of type <code>Boolean</code>.
* </p>
@@ -281,10 +281,10 @@ public class TextEditorPreferenceConstants {
public final static String EDITOR_SEARCH_RESULT_INDICATION_IN_OVERVIEW_RULER= "searchResultIndicationInOverviewRuler"; //$NON-NLS-1$
/**
- * Initializes the given preference store with the default values.
+ * Initializes the given preference store with the default values.
*
- * @param store the preference store to be initialized
- */
+ * @param store the preference store to be initialized
+ */
public static void initializeDefaultValues(IPreferenceStore store) {
// set defaults from AbstractDecoratedTextEditor
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ConvertLineDelimitersAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ConvertLineDelimitersAction.java
index 2782c92b9de..47d92444ce8 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ConvertLineDelimitersAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ConvertLineDelimitersAction.java
@@ -90,7 +90,7 @@ public class ConvertLineDelimitersAction extends FileBufferOperationAction {
return filterUnacceptableFiles(files);
}
- final IFilter filter= new IFilter() {
+ final IFilter filter= new IFilter() {
@Override
public boolean accept(IResource resource) {
return resource != null && isAcceptableLocation(resource.getFullPath());
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/LinkedModeConfigurationBlock.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/LinkedModeConfigurationBlock.java
index 87ea350c397..05604cf898b 100755
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/LinkedModeConfigurationBlock.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/LinkedModeConfigurationBlock.java
@@ -375,12 +375,12 @@ class LinkedModeConfigurationBlock implements IPreferenceConfigurationBlock {
* @param chars the number of characters
* @return the number of pixels
*/
- protected int convertWidthInCharsToPixels(int chars) {
- // test for failure to initialize for backward compatibility
- if (fFontMetrics == null)
- return 0;
- return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
- }
+ protected int convertWidthInCharsToPixels(int chars) {
+ // test for failure to initialize for backward compatibility
+ if (fFontMetrics == null)
+ return 0;
+ return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
+ }
/**
* Returns the number of pixels corresponding to the height of the given number of characters.
@@ -394,12 +394,12 @@ class LinkedModeConfigurationBlock implements IPreferenceConfigurationBlock {
* @param chars the number of characters
* @return the number of pixels
*/
- protected int convertHeightInCharsToPixels(int chars) {
- // test for failure to initialize for backward compatibility
- if (fFontMetrics == null)
- return 0;
- return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
- }
+ protected int convertHeightInCharsToPixels(int chars) {
+ // test for failure to initialize for backward compatibility
+ if (fFontMetrics == null)
+ return 0;
+ return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
+ }
/**
* Initializes the computation of horizontal and vertical dialog units based on the size of
@@ -410,13 +410,13 @@ class LinkedModeConfigurationBlock implements IPreferenceConfigurationBlock {
*
* @param testControl a control from which to obtain the current font
*/
- protected void initializeDialogUnits(Control testControl) {
- // Compute and store a font metric
- GC gc = new GC(testControl);
- gc.setFont(JFaceResources.getDialogFont());
- fFontMetrics = gc.getFontMetrics();
- gc.dispose();
- }
+ protected void initializeDialogUnits(Control testControl) {
+ // Compute and store a font metric
+ GC gc = new GC(testControl);
+ gc.setFont(JFaceResources.getDialogFont());
+ fFontMetrics = gc.getFontMetrics();
+ gc.dispose();
+ }
private void handleAnnotationListSelection() {
ListItem item= getSelectedItem();
@@ -545,12 +545,12 @@ class LinkedModeConfigurationBlock implements IPreferenceConfigurationBlock {
private void initializeFields() {
- // Update slaves
- Iterator<SelectionListener> iter= fMasterSlaveListeners.iterator();
- while (iter.hasNext()) {
- SelectionListener listener= iter.next();
- listener.widgetSelected(null);
- }
+ // Update slaves
+ Iterator<SelectionListener> iter= fMasterSlaveListeners.iterator();
+ while (iter.hasNext()) {
+ SelectionListener listener= iter.next();
+ listener.widgetSelected(null);
+ }
}
@Override
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java
index bf025618866..e73da307b01 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java
@@ -23,9 +23,9 @@ import org.eclipse.ui.texteditor.AnnotationPreference;
*/
public class PreviousPulldownActionDelegate extends NextPreviousPulldownActionDelegate {
- @Override
+ @Override
public String getPreferenceKey(AnnotationPreference annotationPreference) {
- return annotationPreference.getIsGoToPreviousNavigationTargetKey();
- }
+ return annotationPreference.getIsGoToPreviousNavigationTargetKey();
+ }
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/RemoveTrailingWhitespaceHandler.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/RemoveTrailingWhitespaceHandler.java
index 3933e92a111..c25a0aa873b 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/RemoveTrailingWhitespaceHandler.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/RemoveTrailingWhitespaceHandler.java
@@ -65,7 +65,7 @@ public class RemoveTrailingWhitespaceHandler extends FileBufferOperationHandler
if (containsOnlyFiles(resources))
return files;
- final IFilter filter= new IFilter() {
+ final IFilter filter= new IFilter() {
@Override
public boolean accept(IResource resource) {
return resource != null && isAcceptableLocation(resource.getFullPath());
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java
index 657bdedd70e..9ff215c94f0 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java
@@ -78,7 +78,7 @@ class SelectResourcesBlock implements ICheckStateListener, ISelectionChangedList
void filterElements(Collection<Object> elements) throws InterruptedException;
- void filterElements(Object[] elements) throws InterruptedException;
+ void filterElements(Object[] elements) throws InterruptedException;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesDialog.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesDialog.java
index 0a21c76961f..75ec3955a69 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesDialog.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesDialog.java
@@ -63,11 +63,11 @@ class SelectResourcesDialog extends Dialog {
}
private SelectResourcesBlock fResourceGroup;
- private List<Object> fAcceptedFileTypes = new ArrayList<>();
- private IResource[] fInput;
- private String fTitle;
- private String fInstruction;
- private Label fCountIndication;
+ private List<Object> fAcceptedFileTypes = new ArrayList<>();
+ private IResource[] fInput;
+ private String fTitle;
+ private String fInstruction;
+ private Label fCountIndication;
private IFilter fAcceptableLocationsFilter;
@@ -130,50 +130,50 @@ class SelectResourcesDialog extends Dialog {
return (displayHeight / fontHeight) > 50;
}
- private ITreeContentProvider getResourceProvider(final int resourceType) {
- return new WorkbenchContentProvider() {
- @Override
+ private ITreeContentProvider getResourceProvider(final int resourceType) {
+ return new WorkbenchContentProvider() {
+ @Override
public Object[] getChildren(Object o) {
- if (o instanceof IWorkspaceRoot) {
- HashSet<IResource> projects= new HashSet<>();
- for (int i= 0; i < fInput.length; i++) {
- IResource project= fInput[i].getProject();
- if ((project.getType() & resourceType) > 0)
- projects.add(project);
- }
- return projects.toArray();
- }
-
- if (o instanceof IContainer) {
- IResource[] members = null;
- try {
- members = ((IContainer) o).members();
- } catch (CoreException e) {
- //just return an empty set of children
- return new Object[0];
- }
-
- //filter out the desired resource types
- ArrayList<IResource> results = new ArrayList<>();
- for (int i = 0; i < members.length; i++) {
- //And the test bits with the resource types to see if they are what we want
- if ((members[i].getType() & resourceType) > 0 && (resourceType != IResource.FILE || fAcceptableLocationsFilter == null || fAcceptableLocationsFilter.accept(members[i]))) {
- results.add(members[i]);
- }
- }
- return results.toArray();
- }
-
- //input element case
- if (o instanceof ArrayList)
- return ((ArrayList<?>) o).toArray();
-
- return new Object[0];
- }
- };
- }
-
- protected Composite createSelectionButtonGroup(Composite parent) {
+ if (o instanceof IWorkspaceRoot) {
+ HashSet<IResource> projects= new HashSet<>();
+ for (int i= 0; i < fInput.length; i++) {
+ IResource project= fInput[i].getProject();
+ if ((project.getType() & resourceType) > 0)
+ projects.add(project);
+ }
+ return projects.toArray();
+ }
+
+ if (o instanceof IContainer) {
+ IResource[] members = null;
+ try {
+ members = ((IContainer) o).members();
+ } catch (CoreException e) {
+ //just return an empty set of children
+ return new Object[0];
+ }
+
+ //filter out the desired resource types
+ ArrayList<IResource> results = new ArrayList<>();
+ for (int i = 0; i < members.length; i++) {
+ //And the test bits with the resource types to see if they are what we want
+ if ((members[i].getType() & resourceType) > 0 && (resourceType != IResource.FILE || fAcceptableLocationsFilter == null || fAcceptableLocationsFilter.accept(members[i]))) {
+ results.add(members[i]);
+ }
+ }
+ return results.toArray();
+ }
+
+ //input element case
+ if (o instanceof ArrayList)
+ return ((ArrayList<?>) o).toArray();
+
+ return new Object[0];
+ }
+ };
+ }
+
+ protected Composite createSelectionButtonGroup(Composite parent) {
Font font= parent.getFont();
@@ -225,7 +225,7 @@ class SelectResourcesDialog extends Dialog {
return buttonComposite;
}
- protected void handleSelectFileTypes() {
+ protected void handleSelectFileTypes() {
Object[] acceptedFileTypes= queryFileTypes();
if (acceptedFileTypes != null) {
fAcceptedFileTypes= Arrays.asList(acceptedFileTypes);
@@ -233,13 +233,13 @@ class SelectResourcesDialog extends Dialog {
}
}
- protected Object[] queryFileTypes() {
+ protected Object[] queryFileTypes() {
TypeFilteringDialog dialog= new TypeFilteringDialog(getShell(), fAcceptedFileTypes);
dialog.open();
return dialog.getResult();
}
- private void filterSelection() {
+ private void filterSelection() {
final IFilter filter= resource -> hasAcceptedFileType(resource);
@@ -248,10 +248,10 @@ class SelectResourcesDialog extends Dialog {
Runnable runnable= () -> setSelection(resources, filter);
- BusyIndicator.showWhile(getShell().getDisplay(), runnable);
- }
+ BusyIndicator.showWhile(getShell().getDisplay(), runnable);
+ }
- protected boolean hasAcceptedFileType(IResource resource) {
+ protected boolean hasAcceptedFileType(IResource resource) {
if (fAcceptedFileTypes == null)
return true;
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
index 87036b60c4a..23e1615359b 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
@@ -1058,12 +1058,12 @@ public class TextEditorDefaultsPreferencePage extends PreferencePage implements
fFieldsInitialized= true;
updateStatus(new StatusInfo());
- // Update slaves
- Iterator<SelectionListener> iter= fMasterSlaveListeners.iterator();
- while (iter.hasNext()) {
- SelectionListener listener= iter.next();
- listener.widgetSelected(null);
- }
+ // Update slaves
+ Iterator<SelectionListener> iter= fMasterSlaveListeners.iterator();
+ while (iter.hasNext()) {
+ SelectionListener listener= iter.next();
+ listener.widgetSelected(null);
+ }
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index bd8ee10238b..6c0f9af9060 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -1185,10 +1185,10 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
setAction(ITextEditorActionConstants.QUICKDIFF_REVERTDELETION, action);
IAction action2= new CompositeRevertAction(this, new IAction[] {
- getAction(ITextEditorActionConstants.QUICKDIFF_REVERTSELECTION),
- getAction(ITextEditorActionConstants.QUICKDIFF_REVERTBLOCK),
- getAction(ITextEditorActionConstants.QUICKDIFF_REVERTDELETION),
- getAction(ITextEditorActionConstants.QUICKDIFF_REVERTLINE)});
+ getAction(ITextEditorActionConstants.QUICKDIFF_REVERTSELECTION),
+ getAction(ITextEditorActionConstants.QUICKDIFF_REVERTBLOCK),
+ getAction(ITextEditorActionConstants.QUICKDIFF_REVERTDELETION),
+ getAction(ITextEditorActionConstants.QUICKDIFF_REVERTLINE)});
action2.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICKDIFF_REVERT);
setAction(ITextEditorActionConstants.QUICKDIFF_REVERT, action2);
@@ -1310,7 +1310,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
IAnnotationHover hover= fLineColumn.getHover();
showFocusedRulerHover(hover, sourceViewer, caretOffset);
- }
+ }
/**
* Opens a sticky annotation ruler hover for the caret line. Does nothing if no annotation hover
@@ -1528,14 +1528,14 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
// Check whether file exists and if so, confirm overwrite
final File localFile= new File(path);
if (localFile.exists()) {
- MessageDialog overwriteDialog= new MessageDialog(
- shell,
- TextEditorMessages.AbstractDecoratedTextEditor_saveAs_overwrite_title,
- null,
- NLSUtility.format(TextEditorMessages.AbstractDecoratedTextEditor_saveAs_overwrite_message, path),
- MessageDialog.WARNING,
- new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL },
- 1); // 'No' is the default
+ MessageDialog overwriteDialog= new MessageDialog(
+ shell,
+ TextEditorMessages.AbstractDecoratedTextEditor_saveAs_overwrite_title,
+ null,
+ NLSUtility.format(TextEditorMessages.AbstractDecoratedTextEditor_saveAs_overwrite_message, path),
+ MessageDialog.WARNING,
+ new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL },
+ 1); // 'No' is the default
if (overwriteDialog.open() != Window.OK) {
if (progressMonitor != null) {
progressMonitor.setCanceled(true);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
index 0717f06115a..79f55b89dba 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
@@ -102,7 +102,7 @@ public class AbstractDecoratedTextEditorPreferenceConstants {
/**
* A named preference that controls whether the print margin is turned on or off
- * (value <code>"printMargin"</code>).
+ * (value <code>"printMargin"</code>).
* <p>
* The preference value is of type <code>Boolean</code>.
* </p>
@@ -170,7 +170,7 @@ public class AbstractDecoratedTextEditorPreferenceConstants {
/**
* A named preference that controls whether the overview ruler shows unknown indicators
- * (value <code>"othersIndicationInOverviewRuler"</code>).
+ * (value <code>"othersIndicationInOverviewRuler"</code>).
* <p>
* The preference value is of type <code>Boolean</code>.
* </p>
@@ -181,7 +181,7 @@ public class AbstractDecoratedTextEditorPreferenceConstants {
/**
* A named preference that controls if the overview ruler is shown in the UI
- * (value <code>"overviewRuler"</code>).
+ * (value <code>"overviewRuler"</code>).
* <p>
* The preference value is of type <code>Boolean</code>.
* </p>
@@ -672,10 +672,10 @@ public class AbstractDecoratedTextEditorPreferenceConstants {
public static final String EDITOR_HOVER_ENRICH_MODE= AbstractTextEditor.PREFERENCE_HOVER_ENRICH_MODE;
/**
- * Initializes the given preference store with the default values.
+ * Initializes the given preference store with the default values.
*
- * @param store the preference store to be initialized
- */
+ * @param store the preference store to be initialized
+ */
public static void initializeDefaultValues(IPreferenceStore store) {
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.USE_ANNOTATIONS_PREFERENCE_PAGE, false);
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.USE_QUICK_DIFF_PREFERENCE_PAGE, false);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java
index 6b914d3c4e8..e28f26799a6 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java
@@ -63,10 +63,10 @@ public class TaskRulerAction extends AbstractRulerActionDelegate {
if (resource == null)
return;
- TaskPropertiesDialog dialog = new TaskPropertiesDialog(getTextEditor().getSite().getShell());
- dialog.setResource(resource);
- dialog.setInitialAttributes(getInitialAttributes());
- dialog.open();
+ TaskPropertiesDialog dialog = new TaskPropertiesDialog(getTextEditor().getSite().getShell());
+ dialog.setResource(resource);
+ dialog.setInitialAttributes(getInitialAttributes());
+ dialog.open();
}
}
diff --git a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java
index f365a9f6b37..cf3af157ed0 100644
--- a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java
+++ b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java
@@ -26,17 +26,17 @@ import org.eclipse.swt.widgets.Display;
public class BlueTagsPresentationReconciler extends PresentationReconciler {
- private final TextAttribute tagAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
- private final TextAttribute headerAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY));
+ private final TextAttribute tagAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
+ private final TextAttribute headerAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY));
- public BlueTagsPresentationReconciler() {
- RuleBasedScanner scanner= new RuleBasedScanner();
- IRule[] rules = new IRule[2];
- rules[1]= new SingleLineRule("<", ">", new Token(tagAttribute));
- rules[0]= new SingleLineRule("<?", "?>", new Token(headerAttribute));
- scanner.setRules(rules);
- DefaultDamagerRepairer dr= new DefaultDamagerRepairer(scanner);
- this.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- this.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
- }
+ public BlueTagsPresentationReconciler() {
+ RuleBasedScanner scanner= new RuleBasedScanner();
+ IRule[] rules = new IRule[2];
+ rules[1]= new SingleLineRule("<", ">", new Token(tagAttribute));
+ rules[0]= new SingleLineRule("<?", "?>", new Token(headerAttribute));
+ scanner.setRules(rules);
+ DefaultDamagerRepairer dr= new DefaultDamagerRepairer(scanner);
+ this.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ this.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ }
} \ No newline at end of file
diff --git a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/FoldingReconciler.java b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/FoldingReconciler.java
index aeb33e9ac72..a9ed6d21b69 100644
--- a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/FoldingReconciler.java
+++ b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/FoldingReconciler.java
@@ -23,14 +23,14 @@ public class FoldingReconciler extends Reconciler {
private FoldingStrategy fStrategy;
public FoldingReconciler() {
- fStrategy = new FoldingStrategy();
- this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
- }
+ fStrategy = new FoldingStrategy();
+ this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
+ }
- @Override
- public void install(ITextViewer textViewer) {
- super.install(textViewer);
- ProjectionViewer pViewer =(ProjectionViewer)textViewer;
- fStrategy.setProjectionViewer(pViewer);
- }
+ @Override
+ public void install(ITextViewer textViewer) {
+ super.install(textViewer);
+ ProjectionViewer pViewer =(ProjectionViewer)textViewer;
+ fStrategy.setProjectionViewer(pViewer);
+ }
} \ No newline at end of file
diff --git a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/HighlightReconciler.java b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/HighlightReconciler.java
index bdca5308b06..971fe3bf7a7 100644
--- a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/HighlightReconciler.java
+++ b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/HighlightReconciler.java
@@ -22,9 +22,9 @@ public class HighlightReconciler extends Reconciler {
private HighlightStrategy fStrategy;
public HighlightReconciler() {
- fStrategy = new HighlightStrategy();
- this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
- }
+ fStrategy = new HighlightStrategy();
+ this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
+ }
@Override
public void install(ITextViewer textViewer) {
diff --git a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NatureLabelHoverProvider.java b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NatureLabelHoverProvider.java
index ef2c7d94e1c..21c142ab733 100644
--- a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NatureLabelHoverProvider.java
+++ b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NatureLabelHoverProvider.java
@@ -23,31 +23,31 @@ import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
public class NatureLabelHoverProvider implements ITextHover {
- public NatureLabelHoverProvider() {
- }
+ public NatureLabelHoverProvider() {
+ }
- @Override
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+ @Override
+ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- String contents= textViewer.getDocument().get();
- int offset= hoverRegion.getOffset();
- int endIndex= contents.indexOf("</nature>", offset);
- if (endIndex==-1) return "";
- int startIndex= contents.substring(0, offset).lastIndexOf("<nature>");
- if (startIndex==-1) return "";
- String selection = contents.substring(startIndex+"<nature>".length(), endIndex);
+ String contents= textViewer.getDocument().get();
+ int offset= hoverRegion.getOffset();
+ int endIndex= contents.indexOf("</nature>", offset);
+ if (endIndex==-1) return "";
+ int startIndex= contents.substring(0, offset).lastIndexOf("<nature>");
+ if (startIndex==-1) return "";
+ String selection = contents.substring(startIndex+"<nature>".length(), endIndex);
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProjectNatureDescriptor[] natureDescriptors= workspace.getNatureDescriptors();
- for (int i= 0; i < natureDescriptors.length; i++) {
- if (natureDescriptors[i].getNatureId().equals(selection))
- return natureDescriptors[i].getLabel();
- }
- return null;
- }
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProjectNatureDescriptor[] natureDescriptors= workspace.getNatureDescriptors();
+ for (int i= 0; i < natureDescriptors.length; i++) {
+ if (natureDescriptors[i].getNatureId().equals(selection))
+ return natureDescriptors[i].getLabel();
+ }
+ return null;
+ }
- @Override
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- return new Region(offset, 0);
- }
+ @Override
+ public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+ return new Region(offset, 0);
+ }
} \ No newline at end of file
diff --git a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NaturesAndProjectsContentAssistProcessor.java b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NaturesAndProjectsContentAssistProcessor.java
index f4a0375f057..a61f6580fb9 100644
--- a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NaturesAndProjectsContentAssistProcessor.java
+++ b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/NaturesAndProjectsContentAssistProcessor.java
@@ -30,58 +30,58 @@ public class NaturesAndProjectsContentAssistProcessor implements IContentAssistP
// TODO Auto-generated constructor stub
}
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
- String text = viewer.getDocument().get();
- String natureTag= "<nature>";
- String projectReferenceTag="<project>";
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- int natureTagLength = natureTag.length();
+ @Override
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ String text = viewer.getDocument().get();
+ String natureTag= "<nature>";
+ String projectReferenceTag="<project>";
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ int natureTagLength = natureTag.length();
if (text.length() >= natureTagLength && offset >= natureTagLength && text.substring(offset - natureTagLength, offset).equals(natureTag)) {
- IProjectNatureDescriptor[] natureDescriptors= workspace.getNatureDescriptors();
- ICompletionProposal[] proposals = new ICompletionProposal[natureDescriptors.length];
- for (int i= 0; i < natureDescriptors.length; i++) {
- IProjectNatureDescriptor descriptor= natureDescriptors[i];
- proposals[i] = new CompletionProposal(descriptor.getNatureId(), offset, 0, descriptor.getNatureId().length());
- }
- return proposals;
- }
- int projectReferenceTagLength = projectReferenceTag.length();
+ IProjectNatureDescriptor[] natureDescriptors= workspace.getNatureDescriptors();
+ ICompletionProposal[] proposals = new ICompletionProposal[natureDescriptors.length];
+ for (int i= 0; i < natureDescriptors.length; i++) {
+ IProjectNatureDescriptor descriptor= natureDescriptors[i];
+ proposals[i] = new CompletionProposal(descriptor.getNatureId(), offset, 0, descriptor.getNatureId().length());
+ }
+ return proposals;
+ }
+ int projectReferenceTagLength = projectReferenceTag.length();
if (text.length() >= projectReferenceTagLength && offset >= projectReferenceTagLength && text.substring(offset - projectReferenceTagLength, offset).equals(projectReferenceTag)) {
- IProject[] projects= workspace.getRoot().getProjects();
- //TODO - filter out the project this file is in
- ICompletionProposal[] proposals = new ICompletionProposal[projects.length];
- for (int i= 0; i < projects.length; i++) {
- proposals[i]=new CompletionProposal(projects[i].getName(), offset, 0, projects[i].getName().length());
- }
- return proposals;
- }
- return new ICompletionProposal[0];
- }
+ IProject[] projects= workspace.getRoot().getProjects();
+ //TODO - filter out the project this file is in
+ ICompletionProposal[] proposals = new ICompletionProposal[projects.length];
+ for (int i= 0; i < projects.length; i++) {
+ proposals[i]=new CompletionProposal(projects[i].getName(), offset, 0, projects[i].getName().length());
+ }
+ return proposals;
+ }
+ return new ICompletionProposal[0];
+ }
- @Override
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
- return null;
- }
+ @Override
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ return null;
+ }
- @Override
- public char[] getCompletionProposalAutoActivationCharacters() {
- return null;
- }
+ @Override
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return null;
+ }
- @Override
- public char[] getContextInformationAutoActivationCharacters() {
- return null;
- }
+ @Override
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
- @Override
- public String getErrorMessage() {
- return null;
- }
+ @Override
+ public String getErrorMessage() {
+ return null;
+ }
- @Override
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
+ @Override
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.ui.genericeditor.tests/META-INF/MANIFEST.MF b/org.eclipse.ui.genericeditor.tests/META-INF/MANIFEST.MF
index 49a6416be92..24870951e7b 100644
--- a/org.eclipse.ui.genericeditor.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.genericeditor.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.genericeditor.tests;singleton:=true
-Bundle-Version: 1.1.200.qualifier
+Bundle-Version: 1.1.300.qualifier
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.ui.genericeditor.tests,
diff --git a/org.eclipse.ui.genericeditor.tests/pom.xml b/org.eclipse.ui.genericeditor.tests/pom.xml
index 03c6ba2c40f..295e7e95a55 100644
--- a/org.eclipse.ui.genericeditor.tests/pom.xml
+++ b/org.eclipse.ui.genericeditor.tests/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.genericeditor.tests</artifactId>
- <version>1.1.200-SNAPSHOT</version>
+ <version>1.1.300-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<testSuite>${project.artifactId}</testSuite>
diff --git a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/FoldingReconciler.java b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/FoldingReconciler.java
index 63c6014d972..7330b51d99c 100644
--- a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/FoldingReconciler.java
+++ b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/FoldingReconciler.java
@@ -23,14 +23,14 @@ public class FoldingReconciler extends Reconciler {
private FoldingStrategy fStrategy;
public FoldingReconciler() {
- fStrategy = new FoldingStrategy();
- this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
- }
+ fStrategy = new FoldingStrategy();
+ this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
+ }
- @Override
- public void install(ITextViewer textViewer) {
- super.install(textViewer);
- ProjectionViewer pViewer =(ProjectionViewer)textViewer;
- fStrategy.setProjectionViewer(pViewer);
- }
+ @Override
+ public void install(ITextViewer textViewer) {
+ super.install(textViewer);
+ ProjectionViewer pViewer =(ProjectionViewer)textViewer;
+ fStrategy.setProjectionViewer(pViewer);
+ }
} \ No newline at end of file
diff --git a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightReconciler.java b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightReconciler.java
index c20fc6a1867..c1318e5eafa 100644
--- a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightReconciler.java
+++ b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightReconciler.java
@@ -22,9 +22,9 @@ public class HighlightReconciler extends Reconciler {
private HighlightStrategy fStrategy;
public HighlightReconciler() {
- fStrategy = new HighlightStrategy();
- this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
- }
+ fStrategy = new HighlightStrategy();
+ this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
+ }
@Override
public void install(ITextViewer textViewer) {
diff --git a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerFirst.java b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerFirst.java
index dc1d3132e2f..f5856a85a05 100644
--- a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerFirst.java
+++ b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerFirst.java
@@ -18,6 +18,6 @@ import org.eclipse.jface.text.reconciler.Reconciler;
public class TheReconcilerFirst extends Reconciler{
public TheReconcilerFirst() {
- this.setReconcilingStrategy(new ReconcilerStrategyFirst(), IDocument.DEFAULT_CONTENT_TYPE);
+ this.setReconcilingStrategy(new ReconcilerStrategyFirst(), IDocument.DEFAULT_CONTENT_TYPE);
}
}
diff --git a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerSecond.java b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerSecond.java
index 706728930e2..57d7a2b79bc 100644
--- a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerSecond.java
+++ b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/TheReconcilerSecond.java
@@ -18,6 +18,6 @@ import org.eclipse.jface.text.reconciler.Reconciler;
public class TheReconcilerSecond extends Reconciler{
public TheReconcilerSecond() {
- this.setReconcilingStrategy(new ReconcilerStrategySecond(), IDocument.DEFAULT_CONTENT_TYPE);
+ this.setReconcilingStrategy(new ReconcilerStrategySecond(), IDocument.DEFAULT_CONTENT_TYPE);
}
}
diff --git a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/DefaultWordHighlightReconciler.java b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/DefaultWordHighlightReconciler.java
index d0744cf6594..80d5d112b4d 100644
--- a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/DefaultWordHighlightReconciler.java
+++ b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/DefaultWordHighlightReconciler.java
@@ -22,9 +22,9 @@ public class DefaultWordHighlightReconciler extends Reconciler {
private DefaultWordHighlightStrategy fStrategy;
public DefaultWordHighlightReconciler() {
- fStrategy = new DefaultWordHighlightStrategy();
- this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
- }
+ fStrategy = new DefaultWordHighlightStrategy();
+ this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
+ }
@Override
public void install(ITextViewer textViewer) {
diff --git a/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF b/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF
index 3d159920981..78502d11a49 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.workbench.texteditor.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.workbench.texteditor.tests
-Bundle-Version: 3.12.200.qualifier
+Bundle-Version: 3.12.300.qualifier
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
Export-Package:
diff --git a/org.eclipse.ui.workbench.texteditor.tests/pom.xml b/org.eclipse.ui.workbench.texteditor.tests/pom.xml
index 69004f07953..96a5bd86d72 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/pom.xml
+++ b/org.eclipse.ui.workbench.texteditor.tests/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.workbench.texteditor.tests</artifactId>
- <version>3.12.200-SNAPSHOT</version>
+ <version>3.12.300-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<testSuite>${project.artifactId}</testSuite>
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java
index f4ded1655c0..d265e89128b 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java
@@ -161,7 +161,7 @@ public class HippieCompletionTest {
list= fEngine.getCompletionsBackwards(documents[0],
"pri", documents[0].get().indexOf("println") + 1);
assertEquals(list.size(), 1);
- assertEquals(list.get(0), "nt");
+ assertEquals(list.get(0), "nt");
list= fEngine.getCompletionsBackwards(documents[0],
"pa", 2);
@@ -192,22 +192,22 @@ public class HippieCompletionTest {
}
@Test
- public void testSearchBackwards3() {
- try {
- List<String> list= fEngine.getCompletionsBackwards(documents[1],
- "test", documents[1].getLength());
- assertEquals("Number of backwards suggestions does not match", 2, list.size());
- list= fEngine.getCompletionsBackwards(documents[1],
- "tests", documents[1].getLength());
- assertEquals("Number of backwards suggestions does not match", 1, list.size());
-
- list= fEngine.getCompletionsBackwards(documents[1],
- "test", documents[1].getLength() - 1);
- assertEquals("Number of backwards suggestions does not match", 1, list.size());
- } catch (BadLocationException e) {
- assertTrue("Got out of document bounds", false);
- }
- }
+ public void testSearchBackwards3() {
+ try {
+ List<String> list= fEngine.getCompletionsBackwards(documents[1],
+ "test", documents[1].getLength());
+ assertEquals("Number of backwards suggestions does not match", 2, list.size());
+ list= fEngine.getCompletionsBackwards(documents[1],
+ "tests", documents[1].getLength());
+ assertEquals("Number of backwards suggestions does not match", 1, list.size());
+
+ list= fEngine.getCompletionsBackwards(documents[1],
+ "test", documents[1].getLength() - 1);
+ assertEquals("Number of backwards suggestions does not match", 1, list.size());
+ } catch (BadLocationException e) {
+ assertTrue("Got out of document bounds", false);
+ }
+ }
@Test
public void testSearch() {
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
index db4a5e1aab4..da8eff72c79 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
@@ -54,49 +54,49 @@ public class ScreenshotTest {
Display display= Display.getDefault();
- Event event= new Event();
- event.type= SWT.KeyDown;
- event.keyCode= SWT.CTRL;
- System.out.println("* CTRL " + display.post(event));
- event.keyCode= SWT.SHIFT;
- System.out.println("* SHIFT " + display.post(event));
- event.character= SWT.ESC;
- event.keyCode= SWT.ESC;
- System.out.println("* ESC " + display.post(event));
-
- event.type= SWT.KeyUp;
- System.out.println("* ESC up " + display.post(event));
- event.character= 0;
- event.keyCode= SWT.SHIFT;
- System.out.println("* SHIFT up " + display.post(event));
- event.keyCode= SWT.CTRL;
- System.out.println("* CTRL up " + display.post(event));
-
- runEventQueue();
- takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 2, System.out);
-
- event.type= SWT.KeyDown;
- event.character= SWT.ESC;
- event.keyCode= SWT.ESC;
- System.out.println("* ESC " + display.post(event));
- event.type= SWT.KeyUp;
- System.out.println("* ESC up " + display.post(event));
-
- runEventQueue();
- takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 3, System.out);
+ Event event= new Event();
+ event.type= SWT.KeyDown;
+ event.keyCode= SWT.CTRL;
+ System.out.println("* CTRL " + display.post(event));
+ event.keyCode= SWT.SHIFT;
+ System.out.println("* SHIFT " + display.post(event));
+ event.character= SWT.ESC;
+ event.keyCode= SWT.ESC;
+ System.out.println("* ESC " + display.post(event));
+
+ event.type= SWT.KeyUp;
+ System.out.println("* ESC up " + display.post(event));
+ event.character= 0;
+ event.keyCode= SWT.SHIFT;
+ System.out.println("* SHIFT up " + display.post(event));
+ event.keyCode= SWT.CTRL;
+ System.out.println("* CTRL up " + display.post(event));
+
+ runEventQueue();
+ takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 2, System.out);
+
+ event.type= SWT.KeyDown;
+ event.character= SWT.ESC;
+ event.keyCode= SWT.ESC;
+ System.out.println("* ESC " + display.post(event));
+ event.type= SWT.KeyUp;
+ System.out.println("* ESC up " + display.post(event));
+
+ runEventQueue();
+ takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 3, System.out);
}
/**
* Takes a screenshot and dumps other debugging information to the given stream.
*
- * <p>
- * Workaround for missing {@link junit.framework.TestCase#getName()} in JUnit 4:
- * </p>
- *
- * <pre>
- * &#64;Rule
- * public TestName testName = new TestName();
- * </pre>
+ * <p>
+ * Workaround for missing {@link junit.framework.TestCase#getName()} in JUnit 4:
+ * </p>
+ *
+ * <pre>
+ * &#64;Rule
+ * public TestName testName = new TestName();
+ * </pre>
*
* @param testClass test class that takes the screenshot
* @param name screenshot identifier (e.g. test name)
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
index 25548967358..8c24259fadf 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
@@ -162,15 +162,15 @@ public final class HippieCompletionEngine {
/**
* Search for possible completions in the backward direction. If there
- * is a possible completion that begins before <code>firstPosition</code>
- * but ends after that position, it will not be included in the results.
+ * is a possible completion that begins before <code>firstPosition</code>
+ * but ends after that position, it will not be included in the results.
*
* @param document the document to be scanned
* @param prefix the completion prefix
* @param firstPosition the caret position
* @return a {@link List} of possible completions ({@link String}s)
* from the caret position to the beginning of the document.
- * The empty suggestion is not included in the results.
+ * The empty suggestion is not included in the results.
* @throws BadLocationException if any error occurs
*/
public List<String> getCompletionsBackwards(IDocument document, CharSequence prefix, int firstPosition) throws BadLocationException {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java
index 0439dff0f15..32ec5314c66 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java
@@ -1416,9 +1416,9 @@ public class DocumentLineDiffer implements ILineDiffer, IDocumentListener, IAnno
fRightDocument= document;
fRightDocument.addDocumentListener(this);
if (document instanceof IDocumentExtension4) {
- IDocumentExtension4 ext= (IDocumentExtension4) document;
- ext.addDocumentRewriteSessionListener(fSessionListener);
- }
+ IDocumentExtension4 ext= (IDocumentExtension4) document;
+ ext.addDocumentRewriteSessionListener(fSessionListener);
+ }
initialize();
}
}
@@ -1454,9 +1454,9 @@ public class DocumentLineDiffer implements ILineDiffer, IDocumentListener, IAnno
if (fRightDocument != null) {
fRightDocument.removeDocumentListener(this);
if (fRightDocument instanceof IDocumentExtension4) {
- IDocumentExtension4 ext= (IDocumentExtension4) fRightDocument;
- ext.removeDocumentRewriteSessionListener(fSessionListener);
- }
+ IDocumentExtension4 ext= (IDocumentExtension4) fRightDocument;
+ ext.removeDocumentRewriteSessionListener(fSessionListener);
+ }
}
fRightDocument= null;
fRightEquivalent= null;
@@ -1486,7 +1486,7 @@ public class DocumentLineDiffer implements ILineDiffer, IDocumentListener, IAnno
List<QuickDiffRangeDifference> differences= fDifferences; // atomic
synchronized (differences) {
copy= new ArrayList<>(differences);
- }
+ }
final Iterator<QuickDiffRangeDifference> iter= copy.iterator();
return new Iterator<Annotation>() {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/compare/equivalence/DJBHashFunction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/compare/equivalence/DJBHashFunction.java
index 4fbc594af06..8223816b88d 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/compare/equivalence/DJBHashFunction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/compare/equivalence/DJBHashFunction.java
@@ -25,14 +25,14 @@ public final class DJBHashFunction implements IHashFunction {
}
private int hash(CharSequence seq){
- int hash = 5381;
- int len= seq.length();
- for (int i= 0; i < len; i++) {
- char ch= seq.charAt(i);
- hash = ((hash << 5) + hash) + ch; /* hash * 33 + ch */
- }
+ int hash = 5381;
+ int len= seq.length();
+ for (int i= 0; i < len; i++) {
+ char ch= seq.charAt(i);
+ hash = ((hash << 5) + hash) + ch; /* hash * 33 + ch */
+ }
- return hash;
- }
+ return hash;
+ }
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index 65f9467e92c..497865c87fa 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -1860,7 +1860,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
return false;
return getInformationPresenter().openFocusedAnnotationHover(annotationHover, line);
- }
+ }
/**
* Returns the information presenter (creates it if necessary).
@@ -3174,16 +3174,16 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
} catch (InvocationTargetException x) {
Throwable t= x.getTargetException();
if (t instanceof CoreException) {
- /*
- /* XXX: Remove unpacking of CoreException once the following bug is
- * fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=81640
- */
- CoreException e= (CoreException)t;
- IStatus status= e.getStatus();
- if (status.getException() != null)
- throw new PartInitException(status);
- throw new PartInitException(new Status(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), t));
- }
+ /*
+ /* XXX: Remove unpacking of CoreException once the following bug is
+ * fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=81640
+ */
+ CoreException e= (CoreException)t;
+ IStatus status= e.getStatus();
+ if (status.getException() != null)
+ throw new PartInitException(status);
+ throw new PartInitException(new Status(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), t));
+ }
throw new PartInitException(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, EditorMessages.Editor_error_init, t));
}
}
@@ -3685,14 +3685,14 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Tells whether the editor input should be included when adding object
- * contributions to this editor's context menu.
- * <p>
- * This implementation always returns <code>true</code>.
- * </p>
- *
+ * Tells whether the editor input should be included when adding object
+ * contributions to this editor's context menu.
+ * <p>
+ * This implementation always returns <code>true</code>.
+ * </p>
+ *
* @return <code>true</code> if the editor input should be considered
- * @since 3.2
+ * @since 3.2
*/
protected boolean isEditorInputIncludedInContextMenu() {
return true;
@@ -6050,11 +6050,11 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
* @param newGroup the new group
*/
protected final void addGroup(IMenuManager menu, String existingGroup, String newGroup) {
- IMenuManager subMenu= menu.findMenuUsingPath(existingGroup);
- if (subMenu != null)
- subMenu.add(new Separator(newGroup));
- else
- menu.appendToGroup(existingGroup, new Separator(newGroup));
+ IMenuManager subMenu= menu.findMenuUsingPath(existingGroup);
+ if (subMenu != null)
+ subMenu.add(new Separator(newGroup));
+ else
+ menu.appendToGroup(existingGroup, new Separator(newGroup));
}
/**
@@ -6596,7 +6596,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
styledText.setCaret(fNonDefaultCaret);
fNonDefaultCaretImage= fNonDefaultCaret.getImage();
} else if (fInitialCaret != styledText.getCaret())
- styledText.setCaret(fInitialCaret);
+ styledText.setCaret(fInitialCaret);
}
private void disposeNonDefaultCaret() {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java
index cc9b923cb1c..00ff12d5508 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java
@@ -847,9 +847,9 @@ public class AnnotationPreference {
}
/**
- * Sets the preference key for go to previous navigation enablement.
- *
- * @param isGoToPreviousNavigationTargetKey the preference key
+ * Sets the preference key for go to previous navigation enablement.
+ *
+ * @param isGoToPreviousNavigationTargetKey the preference key
* @since 3.0
*/
public void setIsGoToPreviousNavigationTargetKey(String isGoToPreviousNavigationTargetKey) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
index 173b3da4210..f23c2164823 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
@@ -292,12 +292,12 @@ public class BasicTextEditorActionContributor extends EditorActionBarContributor
* @since 3.2
*/
private void addOrInsert(IContributionManager menu, IContributionItem item) {
- String id= item.getId();
+ String id= item.getId();
if (menu.find(id) == null)
- menu.add(item);
- else
- menu.insertAfter(id, item);
- }
+ menu.add(item);
+ else
+ menu.insertAfter(id, item);
+ }
@Override
public void contributeToStatusLine(IStatusLineManager statusLineManager) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java
index 1fe94fcbf93..9082268f2de 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java
@@ -132,7 +132,7 @@ public abstract class ConfigurationElementSorter {
Set<Bundle> fBundleSet= new HashSet<>(length);
for (int i= 0; i < length; i++) {
- IConfigurationElement configElement= getConfigurationElement(elements[i]);
+ IConfigurationElement configElement= getConfigurationElement(elements[i]);
Bundle bundle= Platform.getBundle(configElement.getContributor().getName());
fDescriptorMapping.put(elements[i], bundle.getSymbolicName());
fBundleSet.add(bundle);
@@ -148,18 +148,18 @@ public abstract class ConfigurationElementSorter {
String requires = bundle.getHeaders().get(Constants.REQUIRE_BUNDLE);
ManifestElement[] manifestElements;
- try {
- manifestElements = ManifestElement.parseHeader(Constants.REQUIRE_BUNDLE, requires);
- } catch (BundleException e) {
- String uid= getExtensionPointUniqueIdentifier(bundle);
- String message= "ConfigurationElementSorter for '" + uid + "': getting required plug-ins for '" + bundle.getSymbolicName() + "' failed"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Status status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, message, e);
- TextEditorPlugin.getDefault().getLog().log(status);
- continue;
- }
-
- if (manifestElements == null)
- continue;
+ try {
+ manifestElements = ManifestElement.parseHeader(Constants.REQUIRE_BUNDLE, requires);
+ } catch (BundleException e) {
+ String uid= getExtensionPointUniqueIdentifier(bundle);
+ String message= "ConfigurationElementSorter for '" + uid + "': getting required plug-ins for '" + bundle.getSymbolicName() + "' failed"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Status status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, message, e);
+ TextEditorPlugin.getDefault().getLog().log(status);
+ continue;
+ }
+
+ if (manifestElements == null)
+ continue;
int i= 0;
while (i < manifestElements.length && !toTest.isEmpty()) {
@@ -194,7 +194,7 @@ public abstract class ConfigurationElementSorter {
while (iter.hasNext()) {
Entry<Object, String> entry= iter.next();
if (bundleName.equals(entry.getValue())) {
- IExtension extension = getConfigurationElement(entry.getKey()).getDeclaringExtension();
+ IExtension extension = getConfigurationElement(entry.getKey()).getDeclaringExtension();
return extension.getExtensionPointUniqueIdentifier();
}
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceAction.java
index 90bcab1dd8a..5839928d3c8 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceAction.java
@@ -290,7 +290,7 @@ public class FindReplaceAction extends ResourceAction implements IUpdate {
Assert.isLegal(target != null && shell != null);
fTarget= target;
fShell= shell;
- update();
+ update();
}
/**
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
index 3f1e2a36b67..22e039b4273 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
@@ -340,46 +340,46 @@ public interface IAbstractTextEditorHelpContextIds {
*/
String TOGGLE_INSERT_MODE_ACTION= PREFIX + "toggle_insert_mode" + ACTION_POSTFIX; //$NON-NLS-1$;;
- /**
- * Help context id for the word completion action.
- * Value: <code>"org.eclipse.ui.hippie_completion_action_context"</code>
- * @since 3.1
- */
- String HIPPIE_COMPLETION_ACTION= PREFIX + "hippie_completion" + ACTION_POSTFIX; //$NON-NLS-1$
-
- /**
- * Help context id for the content assist action.
- * Value: <code>"org.eclipse.ui.content_assist_action_context"</code>
- * @since 3.5
- */
- String CONTENT_ASSIST_ACTION= PREFIX + "content_assist" + ACTION_POSTFIX; //$NON-NLS-1$
-
- /**
- * Help context id for the content assist context information action.
- * Value: <code>"org.eclipse.ui.content_assist_context_information_action_context"</code>
- * @since 3.5
- */
- String CONTENT_ASSIST_CONTEXT_INFORMATION_ACTION= PREFIX + "content_assist_context_information" + ACTION_POSTFIX; //$NON-NLS-1$
-
- /**
- * Help context id for the quick assist action.
- * Value: <code>"org.eclipse.ui.quick_assist_action_context"</code>
- * @since 3.2
- */
- String QUICK_ASSIST_ACTION= PREFIX + "quick_assist" + ACTION_POSTFIX; //$NON-NLS-1$
-
- /**
- * Help context id for the recenter action.
- * Value: <code>"org.eclipse.ui.recenter_action_context"</code>
- * @since 3.3
- */
- String RECENTER_ACTION= PREFIX + "recenter" + ACTION_POSTFIX; //$NON-NLS-1$
-
- /**
- * Help context id for the show whitespace characters action.
- * Value: <code>"org.eclipse.ui.show_whitespace_characters_action_context"</code>
- * @since 3.3
- */
+ /**
+ * Help context id for the word completion action.
+ * Value: <code>"org.eclipse.ui.hippie_completion_action_context"</code>
+ * @since 3.1
+ */
+ String HIPPIE_COMPLETION_ACTION= PREFIX + "hippie_completion" + ACTION_POSTFIX; //$NON-NLS-1$
+
+ /**
+ * Help context id for the content assist action.
+ * Value: <code>"org.eclipse.ui.content_assist_action_context"</code>
+ * @since 3.5
+ */
+ String CONTENT_ASSIST_ACTION= PREFIX + "content_assist" + ACTION_POSTFIX; //$NON-NLS-1$
+
+ /**
+ * Help context id for the content assist context information action.
+ * Value: <code>"org.eclipse.ui.content_assist_context_information_action_context"</code>
+ * @since 3.5
+ */
+ String CONTENT_ASSIST_CONTEXT_INFORMATION_ACTION= PREFIX + "content_assist_context_information" + ACTION_POSTFIX; //$NON-NLS-1$
+
+ /**
+ * Help context id for the quick assist action.
+ * Value: <code>"org.eclipse.ui.quick_assist_action_context"</code>
+ * @since 3.2
+ */
+ String QUICK_ASSIST_ACTION= PREFIX + "quick_assist" + ACTION_POSTFIX; //$NON-NLS-1$
+
+ /**
+ * Help context id for the recenter action.
+ * Value: <code>"org.eclipse.ui.recenter_action_context"</code>
+ * @since 3.3
+ */
+ String RECENTER_ACTION= PREFIX + "recenter" + ACTION_POSTFIX; //$NON-NLS-1$
+
+ /**
+ * Help context id for the show whitespace characters action.
+ * Value: <code>"org.eclipse.ui.show_whitespace_characters_action_context"</code>
+ * @since 3.3
+ */
String SHOW_WHITESPACE_CHARACTERS_ACTION= PREFIX + "show_whitepsace_characters" + ACTION_POSTFIX; //$NON-NLS-1$
/**
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java
index cfd00592731..ccc5e44ff6c 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java
@@ -149,7 +149,7 @@ public class InfoForm {
fText.setText(info);
}
- /**
+ /**
* Handles the property change.
*
* @param event the property change event object describing which property changed and how
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java
index 18c6733c298..1359ef94528 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java
@@ -64,7 +64,7 @@ public final class RetargetTextEditorAction extends ResourceAction {
* (described in <code>ResourceAction</code> constructor), or
* <code>null</code> if none
* @param style one of <code>IAction.AS_PUSH_BUTTON</code>, <code>IAction.AS_CHECK_BOX</code>,
- * and <code>IAction.AS_RADIO_BUTTON</code>.
+ * and <code>IAction.AS_RADIO_BUTTON</code>.
*
* @see ResourceAction#ResourceAction(ResourceBundle, String, int)
* @see IAction#AS_CHECK_BOX
@@ -109,7 +109,7 @@ public final class RetargetTextEditorAction extends ResourceAction {
* (described in <code>ResourceAction</code> constructor), or <code>null</code> if none
* @param actionId the action id
* @param style one of <code>IAction.AS_PUSH_BUTTON</code>, <code>IAction.AS_CHECK_BOX</code>,
- * and <code>IAction.AS_RADIO_BUTTON</code>.
+ * and <code>IAction.AS_RADIO_BUTTON</code>.
*
* @see ResourceAction#ResourceAction(ResourceBundle, String, int)
* @see IAction#AS_CHECK_BOX
@@ -183,7 +183,7 @@ public final class RetargetTextEditorAction extends ResourceAction {
setEnabled(false);
if (getStyle() == AS_CHECK_BOX || getStyle() == AS_RADIO_BUTTON)
- setChecked(false);
+ setChecked(false);
setText(fDefaultText);
setToolTipText(""); //$NON-NLS-1$
@@ -191,7 +191,7 @@ public final class RetargetTextEditorAction extends ResourceAction {
setEnabled(fAction.isEnabled());
if (fAction.getStyle() == AS_CHECK_BOX || fAction.getStyle() == AS_RADIO_BUTTON)
- super.setChecked(fAction.isChecked());
+ super.setChecked(fAction.isChecked());
setText(fAction.getText());
setToolTipText(fAction.getToolTipText());
fAction.addPropertyChangeListener(fListener);
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
index 87d43bdaf1f..e2e0e89c211 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
@@ -507,7 +507,7 @@ public class SourceViewerDecorationSupport {
/*
* @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent)
- */
+ */
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
String p= event.getProperty();
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java
index ee22664199f..f0d77999ae1 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java
@@ -188,41 +188,41 @@ final class ColumnLayout extends Layout {
@Override
protected void layout(Composite composite, boolean flushCache) {
- Rectangle area= composite.getClientArea();
- Table table= getTable(composite);
- int tableWidth= table.getSize().x;
- int trim= computeTrim(area, table, tableWidth);
- int width= Math.max(0, area.width - trim);
-
- if (width > 1)
- layoutTable(table, width, area, tableWidth < area.width);
-
- if( composite.getData(RECALCULATE_LAYOUT) == null ) {
- composite.setData(RECALCULATE_LAYOUT, Boolean.FALSE);
- composite.layout();
- }
+ Rectangle area= composite.getClientArea();
+ Table table= getTable(composite);
+ int tableWidth= table.getSize().x;
+ int trim= computeTrim(area, table, tableWidth);
+ int width= Math.max(0, area.width - trim);
+
+ if (width > 1)
+ layoutTable(table, width, area, tableWidth < area.width);
+
+ if( composite.getData(RECALCULATE_LAYOUT) == null ) {
+ composite.setData(RECALCULATE_LAYOUT, Boolean.FALSE);
+ composite.layout();
+ }
}
private int computeTrim(Rectangle area, Table table, int tableWidth) {
Point preferredSize= computeTableSize(table, area.width, area.height);
- int trim;
- if (tableWidth > 1) {
- trim= tableWidth - table.getClientArea().width;
- } else {
- // initially, the table has no extend and no client area - use the border with
- // plus some padding as educated guess
- trim= 2 * table.getBorderWidth() + 1 ;
- }
- if (preferredSize.y > area.height) {
- // Subtract the scrollbar width from the total column width
- // if a vertical scrollbar will be required, but is not currently showing
- // (in which case it is already subtracted above)
- ScrollBar vBar= table.getVerticalBar();
- if (!vBar.isVisible()) {
- Point vBarSize= vBar.getSize();
- trim += vBarSize.x;
- }
- }
+ int trim;
+ if (tableWidth > 1) {
+ trim= tableWidth - table.getClientArea().width;
+ } else {
+ // initially, the table has no extend and no client area - use the border with
+ // plus some padding as educated guess
+ trim= 2 * table.getBorderWidth() + 1 ;
+ }
+ if (preferredSize.y > area.height) {
+ // Subtract the scrollbar width from the total column width
+ // if a vertical scrollbar will be required, but is not currently showing
+ // (in which case it is already subtracted above)
+ ScrollBar vBar= table.getVerticalBar();
+ if (!vBar.isVisible()) {
+ Point vBarSize= vBar.getSize();
+ trim += vBarSize.x;
+ }
+ }
return trim;
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
index 2d93bbb6f98..1583a795f63 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
@@ -832,24 +832,24 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
layout.marginWidth= 0;
parent.setLayout(layout);
- Composite innerParent= new Composite(parent, SWT.NONE);
- GridLayout innerLayout= new GridLayout();
- innerLayout.numColumns= 2;
- innerLayout.marginHeight= 0;
- innerLayout.marginWidth= 0;
- innerParent.setLayout(innerLayout);
- GridData gd= new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan= 2;
- innerParent.setLayoutData(gd);
-
- Composite tableComposite= new Composite(innerParent, SWT.NONE);
- GridData data= new GridData(GridData.FILL_BOTH);
- data.widthHint= 360;
- data.heightHint= convertHeightInCharsToPixels(10);
- tableComposite.setLayoutData(data);
-
- ColumnLayout columnLayout= new ColumnLayout();
- tableComposite.setLayout(columnLayout);
+ Composite innerParent= new Composite(parent, SWT.NONE);
+ GridLayout innerLayout= new GridLayout();
+ innerLayout.numColumns= 2;
+ innerLayout.marginHeight= 0;
+ innerLayout.marginWidth= 0;
+ innerParent.setLayout(innerLayout);
+ GridData gd= new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan= 2;
+ innerParent.setLayoutData(gd);
+
+ Composite tableComposite= new Composite(innerParent, SWT.NONE);
+ GridData data= new GridData(GridData.FILL_BOTH);
+ data.widthHint= 360;
+ data.heightHint= convertHeightInCharsToPixels(10);
+ tableComposite.setLayoutData(data);
+
+ ColumnLayout columnLayout= new ColumnLayout();
+ tableComposite.setLayout(columnLayout);
Table table= new Table(tableComposite, SWT.CHECK | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
table.setHeaderVisible(true);
@@ -959,10 +959,10 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
if (isShowFormatterSetting()) {
fFormatButton= new Button(parent, SWT.CHECK);
fFormatButton.setText(TemplatesMessages.TemplatePreferencePage_use_code_formatter);
- GridData gd1= new GridData();
- gd1.horizontalSpan= 2;
- fFormatButton.setLayoutData(gd1);
- fFormatButton.setSelection(getPreferenceStore().getBoolean(getFormatterPreferenceKey()));
+ GridData gd1= new GridData();
+ gd1.horizontalSpan= 2;
+ fFormatButton.setLayoutData(gd1);
+ fFormatButton.setSelection(getPreferenceStore().getBoolean(getFormatterPreferenceKey()));
}
fTableViewer.setInput(fTemplateStore);
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesTransfer.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesTransfer.java
index a8edbdc3907..a7f1443458e 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesTransfer.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesTransfer.java
@@ -69,9 +69,9 @@ class TemplatesTransfer extends ByteArrayTransfer {
@Override
protected Object nativeToJava(TransferData transferData) {
- Object result= super.nativeToJava(transferData);
- if (!(result instanceof byte[]) || !TYPE_NAME.equals(new String((byte[]) result)))
- return null ;
+ Object result= super.nativeToJava(transferData);
+ if (!(result instanceof byte[]) || !TYPE_NAME.equals(new String((byte[]) result)))
+ return null ;
return fObject ;
}
}

Back to the top