Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-11-26 22:25:04 +0000
committerLars Vogel2020-03-19 11:42:51 +0000
commit993bc1eed15ef5502ff3e005e2f76f7334b80b14 (patch)
tree70fde7cb368755f8756587d9a1f7a7c3abad93a7
parentce4ee64f0c0ddf4733ab946f2171587cc35d4fcd (diff)
downloadeclipse.platform.team-I20200330-1800.tar.gz
eclipse.platform.team-I20200330-1800.tar.xz
eclipse.platform.team-I20200330-1800.zip
Change-Id: If2db9cef6eddb2d79e3fd1c312b2c8248dd288d6 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java2
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java8
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java4
27 files changed, 38 insertions, 38 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java
index 4f4d79936..7624b7eea 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java
@@ -172,7 +172,7 @@ public class CompareStructureViewerSwitchingPane extends
// add others
for (ViewerDescriptor vdi : vd) {
label = vdi.getLabel();
- if (label == null || label.equals("")) { //$NON-NLS-1$
+ if (label == null || label.isEmpty()) {
String l = CompareUIPlugin.getDefault().findStructureTypeNameOrType((ICompareInput) getInput(), vdi, getCompareConfiguration());
if (l == null)
// couldn't figure out the label, skip the viewer
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
index 606d9e149..d4e5c6d63 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
@@ -410,7 +410,7 @@ public class ProxyType implements INodeChangeListener, IPreferenceChangeListener
boolean proxiesEnabled = isProxyEnabled();
Assert.isTrue(data.getType().equals(IProxyData.HTTP_PROXY_TYPE));
Properties sysProps = System.getProperties();
- if (!proxiesEnabled || data.getHost() == null || data.getHost().equals("")) { //$NON-NLS-1$
+ if (!proxiesEnabled || data.getHost() == null || data.getHost().isEmpty()) {
sysProps.remove("http.proxySet"); //$NON-NLS-1$
sysProps.remove("http.proxyHost"); //$NON-NLS-1$
sysProps.remove("http.proxyPort"); //$NON-NLS-1$
@@ -469,7 +469,7 @@ public class ProxyType implements INodeChangeListener, IPreferenceChangeListener
boolean proxiesEnabled = isProxyEnabled();
Assert.isTrue(data.getType().equals(IProxyData.HTTPS_PROXY_TYPE));
Properties sysProps = System.getProperties();
- if (!proxiesEnabled || data.getHost() == null || data.getHost().equals("")) { //$NON-NLS-1$
+ if (!proxiesEnabled || data.getHost() == null || data.getHost().isEmpty()) {
sysProps.remove("https.proxySet"); //$NON-NLS-1$
sysProps.remove("https.proxyHost"); //$NON-NLS-1$
sysProps.remove("https.proxyPort"); //$NON-NLS-1$
@@ -509,7 +509,7 @@ public class ProxyType implements INodeChangeListener, IPreferenceChangeListener
boolean proxiesEnabled = isProxyEnabled();
Assert.isTrue(data.getType().equals(IProxyData.SOCKS_PROXY_TYPE));
Properties sysProps = System.getProperties();
- if (!proxiesEnabled || data.getHost() == null || data.getHost().equals("")) { //$NON-NLS-1$
+ if (!proxiesEnabled || data.getHost() == null || data.getHost().isEmpty()) {
sysProps.remove("socksProxyHost"); //$NON-NLS-1$
sysProps.remove("socksProxyPort"); //$NON-NLS-1$
} else {
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
index 1fdb4ab47..e76f6fa4a 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
@@ -90,7 +90,7 @@ public class InfiniteSubProgressMonitor extends SubProgressMonitor {
*/
@Override
public void subTask(String name) {
- if(name != null && ! name.equals("")) { //$NON-NLS-1$
+ if(name != null && ! name.isEmpty()) {
super.subTask(name);
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
index 7400f582e..95b9088e6 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
@@ -135,7 +135,7 @@ public class CVSTag implements ITag {
public static IStatus validateTagName(String tagName) {
if (tagName == null)
return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_nullName);
- if (tagName.equals("")) //$NON-NLS-1$
+ if (tagName.isEmpty())
return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_emptyName);
if (!Character. isLetter(tagName.charAt(0)))
return new CVSStatus(IStatus.ERROR, CVSMessages.CVSTag_beginName);
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
index 60f38737d..b74e099e4 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
@@ -153,7 +153,7 @@ public abstract class Request {
// handle completion responses
if (response.equals("ok")) { //$NON-NLS-1$
break;
- } else if (response.equals("error") || (isCVSNT && response.equals(""))) { //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (response.equals("error") || (isCVSNT && response.isEmpty())) { //$NON-NLS-1$
argument = argument.trim();
boolean serious = false;
if (argument.length() == 0) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java
index eb98eefc9..827098b25 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSURI.java
@@ -181,7 +181,7 @@ public class CVSURI {
int i = f.lastIndexOf(',');
if (i != -1) {
String s = f.substring(i + 1);
- if (!s.equals("")) //$NON-NLS-1$
+ if (!s.isEmpty())
return s;
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java
index 3f1c3f627..cdb38cda0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryFilter.java
@@ -102,15 +102,15 @@ public class CVSHistoryFilter extends ViewerFilter {
}
protected boolean hasBranchName() {
- return !branchName.equals(""); //$NON-NLS-1$
+ return !branchName.isEmpty();
}
protected boolean hasAuthor() {
- return !author.equals(""); //$NON-NLS-1$
+ return !author.isEmpty();
}
protected boolean hasComment() {
- return !comment.equals(""); //$NON-NLS-1$
+ return !comment.isEmpty();
}
protected boolean hasDate() {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
index 1911fc3d2..919de9269 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
@@ -1414,7 +1414,7 @@ public class CVSHistoryPage extends HistoryPage implements IAdaptable, IHistoryC
@Override
public void run() {
String searchString = searchField.getText();
- if (searchString.equals("") || //$NON-NLS-1$
+ if (searchString.isEmpty() ||
searchString.equals(CVSUIMessages.CVSHistoryPage_EnterSearchTerm)) {
if (searchFilter != null)
treeViewer.removeFilter(searchFilter);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java
index f2844bf16..159a75ffe 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CompareSubscriberContext.java
@@ -101,7 +101,7 @@ public class CompareSubscriberContext extends CVSSubscriberMergeContext implemen
if (isConsiderContents()) {
String pattern = CVSUIPlugin.getPlugin().getPreferenceStore().getString(
ICVSUIConstants.PREF_SYNCVIEW_REGEX_FILTER_PATTERN);
- if (pattern != null && !pattern.equals("")) { //$NON-NLS-1$
+ if (pattern != null && !pattern.isEmpty()) {
return new RegexDiffFilter(pattern);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
index 0b5617bac..1b72375b2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
@@ -147,7 +147,7 @@ public class WorkspaceSubscriberContext extends CVSSubscriberMergeContext implem
if (isConsiderContents()) {
String pattern = CVSUIPlugin.getPlugin().getPreferenceStore().getString(
ICVSUIConstants.PREF_SYNCVIEW_REGEX_FILTER_PATTERN);
- if (pattern != null && !pattern.equals("")) { //$NON-NLS-1$
+ if (pattern != null && !pattern.isEmpty()) {
return new RegexDiffFilter(pattern);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java
index 52544ba2d..0451584ab 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteProjectFolder.java
@@ -55,6 +55,6 @@ public class RemoteProjectFolder extends RemoteFolder {
}
private boolean isProjectNameEmpty() {
- return projectName == null || projectName.equals(""); //$NON-NLS-1$
+ return projectName == null || projectName.isEmpty();
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
index 629af4140..4413878bd 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
@@ -112,7 +112,7 @@ public class CompareParticipant extends CVSParticipant implements IPreferenceCha
private SyncInfoFilter createRegexFilter() {
if (isConsiderContents()) {
String pattern = CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_SYNCVIEW_REGEX_FILTER_PATTERN);
- if (pattern != null && !pattern.equals("")) { //$NON-NLS-1$
+ if (pattern != null && !pattern.isEmpty()) {
return new RegexSyncInfoFilter(pattern);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
index 6b1af9001..cc4f8232d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
@@ -244,7 +244,7 @@ public class WorkspaceSynchronizeParticipant extends ScopableSubscriberParticipa
private SyncInfoFilter createRegexFilter() {
if (isConsiderContents()) {
String pattern = CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_SYNCVIEW_REGEX_FILTER_PATTERN);
- if (pattern != null && !pattern.equals("")) { //$NON-NLS-1$
+ if (pattern != null && !pattern.isEmpty()) {
return new RegexSyncInfoFilter(pattern);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java
index 0a76e6287..cebef6a75 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java
@@ -219,7 +219,7 @@ public class CVSScmUrlImportWizardPage extends WizardPage implements IScmUrlImpo
} else if (param.startsWith("version=")) { //$NON-NLS-1$
// ignore
} else {
- if (param != null && !param.equals("")) { //$NON-NLS-1$
+ if (param != null && !param.isEmpty()) {
sb.append(';').append(param);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
index bcda4a1ee..69812b4a3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
@@ -265,7 +265,7 @@ public class CheckoutAsLocationSelectionPage extends CVSWizardPage {
return null;
} else {
targetLocation = locationPathField.getText();
- if (targetLocation.equals("")) {//$NON-NLS-1$
+ if (targetLocation.isEmpty()) {
return(CVSUIMessages.CheckoutAsLocationSelectionPage_locationEmpty);
}
else{
@@ -359,7 +359,7 @@ public class CheckoutAsLocationSelectionPage extends CVSWizardPage {
}
String dirName = locationPathField.getText();
- if (!dirName.equals("")) {//$NON-NLS-1$
+ if (!dirName.isEmpty()) {
File path = new File(dirName);
if (path.exists())
dialog.setFilterPath(dirName);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
index b21d2ab19..bb13790b6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
@@ -292,7 +292,7 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
if (allowEmptyComment.equals(MessageDialogWithToggle.NEVER)) {
/* but is empty */
final String comment = fCommentArea.getComment(false);
- if (comment.equals("")) { //$NON-NLS-1$
+ if (comment.isEmpty()) {
return false; // then the page is not complete
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
index 5975becf6..eccdadd13 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
@@ -253,7 +253,7 @@ public class GenerateDiffFileWizard extends Wizard {
private void validateDialog() {
String fileName = wsFilenameText.getText();
- if (fileName.equals("")) { //$NON-NLS-1$
+ if (fileName.isEmpty()) {
if (modified) {
setErrorMessage(CVSUIMessages.GenerateDiffFileWizard_2);
getButton(IDialogConstants.OK_ID).setEnabled(false);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java
index 2e9ce65b0..5337689fe 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModeWizardSelectionPage.java
@@ -841,7 +841,7 @@ public class ModeWizardSelectionPage extends WizardPage {
}
private void validatePage() {
- if (fCommentArea.getComment(false).equals("")) { //$NON-NLS-1$
+ if (fCommentArea.getComment(false).isEmpty()) {
final IPreferenceStore store = CVSUIPlugin.getPlugin()
.getPreferenceStore();
final String allowEmptyComment = store
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
index 29cf1f7c0..0a9662dc3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
@@ -103,7 +103,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
private String getTextFor(ITeamContentProviderDescriptor teamContentDescriptor) {
String name = teamContentDescriptor.getName();
- if (name != null && !name.equals("")) //$NON-NLS-1$
+ if (name != null && !name.isEmpty())
return name;
String modelProviderID = teamContentDescriptor.getModelProviderId();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
index 25540e020..06db65da9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
@@ -158,7 +158,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
dialog.open();
if (dialog.getReturnCode() != Window.OK) return;
String pattern = dialog.getValue();
- if (pattern.equals("")) return; //$NON-NLS-1$
+ if (pattern.isEmpty()) return;
// Check if the item already exists
TableItem[] items = ignoreTable.getItems();
for (TableItem item : items) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
index 63719d1ab..d1ab141d1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
@@ -254,7 +254,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
protected void initializeScopingHint() {
String working_sets = settings.get(STORE_WORKING_SETS);
- if (working_sets == null || working_sets.equals("")) { //$NON-NLS-1$
+ if (working_sets == null || working_sets.isEmpty()) {
participantScope.setSelection(true);
updateParticipantScope();
} else {
@@ -262,7 +262,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
ArrayList<IWorkingSet> ws = new ArrayList<>();
while (st.hasMoreTokens()) {
String workingSetName = st.nextToken();
- if (workingSetName != null && workingSetName.equals("") == false) { //$NON-NLS-1$
+ if (workingSetName != null && !workingSetName.isEmpty()) {
IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
IWorkingSet workingSet = workingSetManager.getWorkingSet(workingSetName);
if (workingSet != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
index 4809f5dad..43a61d5f9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
@@ -388,7 +388,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
wsFilenameText.addModifyListener(e -> {
String patchName = wsFilenameText.getText();
- if (patchName.trim().equals("")) { //$NON-NLS-1$
+ if (patchName.trim().isEmpty()) {
okButton.setEnabled(false);
setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogErrorNoFilename);
} else if (!(ResourcesPlugin.getWorkspace().validateName(patchName, IResource.FILE)).isOK()) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
index 18369648f..d783831eb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
@@ -101,7 +101,7 @@ public class WorkingSetsDialog extends TitleAreaDialog {
protected void okPressed() {
selectedWorkingSet = wsNameText.getText();
- if (selectedWorkingSet.equals("")) { //$NON-NLS-1$
+ if (selectedWorkingSet.isEmpty()) {
setErrorMessage(TeamUIMessages.WorkingSetsDialog_ErrorMessage);
return;
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
index 4ecaf135a..ffb22b164 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
@@ -58,7 +58,7 @@ public class CreateNewIdMapAction extends Action {
if (dialog.open() == Window.OK) {
if (!fIdMaps.containsKey(idmap.getName())) {
fIdMaps.put(idmap.getName(),new HashMap());
- if (!idmap.getExtension().equals("")) //$NON-NLS-1$
+ if (!idmap.getExtension().isEmpty())
fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
XMLPlugin.getDefault().setIdMaps(fIdMaps,fIdExtensionToName,null,false);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
index f4eb8115d..584804472 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
@@ -405,7 +405,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
if (dialog.open() == Window.OK) {
if (!fIdMaps.containsKey(idmap.getName())) {
fIdMaps.put(idmap.getName(),new HashMap());
- if (!idmap.getExtension().equals("")) //$NON-NLS-1$
+ if (!idmap.getExtension().isEmpty())
fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
newIdMapsTableItem(idmap,true);
}
@@ -424,7 +424,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fIdMaps.remove(old_name);
fIdExtensionToName.remove(old_extension);
fIdMaps.put(idmap.getName(),idmapHS);
- if (!idmap.getExtension().equals("")) //$NON-NLS-1$
+ if (!idmap.getExtension().isEmpty())
fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
fIdMapsTable.remove(fIdMapsTable.indexOf(itemsIdMaps[0]));
newIdMapsTableItem(idmap,true);
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
index 3a40b5c43..fb5b808e0 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
@@ -157,7 +157,7 @@ public final class XMLPlugin extends AbstractUIPlugin {
IdMapAttribute = CurrentIdMap.substring(end_of_signature+1,end_of_attribute);
String IdMapExtension= CurrentIdMap.substring(end_of_attribute+1,CurrentIdMap.length());
//if extension already associated, do not associate with this idmap
- if (!IdMapExtension.equals("") && !fIdExtensionToName.containsKey(IdMapExtension)) { //$NON-NLS-1$
+ if (!IdMapExtension.isEmpty() && !fIdExtensionToName.containsKey(IdMapExtension)) {
fIdExtensionToName.put(IdMapExtension,IdMapName);
CompareUI.addStructureViewerAlias(DEFAULT_PREFIX, IdMapExtension);
}
@@ -307,8 +307,8 @@ public final class XMLPlugin extends AbstractUIPlugin {
String attribute= mapping.getAttribute(MAPPING_ID_ATTRIBUTE);
String idsource= mapping.getAttribute(MAPPING_ID_SOURCE);
String bodyid= ""; //$NON-NLS-1$
- if (signature != null && !signature.equals("") //$NON-NLS-1$
- && attribute != null && !attribute.equals("")) { //$NON-NLS-1$
+ if (signature != null && !signature.isEmpty()
+ && attribute != null && !attribute.isEmpty()) {
if (idsource != null && idsource.equals(MAPPING_ID_SOURCE_BODY))
bodyid= (Character.valueOf(XMLStructureCreator.ID_TYPE_BODY)).toString();
idmapHM.put(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR
@@ -323,7 +323,7 @@ public final class XMLPlugin extends AbstractUIPlugin {
//add SIGN_SEPARATOR at the end because not contained in signatures of plugin.xml
//also add prefix at beginning
String signature= ordered.getAttribute(ORDERED_SIGNATURE_ATTRIBUTE);
- if (signature != null && !signature.equals("")) //$NON-NLS-1$
+ if (signature != null && !signature.isEmpty())
orderedAL.add(XMLStructureCreator.ROOT_ID + XMLStructureCreator.SIGN_SEPARATOR + signature + XMLStructureCreator.SIGN_SEPARATOR);
}
if (orderedAL.size() > 0)
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
index f78e35de7..3d7531925 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
@@ -249,7 +249,7 @@ public class XMLStructureCreator implements IStructureCreator {
} catch (Exception e) {
value= ""; //$NON-NLS-1$
}
- if (value.equals("")) //$NON-NLS-1$
+ if (value.isEmpty())
found= true;
else if (value.equals(attr_value)) {
id_index= element_string.lastIndexOf(attr_name, first_quotes - 1);
@@ -328,7 +328,7 @@ public class XMLStructureCreator implements IStructureCreator {
System.out.println("Body Location: line " + locator.getLineNumber() + " column " + locator.getColumnNumber()); //$NON-NLS-2$ //$NON-NLS-1$
//if text contains only white space, it will be ignored.
- if (!trimWhiteSpace(chars).equals("")) { //$NON-NLS-1$
+ if (!trimWhiteSpace(chars).isEmpty()) {
if (XMLStructureCreator.DEBUG_MODE)
System.out.println("Adding body"); //$NON-NLS-1$
try {

Back to the top