Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-10-03 13:35:20 +0000
committerDani Megert2012-10-03 13:35:20 +0000
commit213dad1ac17e243e5f6729cab7d87392154c9193 (patch)
tree7d92f0c444dcd1713e4eeb8453ca1ad12ab49ab0
parent99d1066284f94d75c0f6566b198ad86cc72b47cc (diff)
downloadeclipse.platform.team-213dad1ac17e243e5f6729cab7d87392154c9193.tar.gz
eclipse.platform.team-213dad1ac17e243e5f6729cab7d87392154c9193.tar.xz
eclipse.platform.team-213dad1ac17e243e5f6729cab7d87392154c9193.zip
Fixed bug 222090: CVS property page text fields should be copyablev20121003-133520I20121016-0800I20121009-0800
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java35
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java1
2 files changed, 10 insertions, 26 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
index 526b7c26b..36f6174a0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -173,25 +173,25 @@ public class CVSProjectPropertiesPage extends CVSPropertiesPage {
composite.setLayout(layout);
Label label = createLabel(composite, CVSUIMessages.CVSProjectPropertiesPage_connectionType, 1);
- methodText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ methodText= createReadOnlyText(composite, ""); //$NON-NLS-1$
label = createLabel(composite, CVSUIMessages.CVSProjectPropertiesPage_user, 1);
- userText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ userText= createReadOnlyText(composite, ""); //$NON-NLS-1$
label = createLabel(composite, CVSUIMessages.CVSRepositoryLocationPropertySource_host, 1);
- hostText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ hostText= createReadOnlyText(composite, ""); //$NON-NLS-1$
label = createLabel(composite, CVSUIMessages.CVSPropertiesPage_port, 1);
- portText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ portText= createReadOnlyText(composite, ""); //$NON-NLS-1$
label = createLabel(composite, CVSUIMessages.CVSRepositoryLocationPropertySource_root, 1);
- pathText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ pathText= createReadOnlyText(composite, ""); //$NON-NLS-1$
label = createLabel(composite, CVSUIMessages.CVSPropertiesPage_module, 1);
- moduleText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ moduleText= createReadOnlyText(composite, ""); //$NON-NLS-1$
label = createLabel(composite, CVSUIMessages.CVSPropertiesPage_tag, 1);
- tagText = createReadOnlyText(composite, "", 1); //$NON-NLS-1$
+ tagText= createReadOnlyText(composite, ""); //$NON-NLS-1$
createLabel(composite, "", 1); //$NON-NLS-1$
@@ -258,24 +258,7 @@ public class CVSProjectPropertiesPage extends CVSPropertiesPage {
label.setLayoutData(data);
return label;
}
- /**
- * Utility method that creates a text instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new text
- * @return the new text
- */
- protected Text createReadOnlyText(Composite parent, String text, int span) {
- Text txt = new Text(parent, SWT.LEFT | SWT.READ_ONLY);
- txt.setText(text);
- txt.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- txt.setLayoutData(data);
- return txt;
- }
+
/**
* Creates a new checkbox instance and sets the default layout data.
*
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java
index 42324c9d0..9a3d579b0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java
@@ -77,6 +77,7 @@ public abstract class CVSPropertiesPage extends PropertyPage {
*/
protected Text createReadOnlyText(Composite parent, String text) {
Text textField = new Text(parent, SWT.LEFT | SWT.READ_ONLY);
+ textField.setBackground(textField.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
textField.setText(text);
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;

Back to the top