Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 224308 Details for
Bug 394977
Add repository dialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
labels are aligned now; label removed, name is used instead
addRepositoryDialog.patch (text/plain), 5.84 KB, created by
Johannes Faltermeier
on 2012-12-05 09:28:25 EST
(
hide
)
Description:
labels are aligned now; label removed, name is used instead
Filename:
MIME Type:
Creator:
Johannes Faltermeier
Created:
2012-12-05 09:28:25 EST
Size:
5.84 KB
patch
obsolete
>diff --git a/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/EMFStoreUIProvider.java b/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/EMFStoreUIProvider.java >index 0caea61..07eb700 100644 >--- a/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/EMFStoreUIProvider.java >+++ b/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/EMFStoreUIProvider.java >@@ -92,8 +92,16 @@ > composite.setLayout(mainLayout); > composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > >+ // use label width of main composite as minimum label width > Label url = new Label(composite, 0); > url.setText("Url:"); >+ int mcLabelWidth = parent.getParent().getChildren()[0].getSize().x; >+ if (mcLabelWidth > url.getSize().x) { >+ GridData gdUrl = new GridData(); >+ gdUrl.widthHint = mcLabelWidth; >+ url.setLayoutData(gdUrl); >+ } >+ > final Text urlText = new Text(composite, SWT.BORDER); > urlText.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1)); > urlText.addModifyListener(new ModifyListener() { >diff --git a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/common/AddRepositoryComposite.java b/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/common/AddRepositoryComposite.java >index e2b51ea..ff5329a 100644 >--- a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/common/AddRepositoryComposite.java >+++ b/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/common/AddRepositoryComposite.java >@@ -13,8 +13,6 @@ > > package org.eclipse.emf.ecp.ui.common; > >-import org.eclipse.net4j.util.ObjectUtil; >- > import org.eclipse.emf.ecp.core.ECPProvider; > import org.eclipse.emf.ecp.core.ECPProviderRegistry; > import org.eclipse.emf.ecp.core.util.ECPProperties; >@@ -73,8 +71,6 @@ > > private StackLayout providerStackLayout; > >- private Text repositoryLabelText; >- > private Text repositoryDescriptionText; > > private Text repositoryNameText; >@@ -85,8 +81,6 @@ > > private String repositoryName; > >- private String repositoryLabel; >- > private String repositoryDescription; > > public Composite createUI(Composite parent) { >@@ -96,7 +90,7 @@ > > if (provider == null) { > Label label = new Label(composite, SWT.NONE); >- label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1)); >+ label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); > label.setText(Messages.AddRepositoryComposite_RepositoryProvider); > > ComboViewer providersViewer = new ComboViewer(composite, SWT.NONE); >@@ -130,14 +124,13 @@ > } > > GridData gd_providerStack = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1); >- gd_providerStack.heightHint = 136; > providerStackLayout = new StackLayout(); > providerStack = new Composite(composite, SWT.NONE); > providerStack.setLayout(providerStackLayout); > providerStack.setLayoutData(gd_providerStack); > { > Label repositoryNameLabel = new Label(composite, SWT.NONE); >- repositoryNameLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1)); >+ repositoryNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); > repositoryNameLabel.setText(Messages.AddRepositoryComposite_RepositoryName); > > repositoryNameText = new Text(composite, SWT.BORDER); >@@ -145,11 +138,7 @@ > repositoryNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); > repositoryNameText.addModifyListener(new ModifyListener() { > public void modifyText(ModifyEvent e) { >- boolean labelUnchanged = ObjectUtil.equals(repositoryName, repositoryLabel); > repositoryName = repositoryNameText.getText(); >- if (labelUnchanged) { >- repositoryLabelText.setText(repositoryName); >- } > if (listener != null) { > listener.repositoryNameChanged(repositoryName); > } >@@ -157,25 +146,8 @@ > }); > } > { >- Label repositoryLabelLabel = new Label(composite, SWT.NONE); >- repositoryLabelLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1)); >- repositoryLabelLabel.setText(Messages.AddRepositoryComposite_RepositoryLabel); >- >- repositoryLabelText = new Text(composite, SWT.BORDER); >- // repositoryLabelText.setText(repositoryLabel); >- repositoryLabelText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); >- repositoryLabelText.addModifyListener(new ModifyListener() { >- public void modifyText(ModifyEvent e) { >- repositoryLabel = repositoryLabelText.getText(); >- if (listener != null) { >- listener.repositoryLabelChanged(repositoryLabel); >- } >- } >- }); >- } >- { > Label repositoryDescriptionLabel = new Label(composite, SWT.NONE); >- repositoryDescriptionLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1)); >+ repositoryDescriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); > repositoryDescriptionLabel.setText(Messages.AddRepositoryComposite_RepositoryDescription); > > repositoryDescriptionText = new Text(composite, SWT.BORDER); >@@ -214,8 +186,9 @@ > ECPProperties properties = ECPUtil.createProperties(); > > UIProvider uiProvider = UIProviderRegistry.INSTANCE.getUIProvider(name); >+ // since we don't have a dedicated Label-Text but use the Name-Text, we use repositoryNameText twice > control = uiProvider.createAddRepositoryUI(providerStack, properties, repositoryNameText, >- repositoryLabelText, repositoryDescriptionText); >+ repositoryNameText, repositoryDescriptionText); > providerControls.put(name, control); > providerProperties.put(name, properties); > } >@@ -260,7 +233,8 @@ > * @return > */ > public String getRepositoryLabel() { >- return repositoryLabel; >+ // since we don't have a dedicated label-textfield we use the repository name >+ return repositoryName; > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
eneufeld
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 394977
: 224308